
theorem Th33:
for a,b be Real, f be PartFunc of REAL,REAL st [.a,b.[ c= dom f
 & f is_right_improper_integrable_on a,b
 holds for E be Element of L-Field st E c= [.a,b.[ holds f is E-measurable
proof
    let a,b be Real, f be PartFunc of REAL,REAL;
    assume that
A1: [.a,b.[ c= dom f and
A2:  f is_right_improper_integrable_on a,b;

    per cases;
    suppose A3: a < b;
     reconsider A = [.a,b.[ as Element of L-Field by MEASUR12:72,75;
     set dif = b-a;

     consider K be SetSequence of L-Field such that
A4:   (for n be Nat holds K.n = [.a,b-(b-a)/(n+1).] & K.n c= [.a,b.[ &
       K.n is non empty closed_interval Subset of REAL) &
      K is non-descending &
      K is convergent &
      Union K = A by A3,Th23;
     rng K c= L-Field; then
     reconsider K1 = K as sequence of L-Field by FUNCT_2:6;

     for n be Nat holds (R_EAL f) is (K1.n)-measurable
     proof
      let n be Nat;
      K.n is non empty by A4; then
      [.a,b-(b-a)/(n+1).] <> {} by A4; then
A5:   a <= b-(b-a)/(n+1) by XXREAL_1:29;
      K.n c= [.a,b.[ by A4; then
      [.a,b-(b-a)/(n+1).] c= [.a,b.[ by A4; then
A6:   a<= b-dif/(n+1) < b by A5,XXREAL_1:54;

      reconsider Kn = K.n as non empty closed_interval Subset of REAL by A4;

      Kn = [.a,b-dif/(n+1).] by A4; then
      Kn = [' a,b-dif/(n+1) '] by XXREAL_1:29,INTEGRA5:def 3; then
A7:   f is_integrable_on Kn & f||Kn is bounded by A6,A2,INTEGR24:def 2;

      Kn c= [.a,b.[ by A4; then
      Kn c= dom f by A1;
      hence (R_EAL f) is (K1.n)-measurable by A7,MESFUN14:49,MESFUNC6:def 1;
     end; then
     f is (Union K1)-measurable by Th21,MESFUNC6:def 1;
     hence for E be Element of L-Field st E c= [.a,b.[ holds
      f is E-measurable by A4,MESFUNC6:16;
    end;
    suppose a >= b; then
A8:  [.a,b.[ = {} by XXREAL_1:27;
     hereby let E be Element of L-Field;
      assume E c= [.a,b.[; then
      E = {} by A8;
      hence f is E-measurable by Th30;
     end;
    end;
end;
