
theorem Th57: ::  WWA7:
  for X being finite non empty set, F being Dependency-set of X
holds (for A, B being Subset of X holds [A, B] in Dependency-closure F iff for
  a being Subset of X st A c= a & not B c= a holds a in charact_set F) &
  saturated-subsets Dependency-closure F = (bool X) \ charact_set F
proof
  let A be finite non empty set, F be Dependency-set of A;
  set G = Dependency-closure F;
  set B = (bool A) \ charact_set F;
  set BB = {b where b is Subset of A : for x, y being Subset of A st [x, y] in
  F & x c= b holds y c= b};
  now
    let c be object;
    reconsider cc = c as set by TARSKI:1;
    hereby
      assume
A1:   c in B;
      then not c in charact_set F by XBOOLE_0:def 5;
      then
      for x, y being Subset of A st [x,y] in F & x c= cc holds y c= cc by A1;
      hence c in BB by A1;
    end;
    assume c in BB;
    then consider b being Subset of A such that
A2: c = b and
A3: for x, y being Subset of A st [x,y] in F & x c= b holds y c= b;
    not b in charact_set F by A3,Th55;
    hence c in B by A2,XBOOLE_0:def 5;
  end;
  then
A4: B = BB by TARSKI:2;
  reconsider B as Subset-Family of A;
A5: BB = enclosure_of F;
  then
A6: B is (B2) by A4,Th36;
  set FF = {[a, b] where a, b is Subset of A : for c being set st c in B & a
  c= c holds b c= c};
A7: FF = A deps_encl_by B;
  then reconsider FF as Dependency-set of A;
  F c= G by Def24;
  then
A8: FF c= G by A4,A5,A7,Th37;
A9: FF is full_family by A7,Th33;
  F c= FF by A4,A5,A7,Th37;
  then
A10: G c= FF by A9,Def24;
  hereby
    let X, Y be Subset of A;
    hereby
      assume [X, Y] in G;
      then [X,Y] in FF by A10;
      then consider a9, b9 being Subset of A such that
A11:  [a9,b9] = [X,Y] and
A12:  for c being set st c in B & a9 c= c holds b9 c= c;
A13:  b9 = Y by A11,XTUPLE_0:1;
      let a be Subset of A such that
A14:  X c= a and
A15:  not Y c= a;
      assume not a in charact_set F;
      then
A16:  a in B by XBOOLE_0:def 5;
      a9 = X by A11,XTUPLE_0:1;
      hence contradiction by A14,A15,A12,A13,A16;
    end;
    assume
A17: for a being Subset of A st X c= a & not Y c= a holds a in charact_set F;
    now
      let c be set such that
A18:  c in B and
A19:  X c= c and
A20:  not Y c= c;
      reconsider c as Subset of A by A18;
      not c in charact_set F by A18,XBOOLE_0:def 5;
      hence contradiction by A17,A19,A20;
    end;
    then [X,Y] in FF;
    hence [X, Y] in G by A8;
  end;
  for x, y be Subset of A st [x, y] in F & x c= A holds y c= A;
  then not [#]A in charact_set F by Th55;
  then A in B by XBOOLE_0:def 5;
  then
A21: B is (B1);
  G = FF by A10,A8,XBOOLE_0:def 10;
  hence thesis by A21,A6,A7,Th35;
end;
