reserve X for set;
reserve S for Subset-Family of X;

theorem ThmVAL0:
  for S be cap-finite-partition-closed Subset-Family of X, A be Element of S
  holds {x where x is Element of S: x in union (PARTITIONS(A)/\Fin S)}
  is
  cap-finite-partition-closed Subset-Family of A
  proof
    let S be cap-finite-partition-closed Subset-Family of X;
    let A be Element of S;
    set B={x where x is Element of S:x in union (PARTITIONS(A)/\Fin S)};
    per cases;
    suppose
H0:   A is empty;
T1:   B c= {}
      proof
        let t be object;
        assume t in B;
        then consider t0 be Element of S such that
        t=t0 and
ZE2:    t0 in union (PARTITIONS(A)/\Fin S);
        consider u0 be set such that
ZE3:    t0 in u0 and
ZE4:    u0 in PARTITIONS(A)/\Fin S by ZE2,TARSKI:def 4;
        u0 in {{}} by A4bis,ZE4,XBOOLE_0:def 4,H0;
        hence thesis by ZE3,TARSKI:def 1;
      end;
      {} is Subset-Family of {} by XBOOLE_1:2;
      then reconsider B as Subset-Family of {} by T1;
      for a,b be Element of B st a/\b is non empty
      ex P be finite Subset of B st P is a_partition of a/\b
      proof
        let a,b be Element of B;
        assume
VA:     a/\b is non empty;
        a={} & b={} by T1,SUBSET_1:def 1;
        hence thesis by VA;
      end;
      hence thesis by H0,Defcap;
    end;
    suppose
H1:   A is non empty;
AA:   B c= bool A
      proof
        let x be object;
        assume x in B;
        then consider x0 be Element of S such that
B1:     x=x0 and
B2:     x0 in union (PARTITIONS(A)/\Fin S);
        consider x1 be set such that
B3:     x0 in x1 and
B4:     x1 in PARTITIONS(A)/\Fin S by B2,TARSKI:def 4;
        x1 in PARTITIONS(A) by B4,XBOOLE_0:def 4;
        then x1 is a_partition of A by PARTIT1:def 3;
        hence x in bool A by B1,B3;
      end;
      per cases;
        suppose
U0:       B is empty;
          then reconsider B as Subset-Family of A by XBOOLE_1:2;
          B is cap-finite-partition-closed by U0;
          hence thesis;
        end;
        suppose B is non empty;
          then reconsider B as non empty set;
          for x,y be Element of B st x/\y is non empty
          ex P be finite Subset of B st P is a_partition of x/\y
          proof
            let x,y be Element of B;
            assume
V1:         x/\y is non empty;
            x in B;
            then consider x0 be Element of S such that
A1:         x=x0 and
A2:         x0 in union (PARTITIONS(A)/\Fin S);
            consider x1 be set such that
C1:         x0 in x1 and
C2:         x1 in PARTITIONS(A)/\Fin S by A2,TARSKI:def 4;
            y in B;
            then consider y0 be Element of S such that
A3:         y=y0 and
A4:         y0 in union (PARTITIONS(A)/\Fin S);
            consider y1 be set such that
C3:         y0 in y1 and
C4:         y1 in PARTITIONS(A)/\Fin S by A4,TARSKI:def 4;
C4a:        x1 in PARTITIONS(A) & x1 in Fin S & y1 in PARTITIONS(A) &
            y1 in Fin S by C2,C4,XBOOLE_0:def 4;
            then
C5:         x1 is a_partition of A & x1 is finite Subset of S &
            y1 is a_partition of A & y1 is finite Subset of S
            by PARTIT1:def 3,FINSUB_1:def 5;
            reconsider A as non empty set by H1;
            reconsider x1 as a_partition of A
            by C4a,PARTIT1:def 3;
            reconsider y1 as a_partition of A
            by C4a,PARTIT1:def 3;
            consider P be a_partition of A such that
D1:         P is finite Subset of S and
D2:         P '<' x1 '/\' y1 by C5,ThmJ1;
            consider P1 be finite Subset of S such that
F1:         P1 is a_partition of x/\y by A1,A3,V1,Defcap;
            P1 is finite Subset of B
            proof
              P1 c= B
              proof
                let d be object;
                assume
