
theorem Th46:
for X be set, S be with_empty_element semi-diff-closed
   cap-closed Subset-Family of X, P be pre-Measure of S
 ex M be nonnegative additive zeroed Function of
     (Ring_generated_by S),ExtREAL
  st for A be set st A in Ring_generated_by S holds
    for F be disjoint_valued FinSequence of S
      st A = Union F holds M.A = Sum(P*F)
proof
   let X be set,
       S be with_empty_element semi-diff-closed cap-closed Subset-Family of X,
       P be pre-Measure of S;

   defpred P[object,object] means
    for F be disjoint_valued FinSequence of S
     st $1 = Union F holds $2 = Sum(P*F);

A1:for A be object st A in Ring_generated_by S
    ex p be object st p in ExtREAL & P[A,p]
   proof
    let A be object;
    assume
A2:  A in Ring_generated_by S; then
    A in DisUnion S by SRINGS_3:18; then
    consider V be Subset of X such that
A3:  A = V & ex F be disjoint_valued FinSequence of S st V = Union F;
    consider F be disjoint_valued FinSequence of S such that
A4:  V = Union F by A3;
    set p = Sum(P*F);
    take p;
    thus p in ExtREAL & P[A,p] by A2,A3,A4,Th42;
   end;
   consider M be Function of (Ring_generated_by S),ExtREAL such that
A5: for A be object st A in Ring_generated_by S holds P[A,M.A]
      from FUNCT_2:sch 1(A1);

A18:for A be Element of Ring_generated_by S holds 0 <= M.A
   proof
    let A be Element of Ring_generated_by S;
    A in Ring_generated_by S; then
    A in DisUnion S by SRINGS_3:18; then
    consider V be Subset of X such that
A7:  A = V & ex F be disjoint_valued FinSequence of S st V = Union F;
    consider F be disjoint_valued FinSequence of S such that
A8:  V = Union F by A7;
    consider PF be sequence of ExtREAL such that
A10: Sum(P*F) = PF.(len(P*F)) & PF.0 = 0. &
     for i be Nat st i < len(P*F) holds PF.(i+1) = PF.i + (P*F).(i+1)
       by EXTREAL1:def 2;
    defpred P2[Nat] means $1 <= len(P*F) implies PF.$1 >= 0;
A11:P2[0] by A10;
A12:for i be Nat st P2[i] holds P2[i+1]
    proof
     let i be Nat;
     assume A13: P2[i];
     assume A14: i+1 <= len(P*F); then
     i+1 in dom(P*F) by NAT_1:11,FINSEQ_3:25; then
     (P*F).(i+1) = P.(F.(i+1)) by FUNCT_1:12; then
A17: (P*F).(i+1) >= 0 by SUPINF_2:51;
     PF.(i+1) = PF.i + (P*F).(i+1) by A14,A10,NAT_1:13;
     hence PF.(i+1) >= 0 by A13,A14,A17,NAT_1:13;
    end;
    for i be Nat holds P2[i] from NAT_1:sch 2(A11,A12); then
    Sum(P*F) >= 0 by A10;
    hence 0 <= M.A by A7,A8,A5;
   end;
   for A,B be Element of Ring_generated_by S
     st A misses B & A \/ B in Ring_generated_by S
       holds M.(A \/ B) = M.A + M.B
   proof
    let A,B be Element of Ring_generated_by S;
    assume A19: A misses B & A \/ B in Ring_generated_by S;
    A in Ring_generated_by S; then
    A in DisUnion S by SRINGS_3:18; then
    consider V be Subset of X such that
A20: A = V & ex F be disjoint_valued FinSequence of S st V = Union F;
    consider F be disjoint_valued FinSequence of S such that
A21: V = Union F by A20;
    B in Ring_generated_by S; then
    B in DisUnion S by SRINGS_3:18; then
    consider W be Subset of X such that
A22: B = W & ex G be disjoint_valued FinSequence of S st W = Union G;
    consider G be disjoint_valued FinSequence of S such that
A23: W = Union G by A22;
    set H = F^G;
A24:A = union rng F & B = union rng G by A20,A21,A22,A23,CARD_3:def 4; then
    reconsider H as disjoint_valued FinSequence of S by A19,Th43;
    rng H = rng F \/ rng G by FINSEQ_1:31; then
    union rng H = union rng F \/ union rng G by ZFMISC_1:78; then
    A \/ B = Union H by A24,CARD_3:def 4; then
A25:M.(A \/ B) = Sum(P*H) by A5;
A26:M.A = Sum(P*F) & M.B = Sum(P*G) by A20,A21,A22,A23,A5;
    P*F is nonnegative by Th45; then
A27:not -infty in rng(P*F) by SUPINF_2:def 9,def 12;
    P*G is nonnegative by Th45; then
A28:not -infty in rng(P*G) by SUPINF_2:def 9,def 12;
    P*H = (P*F)^(P*G) by FINSEQOP:9;
    hence M.(A \/ B) = M.A + M.B by A25,A26,A27,A28,EXTREAL1:10;
   end; then
A29:M is additive by MEASURE1:def 3;
   reconsider E = {} as Element of S by SETFAM_1:def 8;
   reconsider F = <*E*> as disjoint_valued FinSequence of S;
   rng F = {{}} by FINSEQ_1:38; then
   union rng F = {} by ZFMISC_1:25; then
   Union F = {} by CARD_3:def 4; then
   M.{} = Sum(P*F) by A5,FINSUB_1:7; then
   M.{} = Sum(<*P.{}*>) by FINSEQ_2:35; then
   M.{} = P.{} by EXTREAL1:8; then
   M.{} = 0 by VALUED_0:def 19; then
   reconsider M as nonnegative additive zeroed Function of
     (Ring_generated_by S),ExtREAL by A18,A29,VALUED_0:def 19,MEASURE1:def 2;
   take M;
   thus thesis by A5;
end;
