reserve Y for non empty set,
  G for Subset of PARTITIONS(Y),
  A,B,C,D,E,F for a_partition of Y;

theorem Th7:
  G={A,B,C,D} & A<>B & A<>C & A<>D implies CompF(A,G) = B '/\' C '/\' D
proof
  assume that
A1: G={A,B,C,D} and
A2: A<>B and
A3: A<>C and
A4: A<>D;
  per cases;
  suppose
A5: B = C;
    then G = {B,B,A,D} by A1,ENUMSET1:71
      .= {B,A,D} by ENUMSET1:31
      .= {A,B,D} by ENUMSET1:58;
    hence CompF(A,G)= B '/\' D by A2,A4,Th4
      .= B '/\' C '/\' D by A5,PARTIT1:13;
  end;
  suppose
A6: B = D;
    then G = {B,B,A,C} by A1,ENUMSET1:69
      .= {B,A,C} by ENUMSET1:31
      .= {A,B,C} by ENUMSET1:58;
    hence CompF(A,G) = B '/\' C by A2,A3,Th4
      .= B '/\' D '/\' C by A6,PARTIT1:13
      .= B '/\' C '/\' D by PARTIT1:14;
  end;
  suppose
A7: C = D;
    then G = {C,C,A,B} by A1,ENUMSET1:73
      .= {C,A,B} by ENUMSET1:31
      .= {A,B,C} by ENUMSET1:59;
    hence CompF(A,G) = B '/\' C by A2,A3,Th4
      .= B '/\' (C '/\' D) by A7,PARTIT1:13
      .= B '/\' C '/\' D by PARTIT1:14;
  end;
  suppose
A8: B<>C & B<>D & C<>D;
    G \ {A}={A} \/ {B,C,D} \ {A} by A1,ENUMSET1:4;
    then
A9: G \ {A} = ({A} \ {A}) \/ ({B,C,D} \ {A}) by XBOOLE_1:42;
A10: not B in {A} by A2,TARSKI:def 1;
A11: ( not C in {A})& not D in {A} by A3,A4,TARSKI:def 1;
    {B,C,D} \ {A} = ({B} \/ {C,D}) \ {A} by ENUMSET1:2
      .= ({B} \ {A}) \/ ({C,D} \ {A}) by XBOOLE_1:42
      .= ({B} \ {A}) \/ ({C,D}) by A11,ZFMISC_1:63
      .= {B} \/ {C,D} by A10,ZFMISC_1:59
      .= {B,C,D} by ENUMSET1:2;
    then
A12: G \ {A} = {} \/ {B,C,D} by A9,XBOOLE_1:37
      .= {B,C,D};
A13: B '/\' C '/\' D c= '/\' (G \ {A})
    proof
      let x be object;
     reconsider xx=x as set by TARSKI:1;
      assume
A14:  x in B '/\' C '/\' D;
      then
