
theorem lemma101:
for X being set, S being with_empty_element semi-diff-closed cap-closed
  Subset-Family of X holds DisUnion S is cap-closed
proof
   let X be set, S be with_empty_element semi-diff-closed cap-closed
     Subset-Family of X;
   set P = DisUnion S;
   now let x,y be set;
    assume C1: x in P & y in P; then
    consider x1 be Subset of X such that
C2:  x = x1 &
     ex g be disjoint_valued FinSequence of S st x1 = Union g;
    consider g1 be disjoint_valued FinSequence of S such that
C3:  x1 = Union g1 by C2;
    consider y1 be Subset of X such that
C4:  y = y1 &
     ex g be disjoint_valued FinSequence of S st y1 = Union g by C1;
    consider g2 be disjoint_valued FinSequence of S such that
C5:  y1 = Union g2 by C4;
    consider h be disjoint_valued FinSequence such that
C6:  Union g1 /\ Union g2 = Union h &
     dom h = Seg (len g1 * len g2) &
     for i be Nat st i in dom h holds
      h.i = g1.((i-'1) div (len g2) + 1) /\ g2.((i-'1) mod (len g2)+1)
        by TT2;
    x1 /\ y1 c= X; then
    reconsider xy = x /\ y as Subset of X by C2,C4;
    now let i be Nat;
     assume C9: i in dom h; then
     (i-'1) mod (len g2) + 1 in dom g2 &
     (i-'1) div (len g2) + 1 in dom g1 by C6,Lem10; then
     g1.((i-'1) div (len g2) + 1) in S &
     g2.((i-'1) mod (len g2) + 1) in S by FINSEQ_2:11; then
     g1.((i-'1) div (len g2) + 1) /\ g2.((i-'1) mod (len g2) + 1) in S
       by FINSUB_1:def 2;
     hence h.i in S by C9,C6;
    end; then
    reconsider h as disjoint_valued FinSequence of S by FINSEQ_2:12;
    xy = Union h by C2,C4,C3,C5,C6;
    hence x /\ y in P;
   end;
   hence P is cap-closed;
end;
