
theorem :: WWA6a:
  for X being finite set, C being Subset-Family of X st C is (C1) (C2)
  ex F being Full-family of X st C = candidate-keys F
proof
  let X be finite set, C be Subset-Family of X;
  set B = {b where b is Subset of X : for K being Subset of X st K in C holds
  not K c= b};
A1: [#]X = X;
  B c= bool X
  proof
    let x be object;
    assume x in B;
    then ex b being Subset of X st x = b & for K being Subset of X st K in C
    holds not K c= b;
    hence thesis;
  end;
  then reconsider BB = B as Subset-Family of X;
  set F = {[a, b] where a,b is Subset of X : for c being set st c in BB & a c=
  c holds b c= c};
  F = X deps_encl_by BB;
  then reconsider F as Full-family of X by Th33;
  assume
A2: C is (C1);
  assume
A3: C is (C2);
A4: now
    let x be set;
    assume
A5: x in C;
    then reconsider x9 = x as Subset of X;
    now
      let c be set;
      assume that
A6:   c in BB and
A7:   x9 c= c;
      ex b being Subset of X st c = b & for K being Subset of X st K in C
      holds not K c= b by A6;
      hence X c= c by A5,A7;
    end;
    then [x9,X] in F by A1;
    then consider a, b being Subset of X such that
A8: [a,b] in Maximal_wrt F and
A9: [a, b] >= [x9,[#]X] by Th26;
A10: a c= x9 by A9;
    X c= b by A9;
    then
A11: b = X by XBOOLE_0:def 10;
    assume
A12: not [x,X] in Maximal_wrt F;
    now
      let K be Subset of X;
      assume
A13:  K in C;
      assume
A14:  K c= a;
      then K c= x9 by A10;
      then K = x9 by A3,A5,A13;
      hence contradiction by A8,A10,A11,A12,A14,XBOOLE_0:def 10;
    end;
    then a in BB;
    then X c= a by A8,A11,Lm3;
    then X = a by XBOOLE_0:def 10;
    hence contradiction by A8,A10,A11,A12,XBOOLE_0:def 10;
  end;
  take F;
  now
    let x be object;
    hereby
      assume
A15:  x in C;
      then [x,X] in Maximal_wrt F by A4;
      hence x in candidate-keys F by A15;
    end;
    assume x in candidate-keys F;
    then consider A being Subset of X such that
A16: x = A and
A17: [A, X] in Maximal_wrt F;
    assume
A18: not x in C;
    now
A19:  A ^|^ X, F by A17;
      given K being Subset of X such that
A20:  K in C and
A21:  K c= A;
A22:  [K, [#]X] >= [A, [#]X] by A21;
      [K,X] in Maximal_wrt F by A4,A20;
      hence contradiction by A16,A18,A20,A19,A22,Th27;
    end;
    then
A23: A in BB;
    for c being set st c in BB holds c = X or not A c= c
    proof
      let c be set;
      assume that
A24:  c in BB and
A25:  not c = X;
      assume A c= c;
      then X c= c by A1,A17,A24,Lm3;
      hence contradiction by A24,A25,XBOOLE_0:def 10;
    end;
    then X in BB by A23;
    then
    ex b being Subset of X st b = X & for K being Subset of X st K in C
    holds not K c= b;
    then not ex K being object st K in C;
    hence contradiction by A2,XBOOLE_0:def 1;
  end;
  hence thesis by TARSKI:2;
end;
