
theorem Th35: ::  WWA3a:
  for X being finite non empty set, B being Subset-Family of X st
  B is (B1) (B2) holds B = saturated-subsets (X deps_encl_by B) & for G being
  Full-family of X st B = saturated-subsets G holds G = X deps_encl_by B
proof
  let X be finite non empty set, B be Subset-Family of X;
  set F = X deps_encl_by B;
  reconsider F9 = F as Full-family of X by Th33;
  set ss = saturated-subsets F;
  set M = Maximal_wrt F9;
  assume
A1: B is (B1) (B2);
  then reconsider B9 = B as non empty set;
A2: X in B by A1;
  now
    let x be object;
    B c= ss by Th34;
    hence x in B implies x in ss;
    assume x in ss;
    then consider b, a being Subset of X such that
A3: x = b and
A4: a ^|^ b, F by Th31;
    [a,b] in M by A4;
    then [a,b] in F;
    then consider aa, bb being Subset of X such that
A5: [a, b] = [aa, bb] and
A6: for c being set st c in B & aa c= c holds bb c= c;
A7: b = bb by A5,XTUPLE_0:1;
    set S = { b9 where b9 is Element of B9: a c= b9 };
A8: S c= bool X
    proof
      let x be object;
      assume x in S;
      then consider b9 being Element of B9 such that
A9:   x = b9 and
      a c= b9;
      b9 in B9;
      hence thesis by A9;
    end;
A10: S c= B
    proof
      let x be object;
      assume x in S;
      then ex b9 being Element of B9 st x = b9 & a c= b9;
      hence thesis;
    end;
A11: X in S by A2;
    reconsider S as Subset-Family of X by A8;
    set mS = Intersect S;
    reconsider mS as Subset of X;
A12: a = aa by A5,XTUPLE_0:1;
A13: b c= mS
    proof
      let x be object;
      assume
A14:  x in b;
      now
        let Y be set;
        assume Y in S;
        then consider b9 being Element of B9 such that
A15:    Y = b9 and
A16:    a c= b9;
        b c= b9 by A6,A12,A7,A16;
        hence x in Y by A14,A15;
      end;
      then x in meet S by A11,SETFAM_1:def 1;
      hence thesis by A11,SETFAM_1:def 9;
    end;
    now
      now
        let c be set;
        assume that
A17:    c in B and
A18:    a c= c;
        c in S by A17,A18;
        then meet S c= c by SETFAM_1:3;
        hence mS c= c by A11,SETFAM_1:def 9;
      end;
      then
A19:  [a,mS] in F;
      assume
A20:  b <> mS;
      [a,mS] >= [a,b] by A13;
      hence contradiction by A4,A20,A19,Th27;
    end;
    hence x in B by A1,A3,A10,Th1;
  end;
  hence B = saturated-subsets F by TARSKI:2;
  let G be Full-family of X;
  assume
A21: B = saturated-subsets G;
  set MG = Maximal_wrt G;
A22: MG is (M1)(M3) by Th28;
  now
    let x be object;
    hereby
      assume x in G;
      then reconsider x1 = x as Element of G;
      reconsider x9 = x1 as Dependency of X;
      consider a, b being Subset of X such that
A23:  x9 = [a,b] by Th8;
      now
        consider a99, b99 being Subset of X such that
A24:    [a99,b99] in MG and
A25:    [a99, b99] >= x9 by Th26;
A26:    b c= b99 by A23,A25;
        let b9 be set such that
A27:    b9 in B9 and
A28:    a c= b9;
        consider b19, a9 being Subset of X such that
A29:    b9 = b19 and
A30:    a9 ^|^ b19, G by A21,A27,Th31;
        a99 c= a by A23,A25;
        then
A31:    a99 c= b9 by A28;
        [a9,b9] in MG by A29,A30;
        then b99 c= b19 by A22,A29,A24,A31;
        hence b c= b9 by A29,A26;
      end;
      hence x in F by A23;
    end;
    assume x in F;
    then consider a, b being Subset of X such that
A32: x = [a,b] and
A33: for c being set st c in B & a c= c holds b c= c;
    consider a9, b9 being Subset of X such that
A34: [a9, b9] >= [a,a] and
A35: [a9, b9] in MG by A22;
A36: a9 c= a by A34;
    a9 ^|^ b9, G by A35;
    then
A37: b9 in B by A21;
    a c= b9 by A34;
    then b c= b9 by A33,A37;
    then [a9,b9] >= [a,b] by A36;
    hence x in G by A32,A35,Def12;
  end;
  hence thesis by TARSKI:2;
end;
