
theorem Th45:
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,
 x 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 & x in I
holds ProjPMap1(|.Integral2(L-Meas,R_EAL g).|,x) 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,
    x 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: x in I;

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 ProjPMap1(|.Fz.|,x) = REAL by A6,MESFUN16:25;

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

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

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

    set Fz1 = ProjPMap1(|.Fz.|,x);
    set L0 = Fz1|J;
    set L1 = Fz1|NJ;

A13:dom(Fz1|J) = J by A9;

A14:now let y be Element of REAL;
     assume
A15: y in dom L1; then
A16: y in REAL & not y in J 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.y = ProjPMap1(|.Fz.|,x).y by A15,FUNCT_1:49; then
     L1.y = |.Fz.| . (x,y) by A17,MESFUN12:def 3; then
A18: L1.y =|. 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.y = 0 by A18,A19,EXTREAL1:16,MESFUN16:1;
    end;

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

     L0.t = ProjPMap1(|.Fz.|,x).t by FUNCT_1:49,A21; then
     L0.t = (|.Fz.|).(x,t) by A22,MESFUN12:def 3; then
     L0.t = |. Fz.(x,t) .| 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 ProjPMap1(AFz,x) = ProjPMap1(|.Fz.|,x) by MESFUN16:31; then
    ProjPMap1(AFz,x) = ProjPMap1(|.Fz.|,x) by MESFUNC5:def 7; then
    reconsider Gz1 = ProjPMap1(|.Fz.|,x)|J
      as PartFunc of REAL,REAL by PARTFUN1:11;

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

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

    J = X-section([:I,J:],x) by A4,MEASUR11:22; then
A28:Gz1 = ProjPMap1(|.Fz.| | [:I,J:],x) by MESFUN12:34;

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

    reconsider H=REAL as Element of L-Field by PROB_1:5;

    for r being Real holds H /\ (less_dom(Fz1,r)) in L-Field
    proof
     let r be Real;
     consider H0 being Element of L-Field such that
A30: H0 = dom L0 & L0 is H0 -measurable by A29,MESFUNC5:def 17;

     per cases;
     suppose
A31:  r <= 0;
      less_dom(Fz1,r) = {}
      proof
       assume less_dom(Fz1,r) <> {}; then
       consider x be object such that
A32:   x in less_dom(Fz1,r) by XBOOLE_0:def 1;

A33:   Fz1.x < r by MESFUNC1:def 11,A32;

       per cases;
       suppose
A34:    x in J; then
        0 <= L0.x by A20;
        hence contradiction by A34,A31,A33,FUNCT_1:49;
       end;
       suppose not x in J; then
A35:    x in NJ by A32,XBOOLE_0:def 5; then
        Fz1.x = L1.x by FUNCT_1:49;
        hence contradiction by A14,A9,A35,A31,A33;
       end;
      end;
      hence H /\ (less_dom(Fz1,r)) in L-Field by PROB_1:4;
     end;
     suppose
A36:  0 < r;
A37:  for z be object holds z in less_dom(Fz1,r) iff z in less_dom (L0,r) \/ NJ
      proof
       let z be object;
       hereby assume
A38:    z in less_dom(Fz1,r); then
A39:    z in dom Fz1 & Fz1.z < r by MESFUNC1:def 11;
        per cases by A38,A11,XBOOLE_0:def 3;
        suppose
A40:     z in J; 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) \/ NJ by XBOOLE_0:def 3;
        end;
        suppose z in NJ;
         hence z in less_dom (L0,r) \/ NJ by XBOOLE_0:def 3;
        end;
       end;
       assume z in less_dom (L0,r) \/ NJ; 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
        Fz1.z < r by FUNCT_1:49;
        hence z in less_dom(Fz1,r) by A9,A41,MESFUNC1:def 11;
       end;
       suppose
A42:    z in NJ; then
        reconsider u=z as Element of REAL;
        Fz1.u = L1.z by A42,FUNCT_1:49; then
        Fz1.u = 0 by A14,A42,A9;
        hence z in less_dom(Fz1,r) by A9,A36,MESFUNC1:def 11;
       end;
      end;

A43:  H /\ less_dom(Fz1,r) = (J \/ NJ) /\ less_dom (Fz1,r) by XBOOLE_1:45
         .= (J \/ NJ) /\ (less_dom (L0,r) \/ NJ) by A37,TARSKI:2
         .= J /\ (less_dom (L0,r) \/ NJ )
               \/ NJ /\ (less_dom (L0,r) \/ NJ) by XBOOLE_1:23;
      J /\ (less_dom (L0,r) \/ NJ)
        = J /\ less_dom (L0,r) \/ {} by A12,XBOOLE_1:23; then
A44:  J /\ (less_dom (L0,r) \/ NJ) in L-Field by A9,A30;

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

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