
theorem Th47:
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,
 y be Element of REAL, E be Element of L-Field
 st [:[:I,J:],K:] = dom f & f is_continuous_on [:[:I,J:],K:] & f = g & y in J
holds ProjPMap2(|.Integral2(L-Meas,R_EAL g).|,y) 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,
    y be Element of REAL, E be Element of L-Field;
    assume that
A1: [:[:I,J:],K:] = dom f and
A2: f is_continuous_on [:[:I,J:],K:] and
A3: f = g and
A4: y in J;

A5: dom(R_EAL g) = [:[:I,J:],K:] by A1,A3,MESFUNC5:def 7;

A6: [#]REAL = REAL by SUBSET_1:def 3;

    set Fz = Integral2(L-Meas,R_EAL g);

    reconsider Gz = Integral2(L-Meas,R_EAL g)
      as Function of [:REAL,REAL:],REAL by A1,A2,A3,Th32;
    reconsider G = Gz| [:I,J:] as PartFunc of [:REAL,REAL:],REAL;
    reconsider F = G as PartFunc of [:RNS_Real,RNS_Real:],RNS_Real;

A7: dom Gz = [:REAL,REAL:] by FUNCT_2:def 1;

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

     dom Fz = [:REAL,REAL:] by FUNCT_2:def 1; then
     dom |.Fz.| = [:REAL,REAL:] by MESFUNC1:def 10; then
A9: dom ProjPMap2(|.Fz.|,y) = REAL by A6,MESFUN16:26;

A10:  I is Element of L-Field by MEASUR10:5,MEASUR12:75;

      REAL in L-Field by PROB_1:5; then
      reconsider NI = REAL \ I as Element of L-Field by A10,PROB_1:6;

A11:  I \/ NI = REAL by XBOOLE_1:45;
A12:  I /\ NI = {} by XBOOLE_1:85,XBOOLE_0:def 7;

      set Fz2 = ProjPMap2(|.Fz.|,y);
      set L0 = Fz2|I;
      set L1 = Fz2|NI;

A13:  dom(Fz2|I) = I by A9;
A14:  now let x be Element of REAL;
       assume
A15:   x in dom L1; then
A16:   x in REAL & not x in I by XBOOLE_0:def 5;
       [x,y] in [:REAL,REAL:]; then
       [x,y] in dom Fz by FUNCT_2:def 1; then
A17:   [x,y] in dom |.Fz.| by MESFUNC1:def 10;

       L1.x = ProjPMap2(|.Fz.|,y).x by A15,FUNCT_1:49; then
       L1.x = |.Fz.| . (x,y) by A17,MESFUN12:def 4; then
A18:   L1.x =|. Fz.(x,y) .| by A17,MESFUNC1:def 10;

A19:   Fz.(x,y) = Integral(L-Meas,ProjPMap1(R_EAL g,[x,y])) by MESFUN12:def 8;

       not [x,y] in [:I,J:] by A16,ZFMISC_1:87; then
       dom ProjPMap1(R_EAL g,[x,y]) = {} by A5,MESFUN16:25;
       hence L1.x = 0 by A18,A19,EXTREAL1:16,MESFUN16:1;
      end;

A20:  for t be Element of REAL st t in I holds 0 <= L0.t
      proof
       let t be Element of REAL;
       assume
A21:   t in I;
       [t,y] in [:REAL,REAL:]; then
       [t,y] in dom Fz by FUNCT_2:def 1; then
A22:   [t,y] in dom |.Fz.| by MESFUNC1:def 10;

       L0.t = ProjPMap2(|.Fz.|,y).t by FUNCT_1:49,A21; then
       L0.t = (|.Fz.|).(t,y) by A22,MESFUN12:def 4; then
       L0.t = |. Fz.(t,y) .| by A22,MESFUNC1:def 10;
       hence 0 <= L0.t by EXTREAL1:14;
      end;

      Fz = R_EAL Gz by MESFUNC5:def 7; then
A23:  |.Fz.| = R_EAL |.Gz.| by MESFUNC6:44; then
A24:  |.Fz.| = |.Gz.| by MESFUNC5:def 7;

      reconsider AFz = |.Fz.| as PartFunc of [:REAL,REAL:],REAL
        by A23,MESFUNC5:def 7;
      R_EAL AFz = |.Fz.| by MESFUNC5:def 7; then
      R_EAL ProjPMap2(AFz,y) = ProjPMap2(|.Fz.|,y) by MESFUN16:31; then
      ProjPMap2(AFz,y) = ProjPMap2(|.Fz.|,y) by MESFUNC5:def 7; then
      reconsider Gz2 = ProjPMap2(|.Fz.|,y)|I
        as PartFunc of REAL,REAL by PARTFUN1:11;

A25:  ProjPMap2(|.G.|,y) is continuous by A7,A8,MESFUN16:34;

A26:  I is Element of L-Field by MEASUR10:5,MEASUR12:75;
A27:  dom Gz2 = I by A9;

      I = Y-section([:I,J:],y) by A4,MEASUR11:22; then
A28:  Gz2 = ProjPMap2(|.Fz.| | [:I,J:],y) by MESFUN12:34;

      |.Fz.| | [:I,J:] = |.G.| by A24,RFUNCT_1:46; then
      |.Fz.| | [:I,J:] = R_EAL |.G.| by MESFUNC5:def 7; then
      Gz2 = R_EAL ProjPMap2(|.G.|,y) by A28,MESFUN16:31; then
      Gz2 is continuous by A25,MESFUNC5:def 7; then
      Gz2||I is bounded & Gz2 is_integrable_on I by A9,INTEGRA5:10,11; then
      Gz2 is_integrable_on L-Meas by A26,A27,MESFUN14:49; then
A29:  L0 is_integrable_on L-Meas by MESFUNC5:def 7;

A30:  for r being Element of REAL holds 0. <= Fz2.r
      proof
       let r be Element of REAL;
       per cases by A11,XBOOLE_0:def 3;
       suppose
A31:    r in I; then
        0 <= L0.r by A20;
        hence 0 <= Fz2.r by A31,FUNCT_1:49;
       end;
       suppose
A32:    r in NI; then
        Fz2.r = L1.r by FUNCT_1:49;
        hence 0 <= Fz2.r by A14,A9,A32;
       end;
      end;

      reconsider H=REAL as Element of L-Field by PROB_1:5;
      for r being Real holds H /\ (less_dom(Fz2,r)) in L-Field
      proof
       let r be Real;
       consider H0 being Element of L-Field such that
A33:   H0 = dom L0 & L0 is H0 -measurable by A29,MESFUNC5:def 17;
       per cases;
       suppose
A34:    r <= 0;

        less_dom(Fz2,r) = {}
        proof
         assume less_dom(Fz2,r) <> {}; then
         consider y be object such that
A35:     y in less_dom(Fz2,r) by XBOOLE_0:def 1;

         y in dom Fz2 & Fz2.y < r by MESFUNC1:def 11,A35;
         hence contradiction by A30,A34;
        end;
        hence H /\ (less_dom(Fz2,r)) in L-Field by PROB_1:4;
       end;
       suppose
A36:    0 < r;

A37:    for z be object holds
         z in less_dom(Fz2,r) iff z in less_dom (L0,r) \/ NI
        proof
         let z be object;
         hereby assume
A38:      z in less_dom(Fz2,r); then
A39:      z in dom Fz2 & Fz2.z < r by MESFUNC1:def 11;
          per cases by A38,A11,XBOOLE_0:def 3;
          suppose
A40:       z in I; then
           L0.z < r by FUNCT_1:49,A39; then
           z in less_dom (L0,r) by A13,A40,MESFUNC1:def 11;
           hence z in less_dom (L0,r) \/ NI by XBOOLE_0:def 3;
          end;
          suppose z in NI;
           hence z in less_dom (L0,r) \/ NI by XBOOLE_0:def 3;
          end;
         end;
         assume z in less_dom (L0,r) \/ NI; then
         per cases by XBOOLE_0:def 3;
         suppose
A41:      z in less_dom (L0,r); then
          z in dom L0 & L0.z < r by MESFUNC1:def 11; then
          Fz2.z < r by FUNCT_1:49;
          hence z in less_dom(Fz2,r) by A9,A41,MESFUNC1:def 11;
         end;
         suppose
A42:      z in NI; then
          reconsider u=z as Element of REAL;
          Fz2.u = L1.z by A42,FUNCT_1:49; then
          Fz2.u = 0 by A14,A42,A9;
          hence z in less_dom(Fz2,r) by A9,A36,MESFUNC1:def 11;
         end;
        end;

A43:    H /\ less_dom(Fz2,r) = (I \/ NI) /\ less_dom (Fz2,r) by XBOOLE_1:45
         .= (I \/ NI) /\ (less_dom (L0,r) \/ NI) by A37,TARSKI:2
         .= I /\ (less_dom (L0,r) \/ NI )
               \/ NI /\ (less_dom (L0,r) \/ NI) by XBOOLE_1:23;
        I /\ (less_dom (L0,r) \/ NI)
         = I /\ less_dom (L0,r) \/ {} by A12,XBOOLE_1:23; then
A44:    I /\ (less_dom (L0,r) \/ NI) in L-Field by A9,A33;

A45:    less_dom (L0,r) c= I by A13,MESFUNC1:def 11;

        NI /\ (less_dom (L0,r) \/ NI)
         = (NI /\ less_dom (L0,r) ) \/ (NI /\ NI) by XBOOLE_1:23; then
        NI /\ (less_dom (L0,r) \/ NI) = {} \/ (NI /\ NI) by A45;
        hence H /\ less_dom(Fz2,r) in L-Field by A43,A44,PROB_1:3;
       end;
      end; then
      Fz2 is H -measurable;
      hence thesis by MESFUNC1:30;
end;
