let f, g be PartFunc of REAL,REAL; :: thesis: for a, b being Real st a < b & ['a,b'] c= dom f & ['a,b'] c= dom g & f is_left_ext_Riemann_integrable_on a,b & g is_left_ext_Riemann_integrable_on a,b holds
( f + g is_left_ext_Riemann_integrable_on a,b & ext_left_integral ((f + g),a,b) = (ext_left_integral (f,a,b)) + (ext_left_integral (g,a,b)) )

let a, b be Real; :: thesis: ( a < b & ['a,b'] c= dom f & ['a,b'] c= dom g & f is_left_ext_Riemann_integrable_on a,b & g is_left_ext_Riemann_integrable_on a,b implies ( f + g is_left_ext_Riemann_integrable_on a,b & ext_left_integral ((f + g),a,b) = (ext_left_integral (f,a,b)) + (ext_left_integral (g,a,b)) ) )
assume that
A1: a < b and
A2: ( ['a,b'] c= dom f & ['a,b'] c= dom g ) and
A3: f is_left_ext_Riemann_integrable_on a,b and
A4: g is_left_ext_Riemann_integrable_on a,b ; :: thesis: ( f + g is_left_ext_Riemann_integrable_on a,b & ext_left_integral ((f + g),a,b) = (ext_left_integral (f,a,b)) + (ext_left_integral (g,a,b)) )
consider Intg being PartFunc of REAL,REAL such that
A5: dom Intg = ].a,b.] and
A6: for x being Real st x in dom Intg holds
Intg . x = integral (g,x,b) and
A7: Intg is_right_convergent_in a and
A8: ext_left_integral (g,a,b) = lim_right (Intg,a) by ;
consider Intf being PartFunc of REAL,REAL such that
A9: dom Intf = ].a,b.] and
A10: for x being Real st x in dom Intf holds
Intf . x = integral (f,x,b) and
A11: Intf is_right_convergent_in a and
A12: ext_left_integral (f,a,b) = lim_right (Intf,a) by ;
set Intfg = Intf + Intg;
A13: ( dom (Intf + Intg) = ].a,b.] & ( for x being Real st x in dom (Intf + Intg) holds
(Intf + Intg) . x = integral ((f + g),x,b) ) )
proof
A14: ['a,b'] = [.a,b.] by ;
thus A15: dom (Intf + Intg) = (dom Intf) /\ (dom Intg) by VALUED_1:def 1
.= ].a,b.] by A9, A5 ; :: thesis: for x being Real st x in dom (Intf + Intg) holds
(Intf + Intg) . x = integral ((f + g),x,b)

let x be Real; :: thesis: ( x in dom (Intf + Intg) implies (Intf + Intg) . x = integral ((f + g),x,b) )
assume A16: x in dom (Intf + Intg) ; :: thesis: (Intf + Intg) . x = integral ((f + g),x,b)
then A17: a < x by ;
then A18: [.x,b.] c= [.a,b.] by XXREAL_1:34;
A19: x <= b by ;
then A20: ( f is_integrable_on ['x,b'] & f | ['x,b'] is bounded ) by ;
['x,b'] = [.x,b.] by ;
then A21: ( ['x,b'] c= dom f & ['x,b'] c= dom g ) by A2, A14, A18;
A22: ( g is_integrable_on ['x,b'] & g | ['x,b'] is bounded ) by A4, A17, A19;
thus (Intf + Intg) . x = (Intf . x) + (Intg . x) by
.= (integral (f,x,b)) + (Intg . x) by A9, A10, A15, A16
.= (integral (f,x,b)) + (integral (g,x,b)) by A5, A6, A15, A16
.= integral ((f + g),x,b) by ; :: thesis: verum
end;
A23: for r being Real st a < r holds
ex g being Real st
( g < r & a < g & g in dom (Intf + Intg) )
proof
let r be Real; :: thesis: ( a < r implies ex g being Real st
( g < r & a < g & g in dom (Intf + Intg) ) )

assume A24: a < r ; :: thesis: ex g being Real st
( g < r & a < g & g in dom (Intf + Intg) )

per cases ( b < r or not b < r ) ;
suppose A25: b < r ; :: thesis: ex g being Real st
( g < r & a < g & g in dom (Intf + Intg) )

reconsider g = b as Real ;
take g ; :: thesis: ( g < r & a < g & g in dom (Intf + Intg) )
thus ( g < r & a < g & g in dom (Intf + Intg) ) by ; :: thesis: verum
end;
suppose A26: not b < r ; :: thesis: ex g being Real st
( g < r & a < g & g in dom (Intf + Intg) )

reconsider g = r - ((r - a) / 2) as Real ;
take g ; :: thesis: ( g < r & a < g & g in dom (Intf + Intg) )
A27: 0 < r - a by ;
then (r - a) / 2 < r - a by XREAL_1:216;
then A28: ((r - a) / 2) + (a - ((r - a) / 2)) < (r - a) + (a - ((r - a) / 2)) by XREAL_1:8;
A29: 0 < (r - a) / 2 by ;
then r - ((r - a) / 2) < b - 0 by ;
hence ( g < r & a < g & g in dom (Intf + Intg) ) by ; :: thesis: verum
end;
end;
end;
then A30: Intf + Intg is_right_convergent_in a by ;
for d being Real st a < d & d <= b holds
( f + g is_integrable_on ['d,b'] & (f + g) | ['d,b'] is bounded )
proof
let d be Real; :: thesis: ( a < d & d <= b implies ( f + g is_integrable_on ['d,b'] & (f + g) | ['d,b'] is bounded ) )
assume A31: ( a < d & d <= b ) ; :: thesis: ( f + g is_integrable_on ['d,b'] & (f + g) | ['d,b'] is bounded )
then A32: ( ['d,b'] = [.d,b.] & [.d,b.] c= [.a,b.] ) by ;
['a,b'] = [.a,b.] by ;
then A33: ( ['d,b'] c= dom f & ['d,b'] c= dom g ) by ;
A34: ( f is_integrable_on ['d,b'] & g is_integrable_on ['d,b'] ) by A3, A4, A31;
A35: ( f | ['d,b'] is bounded & g | ['d,b'] is bounded ) by A3, A4, A31;
then (f + g) | (['d,b'] /\ ['d,b']) is bounded by RFUNCT_1:83;
hence ( f + g is_integrable_on ['d,b'] & (f + g) | ['d,b'] is bounded ) by ; :: thesis: verum
end;
hence A36: f + g is_left_ext_Riemann_integrable_on a,b by ; :: thesis: ext_left_integral ((f + g),a,b) = (ext_left_integral (f,a,b)) + (ext_left_integral (g,a,b))
lim_right ((Intf + Intg),a) = (ext_left_integral (f,a,b)) + (ext_left_integral (g,a,b)) by ;
hence ext_left_integral ((f + g),a,b) = (ext_left_integral (f,a,b)) + (ext_left_integral (g,a,b)) by ; :: thesis: verum