
theorem Th61:
for f be PartFunc of REAL,REAL, a,b,r be Real st ].a,b.[ c= dom f &
 f is_improper_integrable_on a,b holds
  r(#)f is_improper_integrable_on a,b &
  improper_integral(r(#)f,a,b) = r * improper_integral(f,a,b)
proof
    let f be PartFunc of REAL,REAL, a,b,r be Real;
    assume that
A1:  ].a,b.[ c= dom f and
A2:  f is_improper_integrable_on a,b;

    consider c be Real such that
A3:  a < c < b and
     f is_left_improper_integrable_on a,c and
     f is_right_improper_integrable_on c,b and
A4:  not (left_improper_integral(f,a,c) = -infty
        & right_improper_integral(f,c,b) = +infty) and
A5:  not (left_improper_integral(f,a,c) = +infty
        & right_improper_integral(f,c,b) = -infty) by A2;

    ].a,c.] c= ].a,b.[ & [.c,b.[ c= ].a,b.[ by A3,XXREAL_1:48,49; then
A6: ].a,c.] c= dom f & [.c,b.[ c= dom f by A1;

    f is_left_improper_integrable_on a,c
  & f is_right_improper_integrable_on c,b by A1,A2,A3,Th48; then
A7: r(#)f is_left_improper_integrable_on a,c
  & r(#)f is_right_improper_integrable_on c,b
  & left_improper_integral(r(#)f,a,c) = r * left_improper_integral(f,a,c)
  & right_improper_integral(r(#)f,c,b) = r * right_improper_integral(f,c,b)
  by A3,A6,Th53,Th54;

A8: left_improper_integral(r(#)f,a,c) + right_improper_integral(r(#)f,c,b)
     = r * (left_improper_integral(f,a,c) + right_improper_integral(f,c,b))
       by A7,XXREAL_3:95
    .= r * improper_integral(f,a,b) by A1,A2,A3,Th48;

A9: dom(r(#)f) = dom f by VALUED_1:def 5;

    per cases;
    suppose r = 0;
     hence r(#)f is_improper_integrable_on a,b by A3,A7;
     hence improper_integral(r(#)f,a,b) = r * improper_integral(f,a,b)
       by A1,A3,A8,A9,Th48;
    end;
    suppose A10: r > 0;
A11:  now assume A12: left_improper_integral(r(#)f,a,c) = -infty
       & right_improper_integral(r(#)f,c,b) = +infty; then
      left_improper_integral(f,a,c) = +infty or
      left_improper_integral(f,a,c) = -infty by A7,XXREAL_3:70;
      hence contradiction by A4,A12,A7,A10,XXREAL_3:69;
     end;

A13:  now assume A14: left_improper_integral(r(#)f,a,c) = +infty
       & right_improper_integral(r(#)f,c,b) = -infty; then
      left_improper_integral(f,a,c) = +infty or
      left_improper_integral(f,a,c) = -infty by A7,XXREAL_3:69;
      hence contradiction by A5,A14,A7,A10,XXREAL_3:70;
     end;

     thus r(#)f is_improper_integrable_on a,b by A3,A7,A11,A13;
     hence improper_integral(r(#)f,a,b) = r * improper_integral(f,a,b)
       by A1,A3,A8,A9,Th48;
    end;
    suppose A15: r < 0;
A16:  now assume A17: left_improper_integral(r(#)f,a,c) = -infty
       & right_improper_integral(r(#)f,c,b) = +infty; then
      left_improper_integral(f,a,c) = +infty or
      left_improper_integral(f,a,c) = -infty by A7,XXREAL_3:70;
      hence contradiction by A5,A17,A7,A15,XXREAL_3:69;
     end;

A18:  now assume A19: left_improper_integral(r(#)f,a,c) = +infty
       & right_improper_integral(r(#)f,c,b) = -infty; then
      left_improper_integral(f,a,c) = +infty or
      left_improper_integral(f,a,c) = -infty by A7,XXREAL_3:69;
      hence contradiction by A4,A19,A7,A15,XXREAL_3:70;
     end;

     thus r(#)f is_improper_integrable_on a,b by A3,A7,A16,A18;
     hence improper_integral(r(#)f,a,b) = r * improper_integral(f,a,b)
       by A1,A3,A8,A9,Th48;
    end;
end;
