
theorem Th51:
for X,Z be set, P be semialgebra_of_sets of X,
    K be disjoint_valued Function of NAT,Field_generated_by P
  st Z = {[n,F] where n is Nat, F is disjoint_valued FinSequence of P
           : Union F = K.n & (K.n = {} implies F = <*{}*>) }
 holds proj2 Z is FinSequenceSet of P
    & (for x be object holds
         x in rng K
           iff ex F be FinSequence of P st F in proj2 Z & Union F = x)
    & proj2 Z is with_non-empty_elements
proof
   let X,Z be set, P be semialgebra_of_sets of X,
       K be disjoint_valued Function of NAT,Field_generated_by P;
   assume A1: Z={[n,F] where n is Nat, F is disjoint_valued FinSequence of P
                  : Union F = K.n & (K.n = {} implies F = <*{}*>)};
   now let a be object;
    assume a in proj2 Z; then
    consider k be object such that
A2:  [k,a] in Z by XTUPLE_0:def 13;
    ex n be Nat, F be disjoint_valued FinSequence of P st
     [k,a] = [n,F] & Union F = K.n & (K.n = {} implies F = <*{}*>) by A1,A2;
    hence a is FinSequence of P by XTUPLE_0:1;
   end;
   hence proj2 Z is FinSequenceSet of P by FINSEQ_2:def 3;

   hereby let x be object;
    hereby assume x in rng K; then
     consider n be Element of NAT such that
A6:   x = K.n by FUNCT_2:113;
     K.n in Field_generated_by P; then
     K.n in DisUnion P by SRINGS_3:22; then
     consider A be Subset of X such that
A7:   x = A & ex F be disjoint_valued FinSequence of P st A=Union F by A6;
     consider F be disjoint_valued FinSequence of P such that
A8:   A = Union F by A7;
     per cases;
     suppose A9: K.n = {};
A10:  rng <*{}*> = { {} } by FINSEQ_1:38;
      {} in P by SETFAM_1:def 8; then
      reconsider F1 = <*{}*> as disjoint_valued FinSequence of P
        by A10,ZFMISC_1:31,FINSEQ_1:def 4;
      rng F1 = { {} } by FINSEQ_1:38; then
      union rng F1 = {} by ZFMISC_1:25; then
B1:   Union F1 = {} by CARD_3:def 4; then
      [n,F1] in Z by A9,A1;
      then F1 in proj2 Z by XTUPLE_0:def 13;
      hence ex F be FinSequence of P st F in proj2 Z & Union F = x
         by A9,B1,A6;
     end;
     suppose K.n <> {}; then
      [n,F] in Z by A1,A6,A7,A8;
      then F in proj2 Z by XTUPLE_0:def 13;
      hence ex F be FinSequence of P st F in proj2 Z & Union F = x by A8,A7;
     end;
    end;
    assume ex F be FinSequence of P st F in proj2 Z & Union F = x; then
    consider z be FinSequence of P such that
A12: z in proj2 Z & Union z = x;
    consider y be object such that
A13: [y,z] in Z by A12,XTUPLE_0:def 13;
    consider n be Nat, F be disjoint_valued FinSequence of P such that
A14: [y,z] = [n,F] & Union F = K.n & (K.n = {} implies F = <*{}*>) by A1,A13;
    y=n & z=F by A14,XTUPLE_0:1;
    hence x in rng K by A12,A14,ORDINAL1:def 12,FUNCT_2:4;
   end;

   now assume {} in proj2 Z; then
    consider y be object such that
A16: [ y,{} ] in Z by XTUPLE_0:def 13;
    consider n be Nat, F be disjoint_valued FinSequence of P such that
A17: [ y,{} ] = [n,F] & Union F = K.n & (K.n = {} implies F = <*{}*>)
         by A1,A16;
    y=n & {}=F by A17,XTUPLE_0:1; then
    union rng F = {} by ZFMISC_1:2;
    hence contradiction by A17,XTUPLE_0:1,CARD_3:def 4;
   end;
   hence proj2 Z is with_non-empty_elements;
end;
