
theorem Th113:
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,
  V be Element of sigma measurable_rectangles(S1,S2),
  A be Element of S1, B be Element of S2
 st
 M1 is sigma_finite & V = [:A,B:] & product_sigma_Measure(M1,M2).V < +infty &
 M1.A < +infty
  holds
  {E where E is Element of sigma measurable_rectangles(S1,S2) :
     Integral(M2,(X-vol(E/\V,M1))) = (product_sigma_Measure(M1,M2)).(E/\V)}
       is MonotoneClass of [:X1,X2:]
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,
   V be Element of sigma measurable_rectangles(S1,S2),
   A be Element of S1, B be Element of S2;
   assume that
A01:M1 is sigma_finite and
A02:V = [:A,B:] and
A0: product_sigma_Measure(M1,M2).V < +infty and
PS2:M1.A < +infty;
   set Z = {E where E is Element of sigma measurable_rectangles(S1,S2) :
     Integral(M2,(X-vol(E/\V,M1))) = (product_sigma_Measure(M1,M2)).(E/\V)};
   reconsider XX2 = X2 as Element of S2 by MEASURE1:7;
   now let A be object;
    assume A in Z; then
    ex E be Element of sigma measurable_rectangles(S1,S2) st
     A = E
   & Integral(M2,(X-vol(E/\V,M1))) = (product_sigma_Measure(M1,M2)).(E/\V);
    hence A in bool [:X1,X2:];
   end; then
A1:Z c= bool [:X1,X2:];
   for A1 be SetSequence of [:X1,X2:] st
     A1 is monotone & rng A1 c= Z holds lim A1 in Z
   proof
    let A1 be SetSequence of [:X1,X2:];
    assume A2: A1 is monotone & rng A1 c= Z;
A4: for V be set st V in rng A1 holds V in sigma measurable_rectangles(S1,S2)
    proof
     let W be set;
     assume W in rng A1; then
     W in Z by A2; then
     ex E be Element of sigma measurable_rectangles(S1,S2) st
      W = E
    & Integral(M2,(X-vol(E/\V,M1))) = (product_sigma_Measure(M1,M2)).(E/\V);
     hence W in sigma measurable_rectangles(S1,S2);
    end;
    for n be Nat holds A1.n in sigma measurable_rectangles(S1,S2)
    proof
     let n be Nat;
     dom A1 = NAT by FUNCT_2:def 1; then
     n in dom A1 by ORDINAL1:def 12;
     hence A1.n in sigma measurable_rectangles(S1,S2) by A4,FUNCT_1:3;
    end; then
    reconsider A2 = A1 as Set_Sequence of sigma measurable_rectangles(S1,S2)
       by MEASURE8:def 2;
PP: for n be Nat holds Integral(M2,(X-vol(A2.n /\ V,M1)))
      = (product_sigma_Measure(M1,M2)).(A2.n /\ V)
    proof
     let n be Nat;
     dom A2 = NAT by FUNCT_2:def 1; then
     n in dom A2 by ORDINAL1:def 12; then
     A2.n in Z by A2,FUNCT_1:3; then
     ex E be Element of sigma measurable_rectangles(S1,S2) st
      A2.n = E &
      Integral(M2,(X-vol(E/\V,M1))) = (product_sigma_Measure(M1,M2)).(E/\V);
     hence thesis;
    end;
    per cases by A2,SETLIM_1:def 1;
    suppose
A3:  A1 is non-descending;
     union rng A1 in sigma measurable_rectangles(S1,S2) by A4,MEASURE1:35; then
     Union A1 in sigma measurable_rectangles(S1,S2) by CARD_3:def 4; then
     reconsider E = lim A1 as Element of sigma measurable_rectangles(S1,S2)
       by A3,SETLIM_1:63;
     defpred P[Element of NAT, object] means $2 = X-vol(A2.$1 /\ V,M1);
T1:  for n be Element of NAT ex f be Element of PFuncs(X2,ExtREAL) st P[n,f]
     proof
      let n be Element of NAT;
      reconsider f1 = X-vol(A2.n /\ V,M1) as Element of PFuncs(X2,ExtREAL)
        by PARTFUN1:45;
      take f1;
      thus f1 = X-vol(A2.n /\ V,M1);
     end;
     consider F be Function of NAT,PFuncs(X2,ExtREAL) such that