UP:             d in P1;
UJ:             x0 in x1 & x1 is a_partition of A by C1;
KK2:            x/\y c= A by A1,UJ,XBOOLE_1:108;
                set PP={p where p is Element of P: p misses x/\y}\/P1;
GH2:            PP is finite Subset of S
                proof
GHAA:             PP c= P\/P1
                  proof
                    let z be object;
                    assume z in PP;
                    then
UU:                 z in {p where p is Element of P: p misses x/\y}
                    or z in P1 by XBOOLE_0:def 3;
                    {p where p is Element of P: p misses x/\y} c= P
                    proof
                      let a be object;
                      assume a in {p where p is Element of P: p misses x/\y};
                      then consider p be Element of P such that
UU2:                  a=p and
                      p misses x/\y;
                      thus thesis by UU2;
                    end;
                    hence thesis by UU,XBOOLE_0:def 3;
                  end;
                  PP c= S
                  proof
                    let a be object;
                    assume a in PP;
                    then
GHAA:               a in {p where p is Element of P: p misses x/\y} or a in P1
                    by XBOOLE_0:def 3;
                    {p where p is Element of P: p misses x/\y} c= S
                    proof
                      let b be object;
                      assume b in {p where p is Element of P:
                      p misses x/\y};
                      then consider p be Element of P such that
GHC:                  b=p and
                      p misses x/\y;
                      b in P by GHC;
                      hence thesis by D1;
                    end;
                    hence thesis by GHAA;
                  end;
                  hence thesis by GHAA,D1;
                end;
                PP is a_partition of A
                proof
FD1:              PP c= bool A
                  proof
                    let z be object;
                    assume z in PP;
                    then
O1:                 z in {p where p is Element of P: p misses x/\y}
                    or z in P1 by XBOOLE_0:def 3;
O2:                 {p where p is Element of P: p misses x/\y} c= bool A
                    proof
                      let t be object;
                      assume t in
                      {p where p is Element of P: p misses x/\y};
                      then consider t0 be Element of P such that
O3:                   t=t0 & t0 misses x/\y;
                      thus thesis by O3;
                    end;
                    P1 c= bool A
                    proof
                      let t be object;
                      assume
X1:                   t in P1;
                      bool (x/\y) c= bool A
                      proof
X3:                     x in B;
                        x/\y c= x by XBOOLE_1:17;
                        then x/\y c= A by AA,X3,XBOOLE_1:1;
                        hence thesis by ZFMISC_1:67;
                      end;
                      then P1 c= bool A by F1,XBOOLE_1:1;
                      hence thesis by X1;
                    end;
                    hence thesis by O1,O2;
                  end;
FD2:              union PP = A
                  proof
                    thus union PP c= A
                    proof
                      let a be object;
                      assume
S0:                   a in union PP;
S1:                   union PP=
                      union {p where p is Element of P: p misses x/\y} \/
                      union P1
                      by ZFMISC_1:78;
S5:                   union P1 c= A by KK2,F1,EQREL_1:def 4;
                      union {p where p is Element of P: p misses x/\y} c= A
                      proof
S5a:                    {p where p is Element of P: p misses x/\y} c= P
                        proof
                          let a be object;
                          assume a in
                          {p where p is Element of P: p misses x/\y};
                          then consider b be Element of P such that
S6:                       a=b and
                          b misses x/\y;
                          thus thesis by S6;
                        end;
                        union P = A by EQREL_1:def 4;
                        hence thesis by S5a,ZFMISC_1:77;
                      end;
                      then union {p where p is Element of P:
                      p misses x/\y} \/ union P1 c= A
                      by S5,XBOOLE_1:8;
                      hence thesis by S0,S1;
                    end;
                    let a be object;
                    assume
PO0:                a in A;
                    per cases;
                    suppose
PO1:                  a in x/\y;
                      a in union P1 by PO1,F1,EQREL_1:def 4;
                      then a in union P1 \/ union
                      {p where p is Element of P: p misses x/\y}
                      by XBOOLE_1:7,TARSKI:def 3;
                      hence thesis by ZFMISC_1:78;
                    end;
                    suppose
I0:                   not a in x/\y;
                      union P = A by EQREL_1:def 4;
                      then consider b be set such that
I1:                   a in b and
I2:                   b in P by PO0,TARSKI:def 4;
                      consider u be set such that
W1:                   u in x1 '/\' y1 and
W2:                   b c= u by I2,D2,SETFAM_1:def 2;
                      consider xx1,yy1 be set such that
