
theorem Th38:
  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 holds
    for F be disjoint_valued FinSequence of measurable_rectangles(S1,S2)
      st Union F in measurable_rectangles(S1,S2) holds
        product-pre-Measure(M1,M2).(Union F)
          = Sum(product-pre-Measure(M1,M2)*F)
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;
   set S = measurable_rectangles(S1,S2);
   set P = product-pre-Measure(M1,M2);
   let F be disjoint_valued FinSequence of S;
   assume A1: Union F in S;
   defpred P[object,object] means
    ($1 in dom F implies $2 = F.$1) & (not $1 in dom F implies $2 = {});
A2:for n be Element of NAT ex y be Element of S st P[n,y]
   proof
    let n be Element of NAT;
    per cases;
    suppose A3: n in dom F; then
     F.n in rng F by FUNCT_1:3;
     hence ex y be Element of S st P[n,y] by A3;
    end;
    suppose A4: not n in dom F;
     {} in S by SETFAM_1:def 8;
     hence ex y be Element of S st P[n,y] by A4;
    end;
   end;
   consider G be Function of NAT,S such that
A5: for n be Element of NAT holds P[n,G.n] from FUNCT_2:sch 3(A2);
A6:for x be object st not x in dom F holds G.x = {}
   proof
    let x be object;
    assume A7: not x in dom F;
    per cases;
    suppose x in dom G;
     hence G.x = {} by A5,A7;
    end;
    suppose not x in dom G;
     hence G.x = {} by FUNCT_1:def 2;
    end;
   end;
   for x,y be object st x <> y holds G.x misses G.y
   proof
    let x,y be object;
    assume A7: x <> y;
    per cases;
    suppose x in dom F & y in dom F; then
     G.x = F.x & G.y = F.y by A5;
     hence G.x misses G.y by A7,PROB_2:def 2;
    end;
    suppose not x in dom F or not y in dom F; then
     G.x = {} or G.y = {} by A6;
     hence G.x misses G.y;
    end;
   end; then
   reconsider G as disjoint_valued Function of
     NAT,measurable_rectangles(S1,S2) by PROB_2:def 2;
   now let y be object;
    assume B1: y in rng F \/ {{}};
    per cases by B1,XBOOLE_0:def 3;
    suppose y in rng F; then
     consider x be object such that
A8:   x in dom F & y = F.x by FUNCT_1:def 3;
     y = G.x by A8,A5;
     hence y in rng G by A8,FUNCT_2:4;
    end;
    suppose y in {{}}; then
B3:  y = {} by TARSKI:def 1;
     not 0 in dom F by FINSEQ_3:24; then
     G.0 = {} by A5;
     hence y in rng G by B3,FUNCT_2:4;
    end;
   end; then
A10:rng F \/ {{}} c= rng G;
   now let y be object;
    assume y in rng G; then
    consider x be Element of NAT such that
A11: y = G.x by FUNCT_2:113;
    per cases;
    suppose A12: x in dom F; then
     y = F.x by A5,A11; then
     y in rng F by A12,FUNCT_1:3;
     hence y in rng F \/ {{}} by XBOOLE_0:def 3;
    end;
    suppose not x in dom F; then
     y = {} by A5,A11; then
     y in {{}} by TARSKI:def 1;
     hence y in rng F \/ {{}} by XBOOLE_0:def 3;
    end;
   end; then
   rng G c= rng F \/ {{}}; then
   rng F \/ {{}} = rng G by A10; then
   union rng F \/ union {{}} = union rng G by ZFMISC_1:78; then
   union rng F \/ {} = union rng G by ZFMISC_1:25; then
   Union F = union rng G by CARD_3:def 4; then
   Union F = Union G by CARD_3:def 4; then
P2:product-pre-Measure(M1,M2).(Union F) = SUM(product-pre-Measure(M1,M2)*G)
     by A1,Th35;
P3:product-pre-Measure(M1,M2)*F is nonnegative FinSequence of ExtREAL
     by MEASURE9:47;
P4:for n be object st n in dom(product-pre-Measure(M1,M2)*F) holds
    (product-pre-Measure(M1,M2)*F).n = (product-pre-Measure(M1,M2)*G).n
   proof
    let n be object;
    assume Q1: n in dom(product-pre-Measure(M1,M2)*F);
Q5: dom G = NAT by FUNCT_2:def 1;
    F.n = G.n by A5,Q1,FUNCT_1:11; then
    (product-pre-Measure(M1,M2)*F).n
     = product-pre-Measure(M1,M2).(G.n) by Q1,FUNCT_1:12;
    hence thesis by Q5,Q1,FUNCT_1:13;
   end;
   for n be Element of NAT st not n in dom(product-pre-Measure(M1,M2)*F) holds
    (product-pre-Measure(M1,M2)*G).n = 0
   proof
    let n be Element of NAT;
    assume L1: not n in dom(product-pre-Measure(M1,M2)*F);
L2: dom(product-pre-Measure(M1,M2)) = measurable_rectangles(S1,S2)
      by FUNCT_2:def 1;
    n in NAT; then
L4: n in dom G by FUNCT_2:def 1;
    now assume not F.n in dom(product-pre-Measure(M1,M2)); then
     not F.n in rng F by L2;
     hence not n in dom F by FUNCT_1:3;
    end; then
    G.n = {} by A5,L1,FUNCT_1:11; then
    (product-pre-Measure(M1,M2)*G).n = (product-pre-Measure(M1,M2)).{}
      by L4,FUNCT_1:13;
    hence thesis by VALUED_0:def 19;
   end;
   hence thesis by P2,P3,P4,Th37;
end;
