
theorem Th37: :: WWA3b
:: Added for proving WWA7 where it is referenced but never
:: stated.  This characterizes the smallest full family
:: containing a given dependency set
  for X being finite non empty set, F being Dependency-set of X
holds F c= X deps_encl_by enclosure_of F & for G being Dependency-set of X st F
  c= G & G is full_family holds X deps_encl_by enclosure_of F c= G
proof
  let X be finite non empty set, F be Dependency-set of X;
  set B = enclosure_of F;
  set H = X deps_encl_by B;
  thus F c= H
  proof
    let x be object;
    assume
A1: x in F;
    then consider a, b being Subset of X such that
A2: x = [a,b] by Th9;
    now
      let c be set such that
A3:   c in B and
A4:   a c= c and
A5:   not b c= c;
      reconsider c as Subset of X by A3;
      ex c9 being Subset of X st c9 = c & for x, y being Subset of X st [x
      , y] in F & x c= c9 holds y c= c9 by A3;
      hence contradiction by A1,A2,A4,A5;
    end;
    hence thesis by A2;
  end;
  let G be Dependency-set of X such that
A6: F c= G and
A7: G is full_family;
  set B9 = saturated-subsets G;
  let z be object;
  set GG = {[e, f] where e, f is Subset of X : for c being set st c in B9 & e
  c= c holds f c= c};
A8: GG = X deps_encl_by B9;
  B is (B1) (B2) by Th36;
  then
A9: B = saturated-subsets H by Th35;
  assume z in H;
  then consider a, b being Subset of X such that
A10: z = [a,b] and
A11: for c being set st c in B & a c= c holds b c= c;
  B9 is (B1) (B2) by A7,Th32;
  then
A12: GG = G by A7,A8,Th35;
  B9 c= saturated-subsets H
  proof
    let d be object such that
A13: d in B9 and
A14: not d in saturated-subsets H;
    reconsider d as Subset of X by A13;
    consider x, y being Subset of X such that
A15: [x, y] in F and
A16: x c= d and
A17: not y c= d by A9,A14;
    [x,y] in G by A6,A15;
    then consider e, f being Subset of X such that
A18: [x,y] = [e,f] and
A19: for c being set st c in B9 & e c= c holds f c= c by A12;
A20: y = f by A18,XTUPLE_0:1;
    x = e by A18,XTUPLE_0:1;
    hence contradiction by A13,A16,A17,A19,A20;
  end;
  then for c be set st c in B9 & a c= c holds b c= c by A11,A9;
  hence thesis by A10,A12;
end;
