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_improper_integrable_on a,b & g is_left_improper_integrable_on a,b & ( not left_improper_integral (f,a,b) = +infty or not left_improper_integral (g,a,b) = -infty ) & ( not left_improper_integral (f,a,b) = -infty or not left_improper_integral (g,a,b) = +infty ) holds
( f + g is_left_improper_integrable_on a,b & left_improper_integral ((f + g),a,b) = (left_improper_integral (f,a,b)) + (left_improper_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_improper_integrable_on a,b & g is_left_improper_integrable_on a,b & ( not left_improper_integral (f,a,b) = +infty or not left_improper_integral (g,a,b) = -infty ) & ( not left_improper_integral (f,a,b) = -infty or not left_improper_integral (g,a,b) = +infty ) implies ( f + g is_left_improper_integrable_on a,b & left_improper_integral ((f + g),a,b) = (left_improper_integral (f,a,b)) + (left_improper_integral (g,a,b)) ) )
assume that
A1: a < b and
A2: ].a,b.] c= dom f and
A3: ].a,b.] c= dom g and
A4: f is_left_improper_integrable_on a,b and
A5: g is_left_improper_integrable_on a,b and
A6: ( not left_improper_integral (f,a,b) = +infty or not left_improper_integral (g,a,b) = -infty ) and
A7: ( not left_improper_integral (f,a,b) = -infty or not left_improper_integral (g,a,b) = +infty ) ; :: thesis: ( f + g is_left_improper_integrable_on a,b & left_improper_integral ((f + g),a,b) = (left_improper_integral (f,a,b)) + (left_improper_integral (g,a,b)) )
A8: 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 A9: ( a < d & d <= b ) ; :: thesis: ( f + g is_integrable_on ['d,b'] & (f + g) | ['d,b'] is bounded )
then A10: ( f is_integrable_on ['d,b'] & f | ['d,b'] is bounded & g is_integrable_on ['d,b'] & g | ['d,b'] is bounded ) by A4, A5;
[.d,b.] c= ].a,b.] by A9, XXREAL_1:39;
then ['d,b'] c= ].a,b.] by A9, INTEGRA5:def 3;
then ( ['d,b'] c= dom f & ['d,b'] c= dom g ) by A2, A3;
hence f + g is_integrable_on ['d,b'] by A10, INTEGRA6:11; :: thesis: (f + g) | ['d,b'] is bounded
(f + g) | (['d,b'] /\ ['d,b']) is bounded by A10, RFUNCT_1:83;
hence (f + g) | ['d,b'] is bounded ; :: thesis: verum
end;
per cases ( ( f is_left_ext_Riemann_integrable_on a,b & g is_left_ext_Riemann_integrable_on a,b ) or ( f is_left_ext_Riemann_integrable_on a,b & not g is_left_ext_Riemann_integrable_on a,b ) or ( not f is_left_ext_Riemann_integrable_on a,b & g is_left_ext_Riemann_integrable_on a,b ) or ( not f is_left_ext_Riemann_integrable_on a,b & not g is_left_ext_Riemann_integrable_on a,b ) ) ;
suppose A11: ( f is_left_ext_Riemann_integrable_on a,b & g is_left_ext_Riemann_integrable_on a,b ) ; :: thesis: ( f + g is_left_improper_integrable_on a,b & left_improper_integral ((f + g),a,b) = (left_improper_integral (f,a,b)) + (left_improper_integral (g,a,b)) )
end;
suppose A14: ( f is_left_ext_Riemann_integrable_on a,b & not g is_left_ext_Riemann_integrable_on a,b ) ; :: thesis: ( f + g is_left_improper_integrable_on a,b & left_improper_integral ((f + g),a,b) = (left_improper_integral (f,a,b)) + (left_improper_integral (g,a,b)) )
then A15: left_improper_integral (f,a,b) = ext_left_integral (f,a,b) by A4, Th34;
consider Intf being PartFunc of REAL,REAL such that
A16: dom Intf = ].a,b.] and
A17: for x being Real st x in dom Intf holds
Intf . x = integral (f,x,b) and
A18: Intf is_right_convergent_in a by A14, INTEGR10:def 2;
consider Intg being PartFunc of REAL,REAL such that
A19: dom Intg = ].a,b.] and
A20: for x being Real st x in dom Intg holds
Intg . x = integral (g,x,b) and
( Intg is_right_convergent_in a or Intg is_right_divergent_to+infty_in a or Intg is_right_divergent_to-infty_in a ) by A5;
A21: dom (Intf + Intg) = ].a,b.] /\ ].a,b.] by A16, A19, VALUED_1:def 1
.= ].a,b.] ;
A22: for x being Real st x in dom (Intf + Intg) holds
(Intf + Intg) . x = integral ((f + g),x,b)
proof
let x be Real; :: thesis: ( x in dom (Intf + Intg) implies (Intf + Intg) . x = integral ((f + g),x,b) )
assume A23: x in dom (Intf + Intg) ; :: thesis: (Intf + Intg) . x = integral ((f + g),x,b)
then A24: ( a < x & x <= b ) by A21, XXREAL_1:2;
then [.x,b.] c= ].a,b.] by XXREAL_1:39;
then A25: ( [.x,b.] c= dom f & [.x,b.] c= dom g ) by A2, A3;
A26: ['x,b'] = [.x,b.] by A24, INTEGRA5:def 3;
( f is_integrable_on ['x,b'] & f | ['x,b'] is bounded & g is_integrable_on ['x,b'] & g | ['x,b'] is bounded ) by A4, A5, A24;
then integral ((f + g),['x,b']) = (integral (f,['x,b'])) + (integral (g,['x,b'])) by A25, A26, INTEGRA6:11;
then A27: integral ((f + g),x,b) = (integral (f,['x,b'])) + (integral (g,['x,b'])) by A24, INTEGRA5:def 4
.= (integral (f,x,b)) + (integral (g,['x,b'])) by A24, INTEGRA5:def 4
.= (integral (f,x,b)) + (integral (g,x,b)) by A24, INTEGRA5:def 4 ;
(Intf + Intg) . x = (Intf . x) + (Intg . x) by A23, VALUED_1:def 1
.= (integral (f,x,b)) + (Intg . x) by A23, A21, A16, A17
.= (integral (f,x,b)) + (integral (g,x,b)) by A23, A21, A19, A20 ;
hence (Intf + Intg) . x = integral ((f + g),x,b) by A27; :: thesis: verum
end;
A28: 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 a < r ; :: thesis: ex g being Real st
( g < r & a < g & g in dom (Intf + Intg) )

