let X be finite set ; for C being Subset-Family of X
for B being set st C is (C1) & C is (C2) & B = { b where b is Subset of X : for K being Subset of X st K in C holds
not K c= b } holds
C = candidate-keys (X deps_encl_by B)
let C be Subset-Family of X; for B being set st C is (C1) & C is (C2) & B = { b where b is Subset of X : for K being Subset of X st K in C holds
not K c= b } holds
C = candidate-keys (X deps_encl_by B)
let B be set ; ( C is (C1) & C is (C2) & B = { b where b is Subset of X : for K being Subset of X st K in C holds
not K c= b } implies C = candidate-keys (X deps_encl_by B) )
assume that
A1:
C is (C1)
and
A2:
C is (C2)
and
A3:
B = { b where b is Subset of X : for K being Subset of X st K in C holds
not K c= b }
; C = candidate-keys (X deps_encl_by B)
B c= bool X
then reconsider BB = B as Subset-Family of X ;
set F = X deps_encl_by B;
A4:
[#] X = X
;
A5:
now for x being set st x in C holds
[x,X] in Maximal_wrt (X deps_encl_by B)let x be
set ;
( x in C implies [x,X] in Maximal_wrt (X deps_encl_by B) )assume A6:
x in C
;
[x,X] in Maximal_wrt (X deps_encl_by B)then reconsider x9 =
x as
Subset of
X ;
now for c being set st c in BB & x9 c= c holds
X c= clet c be
set ;
( c in BB & x9 c= c implies X c= c )assume that A7:
c in BB
and A8:
x9 c= c
;
X 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 A3, A7;
hence
X c= c
by A6, A8;
verum end; then
[x9,X] in X deps_encl_by B
by A4;
then consider a,
b being
Subset of
X such that A9:
[a,b] in Maximal_wrt (X deps_encl_by B)
and A10:
[a,b] >= [x9,([#] X)]
by Th26;
A11:
a c= x9
by A10;
X c= b
by A10;
then A12:
b = X
by XBOOLE_0:def 10;
assume A13:
not
[x,X] in Maximal_wrt (X deps_encl_by B)
;
contradictionthen
a in BB
by A3;
then
X c= a
by A9, A12, Lm3;
then
X = a
by XBOOLE_0:def 10;
hence
contradiction
by A9, A11, A12, A13, XBOOLE_0:def 10;
verum end;
now for x being object holds
( ( x in C implies x in candidate-keys (X deps_encl_by B) ) & ( x in candidate-keys (X deps_encl_by B) implies x in C ) )let x be
object ;
( ( x in C implies x in candidate-keys (X deps_encl_by B) ) & ( x in candidate-keys (X deps_encl_by B) implies x in C ) )assume
x in candidate-keys (X deps_encl_by B)
;
x in Cthen consider A being
Subset of
X such that A17:
x = A
and A18:
[A,X] in Maximal_wrt (X deps_encl_by B)
;
assume A19:
not
x in C
;
contradictionnow for K being Subset of X holds
( not K in C or not K c= A )A20:
A ^|^ X,
X deps_encl_by B
by A18;
given K being
Subset of
X such that A21:
K in C
and A22:
K c= A
;
contradictionA23:
[K,([#] X)] >= [A,([#] X)]
by A22;
[K,X] in Maximal_wrt (X deps_encl_by B)
by A5, A21;
hence
contradiction
by A17, A19, A21, A20, A23, Th27;
verum end; then A24:
A in BB
by A3;
for
c being
set holds
( not
c in BB or
c = X or not
A c= c )
then
X in BB
by A24;
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 ) )
by A3;
then
for
K being
object holds not
K in C
;
hence
contradiction
by A1, XBOOLE_0:def 1;
verum end;
hence
C = candidate-keys (X deps_encl_by B)
by TARSKI:2; verum