
theorem
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 being 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 F0 = F| [:I,J:];

A4: dom F = [:REAL,REAL:] by FUNCT_2:def 1; then
A5: dom F0 = [:I,J:];

    reconsider G = F0 as PartFunc of [:REAL,REAL:],REAL by A1,A2,A3,Th32;
    reconsider GG = G 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
A6: F0 is_integrable_on Prod_Measure(L-Meas,L-Meas) by MESFUNC5:def 7;

    reconsider IJ = [:I,J:] as
      Element of sigma measurable_rectangles(L-Field,L-Field) by MESFUN16:11;
    reconsider R2 = [:REAL,REAL:]
     as Element of sigma measurable_rectangles(L-Field,L-Field) by PROB_1:5;
    set NIJ = R2 \ IJ;

A7: IJ \/ NIJ = [:REAL,REAL:] by XBOOLE_1:45;
A8:IJ /\ NIJ = {} by XBOOLE_1:85,XBOOLE_0:def 7;

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

    for r being Real holds R2 /\ (less_dom(F,r))
      in sigma measurable_rectangles(L-Field,L-Field)
    proof
     let r be Real;
A10: ex E be Element of sigma measurable_rectangles(L-Field,L-Field)
      st E = dom F0 & F0 is E-measurable by A6,MESFUNC5:def 17;

     per cases;
     suppose
A11:  r <= 0;
      less_dom(F,r) = {}
      proof
       assume less_dom(F,r) <> {}; then
       consider x be object such that
A12:   x in less_dom(F,r) by XBOOLE_0:def 1;
       x in dom F & F.x < r by A12,MESFUNC1:def 11;
       hence contradiction by A9,A11;
      end;
      hence R2 /\ less_dom(F,r) in sigma measurable_rectangles(L-Field,L-Field)
        by PROB_1:4;
     end;
     suppose
A13:  0 < r;
      for z be object holds z in less_dom(F,r) iff z in less_dom(F0,r) \/ NIJ
      proof
       let z be object;
       hereby assume
A14:    z in less_dom(F,r); then
A15:    F.z < r by MESFUNC1:def 11;

A16:    z in NIJ implies z in less_dom(F0,r) \/ NIJ by XBOOLE_0:def 3;
        now assume
A17:     z in IJ; then
         F0.z < r by A15,FUNCT_1:49; then
         z in less_dom(F0,r) by A5,A17,MESFUNC1:def 11;
         hence z in less_dom(F0,r) \/ NIJ by XBOOLE_0:def 3;
        end;
        hence z in less_dom(F0,r) \/ NIJ by A7,A14,A16,XBOOLE_0:def 3;
       end;

       assume z in less_dom (F0,r) \/ NIJ; then
       per cases by XBOOLE_0:def 3;
       suppose
A18:    z in less_dom(F0,r); then
        z in dom F0 & F0.z < r by MESFUNC1:def 11; then
        F.z < r by A4,FUNCT_1:49;
        hence z in less_dom(F,r) by A4,A18,MESFUNC1:def 11;
       end;
       suppose
A19:    z in NIJ; then
        not z in IJ by XBOOLE_0:def 5; then
        F.z < r by A13,A1,A3,A19,Lm4;
        hence z in less_dom(F,r) by A4,A19,MESFUNC1:def 11;
       end;
      end; then
      less_dom(F,r) = less_dom(F0,r) \/ NIJ by TARSKI:2; then
A20:  R2 /\ less_dom(F,r)
       = IJ /\ (less_dom(F0,r) \/ NIJ) \/ NIJ /\ (less_dom(F0,r) \/ NIJ)
          by A7,XBOOLE_1:23;

      IJ /\ (less_dom(F0,r) \/ NIJ)
       = IJ /\ less_dom(F0,r) \/ (IJ /\ NIJ) by XBOOLE_1:23; then
A21:  IJ /\ (less_dom(F0,r) \/ NIJ)
       in sigma measurable_rectangles(L-Field,L-Field) by A4,A8,A10;

A22:  less_dom(F0,r) c= IJ by A5,MESFUNC1:def 11;

      NIJ /\ (less_dom(F0,r) \/ NIJ)
       = (NIJ /\ less_dom(F0,r)) \/ (NIJ /\ NIJ) by XBOOLE_1:23; then
      NIJ /\ (less_dom(F0,r) \/ NIJ)
       = {} \/ (NIJ /\ NIJ) by A22;
      hence R2 /\ less_dom(F,r) in sigma measurable_rectangles(L-Field,L-Field)
         by A20,A21,PROB_1:3;
     end;
    end; then
    F is R2-measurable;
    hence F is E-measurable by MESFUNC1:30;
end;