then consider g being Real such that
A29: ( a < g & g < min (b,r) ) by A1, XXREAL_0:21, XREAL_1:5;
take g ; :: thesis: ( g < r & a < g & g in dom (Intf + Intg) )
( min (b,r) <= b & min (b,r) <= r ) by XXREAL_0:17;
then ( g < b & g < r ) by A29, XXREAL_0:2;
hence ( g < r & a < g & g in dom (Intf + Intg) ) by A29, A21, XXREAL_1:2; :: thesis: verum
end;
per cases ( left_improper_integral (g,a,b) = +infty or left_improper_integral (g,a,b) = -infty ) by A5, A14, Th34;
suppose A30: left_improper_integral (g,a,b) = +infty ; :: thesis: ( f + g is_left_improper_integrable_on a,b & left_improper_integral ((f + g),a,b) = (left_improper_integral (f,a,b)) + (left_improper_integral (g,a,b)) )
end;
suppose A34: left_improper_integral (g,a,b) = -infty ; :: thesis: ( f + g is_left_improper_integrable_on a,b & left_improper_integral ((f + g),a,b) = (left_improper_integral (f,a,b)) + (left_improper_integral (g,a,b)) )
end;
end;
end;
suppose A38: ( not f is_left_ext_Riemann_integrable_on a,b & g is_left_ext_Riemann_integrable_on a,b ) ; :: thesis: ( f + g is_left_improper_integrable_on a,b & left_improper_integral ((f + g),a,b) = (left_improper_integral (f,a,b)) + (left_improper_integral (g,a,b)) )
then A39: left_improper_integral (g,a,b) = ext_left_integral (g,a,b) by A5, Th34;
consider Intg being PartFunc of REAL,REAL such that
A40: dom Intg = ].a,b.] and
A41: for x being Real st x in dom Intg holds
Intg . x = integral (g,x,b) and
A42: Intg is_right_convergent_in a by A38, INTEGR10:def 2;
consider Intf being PartFunc of REAL,REAL such that
A43: dom Intf = ].a,b.] and
A44: for x being Real st x in dom Intf holds
Intf . x = integral (f,x,b) and
( Intf is_right_convergent_in a or Intf is_right_divergent_to+infty_in a or Intf is_right_divergent_to-infty_in a ) by A4;
A45: dom (Intf + Intg) = ].a,b.] /\ ].a,b.] by A40, A43, VALUED_1:def 1
.= ].a,b.] ;
A46: for x being Real st x in dom (Intf + Intg) holds
(Intf + Intg) . x = integral ((f + g),x,b)
proof
let x be Real; :: thesis: ( x in dom (Intf + Intg) implies (Intf + Intg) . x = integral ((f + g),x,b) )
assume A47: x in dom (Intf + Intg) ; :: thesis: (Intf + Intg) . x = integral ((f + g),x,b)
then A48: ( a < x & x <= b ) by A45, XXREAL_1:2;
then [.x,b.] c= ].a,b.] by XXREAL_1:39;
then A49: ( [.x,b.] c= dom f & [.x,b.] c= dom g ) by A2, A3;
A50: ['x,b'] = [.x,b.] by A48, INTEGRA5:def 3;
( f is_integrable_on ['x,b'] & f | ['x,b'] is bounded & g is_integrable_on ['x,b'] & g | ['x,b'] is bounded ) by A4, A5, A48;
then integral ((f + g),['x,b']) = (integral (f,['x,b'])) + (integral (g,['x,b'])) by A49, A50, INTEGRA6:11;
then A51: integral ((f + g),x,b) = (integral (f,['x,b'])) + (integral (g,['x,b'])) by A48, INTEGRA5:def 4
.= (integral (f,x,b)) + (integral (g,['x,b'])) by A48, INTEGRA5:def 4
.= (integral (f,x,b)) + (integral (g,x,b)) by A48, INTEGRA5:def 4 ;
(Intf + Intg) . x = (Intf . x) + (Intg . x) by A47, VALUED_1:def 1
.= (integral (f,x,b)) + (Intg . x) by A47, A45, A43, A44
.= (integral (f,x,b)) + (integral (g,x,b)) by A47, A45, A40, A41 ;
hence (Intf + Intg) . x = integral ((f + g),x,b) by A51; :: thesis: verum
end;
A52: 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 a < r ; :: thesis: ex g being Real st
( g < r & a < g & g in dom (Intf + Intg) )