A15:  x<>{} by EQREL_1:def 4;
      x in INTERSECTION(B '/\' C,D) \ {{}} by A14,PARTIT1:def 4;
      then consider a,d being set such that
A16:  a in B '/\' C and
A17:  d in D and
A18:  x = a /\ d by SETFAM_1:def 5;
      a in INTERSECTION(B,C) \ {{}} by A16,PARTIT1:def 4;
      then consider b,c being set such that
A19:  b in B and
A20:  c in C and
A21:  a = b /\ c by SETFAM_1:def 5;
      set h = (B,C,D) --> (b,c,d);
A22:  h.D = d by FUNCT_7:94;
A23:  h.C = c by A8,Lm1;
A24:  rng h = {h.B,h.C,h.D} by Lm2
        .= {h.D,h.B,h.C} by ENUMSET1:59;
A25:  h.B = b by A8,FUNCT_4:134;
      rng h c= bool Y
      proof
        let t be object;
        assume
A26:    t in rng h;
        now
          per cases by A24,A26,ENUMSET1:def 1;
          case
            t=h.D;
            hence thesis by A17,A22;
          end;
          case
            t=h.B;
            hence thesis by A19,A25;
          end;
          case
            t=h.C;
            hence thesis by A20,A23;
          end;
        end;
        hence thesis;
      end;
      then reconsider F=rng h as Subset-Family of Y;
A27:  xx c= Intersect F
      proof
        let u be object;
        assume
A28:    u in xx;
        for y be set holds y in F implies u in y
        proof
          let y be set;
          assume
A29:      y in F;
          now
            per cases by A24,A29,ENUMSET1:def 1;
            case
              y=h.D;
              hence thesis by A18,A22,A28,XBOOLE_0:def 4;
            end;
            case
A30:          y=h.B;
              u in b /\ (c /\ d) by A18,A21,A28,XBOOLE_1:16;
              hence thesis by A25,A30,XBOOLE_0:def 4;
            end;
            case
A31:          y=h.C;
              u in c /\ (b /\ d) by A18,A21,A28,XBOOLE_1:16;
              hence thesis by A23,A31,XBOOLE_0:def 4;
            end;
          end;
          hence thesis;
        end;
        then u in meet F by A24,SETFAM_1:def 1;
        hence thesis by A24,SETFAM_1:def 9;
      end;
A32:  for p being set st p in (G \ {A}) holds h.p in p
      proof
        let p be set;
        assume
A33:    p in (G \ {A});
        now
          per cases by A12,A33,ENUMSET1:def 1;
          case
            p=D;
            hence thesis by A17,FUNCT_7:94;
          end;
          case
            p=B;
            hence thesis by A8,A19,FUNCT_4:134;
          end;
          case
            p=C;
            hence thesis by A8,A20,Lm1;
          end;
        end;
        hence thesis;
      end;
A34:  dom h = {B,C,D} by FUNCT_4:128;
      then D in dom h by ENUMSET1:def 1;
      then
A35:  rng h <> {} by FUNCT_1:3;
      Intersect F c= xx
      proof
        let t be object;
        assume t in Intersect F;
        then
A36:    t in meet (rng h) by A35,SETFAM_1:def 9;
        h.D in rng h by A24,ENUMSET1:def 1;
        then
A37:    t in h.D by A36,SETFAM_1:def 1;
        h.C in rng h by A24,ENUMSET1:def 1;
        then
A38:    t in h.C by A36,SETFAM_1:def 1;
        h.B in rng h by A24,ENUMSET1:def 1;
        then t in h.B by A36,SETFAM_1:def 1;
        then t in b /\ c by A25,A23,A38,XBOOLE_0:def 4;
        hence thesis by A18,A21,A22,A37,XBOOLE_0:def 4;
      end;
      then x = Intersect F by A27,XBOOLE_0:def 10;
      hence thesis by A12,A34,A32,A15,BVFUNC_2:def 1;
    end;
    '/\' (G \ {A}) c= B '/\' C '/\' D
    proof
      let x be object;
     reconsider xx=x as set by TARSKI:1;
      assume x in '/\' (G \ {A});
      then consider h being Function, F being Subset-Family of Y such that
A39:  dom h=(G \ {A}) and
A40:  rng h = F and
A41:  for d being set st d in (G \ {A}) holds h.d in d and
A42:  x=Intersect F and
A43:  x<>{} by BVFUNC_2:def 1;
      D in dom h by A12,A39,ENUMSET1:def 1;
      then
A44:  h.D in rng h by FUNCT_1:def 3;
      set m=h.B /\ h.C;
      B in dom h by A12,A39,ENUMSET1:def 1;
      then
A45:  h.B in rng h by FUNCT_1:def 3;
      C in dom h by A12,A39,ENUMSET1:def 1;
      then
A46:  h.C in rng h by FUNCT_1:def 3;
A47:  xx c= h.B /\ h.C /\ h.D
      proof
        let m be object;
        assume m in xx;
        then
A48:    m in meet (rng h) by A40,A42,A45,SETFAM_1:def 9;
        then m in h.B & m in h.C by A45,A46,SETFAM_1:def 1;
        then
A49:    m in h.B /\ h.C by XBOOLE_0:def 4;
        m in h.D by A44,A48,SETFAM_1:def 1;
        hence thesis by A49,XBOOLE_0:def 4;
      end;
      then m<>{} by A43;
      then
A50:  not m in {{}} by TARSKI:def 1;
      D in (G \ {A}) by A12,ENUMSET1:def 1;
      then
A51:  h.D in D by A41;
A52:  not x in {{}} by A43,TARSKI:def 1;
      C in (G \ {A}) by A12,ENUMSET1:def 1;
      then
A53:  h.C in C by A41;
      B in (G \ {A}) by A12,ENUMSET1:def 1;
      then h.B in B by A41;
      then m in INTERSECTION(B,C) by A53,SETFAM_1:def 5;
      then m in INTERSECTION(B,C) \ {{}} by A50,XBOOLE_0:def 5;
      then
A54:  m in B '/\' C by PARTIT1:def 4;
      h.B /\ h.C /\ h.D c= xx
      proof
        let m be object;
        assume
A55:    m in h.B /\ h.C /\ h.D;
        then
A56:    m in h.B /\ h.C by XBOOLE_0:def 4;
A57:    rng h c= {h.B,h.C,h.D}
        proof
          let u be object;
          assume u in rng h;
          then consider x1 being object such that
A58:      x1 in dom h and
A59:      u = h.x1 by FUNCT_1:def 3;
          now
            per cases by A12,A39,A58,ENUMSET1:def 1;
            case
              x1=B;
              hence thesis by A59,ENUMSET1:def 1;
            end;
            case
              x1=C;
              hence thesis by A59,ENUMSET1:def 1;
            end;
            case
              x1=D;
              hence thesis by A59,ENUMSET1:def 1;
            end;
          end;
          hence thesis;
        end;
        for y being set holds y in rng h implies m in y
        proof
          let y be set;
          assume
A60:      y in rng h;
          now
            per cases by A57,A60,ENUMSET1:def 1;
            case
              y=h.B;
              hence thesis by A56,XBOOLE_0:def 4;
            end;
            case
              y=h.C;
              hence thesis by A56,XBOOLE_0:def 4;
            end;
            case
              y=h.D;
              hence thesis by A55,XBOOLE_0:def 4;
            end;
          end;
          hence thesis;
        end;
        then m in meet (rng h) by A45,SETFAM_1:def 1;
        hence thesis by A40,A42,A45,SETFAM_1:def 9;
      end;
      then (h.B /\ h.C) /\ h.D = x by A47,XBOOLE_0:def 10;
      then x in INTERSECTION(B '/\' C,D) by A51,A54,SETFAM_1:def 5;
      then x in INTERSECTION(B '/\' C,D) \ {{}} by A52,XBOOLE_0:def 5;
      hence thesis by PARTIT1:def 4;
    end;
    then '/\' (G \ {A}) = B '/\' C '/\' D by A13,XBOOLE_0:def 10;
    hence thesis by BVFUNC_2:def 7;
  end;
end;
