
theorem Th76:
for X1,X2 be non empty set, S1 be SigmaField of X1, S2 be SigmaField of X2,
  M1 be sigma_Measure of S1, M2 be sigma_Measure of S2,
  E be Element of sigma measurable_rectangles(S1,S2),
  V be Element of S2
 st E in Field_generated_by measurable_rectangles(S1,S2)
 ex F be Function of X1,ExtREAL st
    ( for x be Element of X1 holds
       F.x = M2.(Measurable-X-section(E,x) /\ V))
  & (for P be Element of S1 holds F is P-measurable)
proof
   let X1,X2 be non empty set, S1 be SigmaField of X1, S2 be SigmaField of X2,
   M1 be sigma_Measure of S1, M2 be sigma_Measure of S2,
   E be Element of sigma measurable_rectangles(S1,S2),
   V be Element of S2;
   assume
A1: E in Field_generated_by measurable_rectangles(S1,S2);
   X1 in S1 by MEASURE1:7; then
   [:X1,V:] in the set of all [:A,B:]
      where A is Element of S1, B is Element of S2; then
A2:[:X1,V:] in measurable_rectangles(S1,S2) by MEASUR10:def 5;
measurable_rectangles(S1,S2) c= sigma measurable_rectangles(S1,S2)
     by PROB_1:def 9; then
   reconsider E1 = E /\ [:X1,V:] as Element of
      sigma measurable_rectangles(S1,S2) by A2,FINSUB_1:def 2;
A3:measurable_rectangles(S1,S2)
    c= Field_generated_by measurable_rectangles(S1,S2) by SRINGS_3:21;
   per cases;
   suppose A4: E1 = {};
    reconsider A = {} as Element of S1 by MEASURE1:34;
    0 in REAL by XREAL_0:def 1; then
    reconsider F = X1 --> 0 as Function of X1,ExtREAL
      by FUNCOP_1:45,NUMBERS:31;
    take F;
    thus for x be Element of X1 holds F.x = M2.(Measurable-X-section(E,x) /\ V)
    proof
     let x be Element of X1;
A5:  X1 = [#]X1 by SUBSET_1:def 3;
     Measurable-X-section(E,x) /\ V
       = X-section(E,x) /\ X-section([:[#]X1,V:],x) by A5,Th16
      .= X-section({}[:X1,X2:],x) by A4,A5,Th21
      .= {}; then
     M2.(Measurable-X-section(E,x) /\ V) = 0 by VALUED_0:def 19;
     hence F.x = M2.(Measurable-X-section(E,x) /\ V) by FUNCOP_1:7;
    end;
    thus for P be Element of S1 holds F is P-measurable
    proof
     let P be Element of S1;
     for x be Element of X1 holds F.x = chi({},X1).x
     proof
      let x be Element of X1;
      chi({},X1).x = 0 by FUNCT_3:def 3;
      hence F.x = chi({},X1).x by FUNCOP_1:7;
     end; then
     F = chi(A,X1) by FUNCT_2:def 8;
     hence F is P-measurable by MESFUNC2:29;
    end;
   end;
   suppose A6: E1 <> {};
    deffunc F1(Element of X1) = M2.(Measurable-X-section(E,$1) /\ V);
    consider F be Function of X1,ExtREAL such that
A7:  for x be Element of X1 holds F.x = F1(x) from FUNCT_2:sch 4;
    consider f be disjoint_valued FinSequence of measurable_rectangles(S1,S2),
      A be FinSequence of S1, B be FinSequence of S2,
      Xf be summable FinSequence of Funcs([:X1,X2:],ExtREAL),
      If be summable FinSequence of Funcs(X1,ExtREAL),
      Jf be summable FinSequence of Funcs(X2,ExtREAL)
      such that
A8:  E /\ [:X1,V:] = Union f & len f in dom f & len f = len A & len f = len B
   & len f = len Xf & len f = len If & len f = len Jf
   & ( for n be Nat st n in dom Xf holds Xf.n = chi(f.n,[:X1,X2:]) )
   & (Partial_Sums Xf)/.(len Xf) = chi(E /\ [:X1,V:],[:X1,X2:])
   & ( for x be Element of X1, n be Nat st n in dom If holds
       (If.n).x = Integral(M2,ProjMap1((Xf/.n),x)) )
   & ( for n be Nat, P be Element of S1 st n in dom If holds
       If/.n is P-measurable)
   & ( for x be Element of X1 holds
       Integral(M2,ProjMap1(((Partial_Sums Xf)/.(len Xf)),x))
         = ((Partial_Sums If)/.(len If)).x )
   & ( for x be Element of X2, n be Nat st n in dom Jf holds
       (Jf.n).x = Integral(M1,ProjMap2((Xf/.n),x)) )
   & ( for n be Nat, P be Element of S2 st n in dom Jf holds
       Jf/.n is P-measurable)
   & ( for x be Element of X2 holds
       Integral(M1,ProjMap2(((Partial_Sums Xf)/.(len Xf)),x))
         = ((Partial_Sums Jf)/.(len Jf)).x )
           by A3,A2,A1,FINSUB_1:def 2,A6,Th75;

    take F;

    thus for x be Element of X1 holds
       F.x = M2.(Measurable-X-section(E,x) /\ V) by A7;

A9: dom If = dom f by A8,FINSEQ_3:29;

    for x be Element of X1 holds F.x = ((Partial_Sums If)/.(len If)).x
    proof
     let x be Element of X1;
     ((Partial_Sums If)/.(len If)).x
      = Integral(M2,ProjMap1(chi(E /\ [:X1,V:],[:X1,X2:]),x)) by A8
     .= M2.(Measurable-X-section(E,x) /\ V) by Th67;
     hence thesis by A7;
    end; then
A10:F = (Partial_Sums If)/.(len If) by FUNCT_2:def 8;
     let P be Element of S1;
     for n be Nat st n in dom If holds If/.n is P-measurable by A8;
     hence F is P-measurable by A8,A9,A10,Th64;
   end;
end;