then consider g being Real such that
A53: ( a < g & g < min (b,r) ) by A1, XXREAL_0:21, XREAL_1:5;
take g ; :: thesis: ( g < r & a < g & g in dom (Intf + Intg) )
( min (b,r) <= b & min (b,r) <= r ) by XXREAL_0:17;
then ( g < b & g < r ) by A53, XXREAL_0:2;
hence ( g < r & a < g & g in dom (Intf + Intg) ) by A53, A45, XXREAL_1:2; :: thesis: verum
end;
per cases ( left_improper_integral (f,a,b) = +infty or left_improper_integral (f,a,b) = -infty ) by A4, A38, Th34;
suppose A54: left_improper_integral (f,a,b) = +infty ; :: thesis: ( f + g is_left_improper_integrable_on a,b & left_improper_integral ((f + g),a,b) = (left_improper_integral (f,a,b)) + (left_improper_integral (g,a,b)) )
end;
suppose A56: left_improper_integral (f,a,b) = -infty ; :: thesis: ( f + g is_left_improper_integrable_on a,b & left_improper_integral ((f + g),a,b) = (left_improper_integral (f,a,b)) + (left_improper_integral (g,a,b)) )
end;
end;
end;
suppose A58: ( not f is_left_ext_Riemann_integrable_on a,b & not g is_left_ext_Riemann_integrable_on a,b ) ; :: thesis: ( f + g is_left_improper_integrable_on a,b & left_improper_integral ((f + g),a,b) = (left_improper_integral (f,a,b)) + (left_improper_integral (g,a,b)) )
consider Intf being PartFunc of REAL,REAL such that
A59: dom Intf = ].a,b.] and
A60: for x being Real st x in dom Intf holds
Intf . x = integral (f,x,b) and
( Intf is_right_convergent_in a or Intf is_right_divergent_to+infty_in a or Intf is_right_divergent_to-infty_in a ) by A4;
consider Intg being PartFunc of REAL,REAL such that
A61: dom Intg = ].a,b.] and
A62: for x being Real st x in dom Intg holds
Intg . x = integral (g,x,b) and
( Intg is_right_convergent_in a or Intg is_right_divergent_to+infty_in a or Intg is_right_divergent_to-infty_in a ) by A5;
A63: dom (Intf + Intg) = ].a,b.] /\ ].a,b.] by A61, A59, VALUED_1:def 1
.= ].a,b.] ;
A64: for x being Real st x in dom (Intf + Intg) holds
(Intf + Intg) . x = integral ((f + g),x,b)
proof
let x be Real; :: thesis: ( x in dom (Intf + Intg) implies (Intf + Intg) . x = integral ((f + g),x,b) )
assume A65: x in dom (Intf + Intg) ; :: thesis: (Intf + Intg) . x = integral ((f + g),x,b)
then A66: ( a < x & x <= b ) by A63, XXREAL_1:2;
then [.x,b.] c= ].a,b.] by XXREAL_1:39;
then A67: ( [.x,b.] c= dom f & [.x,b.] c= dom g ) by A2, A3;
A68: ['x,b'] = [.x,b.] by A66, INTEGRA5:def 3;
( f is_integrable_on ['x,b'] & f | ['x,b'] is bounded & g is_integrable_on ['x,b'] & g | ['x,b'] is bounded ) by A4, A5, A66;
then integral ((f + g),['x,b']) = (integral (f,['x,b'])) + (integral (g,['x,b'])) by A67, A68, INTEGRA6:11;
then A69: integral ((f + g),x,b) = (integral (f,['x,b'])) + (integral (g,['x,b'])) by A66, INTEGRA5:def 4
.= (integral (f,x,b)) + (integral (g,['x,b'])) by A66, INTEGRA5:def 4
.= (integral (f,x,b)) + (integral (g,x,b)) by A66, INTEGRA5:def 4 ;
(Intf + Intg) . x = (Intf . x) + (Intg . x) by A65, VALUED_1:def 1
.= (integral (f,x,b)) + (Intg . x) by A65, A63, A59, A60
.= (integral (f,x,b)) + (integral (g,x,b)) by A65, A63, A61, A62 ;
hence (Intf + Intg) . x = integral ((f + g),x,b) by A69; :: thesis: verum
end;
A70: 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 a < r ; :: thesis: ex g being Real st
( g < r & a < g & g in dom (Intf + Intg) )

then consider g being Real such that
A71: ( a < g & g < min (b,r) ) by A1, XXREAL_0:21, XREAL_1:5;
take g ; :: thesis: ( g < r & a < g & g in dom (Intf + Intg) )
( min (b,r) <= b & min (b,r) <= r ) by XXREAL_0:17;
then ( g < b & g < r ) by A71, XXREAL_0:2;
hence ( g < r & a < g & g in dom (Intf + Intg) ) by A71, A63, XXREAL_1:2; :: thesis: verum
end;
per cases ( left_improper_integral (f,a,b) = +infty or left_improper_integral (f,a,b) = -infty ) by A4, A58, Th34;
suppose A72: left_improper_integral (f,a,b) = +infty ; :: thesis: ( f + g is_left_improper_integrable_on a,b & left_improper_integral ((f + g),a,b) = (left_improper_integral (f,a,b)) + (left_improper_integral (g,a,b)) )
end;
suppose A76: left_improper_integral (f,a,b) = -infty ; :: thesis: ( f + g is_left_improper_integrable_on a,b & left_improper_integral ((f + g),a,b) = (left_improper_integral (f,a,b)) + (left_improper_integral (g,a,b)) )
end;
end;
end;
end;