
theorem Th42:
for I,J,K be non empty closed_interval Subset of REAL,
 f be PartFunc of [:[:RNS_Real,RNS_Real:],RNS_Real:],RNS_Real,
 g be PartFunc of [:[:REAL,REAL:],REAL:],REAL,
 E be Element of sigma measurable_rectangles(L-Field,L-Field)
 st [:[:I,J:],K:] = dom f & f is_continuous_on [:[:I,J:],K:] & f = g
  holds Integral2(L-Meas,|.R_EAL g.|) is E-measurable
proof
    let I,J,K be non empty closed_interval Subset of REAL,
    f be PartFunc of [:[:RNS_Real,RNS_Real:],RNS_Real:],RNS_Real,
    g be PartFunc of [:[:REAL,REAL:],REAL:],REAL,
    E be Element of sigma measurable_rectangles(L-Field,L-Field);
    assume that
A1: [:[:I,J:],K:] = dom f and
A2: f is_continuous_on [:[:I,J:],K:] and
A3: f = g;

    set F = Integral2(L-Meas,|.R_EAL g.|);
    set RF = Integral2(L-Meas,R_EAL g);
    set IJ = [:I,J:];

A4: dom F = [:REAL,REAL:] by FUNCT_2:def 1; then
A5: dom(F| [: I,J:]) =[:I,J:];
A6: dom RF = [:REAL,REAL:] by FUNCT_2:def 1;

    set F0 = F|IJ;
    set RF0 = RF|IJ;
    reconsider K0 = K as Element of L-Field by MEASUR10:5,MEASUR12:75;
    reconsider G = Integral2(L-Meas,|.R_EAL g.|)|IJ
      as PartFunc of [:REAL,REAL:],REAL by A1,A2,A3,Th32;
    reconsider RG = Integral2(L-Meas,R_EAL g)|IJ
      as PartFunc of [:REAL,REAL:],REAL by A1,A2,A3,Th32;

    I in L-Field & J in L-Field by MEASUR10:5,MEASUR12:75; then
A7: [:I,J:] in measurable_rectangles(L-Field,L-Field);

    measurable_rectangles(L-Field,L-Field)
      c= sigma measurable_rectangles(L-Field,L-Field) by PROB_1:def 9;
     then
    reconsider AB = [:I,J:] as Element of
     sigma measurable_rectangles(L-Field,L-Field) by A7;

    reconsider GG = G as PartFunc of [:RNS_Real,RNS_Real:],RNS_Real;
    reconsider RGG = RG as PartFunc of [:RNS_Real,RNS_Real:],RNS_Real;

    GG is_uniformly_continuous_on [:I,J:] by A1,A2,A3,Th33; then
    GG is_continuous_on [:I,J:] by NFCONT_2:7; then
    G is_integrable_on Prod_Measure(L-Meas,L-Meas)
      by A4,MESFUN16:57; then
A8: F0 is_integrable_on Prod_Measure(L-Meas,L-Meas) by MESFUNC5:def 7;

    RGG is_uniformly_continuous_on [:I,J:] by A1,A2,A3,Th34; then
A9:RGG is_continuous_on [:I,J:] by NFCONT_2:7;

    reconsider RG1 = Integral2(L-Meas,R_EAL RG)|I as PartFunc of REAL,REAL
     by A6,A9,MESFUN16:51;

    [:REAL,REAL:] in sigma measurable_rectangles(L-Field,L-Field)
      by PROB_1:5; then
    reconsider NAB = [:REAL,REAL:] \ AB
      as Element of sigma measurable_rectangles(L-Field,L-Field) by PROB_1:6;

A10:AB \/ NAB = [:REAL,REAL:] by XBOOLE_1:45;

A11:F is nonnegative by A1,A2,A3,Th38;

    reconsider H = [:REAL,REAL:]
      as Element of sigma measurable_rectangles(L-Field,L-Field) by PROB_1:5;

    for r being Real holds H /\ (less_dom(F,r))
      in sigma measurable_rectangles(L-Field,L-Field)
    proof
     let r be Real;
    consider H0 being Element of sigma measurable_rectangles(L-Field,L-Field)
    such that
A12:H0 = dom F0 & F0 is H0 -measurable by A8,MESFUNC5:def 17;

    per cases;
    suppose
A13: r <= 0;

     now assume less_dom(F,r) <> {}; then
      consider x be object such that
A14:  x in less_dom(F,r) by XBOOLE_0:def 1;
      x in dom F & F.x < r by MESFUNC1:def 11,A14;
      hence contradiction by A11,A13;
     end;
     hence H /\ less_dom(F,r) in sigma measurable_rectangles(L-Field,L-Field)
        by PROB_1:4;
    end;
    suppose
A15: 0 < r;

A16: H0 /\ less_dom (F0,r) in sigma measurable_rectangles(L-Field,L-Field)
        by A12;

     for z be object holds z in less_dom(F,r) iff z in less_dom(F0,r) \/ NAB
     proof
      let z be object;
      hereby assume
A17:   z in less_dom(F,r); then
A18:   z in dom F & F.z < r by MESFUNC1:def 11;

       per cases by A17,A10,XBOOLE_0:def 3;
       suppose
A19:    z in AB; then
        F0.z < r by FUNCT_1:49,A18; then
        z in less_dom(F0,r) by A19,A5,MESFUNC1:def 11;
        hence z in less_dom(F0,r) \/ NAB by XBOOLE_0:def 3;
       end;
       suppose z in NAB;
        hence z in less_dom(F0,r) \/ NAB by XBOOLE_0:def 3;
       end;
      end;

      assume z in less_dom (F0,r) \/ NAB; then
      per cases by XBOOLE_0:def 3;
      suppose
A20:   z in less_dom(F0,r); then
A21:   z in dom F0 & F0.z < r by MESFUNC1:def 11;
A22:   F.z < r by A4,A21,FUNCT_1:49;

       dom F = [:REAL,REAL:] by FUNCT_2:def 1;
       hence z in less_dom(F,r) by A20,A22,MESFUNC1:def 11;
      end;
      suppose
A23:   z in NAB; then
       reconsider x=z as Element of [:REAL,REAL:];
       not z in AB by A23,XBOOLE_0:def 5; then
A24:   F.x < r by A15,A1,A3,Lm4;
       dom F = [:REAL,REAL:] by FUNCT_2:def 1;
       hence z in less_dom(F,r) by A24,MESFUNC1:def 11;
      end;
     end; then
     less_dom(F,r) = less_dom(F0,r) \/ NAB by TARSKI:2; then
A25: H /\ less_dom(F,r)
       = AB /\ (less_dom(F0,r) \/ NAB) \/ NAB /\ (less_dom(F0,r) \/ NAB)
         by A10,XBOOLE_1:23;

A26: AB /\ (less_dom(F0,r) \/ NAB) = AB /\ less_dom(F0,r) by XBOOLE_1:78,85;

     less_dom(F0,r) c= AB by A5,MESFUNC1:def 11; then
     NAB misses less_dom(F0,r); then
     NAB /\ (less_dom(F0,r) \/ NAB) = NAB /\ NAB by XBOOLE_1:78;
     hence H /\ less_dom(F,r) in sigma measurable_rectangles(L-Field,L-Field)
         by A16,A4,A12,A25,A26,PROB_1:3;
    end;
    end; then
    F is H-measurable;
    hence thesis by MESFUNC1:30;
end;
