
theorem :: WWA6:
  for R being DB-Rel holds candidate-keys Dependency-str R is (C1) (C2)
proof
  let D be DB-Rel;
  set F = Dependency-str D;
  set X = the Attributes of D;
A1: F is full_family by Th23;
  then
A2: Maximal_wrt F is (M2) by Th28;
  saturated-subsets F is (B1) by A1,Th32;
  then X in saturated-subsets F;
  then consider B, A be Subset of X such that
A3: X = B and
A4: A ^|^ B, F by Th31;
  [A,X] in Maximal_wrt F by A3,A4;
  then A in candidate-keys F;
  hence candidate-keys F is non empty;
  let k1, k2 be set such that
A5: k1 in candidate-keys F and
A6: k2 in candidate-keys F and
A7: k1 c= k2;
  consider a2 being Subset of X such that
A8: k2 = a2 and
A9: [a2, X] in Maximal_wrt F by A6;
  consider a1 being Subset of X such that
A10: k1 = a1 and
A11: [a1, X] in Maximal_wrt F by A5;
  [a1,[#]X] >= [a2,[#]X] by A7,A10,A8;
  hence thesis by A10,A11,A8,A9,A2;
end;