T2:   for n be Element of NAT holds P[n,F.n] from FUNCT_2:sch 3(T1);
     reconsider F as Functional_Sequence of X2,ExtREAL;
T2a: for n be Nat holds F.n = X-vol(A2.n /\ V,M1)
     proof
      let n be Nat;
      n is Element of NAT by ORDINAL1:def 12;
      hence thesis by T2;
     end;
     F.0 = X-vol(A2.0 /\ V,M1) by T2; then
T3:  dom(F.0) = XX2 & F.0 is nonnegative by FUNCT_2:def 1;
T4:  for n be Nat, x be Element of X2 holds (F#x).n = X-vol(A2.n/\V,M1).x
     proof
      let n be Nat, x be Element of X2;
      (F#x).n = (F.n).x by MESFUNC5:def 13;
      hence (F#x).n = X-vol(A2.n /\ V,M1).x by T2a;
     end;
T5:  for n,m be Nat holds dom(F.n) = dom(F.m)
     proof
      let n,m be Nat;
      F.n = X-vol(A2.n /\ V,M1) & F.m = X-vol(A2.m /\ V, M1) by T2a; then
      dom(F.n) = XX2 & dom(F.m) = XX2 by FUNCT_2:def 1;
      hence dom(F.n) = dom(F.m);
     end;
T6:  for n be Nat holds F.n is XX2-measurable
     proof
      let n be Nat;
      F.n = X-vol(A2.n /\ V,M1) by T2a;
      hence F.n is XX2-measurable by A01,DefXvol;
     end;
T7:  for n,m be Nat st n <= m holds
       for x be Element of X2 st x in XX2 holds (F.n).x <= (F.m).x
     proof
      let n,m be Nat;
      assume T71: n <= m;
      hereby let x be Element of X2;
       assume x in XX2;
T72:   A2.n /\ V c= A2.m /\ V by A3,T71,PROB_1:def 5,XBOOLE_1:26;
T73:   M1.(Measurable-Y-section(A2.n /\ V,x))
        = X-vol(A2.n /\ V,M1).x by A01,DefXvol
       .= (F#x).n by T4
       .= (F.n).x by MESFUNC5:def 13;
       M1.(Measurable-Y-section(A2.m /\ V,x))
        = X-vol(A2.m /\ V,M1).x by A01,DefXvol
       .= (F#x).m by T4
       .= (F.m).x by MESFUNC5:def 13;
       hence (F.n).x <= (F.m).x by T72,T73,Th15,MEASURE1:31;
      end;
     end;
T8:  for x be Element of X2 st x in XX2 holds F#x is convergent
     proof
      let x be Element of X2;
      assume x in XX2;
      now let n,m be Nat;
       assume m <= n; then
       (F.m).x <= (F.n).x by T7; then
       (F#x).m <= (F.n).x by MESFUNC5:def 13;
       hence (F#x).m <= (F#x).n by MESFUNC5:def 13;
      end; then
      F#x is non-decreasing by RINFSUP2:7;
      hence F#x is convergent by RINFSUP2:37;
     end;
     consider I be ExtREAL_sequence such that
V2:   ( for n be Nat holds I.n = Integral(M2,F.n))
    & I is convergent
    & Integral(M2,lim F) = lim I by T3,T5,T6,T7,T8,MESFUNC9:52,MESFUNC8:def 2;
     dom(lim F) = dom(F.0) by MESFUNC8:def 9; then
V4:  dom(lim F) = dom(X-vol(E/\V,M1)) by T3,FUNCT_2:def 1;
     for x be Element of X2 st x in dom(lim F) holds
      (lim F).x = X-vol(E/\V,M1).x
     proof
      let x be Element of X2;
      assume x in dom(lim F); then
L2:   (lim F).x = lim(F#x) by MESFUNC8:def 9;
      consider G be SetSequence of S1 such that
L3:    G is non-descending & (for n be Nat holds
          G.n = Measurable-Y-section(A2.n,x) /\ Measurable-Y-section(V,x))
     & lim G = Measurable-Y-section(E,x) /\ Measurable-Y-section(V,x)
          by A3,Th109;
      for n be Element of NAT holds (F#x).n = (M1*G).n
      proof
       let n be Element of NAT;
L5:    dom G = NAT by FUNCT_2:def 1;
L4:    (F#x).n = (F.n).x by MESFUNC5:def 13
        .= X-vol(A2.n /\ V,M1).x by T2
        .= M1.(Measurable-Y-section(A2.n /\ V,x)) by A01,DefXvol;
       Measurable-Y-section(A2.n /\ V,x)
        = Measurable-Y-section(A2.n,x) /\ Measurable-Y-section(V,x)
            by Th21; then
       Measurable-Y-section(A2.n /\ V,x) = G.n by L3;
       hence (F#x).n = (M1*G).n by L4,L5,FUNCT_1:13;
      end; then
      F#x = M1*G by FUNCT_2:63; then
      (lim F).x = M1.(Measurable-Y-section(E,x) /\ Measurable-Y-section(V,x))
        by L2,L3,MEASURE8:26; then
      (lim F).x = M1.(Measurable-Y-section(E /\ V,x)) by Th21;
      hence (lim F).x = X-vol(E /\ V,M1).x by A01,DefXvol;
     end; then
V3:  lim F = X-vol(E/\V,M1) by V4,PARTFUN1:5;
     set J = V (/\) A2;
E1:  dom J = NAT by FUNCT_2:def 1;
     for n be object st n in NAT holds
       J.n in sigma measurable_rectangles(S1,S2)
     proof
      let n be object;
      assume n in NAT; then
      reconsider n1 = n as Element of NAT;
      J.n = A2.n1 /\ V by SETLIM_2:def 5;
      hence J.n in sigma measurable_rectangles(S1,S2);
     end; then
     reconsider J as SetSequence of sigma measurable_rectangles(S1,S2)
       by E1,FUNCT_2:3;
R11: J is non-descending by A3,SETLIM_2:22;
     A2 is convergent by A3,SETLIM_1:63; then
R13: lim J = E /\ V by SETLIM_2:92;
R3:  product_sigma_Measure(M1,M2) is sigma_Measure of
       sigma measurable_rectangles(S1,S2) by Th2; then
R4:  dom product_sigma_Measure(M1,M2) = sigma measurable_rectangles(S1,S2)
       by FUNCT_2:def 1;
     rng J c= sigma measurable_rectangles(S1,S2) by RELAT_1:def 19; then
R2:  (product_sigma_Measure(M1,M2))/*J = (product_sigma_Measure(M1,M2))*J
       by R4,FUNCT_2:def 11;
     for n be Element of NAT holds I.n = ((product_sigma_Measure(M1,M2))/*J).n
     proof
      let n be Element of NAT;
R21:  dom J = NAT by FUNCT_2:def 1;
      I.n = Integral(M2,F.n) by V2 .= Integral(M2,X-vol(A2.n /\ V,M1)) by T2
       .= (product_sigma_Measure(M1,M2)).(A2.n /\ V) by PP
       .= (product_sigma_Measure(M1,M2)).(J.n) by SETLIM_2:def 5;
      hence I.n = ((product_sigma_Measure(M1,M2))/*J).n by R2,R21,FUNCT_1:13;
     end; then
     lim I = lim( (product_sigma_Measure(M1,M2))/*J ) by FUNCT_2:63; then
     lim I = (product_sigma_Measure(M1,M2)).(E/\V)
       by R13,R11,R2,R3,MEASURE8:26;
     hence lim A1 in Z by V2,V3;
    end;
    suppose
A3:  A1 is non-ascending;
     meet rng A1 in sigma measurable_rectangles(S1,S2) by A4,MEASURE1:35; then
     Intersection A1 in sigma measurable_rectangles(S1,S2) by SETLIM_1:8; then
     reconsider E = lim A1 as Element of sigma measurable_rectangles(S1,S2)
        by A3,SETLIM_1:64;
     defpred P[Element of NAT, object] means $2 = X-vol(A2.$1 /\ V,M1);
T1:  for n be Element of NAT ex f be Element of PFuncs(X2,ExtREAL) st P[n,f]
     proof
      let n be Element of NAT;
      reconsider f1 = X-vol(A2.n /\ V,M1) as Element of PFuncs(X2,ExtREAL)
        by PARTFUN1:45;
      take f1;
      thus f1 = X-vol(A2.n /\ V,M1);
     end;
     consider F be Function of NAT,PFuncs(X2,ExtREAL) such that
T2:   for n be Element of NAT holds P[n,F.n] from FUNCT_2:sch 3(T1);
     reconsider F as Functional_Sequence of X2,ExtREAL;
T2a: for n be Nat holds F.n = X-vol(A2.n /\ V,M1)
     proof
      let n be Nat;
      n is Element of NAT by ORDINAL1:def 12;
      hence thesis by T2;
     end;
     F.0 = X-vol(A2.0 /\ V,M1) by T2; then
T3:  dom(F.0) = XX2 by FUNCT_2:def 1;
T4:  for n be Nat, x be Element of X2 holds (F#x).n = X-vol(A2.n/\V,M1).x
     proof
      let n be Nat, x be Element of X2;
      (F#x).n = (F.n).x by MESFUNC5:def 13;
      hence (F#x).n = X-vol(A2.n /\ V,M1).x by T2a;
     end;
     for n,m be Nat holds dom(F.n) = dom(F.m)
     proof
      let n,m be Nat;
      F.n = X-vol(A2.n /\ V,M1) & F.m = X-vol(A2.m /\ V, M1) by T2a; then
      dom(F.n) = XX2 & dom(F.m) = XX2 by FUNCT_2:def 1;
      hence dom(F.n) = dom(F.m);
     end; then
     reconsider F as with_the_same_dom Functional_Sequence of X2,ExtREAL
        by MESFUNC8:def 2;
T6:  for n be Nat holds F.n is nonnegative & F.n is XX2-measurable
     proof
      let n be Nat;
      F.n = X-vol(A2.n /\ V,M1) by T2a;
      hence F.n is nonnegative & F.n is XX2-measurable by A01,DefXvol;
     end;
T7:  for x be Element of X2, n,m be Nat st x in XX2 & n <= m holds
        (F.n).x >= (F.m).x
     proof
      let x be Element of X2, n,m be Nat;
      assume x in XX2 & n <= m; then
T72:   A2.m /\ V c= A2.n /\ V by A3,PROB_1:def 4,XBOOLE_1:26;
T73:   M1.(Measurable-Y-section(A2.n /\ V,x))
        = X-vol(A2.n /\ V,M1).x by A01,DefXvol
       .= (F#x).n by T4
       .= (F.n).x by MESFUNC5:def 13;
       M1.(Measurable-Y-section(A2.m /\ V,x))
        = X-vol(A2.m /\ V,M1).x by A01,DefXvol
       .= (F#x).m by T4
       .= (F.m).x by MESFUNC5:def 13;
       hence (F.m).x <= (F.n).x by T72,T73,Th15,MEASURE1:31;
     end;
M3:  product_sigma_Measure(M1,M2) is sigma_Measure of
       sigma measurable_rectangles(S1,S2) by Th2;
     Integral(M2,(F.0)|XX2) = Integral(M2,X-vol(A2.0 /\ V,M1)) by T2a; then
M1:  Integral(M2,(F.0)|XX2) = (product_sigma_Measure(M1,M2)).(A2.0 /\ V)
       by PP;
     product_sigma_Measure(M1,M2).(A2.0 /\ V)
       <= product_sigma_Measure(M1,M2).V by M3,MEASURE1:31,XBOOLE_1:17; then
     Integral(M2,(F.0)|XX2) < +infty by A0,M1,XXREAL_0:2; then
     consider I be ExtREAL_sequence such that
V2:   (for n be Nat holds I.n = Integral(M2,F.n))
    & I is convergent
    & lim I = Integral(M2,lim F) by T3,T6,T7,MESFUN10:18;
     dom(lim F) = dom(F.0) by MESFUNC8:def 9; then
V4:  dom(lim F) = dom(X-vol(E/\V,M1)) by T3,FUNCT_2:def 1;
     for x be Element of X2 st x in dom(lim F) holds
      (lim F).x = X-vol(E/\V,M1).x
     proof
      let x be Element of X2;
      assume x in dom(lim F); then
L2:   (lim F).x = lim(F#x) by MESFUNC8:def 9;
      consider G be SetSequence of S1 such that
L3:    G is non-ascending
     & (for n be Nat holds
          G.n = Measurable-Y-section(A2.n,x) /\ Measurable-Y-section(V,x))
     & lim G = Measurable-Y-section(E,x) /\ Measurable-Y-section(V,x)
          by A3,Th111;
      G.0 = Measurable-Y-section(A2.0,x) /\ Measurable-Y-section(V,x)
        by L3; then
L31:  M1.(G.0) <= M1.(Measurable-Y-section(V,x)) by MEASURE1:31,XBOOLE_1:17;
      Measurable-Y-section(V,x) c= A by A02,Th16; then
      M1.(Measurable-Y-section(V,x)) <= M1.A by MEASURE1:31; then
      M1.(G.0) <= M1.A by L31,XXREAL_0:2; then
LL:   M1.(G.0) < +infty by PS2,XXREAL_0:2;
      for n be Element of NAT holds (F#x).n = (M1*G).n
      proof
       let n be Element of NAT;
L5:    dom G = NAT by FUNCT_2:def 1;
L4:    (F#x).n = (F.n).x by MESFUNC5:def 13
        .= X-vol(A2.n /\ V,M1).x by T2
        .= M1.(Measurable-Y-section(A2.n /\ V,x)) by A01,DefXvol;
       Measurable-Y-section(A2.n /\ V,x)
        = Measurable-Y-section(A2.n,x) /\ Measurable-Y-section(V,x)
            by Th21; then
       Measurable-Y-section(A2.n /\ V,x) = G.n by L3;
       hence (F#x).n = (M1*G).n by L4,L5,FUNCT_1:13;
      end; then
      F#x = M1*G by FUNCT_2:63; then
      (lim F).x = M1.(Measurable-Y-section(E,x) /\ Measurable-Y-section(V,x))
        by L2,L3,LL,MEASURE8:31; then
      (lim F).x = M1.(Measurable-Y-section(E /\ V,x)) by Th21;
      hence (lim F).x = X-vol(E /\ V,M1).x by A01,DefXvol;
     end; then
V3:  lim F = X-vol(E/\V,M1) by V4,PARTFUN1:5;
     set J = V (/\) A2;
E1:  dom J = NAT by FUNCT_2:def 1;
     for n be object st n in NAT holds
       J.n in sigma measurable_rectangles(S1,S2)
     proof
      let n be object;
      assume n in NAT; then
      reconsider n1 = n as Element of NAT;
      J.n = A2.n1 /\ V by SETLIM_2:def 5;
      hence J.n in sigma measurable_rectangles(S1,S2);
     end; then
     reconsider J as SetSequence of sigma measurable_rectangles(S1,S2)
       by E1,FUNCT_2:3;
R11: J is non-ascending by A3,SETLIM_2:21;
     A2 is convergent by A3,SETLIM_1:64; then
R13: lim J = E /\ V by SETLIM_2:92;
R3:  product_sigma_Measure(M1,M2) is sigma_Measure of
       sigma measurable_rectangles(S1,S2) by Th2; then
R4:  dom product_sigma_Measure(M1,M2) = sigma measurable_rectangles(S1,S2)
       by FUNCT_2:def 1;
     rng J c= sigma measurable_rectangles(S1,S2) by RELAT_1:def 19; then
R2:  (product_sigma_Measure(M1,M2))/*J = (product_sigma_Measure(M1,M2))*J
       by R4,FUNCT_2:def 11;
     A2.0 /\ V c= V by XBOOLE_1:17; then
     J.0 c= V by SETLIM_2:def 5; then
     product_sigma_Measure(M1,M2).(J.0)
       <= product_sigma_Measure(M1,M2).V by R3,MEASURE1:31; then
K1:  product_sigma_Measure(M1,M2).(J.0) < +infty by A0,XXREAL_0:2;
     for n be Element of NAT holds I.n = ((product_sigma_Measure(M1,M2))/*J).n
     proof
      let n be Element of NAT;
R21:  dom J = NAT by FUNCT_2:def 1;
      I.n = Integral(M2,F.n) by V2 .= Integral(M2,X-vol(A2.n /\ V,M1)) by T2
       .= (product_sigma_Measure(M1,M2)).(A2.n /\ V) by PP
       .= (product_sigma_Measure(M1,M2)).(J.n) by SETLIM_2:def 5;
      hence I.n = ((product_sigma_Measure(M1,M2))/*J).n by R2,R21,FUNCT_1:13;
     end; then
     lim I = lim( (product_sigma_Measure(M1,M2))/*J )
        by FUNCT_2:63; then
     lim I = (product_sigma_Measure(M1,M2)).(E/\V)
       by R13,R11,R2,R3,K1,MEASURE8:31;
     hence lim A1 in Z by V2,V3;
    end;
   end;
   hence thesis by A1,PROB_3:69;
end;