W3:                   xx1 in x1 & yy1 in y1 and
W4:                   u=xx1/\yy1 by W1,SETFAM_1:def 5;
W5W:                  xx1/\yy1 misses x/\y
                      proof
                        assume not xx1/\yy1 misses x/\y;
                        then consider i be object such that
W5A:                    i in (xx1/\yy1)/\(x/\y) by XBOOLE_0:def 1;
                        i in xx1/\yy1 & i in x/\y by W5A,XBOOLE_0:def 4;
                        then i in xx1 & i in yy1 & i in x & i in y
                        by XBOOLE_0:def 4;
                        then i in xx1/\x & i in yy1/\y by XBOOLE_0:def 4;
                        then xx1=x & yy1=y
                        by A1,C1,A3,C3,W3,EQREL_1:def 4,XBOOLE_0:def 7;
                        hence thesis by I0,I1,W2,W4;
                      end;
                      b misses x/\y
                      proof
                        assume not b misses x/\y;
                        then consider b0 be object such that
W6:                     b0 in b/\(x/\y) by XBOOLE_0:def 1;
                        b0 in b & b0 in x/\y by W6,XBOOLE_0:def 4;
                        hence thesis by W5W,W2,W4,XBOOLE_0:def 4;
                      end;
                      then b in {p where p is Element of P:
                      p misses x/\y} by I2;
                      then a in union {p where p is Element of P:
                      p misses x/\y} by I1,TARSKI:def 4;
                      then a in union {p where p is Element of P:
                      p misses x/\y} \/ union P1
                      by XBOOLE_1:7,TARSKI:def 3;
                      hence thesis by ZFMISC_1:78;
                    end;
                  end;
                  for a be Subset of A st a in PP holds a <> {} &
                  for b be Subset of A st b in PP holds a=b or a misses b
                  proof
                    let a be Subset of A;
                    assume a in PP;
                    then
DF1:                a in {p where p is Element of P: p misses x/\y} or
                    a in P1 by XBOOLE_0:def 3;
DF1A:               {p where p is Element of P: p misses x/\y} c= P
                    proof
                      let a be object;
                      assume a in {p where p is Element of P: p misses x/\y};
                      then consider p be Element of P such that
UU2:                  a=p and
                      p misses x/\y;
                      thus thesis by UU2;
                    end;
                    for b be Subset of A st b in PP holds a=b or a misses b
                    proof
                      let b be Subset of A;
                      assume b in PP;
                      then
DF5:                  b in {p where p is Element of P:
                      p misses x/\y} or
                      b in P1 by XBOOLE_0:def 3;
DF7A:                 a in {p where p is Element of P:
                      p misses x/\y} &
                      b in P1 implies a misses b
                      proof
                        assume that
QW1:                    a in {p where p is Element of P:
                        p misses x/\y} and
QW2:                    b in P1;
                        consider a0 be Element of P such that
QW3:                    a=a0 & a0 misses x/\y by QW1;
                        thus thesis by QW3,QW2,F1,XBOOLE_1:63;
                      end;
                      b in {p where p is Element of P:
                      p misses x/\y} &
                      a in P1 implies a misses b
                      proof
                        assume that
QW1:                    b in {p where p is Element of P:
                        p misses x/\y} and
QW2:                    a in P1;
                        consider b0 be Element of P such that
QW3:                    b=b0 & b0 misses x/\y by QW1;
                        thus thesis by QW3,QW2,F1,XBOOLE_1:63;
                      end;
                      hence thesis by DF1,DF5,DF1A,DF7A,F1,EQREL_1:def 4;
                    end;
                    hence thesis by F1,DF1A,DF1;
                  end;
                  hence thesis by FD1,FD2,EQREL_1:def 4;
                end;
                then d in PP & PP in PARTITIONS(A) & PP in Fin S
                by UP,XBOOLE_0:def 3,GH2,PARTIT1:def 3,FINSUB_1:def 5;
                then d in PP & PP in PARTITIONS(A) /\ Fin S
                by XBOOLE_0:def 4;
                then d in union (PARTITIONS(A)/\Fin S) by TARSKI:def 4;
                hence thesis by UP;
              end;
              hence thesis;
            end;
            hence thesis by F1;
          end;
          hence thesis by AA,Defcap;
        end;
      end;
    end;
