:: ARMSTRNG semantic presentation begin Lm1: now__::_thesis:_for_n_being_Element_of_NAT_ for_X_being_non_empty_set_ for_t_being_Tuple_of_n,X_holds_dom_t_=_Seg_n let n be Element of NAT ; ::_thesis: for X being non empty set for t being Tuple of n,X holds dom t = Seg n let X be non empty set ; ::_thesis: for t being Tuple of n,X holds dom t = Seg n let t be Tuple of n,X; ::_thesis: dom t = Seg n len t = n by CARD_1:def_7; hence dom t = Seg n by FINSEQ_1:def_3; ::_thesis: verum end; Lm2: now__::_thesis:_for_n_being_Element_of_NAT_ for_X_being_non_empty_set_ for_t_being_Element_of_n_-tuples_on_X_holds_dom_t_=_Seg_n let n be Element of NAT ; ::_thesis: for X being non empty set for t being Element of n -tuples_on X holds dom t = Seg n let X be non empty set ; ::_thesis: for t being Element of n -tuples_on X holds dom t = Seg n let t be Element of n -tuples_on X; ::_thesis: dom t = Seg n len t = n by CARD_1:def_7; hence dom t = Seg n by FINSEQ_1:def_3; ::_thesis: verum end; theorem Th1: :: ARMSTRNG:1 for B being set st B is cap-closed holds for X being set for S being finite Subset-Family of X st X in B & S c= B holds Intersect S in B proof let B be set ; ::_thesis: ( B is cap-closed implies for X being set for S being finite Subset-Family of X st X in B & S c= B holds Intersect S in B ) assume A1: B is cap-closed ; ::_thesis: for X being set for S being finite Subset-Family of X st X in B & S c= B holds Intersect S in B let X be set ; ::_thesis: for S being finite Subset-Family of X st X in B & S c= B holds Intersect S in B let S be finite Subset-Family of X; ::_thesis: ( X in B & S c= B implies Intersect S in B ) assume that A2: X in B and A3: S c= B ; ::_thesis: Intersect S in B defpred S1[ set ] means for sf being Subset-Family of X st sf = $1 holds Intersect sf in B; A4: now__::_thesis:_for_x,_b_being_set_st_x_in_S_&_b_c=_S_&_S1[b]_holds_ S1[b_\/_{x}] let x, b be set ; ::_thesis: ( x in S & b c= S & S1[b] implies S1[b \/ {x}] ) assume that A5: x in S and A6: b c= S and A7: S1[b] ; ::_thesis: S1[b \/ {x}] thus S1[b \/ {x}] ::_thesis: verum proof reconsider fx = {x} as Subset-Family of X by A5, ZFMISC_1:31; reconsider fb = b as Subset-Family of X by A6, XBOOLE_1:1; reconsider sx = x as Subset of X by A5; A8: Intersect (fb \/ fx) = (Intersect fb) /\ (Intersect fx) by MSSUBFAM:8 .= (Intersect fb) /\ sx by MSSUBFAM:9 ; A9: Intersect fb in B by A7; let sf be Subset-Family of X; ::_thesis: ( sf = b \/ {x} implies Intersect sf in B ) assume sf = b \/ {x} ; ::_thesis: Intersect sf in B hence Intersect sf in B by A1, A3, A5, A9, A8, FINSUB_1:def_2; ::_thesis: verum end; end; A10: S is finite ; A11: S1[ {} ] by A2, SETFAM_1:def_9; S1[S] from FINSET_1:sch_2(A10, A11, A4); hence Intersect S in B ; ::_thesis: verum end; registration cluster non empty Relation-like reflexive antisymmetric transitive for set ; existence ex b1 being Relation st ( b1 is reflexive & b1 is antisymmetric & b1 is transitive & not b1 is empty ) proof set R = {[{},{}]}; reconsider R = {[{},{}]} as Relation ; take R ; ::_thesis: ( R is reflexive & R is antisymmetric & R is transitive & not R is empty ) A1: field R = {{},{}} by RELAT_1:17 .= {{}} by ENUMSET1:29 ; thus R is reflexive ::_thesis: ( R is antisymmetric & R is transitive & not R is empty ) proof let x be set ; :: according to RELAT_2:def_1,RELAT_2:def_9 ::_thesis: ( not x in field R or [x,x] in R ) assume x in field R ; ::_thesis: [x,x] in R then x = {} by A1, TARSKI:def_1; hence [x,x] in R by TARSKI:def_1; ::_thesis: verum end; thus R is antisymmetric ::_thesis: ( R is transitive & not R is empty ) proof let x, y be set ; :: according to RELAT_2:def_4,RELAT_2:def_12 ::_thesis: ( not x in field R or not y in field R or not [x,y] in R or not [y,x] in R or x = y ) assume that A2: x in field R and A3: y in field R and [x,y] in R and [y,x] in R ; ::_thesis: x = y x = {} by A1, A2, TARSKI:def_1; hence x = y by A1, A3, TARSKI:def_1; ::_thesis: verum end; thus R is transitive ::_thesis: not R is empty proof let x, y, z be set ; :: according to RELAT_2:def_8,RELAT_2:def_16 ::_thesis: ( not x in field R or not y in field R or not z in field R or not [x,y] in R or not [y,z] in R or [x,z] in R ) assume that A4: x in field R and y in field R and A5: z in field R and [x,y] in R and [y,z] in R ; ::_thesis: [x,z] in R A6: z = {} by A1, A5, TARSKI:def_1; x = {} by A1, A4, TARSKI:def_1; hence [x,z] in R by A6, TARSKI:def_1; ::_thesis: verum end; thus not R is empty ; ::_thesis: verum end; end; theorem Th2: :: ARMSTRNG:2 for R being non empty antisymmetric transitive Relation for X being finite Subset of (field R) st X <> {} holds ex x being Element of X st x is_maximal_wrt X,R proof let R be non empty antisymmetric transitive Relation; ::_thesis: for X being finite Subset of (field R) st X <> {} holds ex x being Element of X st x is_maximal_wrt X,R let X be finite Subset of (field R); ::_thesis: ( X <> {} implies ex x being Element of X st x is_maximal_wrt X,R ) reconsider IR = R as Relation of (field R) by PRE_POLY:18; set S = RelStr(# (field R),IR #); set CR = the carrier of RelStr(# (field R),IR #); set ir = the InternalRel of RelStr(# (field R),IR #); A1: not the carrier of RelStr(# (field R),IR #) is empty ; A2: R is_transitive_in field R by RELAT_2:def_16; A3: RelStr(# (field R),IR #) is transitive proof let x, y, z be Element of RelStr(# (field R),IR #); :: according to YELLOW_0:def_2 ::_thesis: ( not x <= y or not y <= z or x <= z ) assume that A4: x <= y and A5: y <= z ; ::_thesis: x <= z A6: [y,z] in the InternalRel of RelStr(# (field R),IR #) by A5, ORDERS_2:def_5; [x,y] in the InternalRel of RelStr(# (field R),IR #) by A4, ORDERS_2:def_5; then [x,z] in the InternalRel of RelStr(# (field R),IR #) by A1, A2, A6, RELAT_2:def_8; hence x <= z by ORDERS_2:def_5; ::_thesis: verum end; A7: R is_antisymmetric_in field R by RELAT_2:def_12; RelStr(# (field R),IR #) is antisymmetric proof let x, y be Element of RelStr(# (field R),IR #); :: according to YELLOW_0:def_3 ::_thesis: ( not x <= y or not y <= x or x = y ) assume that A8: x <= y and A9: y <= x ; ::_thesis: x = y A10: [y,x] in the InternalRel of RelStr(# (field R),IR #) by A9, ORDERS_2:def_5; [x,y] in the InternalRel of RelStr(# (field R),IR #) by A8, ORDERS_2:def_5; hence x = y by A1, A7, A10, RELAT_2:def_4; ::_thesis: verum end; then reconsider S = RelStr(# (field R),IR #) as non empty transitive antisymmetric RelStr by A3; reconsider Y = X as finite Subset of the carrier of RelStr(# (field R),IR #) ; assume X <> {} ; ::_thesis: ex x being Element of X st x is_maximal_wrt X,R then consider x being Element of S such that A11: x in Y and A12: x is_maximal_wrt Y, the InternalRel of S by BAGORDER:6; reconsider x = x as Element of X by A11; take x ; ::_thesis: x is_maximal_wrt X,R thus x in X by A11; :: according to WAYBEL_4:def_23 ::_thesis: for b1 being set holds ( not b1 in X or b1 = x or not [x,b1] in R ) given y being set such that A13: y in X and A14: y <> x and A15: [x,y] in R ; ::_thesis: contradiction thus contradiction by A12, A13, A14, A15, WAYBEL_4:def_23; ::_thesis: verum end; scheme :: ARMSTRNG:sch 1 SubsetSEq{ F1() -> set , P1[ set ] } : for X1, X2 being Subset of F1() st ( for y being set holds ( y in X1 iff P1[y] ) ) & ( for y being set holds ( y in X2 iff P1[y] ) ) holds X1 = X2 proof let X1, X2 be Subset of F1(); ::_thesis: ( ( for y being set holds ( y in X1 iff P1[y] ) ) & ( for y being set holds ( y in X2 iff P1[y] ) ) implies X1 = X2 ) assume that A1: for y being set holds ( y in X1 iff P1[y] ) and A2: for y being set holds ( y in X2 iff P1[y] ) ; ::_thesis: X1 = X2 for x being set holds ( x in X1 iff x in X2 ) proof let x be set ; ::_thesis: ( x in X1 iff x in X2 ) hereby ::_thesis: ( x in X2 implies x in X1 ) assume x in X1 ; ::_thesis: x in X2 then P1[x] by A1; hence x in X2 by A2; ::_thesis: verum end; assume x in X2 ; ::_thesis: x in X1 then P1[x] by A2; hence x in X1 by A1; ::_thesis: verum end; hence X1 = X2 by TARSKI:1; ::_thesis: verum end; definition let X be set ; let R be Relation; funcR Maximal_in X -> Subset of X means :Def1: :: ARMSTRNG:def 1 for x being set holds ( x in it iff x is_maximal_wrt X,R ); existence ex b1 being Subset of X st for x being set holds ( x in b1 iff x is_maximal_wrt X,R ) proof defpred S1[ set ] means $1 is_maximal_wrt X,R; consider I being set such that A1: for x being set holds ( x in I iff ( x in X & S1[x] ) ) from XBOOLE_0:sch_1(); for x being set st x in I holds x in X by A1; then reconsider I = I as Subset of X by TARSKI:def_3; take I ; ::_thesis: for x being set holds ( x in I iff x is_maximal_wrt X,R ) let x be set ; ::_thesis: ( x in I iff x is_maximal_wrt X,R ) thus ( x in I implies x is_maximal_wrt X,R ) by A1; ::_thesis: ( x is_maximal_wrt X,R implies x in I ) assume A2: x is_maximal_wrt X,R ; ::_thesis: x in I then x in X by WAYBEL_4:def_23; hence x in I by A1, A2; ::_thesis: verum end; uniqueness for b1, b2 being Subset of X st ( for x being set holds ( x in b1 iff x is_maximal_wrt X,R ) ) & ( for x being set holds ( x in b2 iff x is_maximal_wrt X,R ) ) holds b1 = b2 proof defpred S1[ set ] means $1 is_maximal_wrt X,R; thus for X1, X2 being Subset of X st ( for y being set holds ( y in X1 iff S1[y] ) ) & ( for y being set holds ( y in X2 iff S1[y] ) ) holds X1 = X2 from ARMSTRNG:sch_1(); ::_thesis: verum end; end; :: deftheorem Def1 defines Maximal_in ARMSTRNG:def_1_:_ for X being set for R being Relation for b3 being Subset of X holds ( b3 = R Maximal_in X iff for x being set holds ( x in b3 iff x is_maximal_wrt X,R ) ); definition let x, X be set ; predx is_/\-irreducible_in X means :Def2: :: ARMSTRNG:def 2 ( x in X & ( for z, y being set st z in X & y in X & x = z /\ y & not x = z holds x = y ) ); end; :: deftheorem Def2 defines is_/\-irreducible_in ARMSTRNG:def_2_:_ for x, X being set holds ( x is_/\-irreducible_in X iff ( x in X & ( for z, y being set st z in X & y in X & x = z /\ y & not x = z holds x = y ) ) ); notation let x, X be set ; antonym x is_/\-reducible_in X for x is_/\-irreducible_in X; end; definition let X be non empty set ; func /\-IRR X -> Subset of X means :Def3: :: ARMSTRNG:def 3 for x being set holds ( x in it iff x is_/\-irreducible_in X ); existence ex b1 being Subset of X st for x being set holds ( x in b1 iff x is_/\-irreducible_in X ) proof set irr = { z where z is Element of X : z is_/\-irreducible_in X } ; { z where z is Element of X : z is_/\-irreducible_in X } c= X proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { z where z is Element of X : z is_/\-irreducible_in X } or x in X ) assume x in { z where z is Element of X : z is_/\-irreducible_in X } ; ::_thesis: x in X then ex z being Element of X st ( x = z & z is_/\-irreducible_in X ) ; hence x in X ; ::_thesis: verum end; then reconsider irr = { z where z is Element of X : z is_/\-irreducible_in X } as Subset of X ; take irr ; ::_thesis: for x being set holds ( x in irr iff x is_/\-irreducible_in X ) let x be set ; ::_thesis: ( x in irr iff x is_/\-irreducible_in X ) hereby ::_thesis: ( x is_/\-irreducible_in X implies x in irr ) assume x in irr ; ::_thesis: x is_/\-irreducible_in X then ex z being Element of X st ( x = z & z is_/\-irreducible_in X ) ; hence x is_/\-irreducible_in X ; ::_thesis: verum end; assume A1: x is_/\-irreducible_in X ; ::_thesis: x in irr then x in X by Def2; hence x in irr by A1; ::_thesis: verum end; uniqueness for b1, b2 being Subset of X st ( for x being set holds ( x in b1 iff x is_/\-irreducible_in X ) ) & ( for x being set holds ( x in b2 iff x is_/\-irreducible_in X ) ) holds b1 = b2 proof defpred S1[ set ] means $1 is_/\-irreducible_in X; thus for X1, X2 being Subset of X st ( for y being set holds ( y in X1 iff S1[y] ) ) & ( for y being set holds ( y in X2 iff S1[y] ) ) holds X1 = X2 from ARMSTRNG:sch_1(); ::_thesis: verum end; end; :: deftheorem Def3 defines /\-IRR ARMSTRNG:def_3_:_ for X being non empty set for b2 being Subset of X holds ( b2 = /\-IRR X iff for x being set holds ( x in b2 iff x is_/\-irreducible_in X ) ); scheme :: ARMSTRNG:sch 2 FinIntersect{ F1() -> non empty finite set , P1[ set ] } : for x being set st x in F1() holds P1[x] provided A1: for x being set st x is_/\-irreducible_in F1() holds P1[x] and A2: for x, y being set st x in F1() & y in F1() & P1[x] & P1[y] holds P1[x /\ y] proof deffunc H1( set ) -> set = { x where x is Element of F1() : $1 c= x } ; given x being set such that A3: x in F1() and A4: P1[x] ; ::_thesis: contradiction defpred S1[ Nat] means ex s being Element of F1() st ( card H1(s) = $1 & P1[s] ); H1(x) c= F1() proof let x1 be set ; :: according to TARSKI:def_3 ::_thesis: ( not x1 in H1(x) or x1 in F1() ) assume x1 in H1(x) ; ::_thesis: x1 in F1() then ex xx being Element of F1() st ( x1 = xx & x c= xx ) ; hence x1 in F1() ; ::_thesis: verum end; then reconsider Ux = H1(x) as finite set ; A5: ex k being Nat st S1[k] proof reconsider x = x as Element of F1() by A3; take k = card Ux; ::_thesis: S1[k] take x ; ::_thesis: ( card H1(x) = k & P1[x] ) thus card H1(x) = k ; ::_thesis: P1[x] thus P1[x] by A4; ::_thesis: verum end; consider k being Nat such that A6: S1[k] and A7: for n being Nat st S1[n] holds k <= n from NAT_1:sch_5(A5); consider s being Element of F1() such that A8: card H1(s) = k and A9: P1[s] by A6; percases ( s is_/\-irreducible_in F1() or s is_/\-reducible_in F1() ) ; suppose s is_/\-irreducible_in F1() ; ::_thesis: contradiction hence contradiction by A1, A9; ::_thesis: verum end; supposeA10: s is_/\-reducible_in F1() ; ::_thesis: contradiction H1(s) c= F1() proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in H1(s) or x in F1() ) assume x in H1(s) ; ::_thesis: x in F1() then ex xx being Element of F1() st ( x = xx & s c= xx ) ; hence x in F1() ; ::_thesis: verum end; then reconsider Us = H1(s) as finite set ; consider z, y being set such that A11: z in F1() and A12: y in F1() and A13: s = z /\ y and A14: s <> z and A15: s <> y by A10, Def2; A16: s c= y by A13, XBOOLE_1:17; H1(z) c= F1() proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in H1(z) or x in F1() ) assume x in H1(z) ; ::_thesis: x in F1() then ex xx being Element of F1() st ( x = xx & z c= xx ) ; hence x in F1() ; ::_thesis: verum end; then reconsider Uz = H1(z) as finite set ; H1(y) c= F1() proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in H1(y) or x in F1() ) assume x in H1(y) ; ::_thesis: x in F1() then ex xx being Element of F1() st ( x = xx & y c= xx ) ; hence x in F1() ; ::_thesis: verum end; then reconsider Uy = H1(y) as finite set ; A17: s c= z by A13, XBOOLE_1:17; reconsider y = y, z = z as Element of F1() by A11, A12; A18: Uy c= Us proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in Uy or x in Us ) assume x in Uy ; ::_thesis: x in Us then consider xx being Element of F1() such that A19: x = xx and A20: y c= xx ; s c= xx by A16, A20, XBOOLE_1:1; hence x in Us by A19; ::_thesis: verum end; now__::_thesis:_not_s_in_Uy assume s in Uy ; ::_thesis: contradiction then ex x being Element of F1() st ( s = x & y c= x ) ; hence contradiction by A15, A16, XBOOLE_0:def_10; ::_thesis: verum end; then Uy <> Us ; then Uy c< Us by A18, XBOOLE_0:def_8; then card Us > card Uy by TREES_1:6; then A21: P1[y] by A7, A8; A22: Uz c= Us proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in Uz or x in Us ) assume x in Uz ; ::_thesis: x in Us then consider xx being Element of F1() such that A23: x = xx and A24: z c= xx ; s c= xx by A17, A24, XBOOLE_1:1; hence x in Us by A23; ::_thesis: verum end; now__::_thesis:_not_s_in_Uz assume s in Uz ; ::_thesis: contradiction then ex x being Element of F1() st ( s = x & z c= x ) ; hence contradiction by A14, A17, XBOOLE_0:def_10; ::_thesis: verum end; then Uz <> Us ; then Uz c< Us by A22, XBOOLE_0:def_8; then card Us > card Uz by TREES_1:6; then P1[z] by A7, A8; hence contradiction by A2, A9, A13, A21; ::_thesis: verum end; end; end; theorem Th3: :: ARMSTRNG:3 for X being non empty finite set for x being Element of X ex A being non empty Subset of X st ( x = meet A & ( for s being set st s in A holds s is_/\-irreducible_in X ) ) proof let X be non empty finite set ; ::_thesis: for x being Element of X ex A being non empty Subset of X st ( x = meet A & ( for s being set st s in A holds s is_/\-irreducible_in X ) ) let x be Element of X; ::_thesis: ex A being non empty Subset of X st ( x = meet A & ( for s being set st s in A holds s is_/\-irreducible_in X ) ) defpred S1[ set ] means ex S being non empty Subset of X st ( $1 = meet S & ( for s being set st s in S holds s is_/\-irreducible_in X ) ); A1: now__::_thesis:_for_x,_y_being_set_st_x_in_X_&_y_in_X_&_S1[x]_&_S1[y]_holds_ S1[x_/\_y] let x, y be set ; ::_thesis: ( x in X & y in X & S1[x] & S1[y] implies S1[x /\ y] ) assume that x in X and y in X and A2: S1[x] and A3: S1[y] ; ::_thesis: S1[x /\ y] consider Sy being non empty Subset of X such that A4: y = meet Sy and A5: for s being set st s in Sy holds s is_/\-irreducible_in X by A3; consider Sx being non empty Subset of X such that A6: x = meet Sx and A7: for s being set st s in Sx holds s is_/\-irreducible_in X by A2; reconsider S = Sx \/ Sy as non empty Subset of X ; now__::_thesis:_ex_S_being_non_empty_Subset_of_X_st_ (_x_/\_y_=_meet_S_&_(_for_s_being_set_st_s_in_S_holds_ s_is_/\-irreducible_in_X_)_) take S = S; ::_thesis: ( x /\ y = meet S & ( for s being set st s in S holds b3 is_/\-irreducible_in X ) ) thus x /\ y = meet S by A6, A4, SETFAM_1:9; ::_thesis: for s being set st s in S holds b3 is_/\-irreducible_in X let s be set ; ::_thesis: ( s in S implies b2 is_/\-irreducible_in X ) assume A8: s in S ; ::_thesis: b2 is_/\-irreducible_in X percases ( s in Sx or s in Sy ) by A8, XBOOLE_0:def_3; suppose s in Sx ; ::_thesis: b2 is_/\-irreducible_in X hence s is_/\-irreducible_in X by A7; ::_thesis: verum end; suppose s in Sy ; ::_thesis: b2 is_/\-irreducible_in X hence s is_/\-irreducible_in X by A5; ::_thesis: verum end; end; end; hence S1[x /\ y] ; ::_thesis: verum end; A9: now__::_thesis:_for_x_being_set_st_x_is_/\-irreducible_in_X_holds_ S1[x] let x be set ; ::_thesis: ( x is_/\-irreducible_in X implies S1[x] ) assume A10: x is_/\-irreducible_in X ; ::_thesis: S1[x] thus S1[x] ::_thesis: verum proof x in X by A10, Def2; then reconsider S = {x} as non empty Subset of X by ZFMISC_1:31; take S ; ::_thesis: ( x = meet S & ( for s being set st s in S holds s is_/\-irreducible_in X ) ) thus x = meet S by SETFAM_1:10; ::_thesis: for s being set st s in S holds s is_/\-irreducible_in X let s be set ; ::_thesis: ( s in S implies s is_/\-irreducible_in X ) assume s in S ; ::_thesis: s is_/\-irreducible_in X hence s is_/\-irreducible_in X by A10, TARSKI:def_1; ::_thesis: verum end; end; for x being set st x in X holds S1[x] from ARMSTRNG:sch_2(A9, A1); hence ex A being non empty Subset of X st ( x = meet A & ( for s being set st s in A holds s is_/\-irreducible_in X ) ) ; ::_thesis: verum end; definition let X be set ; let B be Subset-Family of X; attrB is (B1) means :Def4: :: ARMSTRNG:def 4 X in B; end; :: deftheorem Def4 defines (B1) ARMSTRNG:def_4_:_ for X being set for B being Subset-Family of X holds ( B is (B1) iff X in B ); notation let B be set ; synonym (B2) B for cap-closed ; end; registration let X be set ; cluster (B2) (B1) for Element of bool (bool X); existence ex b1 being Subset-Family of X st ( b1 is (B1) & b1 is (B2) ) proof set B = {X}; reconsider B = {X} as Subset-Family of X by ZFMISC_1:68; take B ; ::_thesis: ( B is (B1) & B is (B2) ) X in B by TARSKI:def_1; hence B is (B1) by Def4; ::_thesis: B is (B2) thus B is (B2) ::_thesis: verum proof let a, b be set ; :: according to FINSUB_1:def_2 ::_thesis: ( not a in B or not b in B or a /\ b in B ) assume that A1: a in B and A2: b in B ; ::_thesis: a /\ b in B A3: b = X by A2, TARSKI:def_1; a = X by A1, TARSKI:def_1; hence a /\ b in B by A3, TARSKI:def_1; ::_thesis: verum end; end; end; theorem Th4: :: ARMSTRNG:4 for X being set for B being non empty Subset-Family of X st B is cap-closed holds for x being Element of B st x is_/\-irreducible_in B & x <> X holds for S being finite Subset-Family of X st S c= B & x = Intersect S holds x in S proof let X be set ; ::_thesis: for B being non empty Subset-Family of X st B is cap-closed holds for x being Element of B st x is_/\-irreducible_in B & x <> X holds for S being finite Subset-Family of X st S c= B & x = Intersect S holds x in S let B be non empty Subset-Family of X; ::_thesis: ( B is cap-closed implies for x being Element of B st x is_/\-irreducible_in B & x <> X holds for S being finite Subset-Family of X st S c= B & x = Intersect S holds x in S ) assume A1: B is (B2) ; ::_thesis: for x being Element of B st x is_/\-irreducible_in B & x <> X holds for S being finite Subset-Family of X st S c= B & x = Intersect S holds x in S let x be Element of B; ::_thesis: ( x is_/\-irreducible_in B & x <> X implies for S being finite Subset-Family of X st S c= B & x = Intersect S holds x in S ) assume that A2: x is_/\-irreducible_in B and A3: x <> X ; ::_thesis: for S being finite Subset-Family of X st S c= B & x = Intersect S holds x in S defpred S1[ set ] means ( ex a, b being Element of B st ( x <> a & x <> b & x = a /\ b ) or ex f being Subset-Family of X st ( $1 = {} or ( $1 <> {} & $1 = f & Intersect f <> x & Intersect f in B ) ) ); let S be finite Subset-Family of X; ::_thesis: ( S c= B & x = Intersect S implies x in S ) assume that A4: S c= B and A5: x = Intersect S and A6: not x in S ; ::_thesis: contradiction A7: now__::_thesis:_for_s,_A_being_set_st_s_in_S_&_A_c=_S_&_S1[A]_holds_ S1[A_\/_{s}] let s, A be set ; ::_thesis: ( s in S & A c= S & S1[A] implies S1[b2 \/ {b1}] ) assume that A8: s in S and A c= S and A9: S1[A] ; ::_thesis: S1[b2 \/ {b1}] percases ( ex a, b being Element of B st ( x <> a & x <> b & x = a /\ b ) or ex f being Subset-Family of X st ( A = {} or ( A = f & Intersect f <> x & Intersect f in B ) ) ) by A9; suppose ex a, b being Element of B st ( x <> a & x <> b & x = a /\ b ) ; ::_thesis: S1[b2 \/ {b1}] hence S1[A \/ {s}] ; ::_thesis: verum end; suppose ex f being Subset-Family of X st ( A = {} or ( A = f & Intersect f <> x & Intersect f in B ) ) ; ::_thesis: S1[b2 \/ {b1}] then consider f being Subset-Family of X such that A10: ( A = {} or ( A <> {} & A = f & Intersect f <> x & Intersect f in B ) ) ; thus S1[A \/ {s}] ::_thesis: verum proof reconsider sf = {s} as Subset-Family of X by A8, ZFMISC_1:31; A11: Intersect sf = meet sf by SETFAM_1:def_9; then A12: Intersect sf = s by SETFAM_1:10; percases ( A = {} or ( A <> {} & A = f & Intersect f <> x & Intersect f in B ) ) by A10; suppose A = {} ; ::_thesis: S1[A \/ {s}] hence S1[A \/ {s}] by A4, A6, A8, A12; ::_thesis: verum end; supposeA13: ( A <> {} & A = f & Intersect f <> x & Intersect f in B ) ; ::_thesis: S1[A \/ {s}] then reconsider As = A \/ sf as non empty Subset-Family of X by XBOOLE_1:8; A14: Intersect As = meet As by SETFAM_1:def_9 .= (meet A) /\ (meet sf) by A13, SETFAM_1:9 ; A15: Intersect f = meet f by A13, SETFAM_1:def_9; thus S1[A \/ {s}] ::_thesis: verum proof percases ( Intersect As <> x or Intersect As = x ) ; supposeA16: Intersect As <> x ; ::_thesis: S1[A \/ {s}] Intersect As in B by A1, A4, A8, A11, A12, A13, A15, A14, FINSUB_1:def_2; hence S1[A \/ {s}] by A16; ::_thesis: verum end; suppose Intersect As = x ; ::_thesis: S1[A \/ {s}] hence S1[A \/ {s}] by A4, A6, A8, A11, A12, A13, A15, A14; ::_thesis: verum end; end; end; end; end; end; end; end; end; A17: S1[ {} ] ; A18: S is finite ; S1[S] from FINSET_1:sch_2(A18, A17, A7); hence contradiction by A2, A3, A5, Def2, SETFAM_1:def_9; ::_thesis: verum end; registration let X, D be non empty set ; let n be Element of NAT ; cluster Function-like V24(X,n -tuples_on D) -> FinSequence-yielding for Element of bool [:X,(n -tuples_on D):]; coherence for b1 being Function of X,(n -tuples_on D) holds b1 is FinSequence-yielding proof let f be Function of X,(n -tuples_on D); ::_thesis: f is FinSequence-yielding let x be set ; :: according to PRE_POLY:def_3 ::_thesis: ( not x in proj1 f or f . x is set ) assume x in dom f ; ::_thesis: f . x is set then reconsider fx = f . x as Element of n -tuples_on D by FUNCT_2:5; thus f . x is set ; ::_thesis: verum end; end; registration let f be FinSequence-yielding Function; let x be set ; clusterf . x -> FinSequence-like ; coherence f . x is FinSequence-like proof percases ( x in dom f or not x in dom f ) ; suppose x in dom f ; ::_thesis: f . x is FinSequence-like hence f . x is FinSequence-like by PRE_POLY:def_3; ::_thesis: verum end; suppose not x in dom f ; ::_thesis: f . x is FinSequence-like hence f . x is FinSequence-like by FUNCT_1:def_2; ::_thesis: verum end; end; end; end; definition let n be Element of NAT ; let p, q be Tuple of n, BOOLEAN ; funcp '&' q -> Tuple of n, BOOLEAN means :Def5: :: ARMSTRNG:def 5 for i being set st i in Seg n holds it . i = (p /. i) '&' (q /. i); existence ex b1 being Tuple of n, BOOLEAN st for i being set st i in Seg n holds b1 . i = (p /. i) '&' (q /. i) proof deffunc H1( set ) -> Element of BOOLEAN = (p /. $1) '&' (q /. $1); consider z being FinSequence of BOOLEAN such that A1: len z = n and A2: for j being Nat st j in dom z holds z . j = H1(j) from FINSEQ_2:sch_1(); A3: dom z = Seg n by A1, FINSEQ_1:def_3; z in BOOLEAN * by FINSEQ_1:def_11; then z in n -tuples_on BOOLEAN by A1; then reconsider z = z as Element of n -tuples_on BOOLEAN ; take z ; ::_thesis: for i being set st i in Seg n holds z . i = (p /. i) '&' (q /. i) let i be set ; ::_thesis: ( i in Seg n implies z . i = (p /. i) '&' (q /. i) ) assume i in Seg n ; ::_thesis: z . i = (p /. i) '&' (q /. i) hence z . i = (p /. i) '&' (q /. i) by A2, A3; ::_thesis: verum end; uniqueness for b1, b2 being Tuple of n, BOOLEAN st ( for i being set st i in Seg n holds b1 . i = (p /. i) '&' (q /. i) ) & ( for i being set st i in Seg n holds b2 . i = (p /. i) '&' (q /. i) ) holds b1 = b2 proof let it1, it2 be Tuple of n, BOOLEAN ; ::_thesis: ( ( for i being set st i in Seg n holds it1 . i = (p /. i) '&' (q /. i) ) & ( for i being set st i in Seg n holds it2 . i = (p /. i) '&' (q /. i) ) implies it1 = it2 ) assume that A4: for i being set st i in Seg n holds it1 . i = (p /. i) '&' (q /. i) and A5: for i being set st i in Seg n holds it2 . i = (p /. i) '&' (q /. i) ; ::_thesis: it1 = it2 now__::_thesis:_(_dom_it1_=_dom_it2_&_(_for_x_being_set_st_x_in_dom_it1_holds_ it1_._x_=_it2_._x_)_) A6: dom it1 = Seg n by Lm1; hence dom it1 = dom it2 by Lm1; ::_thesis: for x being set st x in dom it1 holds it1 . x = it2 . x let x be set ; ::_thesis: ( x in dom it1 implies it1 . x = it2 . x ) assume A7: x in dom it1 ; ::_thesis: it1 . x = it2 . x hence it1 . x = (p /. x) '&' (q /. x) by A4, A6 .= it2 . x by A5, A6, A7 ; ::_thesis: verum end; hence it1 = it2 by FUNCT_1:2; ::_thesis: verum end; commutativity for b1, p, q being Tuple of n, BOOLEAN st ( for i being set st i in Seg n holds b1 . i = (p /. i) '&' (q /. i) ) holds for i being set st i in Seg n holds b1 . i = (q /. i) '&' (p /. i) ; end; :: deftheorem Def5 defines '&' ARMSTRNG:def_5_:_ for n being Element of NAT for p, q, b4 being Tuple of n, BOOLEAN holds ( b4 = p '&' q iff for i being set st i in Seg n holds b4 . i = (p /. i) '&' (q /. i) ); theorem Th5: :: ARMSTRNG:5 for n being Element of NAT for p being Element of n -tuples_on BOOLEAN holds (n -BinarySequence 0) '&' p = n -BinarySequence 0 proof let n be Element of NAT ; ::_thesis: for p being Element of n -tuples_on BOOLEAN holds (n -BinarySequence 0) '&' p = n -BinarySequence 0 let p be Element of n -tuples_on BOOLEAN; ::_thesis: (n -BinarySequence 0) '&' p = n -BinarySequence 0 set B = n -BinarySequence 0; now__::_thesis:_for_x_being_set_holds_ (_dom_((n_-BinarySequence_0)_'&'_p)_=_dom_(n_-BinarySequence_0)_&_(_for_x_being_set_st_x_in_dom_((n_-BinarySequence_0)_'&'_p)_holds_ ((n_-BinarySequence_0)_'&'_p)_._x_=_(n_-BinarySequence_0)_._x_)_) let x be set ; ::_thesis: ( dom ((n -BinarySequence 0) '&' p) = dom (n -BinarySequence 0) & ( for x being set st x in dom ((n -BinarySequence 0) '&' p) holds ((n -BinarySequence 0) '&' p) . x = (n -BinarySequence 0) . x ) ) A1: dom (n -BinarySequence 0) = Seg n by Lm1; A2: dom ((n -BinarySequence 0) '&' p) = Seg n by Lm1; hence dom ((n -BinarySequence 0) '&' p) = dom (n -BinarySequence 0) by Lm1; ::_thesis: for x being set st x in dom ((n -BinarySequence 0) '&' p) holds ((n -BinarySequence 0) '&' p) . x = (n -BinarySequence 0) . x let x be set ; ::_thesis: ( x in dom ((n -BinarySequence 0) '&' p) implies ((n -BinarySequence 0) '&' p) . x = (n -BinarySequence 0) . x ) assume A3: x in dom ((n -BinarySequence 0) '&' p) ; ::_thesis: ((n -BinarySequence 0) '&' p) . x = (n -BinarySequence 0) . x A4: n -BinarySequence 0 = 0* n by BINARI_3:25 .= n |-> 0 by EUCLID:def_4 ; then (n -BinarySequence 0) . x = 0 ; then (n -BinarySequence 0) /. x = FALSE by A2, A3, A1, PARTFUN1:def_6; hence ((n -BinarySequence 0) '&' p) . x = FALSE '&' (p /. x) by A2, A3, Def5 .= (n -BinarySequence 0) . x by A4 ; ::_thesis: verum end; hence (n -BinarySequence 0) '&' p = n -BinarySequence 0 by FUNCT_1:2; ::_thesis: verum end; theorem :: ARMSTRNG:6 for n being Element of NAT for p being Tuple of n, BOOLEAN holds ('not' (n -BinarySequence 0)) '&' p = p proof let n be Element of NAT ; ::_thesis: for p being Tuple of n, BOOLEAN holds ('not' (n -BinarySequence 0)) '&' p = p let p be Tuple of n, BOOLEAN ; ::_thesis: ('not' (n -BinarySequence 0)) '&' p = p set B = n -BinarySequence 0; set nB = 'not' (n -BinarySequence 0); now__::_thesis:_for_x_being_set_holds_ (_dom_(('not'_(n_-BinarySequence_0))_'&'_p)_=_dom_p_&_(_for_x_being_set_st_x_in_dom_(('not'_(n_-BinarySequence_0))_'&'_p)_holds_ (('not'_(n_-BinarySequence_0))_'&'_p)_._x_=_p_._x_)_) let x be set ; ::_thesis: ( dom (('not' (n -BinarySequence 0)) '&' p) = dom p & ( for x being set st x in dom (('not' (n -BinarySequence 0)) '&' p) holds (('not' (n -BinarySequence 0)) '&' p) . x = p . x ) ) A1: dom (n -BinarySequence 0) = Seg n by Lm1; A2: dom (('not' (n -BinarySequence 0)) '&' p) = Seg n by Lm1; hence A3: dom (('not' (n -BinarySequence 0)) '&' p) = dom p by Lm1; ::_thesis: for x being set st x in dom (('not' (n -BinarySequence 0)) '&' p) holds (('not' (n -BinarySequence 0)) '&' p) . x = p . x let x be set ; ::_thesis: ( x in dom (('not' (n -BinarySequence 0)) '&' p) implies (('not' (n -BinarySequence 0)) '&' p) . x = p . x ) assume A4: x in dom (('not' (n -BinarySequence 0)) '&' p) ; ::_thesis: (('not' (n -BinarySequence 0)) '&' p) . x = p . x then reconsider k = x as Element of NAT ; n -BinarySequence 0 = 0* n by BINARI_3:25 .= n |-> 0 by EUCLID:def_4 ; then (n -BinarySequence 0) . x = 0 ; then A5: (n -BinarySequence 0) /. x = FALSE by A2, A4, A1, PARTFUN1:def_6; ('not' (n -BinarySequence 0)) /. x = 'not' ((n -BinarySequence 0) /. k) by A2, A4, BINARITH:def_1 .= TRUE by A5 ; hence (('not' (n -BinarySequence 0)) '&' p) . x = TRUE '&' (p /. x) by A2, A4, Def5 .= p . x by A3, A4, PARTFUN1:def_6 ; ::_thesis: verum end; hence ('not' (n -BinarySequence 0)) '&' p = p by FUNCT_1:2; ::_thesis: verum end; theorem Th7: :: ARMSTRNG:7 for n, i being Element of NAT st i < n holds ( (n -BinarySequence (2 to_power i)) . (i + 1) = 1 & ( for j being Element of NAT st j in Seg n & j <> i + 1 holds (n -BinarySequence (2 to_power i)) . j = 0 ) ) proof let n, i be Element of NAT ; ::_thesis: ( i < n implies ( (n -BinarySequence (2 to_power i)) . (i + 1) = 1 & ( for j being Element of NAT st j in Seg n & j <> i + 1 holds (n -BinarySequence (2 to_power i)) . j = 0 ) ) ) assume A1: i < n ; ::_thesis: ( (n -BinarySequence (2 to_power i)) . (i + 1) = 1 & ( for j being Element of NAT st j in Seg n & j <> i + 1 holds (n -BinarySequence (2 to_power i)) . j = 0 ) ) deffunc H1( Nat) -> FinSequence of BOOLEAN = $1 -BinarySequence (2 to_power i); set B = n -BinarySequence (2 to_power i); defpred S1[ Nat] means ( i < $1 implies H1($1) . (i + 1) = TRUE ); A2: now__::_thesis:_for_n_being_Element_of_NAT_st_S1[n]_holds_ S1[n_+_1] let n be Element of NAT ; ::_thesis: ( S1[n] implies S1[n + 1] ) assume A3: S1[n] ; ::_thesis: S1[n + 1] now__::_thesis:_(_i_<_n_+_1_implies_H1(n_+_1)_._(i_+_1)_=_TRUE_) assume A4: i < n + 1 ; ::_thesis: H1(n + 1) . (i + 1) = TRUE then A5: i <= n by NAT_1:13; percases ( n = 0 or ( n > 0 & n = i ) or ( n > 0 & n > i ) ) by A5, XXREAL_0:1; supposeA6: n = 0 ; ::_thesis: H1(n + 1) . (i + 1) = TRUE 0* n = n |-> 0 by EUCLID:def_4; then dom (0* n) = Seg n by FUNCOP_1:13; then A7: len (0* n) = n by FINSEQ_1:def_3; dom <*TRUE*> = Seg 1 by FINSEQ_1:38; then A8: 1 in dom <*TRUE*> by FINSEQ_1:1; A9: i = 0 by A4, A6, NAT_1:13; hence H1(n + 1) . (i + 1) = ((0* n) ^ <*TRUE*>) . (i + 1) by A6, BINARI_3:28 .= <*TRUE*> . 1 by A6, A9, A7, A8, FINSEQ_1:def_7 .= TRUE by FINSEQ_1:40 ; ::_thesis: verum end; supposeA10: ( n > 0 & n = i ) ; ::_thesis: H1(n + 1) . (i + 1) = TRUE 0* n = n |-> 0 by EUCLID:def_4; then dom (0* n) = Seg n by FUNCOP_1:13; then A11: len (0* n) = n by FINSEQ_1:def_3; dom <*TRUE*> = Seg 1 by FINSEQ_1:38; then A12: 1 in dom <*TRUE*> by FINSEQ_1:1; thus H1(n + 1) . (i + 1) = ((0* n) ^ <*TRUE*>) . (i + 1) by A10, BINARI_3:28 .= <*TRUE*> . 1 by A10, A11, A12, FINSEQ_1:def_7 .= TRUE by FINSEQ_1:40 ; ::_thesis: verum end; supposeA13: ( n > 0 & n > i ) ; ::_thesis: H1(n + 1) . (i + 1) = TRUE then reconsider n9 = n as non empty Element of NAT ; A14: 0 + 1 <= i + 1 by XREAL_1:6; i + 1 <= n by A13, NAT_1:13; then i + 1 in Seg n by A14, FINSEQ_1:1; then A15: i + 1 in dom H1(n) by Lm1; 2 to_power i < 2 to_power n by A13, POWER:39; hence H1(n + 1) . (i + 1) = (H1(n9) ^ <*FALSE*>) . (i + 1) by BINARI_3:27 .= TRUE by A3, A13, A15, FINSEQ_1:def_7 ; ::_thesis: verum end; end; end; hence S1[n + 1] ; ::_thesis: verum end; A16: S1[ 0 ] ; for n being Element of NAT holds S1[n] from NAT_1:sch_1(A16, A2); hence (n -BinarySequence (2 to_power i)) . (i + 1) = 1 by A1; ::_thesis: for j being Element of NAT st j in Seg n & j <> i + 1 holds (n -BinarySequence (2 to_power i)) . j = 0 defpred S2[ Element of NAT ] means ( i < $1 implies for j being Element of NAT st i + 1 <= j & j <= $1 holds H1($1) . (j + 1) = FALSE ); let j be Element of NAT ; ::_thesis: ( j in Seg n & j <> i + 1 implies (n -BinarySequence (2 to_power i)) . j = 0 ) assume that A17: j in Seg n and A18: j <> i + 1 ; ::_thesis: (n -BinarySequence (2 to_power i)) . j = 0 A19: 1 <= j by A17, FINSEQ_1:1; A20: now__::_thesis:_for_n_being_Element_of_NAT_st_S2[n]_holds_ S2[n_+_1] let n be Element of NAT ; ::_thesis: ( S2[n] implies S2[n + 1] ) assume A21: S2[n] ; ::_thesis: S2[n + 1] now__::_thesis:_(_i_<_n_+_1_implies_for_j_being_Element_of_NAT_st_i_+_1_<=_j_&_j_<=_n_+_1_holds_ H1(n_+_1)_._(j_+_1)_=_FALSE_) assume i < n + 1 ; ::_thesis: for j being Element of NAT st i + 1 <= j & j <= n + 1 holds H1(n + 1) . (b2 + 1) = FALSE then A22: i <= n by NAT_1:13; A23: 0 + 1 <= i + 1 by XREAL_1:6; let j be Element of NAT ; ::_thesis: ( i + 1 <= j & j <= n + 1 implies H1(n + 1) . (b1 + 1) = FALSE ) assume that A24: i + 1 <= j and A25: j <= n + 1 ; ::_thesis: H1(n + 1) . (b1 + 1) = FALSE percases ( n = 0 or ( n > 0 & n = i ) or ( n > 0 & n > i ) ) by A22, XXREAL_0:1; supposeA26: n = 0 ; ::_thesis: H1(n + 1) . (b1 + 1) = FALSE 1 <= j by A24, A23, XXREAL_0:2; then A27: j = 1 by A25, A26, XXREAL_0:1; dom H1(n + 1) = Seg (n + 1) by Lm1; then not j + 1 in dom H1(n + 1) by A26, A27, FINSEQ_1:1; hence H1(n + 1) . (j + 1) = FALSE by FUNCT_1:def_2; ::_thesis: verum end; supposeA28: ( n > 0 & n = i ) ; ::_thesis: H1(n + 1) . (b1 + 1) = FALSE A29: dom H1(n + 1) = Seg (n + 1) by Lm1; j + 1 > n + 1 by A24, A28, NAT_1:13; then not j + 1 in dom H1(n + 1) by A29, FINSEQ_1:1; hence H1(n + 1) . (j + 1) = FALSE by FUNCT_1:def_2; ::_thesis: verum end; supposeA30: ( n > 0 & n > i ) ; ::_thesis: H1(n + 1) . (b1 + 1) = FALSE then reconsider n9 = n as non empty Element of NAT ; A31: 2 to_power i < 2 to_power n by A30, POWER:39; thus H1(n + 1) . (j + 1) = FALSE ::_thesis: verum proof ( j < n + 1 or j = n + 1 ) by A25, XXREAL_0:1; then A32: ( j <= n or j = n + 1 ) by NAT_1:13; percases ( j = n + 1 or j = n or j < n ) by A32, XXREAL_0:1; suppose j = n + 1 ; ::_thesis: H1(n + 1) . (j + 1) = FALSE then A33: j + 1 > n + 1 by NAT_1:13; dom H1(n + 1) = Seg (n + 1) by Lm1; then not j + 1 in dom H1(n + 1) by A33, FINSEQ_1:1; hence H1(n + 1) . (j + 1) = FALSE by FUNCT_1:def_2; ::_thesis: verum end; supposeA34: j = n ; ::_thesis: H1(n + 1) . (j + 1) = FALSE dom H1(n) = Seg n by Lm1; then A35: j = len H1(n) by A34, FINSEQ_1:def_3; dom <*FALSE*> = Seg 1 by FINSEQ_1:38; then A36: 1 in dom <*FALSE*> by FINSEQ_1:1; thus H1(n + 1) . (j + 1) = (H1(n9) ^ <*FALSE*>) . (j + 1) by A31, BINARI_3:27 .= <*FALSE*> . 1 by A35, A36, FINSEQ_1:def_7 .= FALSE by FINSEQ_1:40 ; ::_thesis: verum end; supposeA37: j < n ; ::_thesis: H1(n + 1) . (j + 1) = FALSE A38: 1 <= j + 1 by NAT_1:12; j + 1 <= n by A37, NAT_1:13; then j + 1 in Seg n by A38, FINSEQ_1:1; then A39: j + 1 in dom H1(n) by Lm1; thus H1(n + 1) . (j + 1) = (H1(n9) ^ <*FALSE*>) . (j + 1) by A31, BINARI_3:27 .= H1(n) . (j + 1) by A39, FINSEQ_1:def_7 .= FALSE by A21, A24, A30, A37 ; ::_thesis: verum end; end; end; end; end; end; hence S2[n + 1] ; ::_thesis: verum end; A40: S2[ 0 ] ; A41: for n being Element of NAT holds S2[n] from NAT_1:sch_1(A40, A20); defpred S3[ Element of NAT ] means ( i < $1 implies for j being Element of NAT st 1 <= j & j < i + 1 holds H1($1) . j = FALSE ); A42: now__::_thesis:_for_n_being_Element_of_NAT_st_S3[n]_holds_ S3[n_+_1] let n be Element of NAT ; ::_thesis: ( S3[n] implies S3[n + 1] ) assume A43: S3[n] ; ::_thesis: S3[n + 1] now__::_thesis:_(_i_<_n_+_1_implies_for_j_being_Element_of_NAT_st_1_<=_j_&_j_<_i_+_1_holds_ H1(n_+_1)_._j_=_FALSE_) assume A44: i < n + 1 ; ::_thesis: for j being Element of NAT st 1 <= j & j < i + 1 holds H1(n + 1) . b2 = FALSE then A45: i <= n by NAT_1:13; let j be Element of NAT ; ::_thesis: ( 1 <= j & j < i + 1 implies H1(n + 1) . b1 = FALSE ) assume that A46: 1 <= j and A47: j < i + 1 ; ::_thesis: H1(n + 1) . b1 = FALSE percases ( n = 0 or ( n > 0 & i < n ) or ( n > 0 & i = n ) ) by A45, XXREAL_0:1; suppose n = 0 ; ::_thesis: H1(n + 1) . b1 = FALSE then i = 0 by A44, NAT_1:13; hence H1(n + 1) . j = FALSE by A46, A47; ::_thesis: verum end; supposeA48: ( n > 0 & i < n ) ; ::_thesis: H1(n + 1) . b1 = FALSE then reconsider n9 = n as non empty Element of NAT ; A49: dom H1(n) = Seg n by Lm1; A50: i <= n by A44, NAT_1:13; j <= i by A47, NAT_1:13; then j <= n by A50, XXREAL_0:2; then A51: j in dom H1(n) by A46, A49, FINSEQ_1:1; 2 to_power i < 2 to_power n by A48, POWER:39; hence H1(n + 1) . j = (H1(n9) ^ <*FALSE*>) . j by BINARI_3:27 .= H1(n) . j by A51, FINSEQ_1:def_7 .= FALSE by A43, A46, A47, A48 ; ::_thesis: verum end; supposeA52: ( n > 0 & i = n ) ; ::_thesis: H1(n + 1) . b1 = FALSE then j <= n by A47, NAT_1:13; then A53: j in Seg n by A46, FINSEQ_1:1; A54: 0* n = n |-> 0 by EUCLID:def_4; then A55: j in dom (0* n) by A53, FUNCOP_1:13; thus H1(n + 1) . j = ((0* n) ^ <*TRUE*>) . j by A52, BINARI_3:28 .= (0* n) . j by A55, FINSEQ_1:def_7 .= FALSE by A54 ; ::_thesis: verum end; end; end; hence S3[n + 1] ; ::_thesis: verum end; A56: S3[ 0 ] ; A57: for n being Element of NAT holds S3[n] from NAT_1:sch_1(A56, A42); A58: j <= n by A17, FINSEQ_1:1; percases ( j < i + 1 or ( j > i + 1 & j < n ) or ( j > i + 1 & j = n ) ) by A18, A58, XXREAL_0:1; suppose j < i + 1 ; ::_thesis: (n -BinarySequence (2 to_power i)) . j = 0 hence (n -BinarySequence (2 to_power i)) . j = 0 by A1, A57, A19; ::_thesis: verum end; supposeA59: ( j > i + 1 & j < n ) ; ::_thesis: (n -BinarySequence (2 to_power i)) . j = 0 then consider k being Nat such that A60: j = k + 1 by NAT_1:6; reconsider k = k as Element of NAT by ORDINAL1:def_12; A61: k <= n by A59, A60, NAT_1:13; i + 1 <= k by A59, A60, NAT_1:13; hence (n -BinarySequence (2 to_power i)) . j = 0 by A1, A41, A60, A61; ::_thesis: verum end; supposeA62: ( j > i + 1 & j = n ) ; ::_thesis: (n -BinarySequence (2 to_power i)) . j = 0 then consider m being Nat such that A63: n = m + 1 by NAT_1:6; reconsider m = m as Element of NAT by ORDINAL1:def_12; i < m by A62, A63, XREAL_1:6; then 2 to_power i < 2 to_power m by POWER:39; hence (n -BinarySequence (2 to_power i)) . j = 0 by A62, A63, BINARI_3:26; ::_thesis: verum end; end; end; begin definition attrc1 is strict ; struct DB-Rel -> ; aggrDB-Rel(# Attributes, Domains, Relationship #) -> DB-Rel ; sel Attributes c1 -> non empty finite set ; sel Domains c1 -> non-empty ManySortedSet of the Attributes of c1; sel Relationship c1 -> Subset of (product the Domains of c1); end; begin definition let X be set ; mode Subset-Relation of X is Relation of (bool X); mode Dependency-set of X is Relation of (bool X); end; registration let X be set ; cluster non empty Relation-like bool X -defined bool X -valued finite for Element of bool [:(bool X),(bool X):]; existence ex b1 being Dependency-set of X st ( not b1 is empty & b1 is finite ) proof {} c= X by XBOOLE_1:2; then reconsider R = {[{},{}]} as Relation of (bool X) by RELSET_1:3; take R ; ::_thesis: ( not R is empty & R is finite ) thus not R is empty ; ::_thesis: R is finite thus R is finite ; ::_thesis: verum end; end; definition let X be set ; func Dependencies X -> Dependency-set of X equals :: ARMSTRNG:def 6 [:(bool X),(bool X):]; coherence [:(bool X),(bool X):] is Dependency-set of X ; end; :: deftheorem defines Dependencies ARMSTRNG:def_6_:_ for X being set holds Dependencies X = [:(bool X),(bool X):]; definition let X be set ; mode Dependency of X is Element of Dependencies X; end; registration let X be set ; cluster Dependencies X -> non empty ; coherence Dependencies X is (C1) ; end; definition let X be set ; let F be non empty Dependency-set of X; :: original: Element redefine mode Element of F -> Dependency of X; correctness coherence for b1 being Element of F holds b1 is Dependency of X; proof let x be Element of F; ::_thesis: x is Dependency of X thus x is Dependency of X ; ::_thesis: verum end; end; theorem Th8: :: ARMSTRNG:8 for X, x being set holds ( x in Dependencies X iff ex a, b being Subset of X st x = [a,b] ) proof let X, x be set ; ::_thesis: ( x in Dependencies X iff ex a, b being Subset of X st x = [a,b] ) hereby ::_thesis: ( ex a, b being Subset of X st x = [a,b] implies x in Dependencies X ) assume A1: x in Dependencies X ; ::_thesis: ex a, b being Subset of X st x = [a,b] then consider a, b being set such that A2: [a,b] = x by RELAT_1:def_1; reconsider a = a, b = b as Subset of X by A1, A2, ZFMISC_1:87; take a = a; ::_thesis: ex b being Subset of X st x = [a,b] take b = b; ::_thesis: x = [a,b] thus x = [a,b] by A2; ::_thesis: verum end; given a, b being Subset of X such that A3: x = [a,b] ; ::_thesis: x in Dependencies X thus x in Dependencies X by A3, ZFMISC_1:87; ::_thesis: verum end; theorem Th9: :: ARMSTRNG:9 for X, x being set for F being Dependency-set of X st x in F holds ex a, b being Subset of X st x = [a,b] proof let X, x be set ; ::_thesis: for F being Dependency-set of X st x in F holds ex a, b being Subset of X st x = [a,b] let M be Dependency-set of X; ::_thesis: ( x in M implies ex a, b being Subset of X st x = [a,b] ) assume A1: x in M ; ::_thesis: ex a, b being Subset of X st x = [a,b] then consider a, b being set such that A2: [a,b] = x by RELAT_1:def_1; reconsider a = a, b = b as Subset of X by A1, A2, ZFMISC_1:87; take a ; ::_thesis: ex b being Subset of X st x = [a,b] take b ; ::_thesis: x = [a,b] thus x = [a,b] by A2; ::_thesis: verum end; definition let R be DB-Rel ; let A, B be Subset of the Attributes of R; predA >|> B,R means :Def7: :: ARMSTRNG:def 7 for f, g being Element of the Relationship of R st f | A = g | A holds f | B = g | B; end; :: deftheorem Def7 defines >|> ARMSTRNG:def_7_:_ for R being DB-Rel for A, B being Subset of the Attributes of R holds ( A >|> B,R iff for f, g being Element of the Relationship of R st f | A = g | A holds f | B = g | B ); notation let R be DB-Rel ; let A, B be Subset of the Attributes of R; synonym A,B holds_in R for A >|> B,R; end; definition let R be DB-Rel ; func Dependency-str R -> Dependency-set of the Attributes of R equals :: ARMSTRNG:def 8 { [A,B] where A, B is Subset of the Attributes of R : A >|> B,R } ; coherence { [A,B] where A, B is Subset of the Attributes of R : A >|> B,R } is Dependency-set of the Attributes of R proof set at = the Attributes of R; set X = { [A,B] where A, B is Subset of the Attributes of R : A >|> B,R } ; { [A,B] where A, B is Subset of the Attributes of R : A >|> B,R } c= [:(bool the Attributes of R),(bool the Attributes of R):] proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { [A,B] where A, B is Subset of the Attributes of R : A >|> B,R } or x in [:(bool the Attributes of R),(bool the Attributes of R):] ) assume x in { [A,B] where A, B is Subset of the Attributes of R : A >|> B,R } ; ::_thesis: x in [:(bool the Attributes of R),(bool the Attributes of R):] then ex A, B being Subset of the Attributes of R st ( x = [A,B] & A >|> B,R ) ; hence x in [:(bool the Attributes of R),(bool the Attributes of R):] by ZFMISC_1:def_2; ::_thesis: verum end; hence { [A,B] where A, B is Subset of the Attributes of R : A >|> B,R } is Dependency-set of the Attributes of R ; ::_thesis: verum end; end; :: deftheorem defines Dependency-str ARMSTRNG:def_8_:_ for R being DB-Rel holds Dependency-str R = { [A,B] where A, B is Subset of the Attributes of R : A >|> B,R } ; theorem Th10: :: ARMSTRNG:10 for R being DB-Rel for A, B being Subset of the Attributes of R holds ( [A,B] in Dependency-str R iff A >|> B,R ) proof let D be DB-Rel ; ::_thesis: for A, B being Subset of the Attributes of D holds ( [A,B] in Dependency-str D iff A >|> B,D ) let A, B be Subset of the Attributes of D; ::_thesis: ( [A,B] in Dependency-str D iff A >|> B,D ) set S = Dependency-str D; hereby ::_thesis: ( A >|> B,D implies [A,B] in Dependency-str D ) assume [A,B] in Dependency-str D ; ::_thesis: A >|> B,D then consider a, b being Subset of the Attributes of D such that A1: [A,B] = [a,b] and A2: a >|> b,D ; A = a by A1, XTUPLE_0:1; hence A >|> B,D by A1, A2, XTUPLE_0:1; ::_thesis: verum end; thus ( A >|> B,D implies [A,B] in Dependency-str D ) ; ::_thesis: verum end; begin definition let X be set ; let P, Q be Dependency of X; predP >= Q means :Def9: :: ARMSTRNG:def 9 ( P `1 c= Q `1 & Q `2 c= P `2 ); reflexivity for P being Dependency of X holds ( P `1 c= P `1 & P `2 c= P `2 ) ; end; :: deftheorem Def9 defines >= ARMSTRNG:def_9_:_ for X being set for P, Q being Dependency of X holds ( P >= Q iff ( P `1 c= Q `1 & Q `2 c= P `2 ) ); notation let X be set ; let P, Q be Dependency of X; synonym Q <= P for P >= Q; synonym P is_at_least_as_informative_as Q for P >= Q; end; theorem Th11: :: ARMSTRNG:11 for X being set for P, Q being Dependency of X st P <= Q & Q <= P holds P = Q proof let X be set ; ::_thesis: for P, Q being Dependency of X st P <= Q & Q <= P holds P = Q let p, q be Dependency of X; ::_thesis: ( p <= q & q <= p implies p = q ) assume that A1: p <= q and A2: q <= p ; ::_thesis: p = q A3: q `1 c= p `1 by A1, Def9; A4: p `2 c= q `2 by A1, Def9; q `2 c= p `2 by A2, Def9; then A5: p `2 = q `2 by A4, XBOOLE_0:def_10; p `1 c= q `1 by A2, Def9; then A6: p `1 = q `1 by A3, XBOOLE_0:def_10; p = [(p `1),(p `2)] by MCART_1:22; hence p = q by A6, A5, MCART_1:22; ::_thesis: verum end; theorem Th12: :: ARMSTRNG:12 for X being set for P, Q, S being Dependency of X st P <= Q & Q <= S holds P <= S proof let X be set ; ::_thesis: for P, Q, S being Dependency of X st P <= Q & Q <= S holds P <= S let p, q, r be Dependency of X; ::_thesis: ( p <= q & q <= r implies p <= r ) assume that A1: p <= q and A2: q <= r ; ::_thesis: p <= r A3: q `2 c= r `2 by A2, Def9; p `2 c= q `2 by A1, Def9; then A4: p `2 c= r `2 by A3, XBOOLE_1:1; A5: r `1 c= q `1 by A2, Def9; q `1 c= p `1 by A1, Def9; then r `1 c= p `1 by A5, XBOOLE_1:1; hence p <= r by A4, Def9; ::_thesis: verum end; definition let X be set ; let A, B be Subset of X; :: original: [ redefine func[A,B] -> Dependency of X; coherence [A,B] is Dependency of X by ZFMISC_1:def_2; end; theorem Th13: :: ARMSTRNG:13 for X being set for A, B, A9, B9 being Subset of X holds ( [A,B] >= [A9,B9] iff ( A c= A9 & B9 c= B ) ) proof let X be set ; ::_thesis: for A, B, A9, B9 being Subset of X holds ( [A,B] >= [A9,B9] iff ( A c= A9 & B9 c= B ) ) let A, B, A9, B9 be Subset of X; ::_thesis: ( [A,B] >= [A9,B9] iff ( A c= A9 & B9 c= B ) ) A1: [A,B] `2 = B ; A2: [A9,B9] `1 = A9 ; A3: [A9,B9] `2 = B9 ; [A,B] `1 = A ; hence ( [A,B] >= [A9,B9] iff ( A c= A9 & B9 c= B ) ) by A1, A2, A3, Def9; ::_thesis: verum end; definition let X be set ; func Dependencies-Order X -> Relation of (Dependencies X) equals :: ARMSTRNG:def 10 { [P,Q] where P, Q is Dependency of X : P <= Q } ; coherence { [P,Q] where P, Q is Dependency of X : P <= Q } is Relation of (Dependencies X) proof set Y = { [E,F] where E, F is Dependency of X : E <= F } ; { [E,F] where E, F is Dependency of X : E <= F } c= [:(Dependencies X),(Dependencies X):] proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { [E,F] where E, F is Dependency of X : E <= F } or x in [:(Dependencies X),(Dependencies X):] ) assume x in { [E,F] where E, F is Dependency of X : E <= F } ; ::_thesis: x in [:(Dependencies X),(Dependencies X):] then ex E, F being Dependency of X st ( x = [E,F] & E <= F ) ; hence x in [:(Dependencies X),(Dependencies X):] by ZFMISC_1:def_2; ::_thesis: verum end; hence { [P,Q] where P, Q is Dependency of X : P <= Q } is Relation of (Dependencies X) ; ::_thesis: verum end; end; :: deftheorem defines Dependencies-Order ARMSTRNG:def_10_:_ for X being set holds Dependencies-Order X = { [P,Q] where P, Q is Dependency of X : P <= Q } ; theorem :: ARMSTRNG:14 for X, x being set holds ( x in Dependencies-Order X iff ex P, Q being Dependency of X st ( x = [P,Q] & P <= Q ) ) ; theorem Th15: :: ARMSTRNG:15 for X being set holds dom (Dependencies-Order X) = [:(bool X),(bool X):] proof let X be set ; ::_thesis: dom (Dependencies-Order X) = [:(bool X),(bool X):] now__::_thesis:_for_x_being_set_holds_ (_(_x_in_dom_(Dependencies-Order_X)_implies_x_in_[:(bool_X),(bool_X):]_)_&_(_x_in_[:(bool_X),(bool_X):]_implies_x_in_dom_(Dependencies-Order_X)_)_) let x be set ; ::_thesis: ( ( x in dom (Dependencies-Order X) implies x in [:(bool X),(bool X):] ) & ( x in [:(bool X),(bool X):] implies x in dom (Dependencies-Order X) ) ) thus ( x in dom (Dependencies-Order X) implies x in [:(bool X),(bool X):] ) ; ::_thesis: ( x in [:(bool X),(bool X):] implies x in dom (Dependencies-Order X) ) assume x in [:(bool X),(bool X):] ; ::_thesis: x in dom (Dependencies-Order X) then reconsider x9 = x as Dependency of X ; [x9,x9] in Dependencies-Order X ; hence x in dom (Dependencies-Order X) by XTUPLE_0:def_12; ::_thesis: verum end; hence dom (Dependencies-Order X) = [:(bool X),(bool X):] by TARSKI:1; ::_thesis: verum end; theorem Th16: :: ARMSTRNG:16 for X being set holds rng (Dependencies-Order X) = [:(bool X),(bool X):] proof let X be set ; ::_thesis: rng (Dependencies-Order X) = [:(bool X),(bool X):] now__::_thesis:_for_x_being_set_holds_ (_(_x_in_rng_(Dependencies-Order_X)_implies_x_in_[:(bool_X),(bool_X):]_)_&_(_x_in_[:(bool_X),(bool_X):]_implies_x_in_rng_(Dependencies-Order_X)_)_) let x be set ; ::_thesis: ( ( x in rng (Dependencies-Order X) implies x in [:(bool X),(bool X):] ) & ( x in [:(bool X),(bool X):] implies x in rng (Dependencies-Order X) ) ) thus ( x in rng (Dependencies-Order X) implies x in [:(bool X),(bool X):] ) ; ::_thesis: ( x in [:(bool X),(bool X):] implies x in rng (Dependencies-Order X) ) assume x in [:(bool X),(bool X):] ; ::_thesis: x in rng (Dependencies-Order X) then reconsider x9 = x as Dependency of X ; [x9,x9] in Dependencies-Order X ; hence x in rng (Dependencies-Order X) by XTUPLE_0:def_13; ::_thesis: verum end; hence rng (Dependencies-Order X) = [:(bool X),(bool X):] by TARSKI:1; ::_thesis: verum end; theorem Th17: :: ARMSTRNG:17 for X being set holds field (Dependencies-Order X) = [:(bool X),(bool X):] proof let X be set ; ::_thesis: field (Dependencies-Order X) = [:(bool X),(bool X):] thus field (Dependencies-Order X) = (dom (Dependencies-Order X)) \/ (rng (Dependencies-Order X)) by RELAT_1:def_6 .= [:(bool X),(bool X):] \/ (rng (Dependencies-Order X)) by Th15 .= [:(bool X),(bool X):] \/ [:(bool X),(bool X):] by Th16 .= [:(bool X),(bool X):] ; ::_thesis: verum end; registration let X be set ; cluster Dependencies-Order X -> non empty ; coherence Dependencies-Order X is (C1) by Th15, RELAT_1:38; cluster Dependencies-Order X -> total reflexive antisymmetric transitive ; coherence ( Dependencies-Order X is total & Dependencies-Order X is reflexive & Dependencies-Order X is antisymmetric & Dependencies-Order X is (F2) ) proof set dx = Dependencies X; set dox = Dependencies-Order X; Dependencies X c= dom (Dependencies-Order X) proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in Dependencies X or x in dom (Dependencies-Order X) ) assume x in Dependencies X ; ::_thesis: x in dom (Dependencies-Order X) then reconsider x9 = x as Element of Dependencies X ; x9 <= x9 ; then [x,x] in Dependencies-Order X ; hence x in dom (Dependencies-Order X) by XTUPLE_0:def_12; ::_thesis: verum end; then A1: dom (Dependencies-Order X) = Dependencies X by XBOOLE_0:def_10; then A2: field (Dependencies-Order X) = (Dependencies X) \/ (rng (Dependencies-Order X)) by RELAT_1:def_6 .= Dependencies X by XBOOLE_1:12 ; thus Dependencies-Order X is total by A1, PARTFUN1:def_2; ::_thesis: ( Dependencies-Order X is reflexive & Dependencies-Order X is antisymmetric & Dependencies-Order X is (F2) ) Dependencies-Order X is_reflexive_in Dependencies X proof let x be set ; :: according to RELAT_2:def_1 ::_thesis: ( not x in Dependencies X or [x,x] in Dependencies-Order X ) assume x in Dependencies X ; ::_thesis: [x,x] in Dependencies-Order X then reconsider x9 = x as Element of Dependencies X ; x9 <= x9 ; hence [x,x] in Dependencies-Order X ; ::_thesis: verum end; hence Dependencies-Order X is reflexive by A2, RELAT_2:def_9; ::_thesis: ( Dependencies-Order X is antisymmetric & Dependencies-Order X is (F2) ) Dependencies-Order X is_antisymmetric_in Dependencies X proof let x, y be set ; :: according to RELAT_2:def_4 ::_thesis: ( not x in Dependencies X or not y in Dependencies X or not [x,y] in Dependencies-Order X or not [y,x] in Dependencies-Order X or x = y ) assume that x in Dependencies X and y in Dependencies X and A3: [x,y] in Dependencies-Order X and A4: [y,x] in Dependencies-Order X ; ::_thesis: x = y consider x9, y9 being Element of Dependencies X such that A5: [x,y] = [x9,y9] and A6: x9 <= y9 by A3; A7: y = y9 by A5, XTUPLE_0:1; consider y99, x99 being Element of Dependencies X such that A8: [y,x] = [y99,x99] and A9: y99 <= x99 by A4; A10: x = x99 by A8, XTUPLE_0:1; A11: y = y99 by A8, XTUPLE_0:1; x = x9 by A5, XTUPLE_0:1; hence x = y by A6, A9, A10, A7, A11, Th11; ::_thesis: verum end; hence Dependencies-Order X is antisymmetric by A2, RELAT_2:def_12; ::_thesis: Dependencies-Order X is (F2) Dependencies-Order X is_transitive_in Dependencies X proof let x, y, z be set ; :: according to RELAT_2:def_8 ::_thesis: ( not x in Dependencies X or not y in Dependencies X or not z in Dependencies X or not [x,y] in Dependencies-Order X or not [y,z] in Dependencies-Order X or [x,z] in Dependencies-Order X ) assume that x in Dependencies X and y in Dependencies X and z in Dependencies X and A12: [x,y] in Dependencies-Order X and A13: [y,z] in Dependencies-Order X ; ::_thesis: [x,z] in Dependencies-Order X consider x9, y9 being Element of Dependencies X such that A14: [x,y] = [x9,y9] and A15: x9 <= y9 by A12; A16: x = x9 by A14, XTUPLE_0:1; consider y99, z9 being Element of Dependencies X such that A17: [y,z] = [y99,z9] and A18: y99 <= z9 by A13; A19: y = y99 by A17, XTUPLE_0:1; A20: z = z9 by A17, XTUPLE_0:1; y = y9 by A14, XTUPLE_0:1; then x9 <= z9 by A15, A18, A19, Th12; hence [x,z] in Dependencies-Order X by A16, A20; ::_thesis: verum end; hence Dependencies-Order X is (F2) by A2, RELAT_2:def_16; ::_thesis: verum end; end; notation let X be set ; let F be Dependency-set of X; synonym (F2) F for transitive ; synonym (DC1) F for transitive ; end; definition let X be set ; let F be Dependency-set of X; attrF is (F1) means :Def11: :: ARMSTRNG:def 11 for A being Subset of X holds [A,A] in F; end; :: deftheorem Def11 defines (F1) ARMSTRNG:def_11_:_ for X being set for F being Dependency-set of X holds ( F is (F1) iff for A being Subset of X holds [A,A] in F ); notation let X be set ; let F be Dependency-set of X; synonym (DC2) F for (F1) ; end; theorem Th18: :: ARMSTRNG:18 for X being set for F being Dependency-set of X holds ( F is (F2) iff for A, B, C being Subset of X st [A,B] in F & [B,C] in F holds [A,C] in F ) proof let X be set ; ::_thesis: for F being Dependency-set of X holds ( F is (F2) iff for A, B, C being Subset of X st [A,B] in F & [B,C] in F holds [A,C] in F ) let F be Dependency-set of X; ::_thesis: ( F is (F2) iff for A, B, C being Subset of X st [A,B] in F & [B,C] in F holds [A,C] in F ) hereby ::_thesis: ( ( for A, B, C being Subset of X st [A,B] in F & [B,C] in F holds [A,C] in F ) implies F is (F2) ) assume F is (F2) ; ::_thesis: for A, B, C being Subset of X st [A,B] in F & [B,C] in F holds [A,C] in F then A1: F is_transitive_in field F by RELAT_2:def_16; let A, B, C be Subset of X; ::_thesis: ( [A,B] in F & [B,C] in F implies [A,C] in F ) assume that A2: [A,B] in F and A3: [B,C] in F ; ::_thesis: [A,C] in F A4: B in field F by A2, RELAT_1:15; A5: C in field F by A3, RELAT_1:15; A in field F by A2, RELAT_1:15; hence [A,C] in F by A1, A2, A3, A4, A5, RELAT_2:def_8; ::_thesis: verum end; assume A6: for A, B, C being Subset of X st [A,B] in F & [B,C] in F holds [A,C] in F ; ::_thesis: F is (F2) let x, y, z be set ; :: according to RELAT_2:def_8,RELAT_2:def_16 ::_thesis: ( not x in field F or not y in field F or not z in field F or not [x,y] in F or not [y,z] in F or [x,z] in F ) assume that A7: x in field F and A8: y in field F and A9: z in field F and A10: [x,y] in F and A11: [y,z] in F ; ::_thesis: [x,z] in F field F c= (bool X) \/ (bool X) by RELSET_1:8; then reconsider A = x, B = y, C = z as Subset of X by A7, A8, A9; A12: [B,C] in F by A11; [A,B] in F by A10; hence [x,z] in F by A6, A12; ::_thesis: verum end; definition let X be set ; let F be Dependency-set of X; attrF is (F3) means :Def12: :: ARMSTRNG:def 12 for A, B, A9, B9 being Subset of X st [A,B] in F & [A,B] >= [A9,B9] holds [A9,B9] in F; attrF is (F4) means :Def13: :: ARMSTRNG:def 13 for A, B, A9, B9 being Subset of X st [A,B] in F & [A9,B9] in F holds [(A \/ A9),(B \/ B9)] in F; end; :: deftheorem Def12 defines (F3) ARMSTRNG:def_12_:_ for X being set for F being Dependency-set of X holds ( F is (F3) iff for A, B, A9, B9 being Subset of X st [A,B] in F & [A,B] >= [A9,B9] holds [A9,B9] in F ); :: deftheorem Def13 defines (F4) ARMSTRNG:def_13_:_ for X being set for F being Dependency-set of X holds ( F is (F4) iff for A, B, A9, B9 being Subset of X st [A,B] in F & [A9,B9] in F holds [(A \/ A9),(B \/ B9)] in F ); theorem Th19: :: ARMSTRNG:19 for X being set holds ( Dependencies X is (F1) & Dependencies X is (F2) & Dependencies X is (F3) & Dependencies X is (F4) ) proof let X be set ; ::_thesis: ( Dependencies X is (F1) & Dependencies X is (F2) & Dependencies X is (F3) & Dependencies X is (F4) ) set D = Dependencies X; thus Dependencies X is (F1) ::_thesis: ( Dependencies X is (F2) & Dependencies X is (F3) & Dependencies X is (F4) ) proof let A be Subset of X; :: according to ARMSTRNG:def_11 ::_thesis: [A,A] in Dependencies X thus [A,A] in Dependencies X ; ::_thesis: verum end; Dependencies X = nabla (bool X) by EQREL_1:def_1; then A1: field (Dependencies X) = bool X by ORDERS_1:12; thus Dependencies X is (F2) ::_thesis: ( Dependencies X is (F3) & Dependencies X is (F4) ) proof let x, y, z be set ; :: according to RELAT_2:def_8,RELAT_2:def_16 ::_thesis: ( not x in field (Dependencies X) or not y in field (Dependencies X) or not z in field (Dependencies X) or not [x,y] in Dependencies X or not [y,z] in Dependencies X or [x,z] in Dependencies X ) assume that A2: x in field (Dependencies X) and y in field (Dependencies X) and A3: z in field (Dependencies X) and [x,y] in Dependencies X and [y,z] in Dependencies X ; ::_thesis: [x,z] in Dependencies X thus [x,z] in Dependencies X by A1, A2, A3, ZFMISC_1:def_2; ::_thesis: verum end; thus Dependencies X is (F3) ::_thesis: Dependencies X is (F4) proof let A, B, A9, B9 be Subset of X; :: according to ARMSTRNG:def_12 ::_thesis: ( [A,B] in Dependencies X & [A,B] >= [A9,B9] implies [A9,B9] in Dependencies X ) thus ( [A,B] in Dependencies X & [A,B] >= [A9,B9] implies [A9,B9] in Dependencies X ) ; ::_thesis: verum end; thus Dependencies X is (F4) ::_thesis: verum proof let A, B, A9, B9 be Subset of X; :: according to ARMSTRNG:def_13 ::_thesis: ( [A,B] in Dependencies X & [A9,B9] in Dependencies X implies [(A \/ A9),(B \/ B9)] in Dependencies X ) thus ( [A,B] in Dependencies X & [A9,B9] in Dependencies X implies [(A \/ A9),(B \/ B9)] in Dependencies X ) ; ::_thesis: verum end; end; registration let X be set ; cluster non empty Relation-like bool X -defined bool X -valued (F2) (F1) (F3) (F4) for Element of bool [:(bool X),(bool X):]; existence ex b1 being Dependency-set of X st ( b1 is (F1) & b1 is (F2) & b1 is (F3) & b1 is (F4) & not b1 is empty ) proof take Dependencies X ; ::_thesis: ( Dependencies X is (F1) & Dependencies X is (F2) & Dependencies X is (F3) & Dependencies X is (F4) & not Dependencies X is empty ) thus ( Dependencies X is (F1) & Dependencies X is (F2) & Dependencies X is (F3) & Dependencies X is (F4) & not Dependencies X is empty ) by Th19; ::_thesis: verum end; end; definition let X be set ; let F be Dependency-set of X; attrF is full_family means :Def14: :: ARMSTRNG:def 14 ( F is (F1) & F is (F2) & F is (F3) & F is (F4) ); end; :: deftheorem Def14 defines full_family ARMSTRNG:def_14_:_ for X being set for F being Dependency-set of X holds ( F is full_family iff ( F is (F1) & F is (F2) & F is (F3) & F is (F4) ) ); registration let X be set ; cluster Relation-like bool X -defined bool X -valued full_family for Element of bool [:(bool X),(bool X):]; existence ex b1 being Dependency-set of X st b1 is full_family proof set D = the non empty (F2) (F1) (F3) (F4) Dependency-set of X; take the non empty (F2) (F1) (F3) (F4) Dependency-set of X ; ::_thesis: the non empty (F2) (F1) (F3) (F4) Dependency-set of X is full_family thus the non empty (F2) (F1) (F3) (F4) Dependency-set of X is full_family by Def14; ::_thesis: verum end; end; definition let X be set ; mode Full-family of X is full_family Dependency-set of X; end; theorem :: ARMSTRNG:20 for X being finite set for F being Dependency-set of X holds F is finite ; registration let X be finite set ; cluster Relation-like bool X -defined bool X -valued finite countable full_family for Element of bool [:(bool X),(bool X):]; existence ex b1 being Full-family of X st b1 is finite proof set D = the non empty (F2) (F1) (F3) (F4) Dependency-set of X; reconsider D = the non empty (F2) (F1) (F3) (F4) Dependency-set of X as Full-family of X by Def14; take D ; ::_thesis: D is finite thus D is finite ; ::_thesis: verum end; cluster -> finite for Element of bool [:(bool X),(bool X):]; coherence for b1 being Dependency-set of X holds b1 is finite ; end; registration let X be set ; cluster full_family -> (F2) (F1) (F3) (F4) for Element of bool [:(bool X),(bool X):]; coherence for b1 being Dependency-set of X st b1 is full_family holds ( b1 is (F1) & b1 is (F2) & b1 is (F3) & b1 is (F4) ) by Def14; cluster (F2) (F1) (F3) (F4) -> full_family for Element of bool [:(bool X),(bool X):]; correctness coherence for b1 being Dependency-set of X st b1 is (F1) & b1 is (F2) & b1 is (F3) & b1 is (F4) holds b1 is full_family ; by Def14; end; definition let X be set ; let F be Dependency-set of X; attrF is (DC3) means :Def15: :: ARMSTRNG:def 15 for A, B being Subset of X st B c= A holds [A,B] in F; end; :: deftheorem Def15 defines (DC3) ARMSTRNG:def_15_:_ for X being set for F being Dependency-set of X holds ( F is (DC3) iff for A, B being Subset of X st B c= A holds [A,B] in F ); registration let X be set ; cluster (F1) (F3) -> (DC3) for Element of bool [:(bool X),(bool X):]; coherence for b1 being Dependency-set of X st b1 is (F1) & b1 is (F3) holds b1 is (DC3) proof let F be Dependency-set of X; ::_thesis: ( F is (F1) & F is (F3) implies F is (DC3) ) assume A1: ( F is (F1) & F is (F3) ) ; ::_thesis: F is (DC3) let A, B be Subset of X; :: according to ARMSTRNG:def_15 ::_thesis: ( B c= A implies [A,B] in F ) assume B c= A ; ::_thesis: [A,B] in F then A2: [A,A] >= [A,B] by Th13; [A,A] in F by A1, Def11; hence [A,B] in F by A1, A2, Def12; ::_thesis: verum end; cluster (F2) (DC3) -> (F1) (F3) for Element of bool [:(bool X),(bool X):]; coherence for b1 being Dependency-set of X st b1 is (DC3) & b1 is (F2) holds ( b1 is (F1) & b1 is (F3) ) proof let F be Dependency-set of X; ::_thesis: ( F is (DC3) & F is (F2) implies ( F is (F1) & F is (F3) ) ) assume A3: ( F is (DC3) & F is (F2) ) ; ::_thesis: ( F is (F1) & F is (F3) ) thus F is (F1) ::_thesis: F is (F3) proof let A be Subset of X; :: according to ARMSTRNG:def_11 ::_thesis: [A,A] in F thus [A,A] in F by A3, Def15; ::_thesis: verum end; let A, B, A9, B9 be Subset of X; :: according to ARMSTRNG:def_12 ::_thesis: ( [A,B] in F & [A,B] >= [A9,B9] implies [A9,B9] in F ) assume A4: [A,B] in F ; ::_thesis: ( not [A,B] >= [A9,B9] or [A9,B9] in F ) assume A5: [A,B] >= [A9,B9] ; ::_thesis: [A9,B9] in F then A c= A9 by Th13; then [A9,A] in F by A3, Def15; then A6: [A9,B] in F by A3, A4, Th18; B9 c= B by A5, Th13; then [B,B9] in F by A3, Def15; hence [A9,B9] in F by A3, A6, Th18; ::_thesis: verum end; end; registration let X be set ; cluster non empty Relation-like bool X -defined bool X -valued (F2) (F4) (DC3) for Element of bool [:(bool X),(bool X):]; existence ex b1 being Dependency-set of X st ( b1 is (DC3) & b1 is (F2) & b1 is (F4) & not b1 is empty ) proof set D = the non empty (F2) (F1) (F3) (F4) Dependency-set of X; take the non empty (F2) (F1) (F3) (F4) Dependency-set of X ; ::_thesis: ( the non empty (F2) (F1) (F3) (F4) Dependency-set of X is (DC3) & the non empty (F2) (F1) (F3) (F4) Dependency-set of X is (F2) & the non empty (F2) (F1) (F3) (F4) Dependency-set of X is (F4) & not the non empty (F2) (F1) (F3) (F4) Dependency-set of X is empty ) thus ( the non empty (F2) (F1) (F3) (F4) Dependency-set of X is (DC3) & the non empty (F2) (F1) (F3) (F4) Dependency-set of X is (F2) & the non empty (F2) (F1) (F3) (F4) Dependency-set of X is (F4) & not the non empty (F2) (F1) (F3) (F4) Dependency-set of X is empty ) ; ::_thesis: verum end; end; theorem :: ARMSTRNG:21 for X being set for F being Dependency-set of X st F is (DC3) & F is (F2) holds ( F is (F1) & F is (F3) ) ; theorem :: ARMSTRNG:22 for X being set for F being Dependency-set of X st F is (F1) & F is (F3) holds F is (DC3) ; registration let X be set ; cluster (F1) -> non empty for Element of bool [:(bool X),(bool X):]; coherence for b1 being Dependency-set of X st b1 is (F1) holds not b1 is empty by Def11; end; theorem Th23: :: ARMSTRNG:23 for R being DB-Rel holds Dependency-str R is full_family proof let D be DB-Rel ; ::_thesis: Dependency-str D is full_family set S = Dependency-str D; set T = the Attributes of D; set R = the Relationship of D; A1: now__::_thesis:_for_A,_B,_C_being_Subset_of_the_Attributes_of_D_st_[A,B]_in_Dependency-str_D_&_[B,C]_in_Dependency-str_D_holds_ [A,C]_in_Dependency-str_D let A, B, C be Subset of the Attributes of D; ::_thesis: ( [A,B] in Dependency-str D & [B,C] in Dependency-str D implies [A,C] in Dependency-str D ) assume that A2: [A,B] in Dependency-str D and A3: [B,C] in Dependency-str D ; ::_thesis: [A,C] in Dependency-str D A4: B >|> C,D by A3, Th10; A5: A >|> B,D by A2, Th10; A >|> C,D proof let f, g be Element of the Relationship of D; :: according to ARMSTRNG:def_7 ::_thesis: ( f | A = g | A implies f | C = g | C ) assume f | A = g | A ; ::_thesis: f | C = g | C then f | B = g | B by A5, Def7; hence f | C = g | C by A4, Def7; ::_thesis: verum end; hence [A,C] in Dependency-str D ; ::_thesis: verum end; then A6: Dependency-str D is (F2) by Th18; A7: Dependency-str D is (DC3) proof let A, B be Subset of the Attributes of D; :: according to ARMSTRNG:def_15 ::_thesis: ( B c= A implies [A,B] in Dependency-str D ) assume A8: B c= A ; ::_thesis: [A,B] in Dependency-str D A >|> B,D proof let f, g be Element of the Relationship of D; :: according to ARMSTRNG:def_7 ::_thesis: ( f | A = g | A implies f | B = g | B ) assume A9: f | A = g | A ; ::_thesis: f | B = g | B thus f | B = (f | A) | B by A8, RELAT_1:74 .= g | B by A8, A9, RELAT_1:74 ; ::_thesis: verum end; hence [A,B] in Dependency-str D ; ::_thesis: verum end; hence Dependency-str D is (F1) by A6; :: according to ARMSTRNG:def_14 ::_thesis: ( Dependency-str D is (F2) & Dependency-str D is (F3) & Dependency-str D is (F4) ) thus Dependency-str D is (F2) by A1, Th18; ::_thesis: ( Dependency-str D is (F3) & Dependency-str D is (F4) ) thus Dependency-str D is (F3) by A7, A6; ::_thesis: Dependency-str D is (F4) thus Dependency-str D is (F4) ::_thesis: verum proof let A, B, A9, B9 be Subset of the Attributes of D; :: according to ARMSTRNG:def_13 ::_thesis: ( [A,B] in Dependency-str D & [A9,B9] in Dependency-str D implies [(A \/ A9),(B \/ B9)] in Dependency-str D ) assume that A10: [A,B] in Dependency-str D and A11: [A9,B9] in Dependency-str D ; ::_thesis: [(A \/ A9),(B \/ B9)] in Dependency-str D A12: A9 >|> B9,D by A11, Th10; A13: A >|> B,D by A10, Th10; A \/ A9 >|> B \/ B9,D proof let f, g be Element of the Relationship of D; :: according to ARMSTRNG:def_7 ::_thesis: ( f | (A \/ A9) = g | (A \/ A9) implies f | (B \/ B9) = g | (B \/ B9) ) assume A14: f | (A \/ A9) = g | (A \/ A9) ; ::_thesis: f | (B \/ B9) = g | (B \/ B9) f | A9 = (f | (A \/ A9)) | A9 by RELAT_1:74, XBOOLE_1:7 .= g | A9 by A14, RELAT_1:74, XBOOLE_1:7 ; then A15: f | B9 = g | B9 by A12, Def7; f | A = (f | (A \/ A9)) | A by RELAT_1:74, XBOOLE_1:7 .= g | A by A14, RELAT_1:74, XBOOLE_1:7 ; then A16: f | B = g | B by A13, Def7; thus f | (B \/ B9) = (f | B) \/ (f | B9) by RELAT_1:78 .= g | (B \/ B9) by A16, A15, RELAT_1:78 ; ::_thesis: verum end; hence [(A \/ A9),(B \/ B9)] in Dependency-str D ; ::_thesis: verum end; end; theorem :: ARMSTRNG:24 for X being set for K being Subset of X holds { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } is Full-family of X proof let X be set ; ::_thesis: for K being Subset of X holds { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } is Full-family of X let K be Subset of X; ::_thesis: { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } is Full-family of X set F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } ; { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } c= [:(bool X),(bool X):] proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } or x in [:(bool X),(bool X):] ) assume x in { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } ; ::_thesis: x in [:(bool X),(bool X):] then ex A, B being Subset of X st ( x = [A,B] & ( K c= A or B c= A ) ) ; hence x in [:(bool X),(bool X):] ; ::_thesis: verum end; then reconsider F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } as Dependency-set of X ; A1: F is (F4) proof let A, B, A9, B9 be Subset of X; :: according to ARMSTRNG:def_13 ::_thesis: ( [A,B] in F & [A9,B9] in F implies [(A \/ A9),(B \/ B9)] in F ) assume that A2: [A,B] in F and A3: [A9,B9] in F ; ::_thesis: [(A \/ A9),(B \/ B9)] in F consider a, b being Subset of X such that A4: [A,B] = [a,b] and A5: ( K c= a or b c= a ) by A2; A6: B = b by A4, XTUPLE_0:1; consider a9, b9 being Subset of X such that A7: [A9,B9] = [a9,b9] and A8: ( K c= a9 or b9 c= a9 ) by A3; A9: A9 = a9 by A7, XTUPLE_0:1; A10: B9 = b9 by A7, XTUPLE_0:1; A = a by A4, XTUPLE_0:1; then ( K c= A \/ A9 or B \/ B9 c= A \/ A9 ) by A5, A8, A6, A9, A10, XBOOLE_1:10, XBOOLE_1:13; hence [(A \/ A9),(B \/ B9)] in F ; ::_thesis: verum end; now__::_thesis:_for_A,_B,_C_being_Subset_of_X_st_[A,B]_in_F_&_[B,C]_in_F_holds_ [A,C]_in_F let A, B, C be Subset of X; ::_thesis: ( [A,B] in F & [B,C] in F implies [A,C] in F ) assume that A11: [A,B] in F and A12: [B,C] in F ; ::_thesis: [A,C] in F consider a, b being Subset of X such that A13: [A,B] = [a,b] and A14: ( K c= a or b c= a ) by A11; A15: A = a by A13, XTUPLE_0:1; consider b1, c being Subset of X such that A16: [B,C] = [b1,c] and A17: ( K c= b1 or c c= b1 ) by A12; A18: B = b1 by A16, XTUPLE_0:1; A19: C = c by A16, XTUPLE_0:1; B = b by A13, XTUPLE_0:1; then ( K c= a or c c= a ) by A14, A17, A18, XBOOLE_1:1; hence [A,C] in F by A15, A19; ::_thesis: verum end; then A20: F is (F2) by Th18; F is (DC3) proof let A, B be Subset of X; :: according to ARMSTRNG:def_15 ::_thesis: ( B c= A implies [A,B] in F ) assume B c= A ; ::_thesis: [A,B] in F hence [A,B] in F ; ::_thesis: verum end; hence { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } is Full-family of X by A20, A1; ::_thesis: verum end; begin definition let X be set ; let F be Dependency-set of X; func Maximal_wrt F -> Dependency-set of X equals :: ARMSTRNG:def 16 (Dependencies-Order X) Maximal_in F; coherence (Dependencies-Order X) Maximal_in F is Dependency-set of X by RELSET_1:1; end; :: deftheorem defines Maximal_wrt ARMSTRNG:def_16_:_ for X being set for F being Dependency-set of X holds Maximal_wrt F = (Dependencies-Order X) Maximal_in F; theorem :: ARMSTRNG:25 for X being set for F being Dependency-set of X holds Maximal_wrt F c= F ; definition let X be set ; let F be Dependency-set of X; let x, y be set ; predx ^|^ y,F means :Def17: :: ARMSTRNG:def 17 [x,y] in Maximal_wrt F; end; :: deftheorem Def17 defines ^|^ ARMSTRNG:def_17_:_ for X being set for F being Dependency-set of X for x, y being set holds ( x ^|^ y,F iff [x,y] in Maximal_wrt F ); theorem Th26: :: ARMSTRNG:26 for X being finite set for P being Dependency of X for F being Dependency-set of X st P in F holds ex A, B being Subset of X st ( [A,B] in Maximal_wrt F & [A,B] >= P ) proof let X be finite set ; ::_thesis: for P being Dependency of X for F being Dependency-set of X st P in F holds ex A, B being Subset of X st ( [A,B] in Maximal_wrt F & [A,B] >= P ) let x be Dependency of X; ::_thesis: for F being Dependency-set of X st x in F holds ex A, B being Subset of X st ( [A,B] in Maximal_wrt F & [A,B] >= x ) let F be Dependency-set of X; ::_thesis: ( x in F implies ex A, B being Subset of X st ( [A,B] in Maximal_wrt F & [A,B] >= x ) ) set DOX = Dependencies-Order X; assume A1: x in F ; ::_thesis: ex A, B being Subset of X st ( [A,B] in Maximal_wrt F & [A,B] >= x ) then reconsider FF = F as non empty Dependency-set of X ; reconsider S = { y where y is Element of FF : x <= y } as set ; A2: field (Dependencies-Order X) = [:(bool X),(bool X):] by Th17; A3: S c= field (Dependencies-Order X) proof let a be set ; :: according to TARSKI:def_3 ::_thesis: ( not a in S or a in field (Dependencies-Order X) ) assume a in S ; ::_thesis: a in field (Dependencies-Order X) then ex b being Element of FF st ( a = b & x <= b ) ; hence a in field (Dependencies-Order X) by A2; ::_thesis: verum end; x in S by A1; then consider m being Element of S such that A4: m is_maximal_wrt S, Dependencies-Order X by A3, Th2; m in S by A4, WAYBEL_4:def_23; then A5: ex y being Element of FF st ( m = y & x <= y ) ; then consider a, b being Subset of X such that A6: m = [a,b] by Th8; take a ; ::_thesis: ex B being Subset of X st ( [a,B] in Maximal_wrt F & [a,B] >= x ) take b ; ::_thesis: ( [a,b] in Maximal_wrt F & [a,b] >= x ) m is_maximal_wrt F, Dependencies-Order X proof thus m in F by A5; :: according to WAYBEL_4:def_23 ::_thesis: for b1 being set holds ( not b1 in F or b1 = m or not [m,b1] in Dependencies-Order X ) given y being set such that A7: y in F and A8: y <> m and A9: [m,y] in Dependencies-Order X ; ::_thesis: contradiction consider e, f being Dependency of X such that A10: [m,y] = [e,f] and A11: e <= f by A9; reconsider y = y as Element of FF by A7; A12: y = f by A10, XTUPLE_0:1; m = e by A10, XTUPLE_0:1; then x <= y by A5, A11, A12, Th12; then y in S ; hence contradiction by A4, A8, A9, WAYBEL_4:def_23; ::_thesis: verum end; hence [a,b] in Maximal_wrt F by A6, Def1; ::_thesis: [a,b] >= x thus [a,b] >= x by A5, A6; ::_thesis: verum end; theorem Th27: :: ARMSTRNG:27 for X being set for F being Dependency-set of X for A, B being Subset of X holds ( A ^|^ B,F iff ( [A,B] in F & ( for A9, B9 being Subset of X holds ( not [A9,B9] in F or ( not A <> A9 & not B <> B9 ) or not [A,B] <= [A9,B9] ) ) ) ) proof let X be set ; ::_thesis: for F being Dependency-set of X for A, B being Subset of X holds ( A ^|^ B,F iff ( [A,B] in F & ( for A9, B9 being Subset of X holds ( not [A9,B9] in F or ( not A <> A9 & not B <> B9 ) or not [A,B] <= [A9,B9] ) ) ) ) let F be Dependency-set of X; ::_thesis: for A, B being Subset of X holds ( A ^|^ B,F iff ( [A,B] in F & ( for A9, B9 being Subset of X holds ( not [A9,B9] in F or ( not A <> A9 & not B <> B9 ) or not [A,B] <= [A9,B9] ) ) ) ) let x, y be Subset of X; ::_thesis: ( x ^|^ y,F iff ( [x,y] in F & ( for A9, B9 being Subset of X holds ( not [A9,B9] in F or ( not x <> A9 & not y <> B9 ) or not [x,y] <= [A9,B9] ) ) ) ) set DOX = Dependencies-Order X; hereby ::_thesis: ( [x,y] in F & ( for A9, B9 being Subset of X holds ( not [A9,B9] in F or ( not x <> A9 & not y <> B9 ) or not [x,y] <= [A9,B9] ) ) implies x ^|^ y,F ) assume x ^|^ y,F ; ::_thesis: ( [x,y] in F & ( for x9, y9 being Subset of X holds ( not [x9,y9] in F or ( not x <> x9 & not y <> y9 ) or not [x,y] <= [x9,y9] ) ) ) then A1: [x,y] in Maximal_wrt F by Def17; hence [x,y] in F ; ::_thesis: for x9, y9 being Subset of X holds ( not [x9,y9] in F or ( not x <> x9 & not y <> y9 ) or not [x,y] <= [x9,y9] ) A2: [x,y] is_maximal_wrt F, Dependencies-Order X by A1, Def1; given x9, y9 being Subset of X such that A3: [x9,y9] in F and A4: ( x <> x9 or y <> y9 ) and A5: [x,y] <= [x9,y9] ; ::_thesis: contradiction A6: [[x,y],[x9,y9]] in Dependencies-Order X by A5; [x,y] <> [x9,y9] by A4, XTUPLE_0:1; hence contradiction by A2, A3, A6, WAYBEL_4:def_23; ::_thesis: verum end; assume that A7: [x,y] in F and A8: for x9, y9 being Subset of X holds ( not [x9,y9] in F or ( not x <> x9 & not y <> y9 ) or not [x,y] <= [x9,y9] ) ; ::_thesis: x ^|^ y,F [x,y] is_maximal_wrt F, Dependencies-Order X proof thus [x,y] in F by A7; :: according to WAYBEL_4:def_23 ::_thesis: for b1 being set holds ( not b1 in F or b1 = [x,y] or not [[x,y],b1] in Dependencies-Order X ) given z being set such that A9: z in F and A10: z <> [x,y] and A11: [[x,y],z] in Dependencies-Order X ; ::_thesis: contradiction consider x9, y9 being set such that A12: z = [x9,y9] and A13: x9 in bool X and A14: y9 in bool X by A9, RELSET_1:2; consider e, f being Dependency of X such that A15: [[x,y],z] = [e,f] and A16: e <= f by A11; A17: e = [x,y] by A15, XTUPLE_0:1; A18: f = z by A15, XTUPLE_0:1; reconsider x9 = x9, y9 = y9 as Subset of X by A13, A14; ( x <> x9 or y <> y9 ) by A10, A12; hence contradiction by A8, A9, A12, A13, A14, A16, A17, A18; ::_thesis: verum end; then [x,y] in Maximal_wrt F by Def1; hence x ^|^ y,F by Def17; ::_thesis: verum end; definition let X be set ; let M be Dependency-set of X; attrM is (M1) means :Def18: :: ARMSTRNG:def 18 for A being Subset of X ex A9, B9 being Subset of X st ( [A9,B9] >= [A,A] & [A9,B9] in M ); attrM is (M2) means :Def19: :: ARMSTRNG:def 19 for A, B, A9, B9 being Subset of X st [A,B] in M & [A9,B9] in M & [A,B] >= [A9,B9] holds ( A = A9 & B = B9 ); attrM is (M3) means :Def20: :: ARMSTRNG:def 20 for A, B, A9, B9 being Subset of X st [A,B] in M & [A9,B9] in M & A9 c= B holds B9 c= B; end; :: deftheorem Def18 defines (M1) ARMSTRNG:def_18_:_ for X being set for M being Dependency-set of X holds ( M is (M1) iff for A being Subset of X ex A9, B9 being Subset of X st ( [A9,B9] >= [A,A] & [A9,B9] in M ) ); :: deftheorem Def19 defines (M2) ARMSTRNG:def_19_:_ for X being set for M being Dependency-set of X holds ( M is (M2) iff for A, B, A9, B9 being Subset of X st [A,B] in M & [A9,B9] in M & [A,B] >= [A9,B9] holds ( A = A9 & B = B9 ) ); :: deftheorem Def20 defines (M3) ARMSTRNG:def_20_:_ for X being set for M being Dependency-set of X holds ( M is (M3) iff for A, B, A9, B9 being Subset of X st [A,B] in M & [A9,B9] in M & A9 c= B holds B9 c= B ); theorem Th28: :: ARMSTRNG:28 for X being non empty finite set for F being Full-family of X holds ( Maximal_wrt F is (M1) & Maximal_wrt F is (M2) & Maximal_wrt F is (M3) ) proof let X be non empty finite set ; ::_thesis: for F being Full-family of X holds ( Maximal_wrt F is (M1) & Maximal_wrt F is (M2) & Maximal_wrt F is (M3) ) let F be full_family Dependency-set of X; ::_thesis: ( Maximal_wrt F is (M1) & Maximal_wrt F is (M2) & Maximal_wrt F is (M3) ) set DOX = Dependencies-Order X; set MEF = Maximal_wrt F; thus Maximal_wrt F is (M1) ::_thesis: ( Maximal_wrt F is (M2) & Maximal_wrt F is (M3) ) proof A1: field (Dependencies-Order X) = [:(bool X),(bool X):] by Th17; let A be Subset of X; :: according to ARMSTRNG:def_18 ::_thesis: ex A9, B9 being Subset of X st ( [A9,B9] >= [A,A] & [A9,B9] in Maximal_wrt F ) defpred S1[ set ] means ex y being Dependency of X st ( $1 = y & y >= [A,A] ); consider MA being set such that A2: for x being set holds ( x in MA iff ( x in F & S1[x] ) ) from XBOOLE_0:sch_1(); MA c= F proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in MA or x in F ) assume x in MA ; ::_thesis: x in F hence x in F by A2; ::_thesis: verum end; then A3: MA is finite Subset of (field (Dependencies-Order X)) by A1, XBOOLE_1:1; [A,A] in F by Def15; then MA <> {} by A2; then consider x being Element of MA such that A4: x is_maximal_wrt MA, Dependencies-Order X by A3, Th2; A5: x in MA by A4, WAYBEL_4:def_23; then x in F by A2; then consider A9, B9 being set such that A6: A9 in bool X and A7: B9 in bool X and A8: x = [A9,B9] by ZFMISC_1:def_2; reconsider A9 = A9, B9 = B9 as Subset of X by A6, A7; take A9 ; ::_thesis: ex B9 being Subset of X st ( [A9,B9] >= [A,A] & [A9,B9] in Maximal_wrt F ) take B9 ; ::_thesis: ( [A9,B9] >= [A,A] & [A9,B9] in Maximal_wrt F ) A9: ex y being Dependency of X st ( x = y & y >= [A,A] ) by A2, A5; hence [A9,B9] >= [A,A] by A8; ::_thesis: [A9,B9] in Maximal_wrt F x is_maximal_wrt F, Dependencies-Order X proof thus x in F by A2, A5; :: according to WAYBEL_4:def_23 ::_thesis: for b1 being set holds ( not b1 in F or b1 = x or not [x,b1] in Dependencies-Order X ) given z being set such that A10: z in F and A11: z <> x and A12: [x,z] in Dependencies-Order X ; ::_thesis: contradiction consider e, f being Dependency of X such that A13: [x,z] = [e,f] and A14: e <= f by A12; x = e by A13, XTUPLE_0:1; then A15: f >= [A,A] by A9, A14, Th12; z = f by A13, XTUPLE_0:1; then z in MA by A2, A10, A15; hence contradiction by A4, A11, A12, WAYBEL_4:def_23; ::_thesis: verum end; hence [A9,B9] in Maximal_wrt F by A8, Def1; ::_thesis: verum end; thus Maximal_wrt F is (M2) ::_thesis: Maximal_wrt F is (M3) proof let A, B, A9, B9 be Subset of X; :: according to ARMSTRNG:def_19 ::_thesis: ( [A,B] in Maximal_wrt F & [A9,B9] in Maximal_wrt F & [A,B] >= [A9,B9] implies ( A = A9 & B = B9 ) ) assume that A16: [A,B] in Maximal_wrt F and A17: [A9,B9] in Maximal_wrt F and A18: [A,B] >= [A9,B9] ; ::_thesis: ( A = A9 & B = B9 ) A19: [[A9,B9],[A,B]] in Dependencies-Order X by A18; assume ( not A = A9 or not B = B9 ) ; ::_thesis: contradiction then A20: [A,B] <> [A9,B9] by XTUPLE_0:1; [A9,B9] is_maximal_wrt F, Dependencies-Order X by A17, Def1; hence contradiction by A16, A20, A19, WAYBEL_4:def_23; ::_thesis: verum end; thus Maximal_wrt F is (M3) ::_thesis: verum proof let A, B, A9, B9 be Subset of X; :: according to ARMSTRNG:def_20 ::_thesis: ( [A,B] in Maximal_wrt F & [A9,B9] in Maximal_wrt F & A9 c= B implies B9 c= B ) assume that A21: [A,B] in Maximal_wrt F and A22: [A9,B9] in Maximal_wrt F and A23: A9 c= B ; ::_thesis: B9 c= B A24: A ^|^ B,F by A21, Def17; [A9,B9] >= [B,B9] by A23, Th13; then [B,B9] in F by A22, Def12; then A25: [A,B9] in F by A21, Th18; B c= B \/ B9 by XBOOLE_1:7; then A26: [A,(B \/ B9)] >= [A,B] by Th13; A \/ A = A ; then [A,(B \/ B9)] in F by A21, A25, Def13; then B \/ B9 = B by A24, A26, Th27; hence B9 c= B by XBOOLE_1:11; ::_thesis: verum end; end; theorem Th29: :: ARMSTRNG:29 for X being finite set for M, F being Dependency-set of X st M is (M1) & M is (M2) & M is (M3) & F = { [A,B] where A, B is Subset of X : ex A9, B9 being Subset of X st ( [A9,B9] >= [A,B] & [A9,B9] in M ) } holds ( M = Maximal_wrt F & F is full_family & ( for G being Full-family of X st M = Maximal_wrt G holds G = F ) ) proof let X be finite set ; ::_thesis: for M, F being Dependency-set of X st M is (M1) & M is (M2) & M is (M3) & F = { [A,B] where A, B is Subset of X : ex A9, B9 being Subset of X st ( [A9,B9] >= [A,B] & [A9,B9] in M ) } holds ( M = Maximal_wrt F & F is full_family & ( for G being Full-family of X st M = Maximal_wrt G holds G = F ) ) let M, F be Dependency-set of X; ::_thesis: ( M is (M1) & M is (M2) & M is (M3) & F = { [A,B] where A, B is Subset of X : ex A9, B9 being Subset of X st ( [A9,B9] >= [A,B] & [A9,B9] in M ) } implies ( M = Maximal_wrt F & F is full_family & ( for G being Full-family of X st M = Maximal_wrt G holds G = F ) ) ) assume that A1: ( M is (M1) & M is (M2) & M is (M3) ) and A2: F = { [A,B] where A, B is Subset of X : ex A9, B9 being Subset of X st ( [A9,B9] >= [A,B] & [A9,B9] in M ) } ; ::_thesis: ( M = Maximal_wrt F & F is full_family & ( for G being Full-family of X st M = Maximal_wrt G holds G = F ) ) A3: F is (F1) proof let A be Subset of X; :: according to ARMSTRNG:def_11 ::_thesis: [A,A] in F ex A9, B9 being Subset of X st ( [A9,B9] >= [A,A] & [A9,B9] in M ) by A1, Def18; hence [A,A] in F by A2; ::_thesis: verum end; A4: now__::_thesis:_for_x_being_set_st_x_in_F_holds_ ex_a,_b,_a9,_b9_being_Subset_of_X_st_ (_x_=_[a,b]_&_[a9,b9]_>=_[a,b]_&_[a9,b9]_in_M_) let x be set ; ::_thesis: ( x in F implies ex a, b, a9, b9 being Subset of X st ( x = [a,b] & [a9,b9] >= [a,b] & [a9,b9] in M ) ) assume x in F ; ::_thesis: ex a, b, a9, b9 being Subset of X st ( x = [a,b] & [a9,b9] >= [a,b] & [a9,b9] in M ) then consider a, b being Subset of X such that A5: x = [a,b] and A6: ex a9, b9 being Subset of X st ( [a9,b9] >= [a,b] & [a9,b9] in M ) by A2; consider a9, b9 being Subset of X such that A7: [a9,b9] >= [a,b] and A8: [a9,b9] in M by A6; take a = a; ::_thesis: ex b, a9, b9 being Subset of X st ( x = [a,b] & [a9,b9] >= [a,b] & [a9,b9] in M ) take b = b; ::_thesis: ex a9, b9 being Subset of X st ( x = [a,b] & [a9,b9] >= [a,b] & [a9,b9] in M ) take a9 = a9; ::_thesis: ex b9 being Subset of X st ( x = [a,b] & [a9,b9] >= [a,b] & [a9,b9] in M ) take b9 = b9; ::_thesis: ( x = [a,b] & [a9,b9] >= [a,b] & [a9,b9] in M ) thus ( x = [a,b] & [a9,b9] >= [a,b] & [a9,b9] in M ) by A5, A7, A8; ::_thesis: verum end; A9: now__::_thesis:_for_A,_B_being_Subset_of_X_st_[A,B]_in_F_holds_ ex_a9,_b9_being_Subset_of_X_st_ (_[a9,b9]_>=_[A,B]_&_[a9,b9]_in_M_) let A, B be Subset of X; ::_thesis: ( [A,B] in F implies ex a9, b9 being Subset of X st ( [a9,b9] >= [A,B] & [a9,b9] in M ) ) assume [A,B] in F ; ::_thesis: ex a9, b9 being Subset of X st ( [a9,b9] >= [A,B] & [a9,b9] in M ) then consider a, b, a9, b9 being Subset of X such that A10: [A,B] = [a,b] and A11: [a9,b9] >= [a,b] and A12: [a9,b9] in M by A4; take a9 = a9; ::_thesis: ex b9 being Subset of X st ( [a9,b9] >= [A,B] & [a9,b9] in M ) take b9 = b9; ::_thesis: ( [a9,b9] >= [A,B] & [a9,b9] in M ) thus ( [a9,b9] >= [A,B] & [a9,b9] in M ) by A10, A11, A12; ::_thesis: verum end; now__::_thesis:_for_A,_B,_C_being_Subset_of_X_st_[A,B]_in_F_&_[B,C]_in_F_holds_ [A,C]_in_F let A, B, C be Subset of X; ::_thesis: ( [A,B] in F & [B,C] in F implies [A,C] in F ) assume that A13: [A,B] in F and A14: [B,C] in F ; ::_thesis: [A,C] in F consider A9, B9 being Subset of X such that A15: [A9,B9] >= [A,B] and A16: [A9,B9] in M by A9, A13; consider B19, C9 being Subset of X such that A17: [B19,C9] >= [B,C] and A18: [B19,C9] in M by A9, A14; A19: B19 c= B by A17, Th13; B c= B9 by A15, Th13; then B19 c= B9 by A19, XBOOLE_1:1; then C9 c= B9 by A1, A16, A18, Def20; then A20: [A9,B9] >= [A9,C9] by Th13; A21: C c= C9 by A17, Th13; A9 c= A by A15, Th13; then [A9,C9] >= [A,C] by A21, Th13; then [A9,B9] >= [A,C] by A20, Th12; hence [A,C] in F by A2, A16; ::_thesis: verum end; then A22: F is (F2) by Th18; A23: F is (F4) proof let A, B, A9, B9 be Subset of X; :: according to ARMSTRNG:def_13 ::_thesis: ( [A,B] in F & [A9,B9] in F implies [(A \/ A9),(B \/ B9)] in F ) assume that A24: [A,B] in F and A25: [A9,B9] in F ; ::_thesis: [(A \/ A9),(B \/ B9)] in F consider a1, b1 being Subset of X such that A26: [a1,b1] >= [A,B] and A27: [a1,b1] in M by A9, A24; A28: B c= b1 by A26, Th13; consider a19, b19 being Subset of X such that A29: [a19,b19] >= [A9,B9] and A30: [a19,b19] in M by A9, A25; A31: B9 c= b19 by A29, Th13; consider A99, B99 being Subset of X such that A32: [A99,B99] >= [(A \/ A9),(A \/ A9)] and A33: [A99,B99] in M by A1, Def18; A34: A \/ A9 c= B99 by A32, Th13; a19 c= A9 by A29, Th13; then a19 c= A \/ A9 by XBOOLE_1:10; then a19 c= B99 by A34, XBOOLE_1:1; then b19 c= B99 by A1, A33, A30, Def20; then A35: B9 c= B99 by A31, XBOOLE_1:1; a1 c= A by A26, Th13; then a1 c= A \/ A9 by XBOOLE_1:10; then a1 c= B99 by A34, XBOOLE_1:1; then b1 c= B99 by A1, A33, A27, Def20; then B c= B99 by A28, XBOOLE_1:1; then A36: B \/ B9 c= B99 \/ B99 by A35, XBOOLE_1:13; A99 c= A \/ A9 by A32, Th13; then [A99,B99] >= [(A \/ A9),(B \/ B9)] by A36, Th13; hence [(A \/ A9),(B \/ B9)] in F by A2, A33; ::_thesis: verum end; set DOX = Dependencies-Order X; now__::_thesis:_for_x_being_set_holds_ (_(_x_in_M_implies_x_in_Maximal_wrt_F_)_&_(_x_in_Maximal_wrt_F_implies_x_in_M_)_) let x be set ; ::_thesis: ( ( x in M implies x in Maximal_wrt F ) & ( x in Maximal_wrt F implies x in M ) ) hereby ::_thesis: ( x in Maximal_wrt F implies x in M ) assume A37: x in M ; ::_thesis: x in Maximal_wrt F then consider a, b being Subset of X such that A38: x = [a,b] by Th9; x is_maximal_wrt F, Dependencies-Order X proof thus x in F by A2, A37, A38; :: according to WAYBEL_4:def_23 ::_thesis: for b1 being set holds ( not b1 in F or b1 = x or not [x,b1] in Dependencies-Order X ) given y being set such that A39: y in F and A40: y <> x and A41: [x,y] in Dependencies-Order X ; ::_thesis: contradiction consider e, f being Dependency of X such that A42: [x,y] = [e,f] and A43: e <= f by A41; A44: y = f by A42, XTUPLE_0:1; consider c, d, c9, d9 being Subset of X such that A45: y = [c,d] and A46: [c9,d9] >= [c,d] and A47: [c9,d9] in M by A4, A39; A48: x = e by A42, XTUPLE_0:1; then A49: [c9,d9] >= [a,b] by A38, A43, A44, A45, A46, Th12; then A50: d9 = b by A1, A37, A38, A47, Def19; c9 = a by A1, A37, A38, A47, A49, Def19; hence contradiction by A38, A40, A43, A48, A44, A45, A46, A50, Th11; ::_thesis: verum end; hence x in Maximal_wrt F by Def1; ::_thesis: verum end; assume A51: x in Maximal_wrt F ; ::_thesis: x in M then A52: x is_maximal_wrt F, Dependencies-Order X by Def1; assume A53: not x in M ; ::_thesis: contradiction consider a, b, a9, b9 being Subset of X such that A54: x = [a,b] and A55: [a9,b9] >= [a,b] and A56: [a9,b9] in M by A4, A51; A57: [[a,b],[a9,b9]] in Dependencies-Order X by A55; [a9,b9] in F by A2, A56; hence contradiction by A52, A54, A56, A53, A57, WAYBEL_4:def_23; ::_thesis: verum end; hence M = Maximal_wrt F by TARSKI:1; ::_thesis: ( F is full_family & ( for G being Full-family of X st M = Maximal_wrt G holds G = F ) ) F is (F3) proof let A, B, A9, B9 be Subset of X; :: according to ARMSTRNG:def_12 ::_thesis: ( [A,B] in F & [A,B] >= [A9,B9] implies [A9,B9] in F ) assume that A58: [A,B] in F and A59: [A,B] >= [A9,B9] ; ::_thesis: [A9,B9] in F consider a9, b9 being Subset of X such that A60: [a9,b9] >= [A,B] and A61: [a9,b9] in M by A9, A58; [a9,b9] >= [A9,B9] by A59, A60, Th12; hence [A9,B9] in F by A2, A61; ::_thesis: verum end; hence F is full_family by A3, A22, A23; ::_thesis: for G being Full-family of X st M = Maximal_wrt G holds G = F let G be Full-family of X; ::_thesis: ( M = Maximal_wrt G implies G = F ) assume A62: M = Maximal_wrt G ; ::_thesis: G = F now__::_thesis:_for_x_being_set_holds_ (_(_x_in_G_implies_x_in_F_)_&_(_x_in_F_implies_x_in_G_)_) let x be set ; ::_thesis: ( ( x in G implies x in F ) & ( x in F implies x in G ) ) hereby ::_thesis: ( x in F implies x in G ) A63: field (Dependencies-Order X) = [:(bool X),(bool X):] by Th17; assume A64: x in G ; ::_thesis: x in F then consider a, b being Subset of X such that A65: x = [a,b] by Th9; defpred S1[ set ] means ex y being Dependency of X st ( $1 = y & y >= [a,b] ); consider MA being set such that A66: for x being set holds ( x in MA iff ( x in G & S1[x] ) ) from XBOOLE_0:sch_1(); MA c= G proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in MA or x in G ) assume x in MA ; ::_thesis: x in G hence x in G by A66; ::_thesis: verum end; then A67: MA is finite Subset of (field (Dependencies-Order X)) by A63, XBOOLE_1:1; MA <> {} by A64, A65, A66; then consider m being Element of MA such that A68: m is_maximal_wrt MA, Dependencies-Order X by A67, Th2; A69: m in MA by A68, WAYBEL_4:def_23; then m in G by A66; then A70: ex a9, b9 being Subset of X st m = [a9,b9] by Th9; m is_maximal_wrt G, Dependencies-Order X proof A71: ex mm being Dependency of X st ( m = mm & mm >= [a,b] ) by A66, A69; thus m in G by A66, A69; :: according to WAYBEL_4:def_23 ::_thesis: for b1 being set holds ( not b1 in G or b1 = m or not [m,b1] in Dependencies-Order X ) given y being set such that A72: y in G and A73: y <> m and A74: [m,y] in Dependencies-Order X ; ::_thesis: contradiction consider e, f being Dependency of X such that A75: [m,y] = [e,f] and A76: e <= f by A74; A77: y = f by A75, XTUPLE_0:1; m = e by A75, XTUPLE_0:1; then f >= [a,b] by A71, A76, Th12; then y in MA by A66, A72, A77; hence contradiction by A68, A73, A74, WAYBEL_4:def_23; ::_thesis: verum end; then A78: m in (Dependencies-Order X) Maximal_in G by Def1; ex y being Dependency of X st ( m = y & y >= [a,b] ) by A66, A69; hence x in F by A2, A62, A65, A78, A70; ::_thesis: verum end; assume x in F ; ::_thesis: x in G then ex a, b, a1, b1 being Subset of X st ( x = [a,b] & [a1,b1] >= [a,b] & [a1,b1] in M ) by A4; hence x in G by A62, Def12; ::_thesis: verum end; hence G = F by TARSKI:1; ::_thesis: verum end; registration let X be non empty finite set ; let F be Full-family of X; cluster Maximal_wrt F -> non empty ; coherence Maximal_wrt F is (C1) proof set M = Maximal_wrt F; Maximal_wrt F is (M1) by Th28; then ex A9, B9 being Subset of X st ( [A9,B9] >= [([#] X),([#] X)] & [A9,B9] in Maximal_wrt F ) by Def18; hence Maximal_wrt F is (C1) ; ::_thesis: verum end; end; theorem Th30: :: ARMSTRNG:30 for X being finite set for F being Dependency-set of X for K being Subset of X st F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } holds {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } = Maximal_wrt F proof let X be finite set ; ::_thesis: for F being Dependency-set of X for K being Subset of X st F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } holds {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } = Maximal_wrt F let F be Dependency-set of X; ::_thesis: for K being Subset of X st F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } holds {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } = Maximal_wrt F let K be Subset of X; ::_thesis: ( F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } implies {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } = Maximal_wrt F ) set M = {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } ; A1: {[K,X]} c= {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } by XBOOLE_1:7; A2: now__::_thesis:_for_A_being_Subset_of_X_st_not_K_c=_A_holds_ [A,A]_in_{[K,X]}_\/__{__[A,A]_where_A_is_Subset_of_X_:_not_K_c=_A__}_ let A be Subset of X; ::_thesis: ( not K c= A implies [A,A] in {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } ) assume not K c= A ; ::_thesis: [A,A] in {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } then A3: [A,A] in { [a,a] where a is Subset of X : not K c= a } ; { [a,a] where a is Subset of X : not K c= a } c= {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } by XBOOLE_1:7; hence [A,A] in {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } by A3; ::_thesis: verum end; A4: [#] X = X ; A5: {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } c= [:(bool X),(bool X):] proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } or x in [:(bool X),(bool X):] ) assume A6: x in {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } ; ::_thesis: x in [:(bool X),(bool X):] percases ( x in {[K,X]} or x in { [A,A] where A is Subset of X : not K c= A } ) by A6, XBOOLE_0:def_3; suppose x in {[K,X]} ; ::_thesis: x in [:(bool X),(bool X):] then x = [K,X] by TARSKI:def_1; hence x in [:(bool X),(bool X):] by A4, ZFMISC_1:def_2; ::_thesis: verum end; suppose x in { [A,A] where A is Subset of X : not K c= A } ; ::_thesis: x in [:(bool X),(bool X):] then ex A being Subset of X st ( x = [A,A] & not K c= A ) ; hence x in [:(bool X),(bool X):] ; ::_thesis: verum end; end; end; A7: now__::_thesis:_for_A,_B_being_Subset_of_X_holds_ (_not_[A,B]_in_{[K,X]}_\/__{__[A,A]_where_A_is_Subset_of_X_:_not_K_c=_A__}__or_[A,B]_=_[K,X]_or_(_not_K_c=_A_&_A_=_B_)_) let A, B be Subset of X; ::_thesis: ( not [A,B] in {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } or [b1,b2] = [K,X] or ( not K c= b1 & b1 = b2 ) ) assume A8: [A,B] in {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } ; ::_thesis: ( [b1,b2] = [K,X] or ( not K c= b1 & b1 = b2 ) ) percases ( [A,B] in {[K,X]} or [A,B] in { [a,a] where a is Subset of X : not K c= a } ) by A8, XBOOLE_0:def_3; suppose [A,B] in {[K,X]} ; ::_thesis: ( [b1,b2] = [K,X] or ( not K c= b1 & b1 = b2 ) ) hence ( [A,B] = [K,X] or ( not K c= A & A = B ) ) by TARSKI:def_1; ::_thesis: verum end; suppose [A,B] in { [a,a] where a is Subset of X : not K c= a } ; ::_thesis: ( [b1,b2] = [K,X] or ( not K c= b1 & b1 = b2 ) ) then consider a being Subset of X such that A9: [A,B] = [a,a] and A10: not K c= a ; A = a by A9, XTUPLE_0:1; hence ( [A,B] = [K,X] or ( not K c= A & A = B ) ) by A9, A10, XTUPLE_0:1; ::_thesis: verum end; end; end; reconsider M = {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } as Dependency-set of X by A5; set FF = { [A,B] where A, B is Subset of X : ex A9, B9 being Subset of X st ( [A9,B9] >= [A,B] & [A9,B9] in M ) } ; A11: { [A,B] where A, B is Subset of X : ex A9, B9 being Subset of X st ( [A9,B9] >= [A,B] & [A9,B9] in M ) } c= [:(bool X),(bool X):] proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { [A,B] where A, B is Subset of X : ex A9, B9 being Subset of X st ( [A9,B9] >= [A,B] & [A9,B9] in M ) } or x in [:(bool X),(bool X):] ) assume x in { [A,B] where A, B is Subset of X : ex A9, B9 being Subset of X st ( [A9,B9] >= [A,B] & [A9,B9] in M ) } ; ::_thesis: x in [:(bool X),(bool X):] then ex A, B being Subset of X st ( x = [A,B] & ex A9, B9 being Subset of X st ( [A9,B9] >= [A,B] & [A9,B9] in M ) ) ; hence x in [:(bool X),(bool X):] ; ::_thesis: verum end; A12: M is (M2) proof let A, B, A9, B9 be Subset of X; :: according to ARMSTRNG:def_19 ::_thesis: ( [A,B] in M & [A9,B9] in M & [A,B] >= [A9,B9] implies ( A = A9 & B = B9 ) ) assume that A13: [A,B] in M and A14: [A9,B9] in M and A15: [A,B] >= [A9,B9] ; ::_thesis: ( A = A9 & B = B9 ) A16: A c= A9 by A15, Th13; A17: B9 c= B by A15, Th13; percases ( [A,B] = [K,X] or ( not K c= A & A = B ) ) by A7, A13; supposeA18: [A,B] = [K,X] ; ::_thesis: ( A = A9 & B = B9 ) thus ( A = A9 & B = B9 ) ::_thesis: verum proof percases ( [A9,B9] = [K,X] or ( not K c= A9 & A9 = B9 ) ) by A7, A14; suppose [A9,B9] = [K,X] ; ::_thesis: ( A = A9 & B = B9 ) hence ( A = A9 & B = B9 ) by A18, XTUPLE_0:1; ::_thesis: verum end; suppose ( not K c= A9 & A9 = B9 ) ; ::_thesis: ( A = A9 & B = B9 ) hence ( A = A9 & B = B9 ) by A16, A18, XTUPLE_0:1; ::_thesis: verum end; end; end; end; supposeA19: ( not K c= A & A = B ) ; ::_thesis: ( A = A9 & B = B9 ) thus ( A = A9 & B = B9 ) ::_thesis: verum proof percases ( [A9,B9] = [K,X] or ( not K c= A9 & A9 = B9 ) ) by A7, A14; suppose [A9,B9] = [K,X] ; ::_thesis: ( A = A9 & B = B9 ) then B9 = X by XTUPLE_0:1; then B = X by A17, XBOOLE_0:def_10; hence ( A = A9 & B = B9 ) by A19; ::_thesis: verum end; suppose ( not K c= A9 & A9 = B9 ) ; ::_thesis: ( A = A9 & B = B9 ) hence ( A = A9 & B = B9 ) by A16, A17, A19, XBOOLE_0:def_10; ::_thesis: verum end; end; end; end; end; end; reconsider FF = { [A,B] where A, B is Subset of X : ex A9, B9 being Subset of X st ( [A9,B9] >= [A,B] & [A9,B9] in M ) } as Dependency-set of X by A11; assume A20: F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } ; ::_thesis: {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } = Maximal_wrt F A21: now__::_thesis:_for_x_being_set_holds_ (_(_x_in_F_implies_x_in_FF_)_&_(_x_in_FF_implies_x_in_F_)_) let x be set ; ::_thesis: ( ( x in F implies x in FF ) & ( x in FF implies b1 in F ) ) hereby ::_thesis: ( x in FF implies b1 in F ) A22: { [a,a] where a is Subset of X : not K c= a } c= M by XBOOLE_1:7; A23: [K,X] in {[K,X]} by TARSKI:def_1; A24: {[K,X]} c= M by XBOOLE_1:7; assume x in F ; ::_thesis: x in FF then consider A, B being Subset of X such that A25: x = [A,B] and A26: ( K c= A or B c= A ) by A20; percases ( K c= A or not K c= A ) ; suppose K c= A ; ::_thesis: x in FF then [K,([#] X)] >= [A,B] by Th13; hence x in FF by A25, A24, A23; ::_thesis: verum end; supposeA27: not K c= A ; ::_thesis: x in FF then A28: [A,A] in { [a,a] where a is Subset of X : not K c= a } ; [A,A] >= [A,B] by A26, A27, Th13; hence x in FF by A25, A22, A28; ::_thesis: verum end; end; end; assume x in FF ; ::_thesis: b1 in F then consider A, B being Subset of X such that A29: x = [A,B] and A30: ex A9, B9 being Subset of X st ( [A9,B9] >= [A,B] & [A9,B9] in M ) ; consider A9, B9 being Subset of X such that A31: [A9,B9] >= [A,B] and A32: [A9,B9] in M by A30; percases ( [A9,B9] in {[K,X]} or [A9,B9] in { [a,a] where a is Subset of X : not K c= a } ) by A32, XBOOLE_0:def_3; suppose [A9,B9] in {[K,X]} ; ::_thesis: b1 in F then [A9,B9] = [K,X] by TARSKI:def_1; then A9 = K by XTUPLE_0:1; then K c= A by A31, Th13; hence x in F by A20, A29; ::_thesis: verum end; suppose [A9,B9] in { [a,a] where a is Subset of X : not K c= a } ; ::_thesis: b1 in F then consider a being Subset of X such that A33: [A9,B9] = [a,a] and not K c= a ; A34: A9 = a by A33, XTUPLE_0:1; A35: B9 = a by A33, XTUPLE_0:1; A36: B c= B9 by A31, Th13; A9 c= A by A31, Th13; then B c= A by A34, A35, A36, XBOOLE_1:1; hence x in F by A20, A29; ::_thesis: verum end; end; end; A37: M is (M3) proof let A, B, A9, B9 be Subset of X; :: according to ARMSTRNG:def_20 ::_thesis: ( [A,B] in M & [A9,B9] in M & A9 c= B implies B9 c= B ) assume that A38: [A,B] in M and A39: [A9,B9] in M and A40: A9 c= B ; ::_thesis: B9 c= B percases ( [A,B] = [K,X] or ( not K c= A & A = B ) ) by A7, A38; suppose [A,B] = [K,X] ; ::_thesis: B9 c= B then B = X by XTUPLE_0:1; hence B9 c= B ; ::_thesis: verum end; supposeA41: ( not K c= A & A = B ) ; ::_thesis: B9 c= B thus B9 c= B ::_thesis: verum proof percases ( [A9,B9] = [K,X] or ( not K c= A9 & A9 = B9 ) ) by A7, A39; suppose [A9,B9] = [K,X] ; ::_thesis: B9 c= B hence B9 c= B by A40, A41, XTUPLE_0:1; ::_thesis: verum end; suppose ( not K c= A9 & A9 = B9 ) ; ::_thesis: B9 c= B hence B9 c= B by A40; ::_thesis: verum end; end; end; end; end; end; A42: [K,X] in {[K,X]} by TARSKI:def_1; M is (M1) proof let A be Subset of X; :: according to ARMSTRNG:def_18 ::_thesis: ex A9, B9 being Subset of X st ( [A9,B9] >= [A,A] & [A9,B9] in M ) percases ( K c= A or not K c= A ) ; supposeA43: K c= A ; ::_thesis: ex A9, B9 being Subset of X st ( [A9,B9] >= [A,A] & [A9,B9] in M ) take A9 = K; ::_thesis: ex B9 being Subset of X st ( [A9,B9] >= [A,A] & [A9,B9] in M ) take B9 = [#] X; ::_thesis: ( [A9,B9] >= [A,A] & [A9,B9] in M ) thus [A9,B9] >= [A,A] by A43, Th13; ::_thesis: [A9,B9] in M thus [A9,B9] in M by A42, A1; ::_thesis: verum end; supposeA44: not K c= A ; ::_thesis: ex A9, B9 being Subset of X st ( [A9,B9] >= [A,A] & [A9,B9] in M ) take A9 = A; ::_thesis: ex B9 being Subset of X st ( [A9,B9] >= [A,A] & [A9,B9] in M ) take B9 = A; ::_thesis: ( [A9,B9] >= [A,A] & [A9,B9] in M ) thus [A9,B9] >= [A,A] ; ::_thesis: [A9,B9] in M thus [A9,B9] in M by A2, A44; ::_thesis: verum end; end; end; then M = Maximal_wrt FF by A12, A37, Th29; hence {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } = Maximal_wrt F by A21, TARSKI:1; ::_thesis: verum end; begin definition let X be set ; let F be Dependency-set of X; func saturated-subsets F -> Subset-Family of X equals :: ARMSTRNG:def 21 { B where B is Subset of X : ex A being Subset of X st A ^|^ B,F } ; coherence { B where B is Subset of X : ex A being Subset of X st A ^|^ B,F } is Subset-Family of X proof set SS = { B where B is Subset of X : ex A being Subset of X st A ^|^ B,F } ; { B where B is Subset of X : ex A being Subset of X st A ^|^ B,F } c= bool X proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { B where B is Subset of X : ex A being Subset of X st A ^|^ B,F } or x in bool X ) assume x in { B where B is Subset of X : ex A being Subset of X st A ^|^ B,F } ; ::_thesis: x in bool X then ex B being Subset of X st ( x = B & ex A being Subset of X st A ^|^ B,F ) ; hence x in bool X ; ::_thesis: verum end; hence { B where B is Subset of X : ex A being Subset of X st A ^|^ B,F } is Subset-Family of X ; ::_thesis: verum end; end; :: deftheorem defines saturated-subsets ARMSTRNG:def_21_:_ for X being set for F being Dependency-set of X holds saturated-subsets F = { B where B is Subset of X : ex A being Subset of X st A ^|^ B,F } ; notation let X be set ; let F be Dependency-set of X; synonym closed_attribute_subset F for saturated-subsets F; end; registration let X be set ; let F be finite Dependency-set of X; cluster saturated-subsets F -> finite ; coherence saturated-subsets F is finite proof defpred S1[ set , set ] means ex a, b being set st ( X = [a,b] & F = [a,b] `2 ); set ss = { B where B is Subset of X : ex A being Subset of X st A ^|^ B,F } ; A1: for x being set st x in F holds ex y being set st S1[x,y] proof let x be set ; ::_thesis: ( x in F implies ex y being set st S1[x,y] ) assume x in F ; ::_thesis: ex y being set st S1[x,y] then consider a, b being Subset of X such that A2: x = [a,b] by Th9; reconsider a = a, b = b as set ; take b ; ::_thesis: S1[x,b] take a ; ::_thesis: ex b being set st ( x = [a,b] & b = [a,b] `2 ) take b ; ::_thesis: ( x = [a,b] & b = [a,b] `2 ) thus ( x = [a,b] & b = [a,b] `2 ) by A2; ::_thesis: verum end; consider f being Function such that A3: dom f = F and A4: for x being set st x in F holds S1[x,f . x] from CLASSES1:sch_1(A1); A5: { B where B is Subset of X : ex A being Subset of X st A ^|^ B,F } c= rng f proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { B where B is Subset of X : ex A being Subset of X st A ^|^ B,F } or x in rng f ) assume x in { B where B is Subset of X : ex A being Subset of X st A ^|^ B,F } ; ::_thesis: x in rng f then consider B being Subset of X such that A6: x = B and A7: ex A being Subset of X st A ^|^ B,F ; consider A being Subset of X such that A8: A ^|^ B,F by A7; A9: [A,B] in Maximal_wrt F by A8, Def17; then A10: ex a, b being set st ( [A,B] = [a,b] & f . [A,B] = [a,b] `2 ) by A4; [A,B] `2 = B ; then f . [A,B] = B by A10; hence x in rng f by A3, A6, A9, FUNCT_1:3; ::_thesis: verum end; rng f is finite by A3, FINSET_1:8; hence saturated-subsets F is finite by A5; ::_thesis: verum end; end; theorem Th31: :: ARMSTRNG:31 for X, x being set for F being Dependency-set of X holds ( x in saturated-subsets F iff ex B, A being Subset of X st ( x = B & A ^|^ B,F ) ) proof let X, x be set ; ::_thesis: for F being Dependency-set of X holds ( x in saturated-subsets F iff ex B, A being Subset of X st ( x = B & A ^|^ B,F ) ) let F be Dependency-set of X; ::_thesis: ( x in saturated-subsets F iff ex B, A being Subset of X st ( x = B & A ^|^ B,F ) ) hereby ::_thesis: ( ex B, A being Subset of X st ( x = B & A ^|^ B,F ) implies x in saturated-subsets F ) assume x in saturated-subsets F ; ::_thesis: ex B, A being Subset of X st ( x = B & A ^|^ B,F ) then consider B being Subset of X such that A1: x = B and A2: ex A being Subset of X st A ^|^ B,F ; consider A being Subset of X such that A3: A ^|^ B,F by A2; take B = B; ::_thesis: ex A being Subset of X st ( x = B & A ^|^ B,F ) take A = A; ::_thesis: ( x = B & A ^|^ B,F ) thus ( x = B & A ^|^ B,F ) by A1, A3; ::_thesis: verum end; given B, A being Subset of X such that A4: x = B and A5: A ^|^ B,F ; ::_thesis: x in saturated-subsets F thus x in saturated-subsets F by A4, A5; ::_thesis: verum end; theorem Th32: :: ARMSTRNG:32 for X being non empty finite set for F being Full-family of X holds ( saturated-subsets F is (B1) & saturated-subsets F is (B2) ) proof let X be non empty finite set ; ::_thesis: for F being Full-family of X holds ( saturated-subsets F is (B1) & saturated-subsets F is (B2) ) let F be Full-family of X; ::_thesis: ( saturated-subsets F is (B1) & saturated-subsets F is (B2) ) set ss = saturated-subsets F; A1: Maximal_wrt F is (M1) by Th28; then consider A9, B9 being Subset of X such that A2: [A9,B9] >= [([#] X),([#] X)] and A3: [A9,B9] in Maximal_wrt F by Def18; [#] X c= B9 by A2, Th13; then A4: [#] X = B9 by XBOOLE_0:def_10; A9 ^|^ B9,F by A3, Def17; then X in saturated-subsets F by A4; hence saturated-subsets F is (B1) by Def4; ::_thesis: saturated-subsets F is (B2) thus saturated-subsets F is (B2) ::_thesis: verum proof let a, b be set ; :: according to FINSUB_1:def_2 ::_thesis: ( not a in saturated-subsets F or not b in saturated-subsets F or a /\ b in saturated-subsets F ) assume that A5: a in saturated-subsets F and A6: b in saturated-subsets F ; ::_thesis: a /\ b in saturated-subsets F reconsider a9 = a, b9 = b as Subset of X by A5, A6; A7: Maximal_wrt F is (M3) by Th28; consider B2, A2 being Subset of X such that A8: b = B2 and A9: A2 ^|^ B2,F by A6, Th31; A10: [A2,B2] in Maximal_wrt F by A9, Def17; consider B1, A1 being Subset of X such that A11: a = B1 and A12: A1 ^|^ B1,F by A5, Th31; A13: [A1,B1] in Maximal_wrt F by A12, Def17; consider A9, B9 being Subset of X such that A14: [A9,B9] >= [(a9 /\ b9),(a9 /\ b9)] and A15: [A9,B9] in Maximal_wrt F by A1, Def18; A16: A9 c= a /\ b by A14, Th13; a /\ b c= b by XBOOLE_1:17; then A9 c= B2 by A8, A16, XBOOLE_1:1; then A17: B9 c= B2 by A10, A15, A7, Def20; A18: a /\ b c= B9 by A14, Th13; a /\ b c= a by XBOOLE_1:17; then A9 c= B1 by A11, A16, XBOOLE_1:1; then B9 c= B1 by A13, A15, A7, Def20; then B9 c= a /\ b by A11, A8, A17, XBOOLE_1:19; then A19: B9 = a /\ b by A18, XBOOLE_0:def_10; A9 ^|^ B9,F by A15, Def17; hence a /\ b in saturated-subsets F by A19; ::_thesis: verum end; end; definition let X, B be set ; funcX deps_encl_by B -> Dependency-set of X equals :: ARMSTRNG:def 22 { [a,b] where a, b is Subset of X : for c being set st c in B & a c= c holds b c= c } ; coherence { [a,b] where a, b is Subset of X : for c being set st c in B & a c= c holds b c= c } is Dependency-set of X proof set F = { [a,b] where a, b is Subset of X : for c being set st c in B & a c= c holds b c= c } ; { [a,b] where a, b is Subset of X : for c being set st c in B & a c= c holds b c= c } c= [:(bool X),(bool X):] proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { [a,b] where a, b is Subset of X : for c being set st c in B & a c= c holds b c= c } or x in [:(bool X),(bool X):] ) assume x in { [a,b] where a, b is Subset of X : for c being set st c in B & a c= c holds b c= c } ; ::_thesis: x in [:(bool X),(bool X):] then ex a, b being Subset of X st ( x = [a,b] & ( for c being set st c in B & a c= c holds b c= c ) ) ; hence x in [:(bool X),(bool X):] ; ::_thesis: verum end; hence { [a,b] where a, b is Subset of X : for c being set st c in B & a c= c holds b c= c } is Dependency-set of X ; ::_thesis: verum end; end; :: deftheorem defines deps_encl_by ARMSTRNG:def_22_:_ for X, B being set holds X deps_encl_by B = { [a,b] where a, b is Subset of X : for c being set st c in B & a c= c holds b c= c } ; theorem Th33: :: ARMSTRNG:33 for X being set for B being Subset-Family of X for F being Dependency-set of X holds X deps_encl_by B is full_family proof let X be set ; ::_thesis: for B being Subset-Family of X for F being Dependency-set of X holds X deps_encl_by B is full_family let B be Subset-Family of X; ::_thesis: for F being Dependency-set of X holds X deps_encl_by B is full_family let F be Dependency-set of X; ::_thesis: X deps_encl_by B is full_family set F = X deps_encl_by B; percases ( B is empty or not B is empty ) ; supposeA1: B is empty ; ::_thesis: X deps_encl_by B is full_family now__::_thesis:_for_x_being_set_holds_ (_(_x_in_X_deps_encl_by_B_implies_x_in_Dependencies_X_)_&_(_x_in_Dependencies_X_implies_x_in_X_deps_encl_by_B_)_) let x be set ; ::_thesis: ( ( x in X deps_encl_by B implies x in Dependencies X ) & ( x in Dependencies X implies x in X deps_encl_by B ) ) thus ( x in X deps_encl_by B implies x in Dependencies X ) ; ::_thesis: ( x in Dependencies X implies x in X deps_encl_by B ) assume x in Dependencies X ; ::_thesis: x in X deps_encl_by B then consider x1, x2 being set such that A2: x1 in bool X and A3: x2 in bool X and A4: x = [x1,x2] by ZFMISC_1:def_2; for g being set st g in B & x1 c= g holds x2 c= g by A1; hence x in X deps_encl_by B by A2, A3, A4; ::_thesis: verum end; then X deps_encl_by B = Dependencies X by TARSKI:1; then ( X deps_encl_by B is (F1) & X deps_encl_by B is (F2) & X deps_encl_by B is (F3) & X deps_encl_by B is (F4) ) by Th19; hence X deps_encl_by B is full_family ; ::_thesis: verum end; suppose not B is empty ; ::_thesis: X deps_encl_by B is full_family then reconsider B = B as non empty Subset-Family of X ; thus X deps_encl_by B is (F1) :: according to ARMSTRNG:def_14 ::_thesis: ( X deps_encl_by B is (F2) & X deps_encl_by B is (F3) & X deps_encl_by B is (F4) ) proof let A be Subset of X; :: according to ARMSTRNG:def_11 ::_thesis: [A,A] in X deps_encl_by B for c being set st c in B & A c= c holds A c= c ; hence [A,A] in X deps_encl_by B ; ::_thesis: verum end; A5: now__::_thesis:_for_x,_y_being_Subset_of_X for_c_being_Element_of_B_st_[x,y]_in_X_deps_encl_by_B_&_x_c=_c_holds_ y_c=_c let x, y be Subset of X; ::_thesis: for c being Element of B st [x,y] in X deps_encl_by B & x c= c holds y c= c let c be Element of B; ::_thesis: ( [x,y] in X deps_encl_by B & x c= c implies y c= c ) assume that A6: [x,y] in X deps_encl_by B and A7: x c= c ; ::_thesis: y c= c consider a, b being Subset of X such that A8: [x,y] = [a,b] and A9: for c being set st c in B & a c= c holds b c= c by A6; A10: y = b by A8, XTUPLE_0:1; x = a by A8, XTUPLE_0:1; hence y c= c by A7, A9, A10; ::_thesis: verum end; now__::_thesis:_for_a,_b,_c_being_Subset_of_X_st_[a,b]_in_X_deps_encl_by_B_&_[b,c]_in_X_deps_encl_by_B_holds_ [a,c]_in_X_deps_encl_by_B let a, b, c be Subset of X; ::_thesis: ( [a,b] in X deps_encl_by B & [b,c] in X deps_encl_by B implies [a,c] in X deps_encl_by B ) assume that A11: [a,b] in X deps_encl_by B and A12: [b,c] in X deps_encl_by B ; ::_thesis: [a,c] in X deps_encl_by B now__::_thesis:_for_x_being_set_st_x_in_B_&_a_c=_x_holds_ c_c=_x let x be set ; ::_thesis: ( x in B & a c= x implies c c= x ) assume that A13: x in B and A14: a c= x ; ::_thesis: c c= x b c= x by A5, A11, A13, A14; hence c c= x by A5, A12, A13; ::_thesis: verum end; hence [a,c] in X deps_encl_by B ; ::_thesis: verum end; hence X deps_encl_by B is (F2) by Th18; ::_thesis: ( X deps_encl_by B is (F3) & X deps_encl_by B is (F4) ) thus X deps_encl_by B is (F3) ::_thesis: X deps_encl_by B is (F4) proof let a, b, a9, b9 be Subset of X; :: according to ARMSTRNG:def_12 ::_thesis: ( [a,b] in X deps_encl_by B & [a,b] >= [a9,b9] implies [a9,b9] in X deps_encl_by B ) assume that A15: [a,b] in X deps_encl_by B and A16: [a,b] >= [a9,b9] ; ::_thesis: [a9,b9] in X deps_encl_by B A17: b9 c= b by A16, Th13; A18: a c= a9 by A16, Th13; now__::_thesis:_for_c_being_set_st_c_in_B_&_a9_c=_c_holds_ b9_c=_c let c be set ; ::_thesis: ( c in B & a9 c= c implies b9 c= c ) assume that A19: c in B and A20: a9 c= c ; ::_thesis: b9 c= c a c= c by A18, A20, XBOOLE_1:1; then b c= c by A5, A15, A19; hence b9 c= c by A17, XBOOLE_1:1; ::_thesis: verum end; hence [a9,b9] in X deps_encl_by B ; ::_thesis: verum end; thus X deps_encl_by B is (F4) ::_thesis: verum proof let a, b, a9, b9 be Subset of X; :: according to ARMSTRNG:def_13 ::_thesis: ( [a,b] in X deps_encl_by B & [a9,b9] in X deps_encl_by B implies [(a \/ a9),(b \/ b9)] in X deps_encl_by B ) assume that A21: [a,b] in X deps_encl_by B and A22: [a9,b9] in X deps_encl_by B ; ::_thesis: [(a \/ a9),(b \/ b9)] in X deps_encl_by B now__::_thesis:_for_c_being_set_st_c_in_B_&_a_\/_a9_c=_c_holds_ b_\/_b9_c=_c let c be set ; ::_thesis: ( c in B & a \/ a9 c= c implies b \/ b9 c= c ) assume that A23: c in B and A24: a \/ a9 c= c ; ::_thesis: b \/ b9 c= c a9 c= c by A24, XBOOLE_1:11; then A25: b9 c= c by A5, A22, A23; a c= c by A24, XBOOLE_1:11; then b c= c by A5, A21, A23; hence b \/ b9 c= c by A25, XBOOLE_1:8; ::_thesis: verum end; hence [(a \/ a9),(b \/ b9)] in X deps_encl_by B ; ::_thesis: verum end; end; end; end; theorem Th34: :: ARMSTRNG:34 for X being non empty finite set for B being Subset-Family of X holds B c= saturated-subsets (X deps_encl_by B) proof let X be non empty finite set ; ::_thesis: for B being Subset-Family of X holds B c= saturated-subsets (X deps_encl_by B) let B be Subset-Family of X; ::_thesis: B c= saturated-subsets (X deps_encl_by B) set F = X deps_encl_by B; reconsider F9 = X deps_encl_by B as Full-family of X by Th33; set M = Maximal_wrt F9; let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in B or x in saturated-subsets (X deps_encl_by B) ) assume A1: x in B ; ::_thesis: x in saturated-subsets (X deps_encl_by B) then reconsider x9 = x as Element of B ; reconsider x99 = x as Subset of X by A1; Maximal_wrt F9 is (M1) by Th28; then consider a9, b9 being Subset of X such that A2: [a9,b9] >= [x99,x99] and A3: [a9,b9] in Maximal_wrt F9 by Def18; A4: a9 c= x99 by A2, Th13; [a9,b9] in X deps_encl_by B by A3; then consider a, b being Subset of X such that A5: [a9,b9] = [a,b] and A6: for c being set st c in B & a c= c holds b c= c ; A7: a ^|^ b,X deps_encl_by B by A3, A5, Def17; a9 = a by A5, XTUPLE_0:1; then A8: b c= x9 by A1, A4, A6; A9: b9 = b by A5, XTUPLE_0:1; x99 c= b9 by A2, Th13; then b = x by A9, A8, XBOOLE_0:def_10; hence x in saturated-subsets (X deps_encl_by B) by A7; ::_thesis: verum end; theorem Th35: :: ARMSTRNG:35 for X being non empty finite set for B being Subset-Family of X st B is (B1) & B is (B2) holds ( B = saturated-subsets (X deps_encl_by B) & ( for G being Full-family of X st B = saturated-subsets G holds G = X deps_encl_by B ) ) proof let X be non empty finite set ; ::_thesis: for B being Subset-Family of X st B is (B1) & B is (B2) holds ( B = saturated-subsets (X deps_encl_by B) & ( for G being Full-family of X st B = saturated-subsets G holds G = X deps_encl_by B ) ) let B be Subset-Family of X; ::_thesis: ( B is (B1) & B is (B2) implies ( B = saturated-subsets (X deps_encl_by B) & ( for G being Full-family of X st B = saturated-subsets G holds G = X deps_encl_by B ) ) ) set F = X deps_encl_by B; reconsider F9 = X deps_encl_by B as Full-family of X by Th33; set ss = saturated-subsets (X deps_encl_by B); set M = Maximal_wrt F9; assume A1: ( B is (B1) & B is (B2) ) ; ::_thesis: ( B = saturated-subsets (X deps_encl_by B) & ( for G being Full-family of X st B = saturated-subsets G holds G = X deps_encl_by B ) ) then reconsider B9 = B as non empty set by Def4; A2: X in B by A1, Def4; now__::_thesis:_for_x_being_set_holds_ (_(_x_in_B_implies_x_in_saturated-subsets_(X_deps_encl_by_B)_)_&_(_x_in_saturated-subsets_(X_deps_encl_by_B)_implies_x_in_B_)_) let x be set ; ::_thesis: ( ( x in B implies x in saturated-subsets (X deps_encl_by B) ) & ( x in saturated-subsets (X deps_encl_by B) implies x in B ) ) B c= saturated-subsets (X deps_encl_by B) by Th34; hence ( x in B implies x in saturated-subsets (X deps_encl_by B) ) ; ::_thesis: ( x in saturated-subsets (X deps_encl_by B) implies x in B ) assume x in saturated-subsets (X deps_encl_by B) ; ::_thesis: x in B then consider b, a being Subset of X such that A3: x = b and A4: a ^|^ b,X deps_encl_by B by Th31; [a,b] in Maximal_wrt F9 by A4, Def17; then [a,b] in X deps_encl_by B ; then consider aa, bb being Subset of X such that A5: [a,b] = [aa,bb] and A6: for c being set st c in B & aa c= c holds bb c= c ; A7: b = bb by A5, XTUPLE_0:1; set S = { b9 where b9 is Element of B9 : a c= b9 } ; A8: { b9 where b9 is Element of B9 : a c= b9 } c= bool X proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { b9 where b9 is Element of B9 : a c= b9 } or x in bool X ) assume x in { b9 where b9 is Element of B9 : a c= b9 } ; ::_thesis: x in bool X then consider b9 being Element of B9 such that A9: x = b9 and a c= b9 ; b9 in B9 ; hence x in bool X by A9; ::_thesis: verum end; A10: { b9 where b9 is Element of B9 : a c= b9 } c= B proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { b9 where b9 is Element of B9 : a c= b9 } or x in B ) assume x in { b9 where b9 is Element of B9 : a c= b9 } ; ::_thesis: x in B then ex b9 being Element of B9 st ( x = b9 & a c= b9 ) ; hence x in B ; ::_thesis: verum end; A11: X in { b9 where b9 is Element of B9 : a c= b9 } by A2; reconsider S = { b9 where b9 is Element of B9 : a c= b9 } as Subset-Family of X by A8; set mS = Intersect S; reconsider mS = Intersect S as Subset of X ; A12: a = aa by A5, XTUPLE_0:1; A13: b c= mS proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in b or x in mS ) assume A14: x in b ; ::_thesis: x in mS now__::_thesis:_for_Y_being_set_st_Y_in_S_holds_ x_in_Y let Y be set ; ::_thesis: ( Y in S implies x in Y ) assume Y in S ; ::_thesis: x in Y then consider b9 being Element of B9 such that A15: Y = b9 and A16: a c= b9 ; b c= b9 by A6, A12, A7, A16; hence x in Y by A14, A15; ::_thesis: verum end; then x in meet S by A11, SETFAM_1:def_1; hence x in mS by A11, SETFAM_1:def_9; ::_thesis: verum end; now__::_thesis:_not_b_<>_mS now__::_thesis:_for_c_being_set_st_c_in_B_&_a_c=_c_holds_ mS_c=_c let c be set ; ::_thesis: ( c in B & a c= c implies mS c= c ) assume that A17: c in B and A18: a c= c ; ::_thesis: mS c= c c in S by A17, A18; then meet S c= c by SETFAM_1:3; hence mS c= c by A11, SETFAM_1:def_9; ::_thesis: verum end; then A19: [a,mS] in X deps_encl_by B ; assume A20: b <> mS ; ::_thesis: contradiction [a,mS] >= [a,b] by A13, Th13; hence contradiction by A4, A20, A19, Th27; ::_thesis: verum end; hence x in B by A1, A2, A3, A10, Th1; ::_thesis: verum end; hence B = saturated-subsets (X deps_encl_by B) by TARSKI:1; ::_thesis: for G being Full-family of X st B = saturated-subsets G holds G = X deps_encl_by B let G be Full-family of X; ::_thesis: ( B = saturated-subsets G implies G = X deps_encl_by B ) assume A21: B = saturated-subsets G ; ::_thesis: G = X deps_encl_by B set MG = Maximal_wrt G; A22: ( Maximal_wrt G is (M1) & Maximal_wrt G is (M3) ) by Th28; now__::_thesis:_for_x_being_set_holds_ (_(_x_in_G_implies_x_in_X_deps_encl_by_B_)_&_(_x_in_X_deps_encl_by_B_implies_x_in_G_)_) let x be set ; ::_thesis: ( ( x in G implies x in X deps_encl_by B ) & ( x in X deps_encl_by B implies x in G ) ) hereby ::_thesis: ( x in X deps_encl_by B implies x in G ) assume x in G ; ::_thesis: x in X deps_encl_by B then reconsider x1 = x as Element of G ; reconsider x9 = x1 as Dependency of X ; consider a, b being Subset of X such that A23: x9 = [a,b] by Th8; now__::_thesis:_for_b9_being_set_st_b9_in_B9_&_a_c=_b9_holds_ b_c=_b9 consider a99, b99 being Subset of X such that A24: [a99,b99] in Maximal_wrt G and A25: [a99,b99] >= x9 by Th26; A26: b c= b99 by A23, A25, Th13; let b9 be set ; ::_thesis: ( b9 in B9 & a c= b9 implies b c= b9 ) assume that A27: b9 in B9 and A28: a c= b9 ; ::_thesis: b c= b9 consider b19, a9 being Subset of X such that A29: b9 = b19 and A30: a9 ^|^ b19,G by A21, A27, Th31; a99 c= a by A23, A25, Th13; then A31: a99 c= b9 by A28, XBOOLE_1:1; [a9,b9] in Maximal_wrt G by A29, A30, Def17; then b99 c= b19 by A22, A29, A24, A31, Def20; hence b c= b9 by A29, A26, XBOOLE_1:1; ::_thesis: verum end; hence x in X deps_encl_by B by A23; ::_thesis: verum end; assume x in X deps_encl_by B ; ::_thesis: x in G then consider a, b being Subset of X such that A32: x = [a,b] and A33: for c being set st c in B & a c= c holds b c= c ; consider a9, b9 being Subset of X such that A34: [a9,b9] >= [a,a] and A35: [a9,b9] in Maximal_wrt G by A22, Def18; A36: a9 c= a by A34, Th13; a9 ^|^ b9,G by A35, Def17; then A37: b9 in B by A21; a c= b9 by A34, Th13; then b c= b9 by A33, A37; then [a9,b9] >= [a,b] by A36, Th13; hence x in G by A32, A35, Def12; ::_thesis: verum end; hence G = X deps_encl_by B by TARSKI:1; ::_thesis: verum end; definition let X be set ; let F be Dependency-set of X; func enclosure_of F -> Subset-Family of X equals :: ARMSTRNG:def 23 { b where b is Subset of X : for A, B being Subset of X st [A,B] in F & A c= b holds B c= b } ; coherence { b where b is Subset of X : for A, B being Subset of X st [A,B] in F & A c= b holds B c= b } is Subset-Family of X proof set B = { b where b is Subset of X : for x, y being Subset of X st [x,y] in F & x c= b holds y c= b } ; { b where b is Subset of X : for x, y being Subset of X st [x,y] in F & x c= b holds y c= b } c= bool X proof let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in { b where b is Subset of X : for x, y being Subset of X st [x,y] in F & x c= b holds y c= b } or z in bool X ) assume z in { b where b is Subset of X : for x, y being Subset of X st [x,y] in F & x c= b holds y c= b } ; ::_thesis: z in bool X then ex b being Subset of X st ( z = b & ( for x, y being Subset of X st [x,y] in F & x c= b holds y c= b ) ) ; hence z in bool X ; ::_thesis: verum end; hence { b where b is Subset of X : for A, B being Subset of X st [A,B] in F & A c= b holds B c= b } is Subset-Family of X ; ::_thesis: verum end; end; :: deftheorem defines enclosure_of ARMSTRNG:def_23_:_ for X being set for F being Dependency-set of X holds enclosure_of F = { b where b is Subset of X : for A, B being Subset of X st [A,B] in F & A c= b holds B c= b } ; theorem Th36: :: ARMSTRNG:36 for X being non empty finite set for F being Dependency-set of X holds ( enclosure_of F is (B1) & enclosure_of F is (B2) ) proof let X be non empty finite set ; ::_thesis: for F being Dependency-set of X holds ( enclosure_of F is (B1) & enclosure_of F is (B2) ) let F be Dependency-set of X; ::_thesis: ( enclosure_of F is (B1) & enclosure_of F is (B2) ) set B = enclosure_of F; A1: for x, y being Subset of X st [x,y] in F & x c= X holds y c= X ; X = [#] X ; then X in enclosure_of F by A1; hence enclosure_of F is (B1) by Def4; ::_thesis: enclosure_of F is (B2) let a, b be set ; :: according to FINSUB_1:def_2 ::_thesis: ( not a in enclosure_of F or not b in enclosure_of F or a /\ b in enclosure_of F ) assume that A2: a in enclosure_of F and A3: b in enclosure_of F ; ::_thesis: a /\ b in enclosure_of F consider b9 being Subset of X such that A4: b9 = b and A5: for x, y being Subset of X st [x,y] in F & x c= b9 holds y c= b9 by A3; consider a9 being Subset of X such that A6: a9 = a and A7: for x, y being Subset of X st [x,y] in F & x c= a9 holds y c= a9 by A2; reconsider ab = a9 /\ b9 as Subset of X ; now__::_thesis:_for_x,_y_being_Subset_of_X_st_[x,y]_in_F_&_x_c=_ab_holds_ y_c=_ab let x, y be Subset of X; ::_thesis: ( [x,y] in F & x c= ab implies y c= ab ) assume that A8: [x,y] in F and A9: x c= ab ; ::_thesis: y c= ab A10: y c= b9 by A5, A8, A9, XBOOLE_1:18; y c= a9 by A7, A8, A9, XBOOLE_1:18; hence y c= ab by A10, XBOOLE_1:19; ::_thesis: verum end; hence a /\ b in enclosure_of F by A6, A4; ::_thesis: verum end; theorem Th37: :: ARMSTRNG:37 for X being non empty finite set for 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 non empty finite set ; ::_thesis: for 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 ) ) let F be Dependency-set of X; ::_thesis: ( 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 ) ) set B = enclosure_of F; set H = X deps_encl_by (enclosure_of F); thus F c= X deps_encl_by (enclosure_of F) ::_thesis: 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 set ; :: according to TARSKI:def_3 ::_thesis: ( not x in F or x in X deps_encl_by (enclosure_of F) ) assume A1: x in F ; ::_thesis: x in X deps_encl_by (enclosure_of F) then consider a, b being Subset of X such that A2: x = [a,b] by Th9; now__::_thesis:_for_c_being_set_st_c_in_enclosure_of_F_&_a_c=_c_holds_ b_c=_c let c be set ; ::_thesis: ( c in enclosure_of F & a c= c implies b c= c ) assume that A3: c in enclosure_of F and A4: a c= c and A5: not b c= c ; ::_thesis: contradiction reconsider c = 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; ::_thesis: verum end; hence x in X deps_encl_by (enclosure_of F) by A2; ::_thesis: verum end; let G be Dependency-set of X; ::_thesis: ( F c= G & G is full_family implies X deps_encl_by (enclosure_of F) c= G ) assume that A6: F c= G and A7: G is full_family ; ::_thesis: X deps_encl_by (enclosure_of F) c= G set B9 = saturated-subsets G; let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in X deps_encl_by (enclosure_of F) or z in G ) set GG = { [e,f] where e, f is Subset of X : for c being set st c in saturated-subsets G & e c= c holds f c= c } ; A8: { [e,f] where e, f is Subset of X : for c being set st c in saturated-subsets G & e c= c holds f c= c } = X deps_encl_by (saturated-subsets G) ; ( enclosure_of F is (B1) & enclosure_of F is (B2) ) by Th36; then A9: enclosure_of F = saturated-subsets (X deps_encl_by (enclosure_of F)) by Th35; assume z in X deps_encl_by (enclosure_of F) ; ::_thesis: z in G then consider a, b being Subset of X such that A10: z = [a,b] and A11: for c being set st c in enclosure_of F & a c= c holds b c= c ; ( saturated-subsets G is (B1) & saturated-subsets G is (B2) ) by A7, Th32; then A12: { [e,f] where e, f is Subset of X : for c being set st c in saturated-subsets G & e c= c holds f c= c } = G by A7, A8, Th35; saturated-subsets G c= saturated-subsets (X deps_encl_by (enclosure_of F)) proof let d be set ; :: according to TARSKI:def_3 ::_thesis: ( not d in saturated-subsets G or d in saturated-subsets (X deps_encl_by (enclosure_of F)) ) assume that A13: d in saturated-subsets G and A14: not d in saturated-subsets (X deps_encl_by (enclosure_of F)) ; ::_thesis: contradiction reconsider d = 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 saturated-subsets G & 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; ::_thesis: verum end; then for c being set st c in saturated-subsets G & a c= c holds b c= c by A11, A9; hence z in G by A10, A12; ::_thesis: verum end; definition let X be non empty finite set ; let F be Dependency-set of X; func Dependency-closure F -> Full-family of X means :Def24: :: ARMSTRNG:def 24 ( F c= it & ( for G being Dependency-set of X st F c= G & G is full_family holds it c= G ) ); existence ex b1 being Full-family of X st ( F c= b1 & ( for G being Dependency-set of X st F c= G & G is full_family holds b1 c= G ) ) proof set B = { c where c is Subset of X : for x, y being Subset of X st [x,y] in F & x c= c holds y c= c } ; A1: { c where c is Subset of X : for x, y being Subset of X st [x,y] in F & x c= c holds y c= c } = enclosure_of F ; { c where c is Subset of X : for x, y being Subset of X st [x,y] in F & x c= c holds y c= c } c= bool X proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { c where c is Subset of X : for x, y being Subset of X st [x,y] in F & x c= c holds y c= c } or x in bool X ) assume x in { c where c is Subset of X : for x, y being Subset of X st [x,y] in F & x c= c holds y c= c } ; ::_thesis: x in bool X then ex c being Subset of X st ( x = c & ( for x, y being Subset of X st [x,y] in F & x c= c holds y c= c ) ) ; hence x in bool X ; ::_thesis: verum end; then reconsider B = { c where c is Subset of X : for x, y being Subset of X st [x,y] in F & x c= c holds y c= c } as Subset-Family of X ; set H = X deps_encl_by B; reconsider H = X deps_encl_by B as Full-family of X by Th33; take H ; ::_thesis: ( F c= H & ( for G being Dependency-set of X st F c= G & G is full_family holds H c= G ) ) thus ( F c= H & ( for G being Dependency-set of X st F c= G & G is full_family holds H c= G ) ) by A1, Th37; ::_thesis: verum end; correctness uniqueness for b1, b2 being Full-family of X st F c= b1 & ( for G being Dependency-set of X st F c= G & G is full_family holds b1 c= G ) & F c= b2 & ( for G being Dependency-set of X st F c= G & G is full_family holds b2 c= G ) holds b1 = b2; proof let it1, it2 be Full-family of X; ::_thesis: ( F c= it1 & ( for G being Dependency-set of X st F c= G & G is full_family holds it1 c= G ) & F c= it2 & ( for G being Dependency-set of X st F c= G & G is full_family holds it2 c= G ) implies it1 = it2 ) assume that A2: F c= it1 and A3: for G being Dependency-set of X st F c= G & G is full_family holds it1 c= G and A4: F c= it2 and A5: for G being Dependency-set of X st F c= G & G is full_family holds it2 c= G ; ::_thesis: it1 = it2 A6: it2 c= it1 by A2, A5; it1 c= it2 by A3, A4; hence it1 = it2 by A6, XBOOLE_0:def_10; ::_thesis: verum end; end; :: deftheorem Def24 defines Dependency-closure ARMSTRNG:def_24_:_ for X being non empty finite set for F being Dependency-set of X for b3 being Full-family of X holds ( b3 = Dependency-closure F iff ( F c= b3 & ( for G being Dependency-set of X st F c= G & G is full_family holds b3 c= G ) ) ); theorem Th38: :: ARMSTRNG:38 for X being non empty finite set for F being Dependency-set of X holds Dependency-closure F = X deps_encl_by (enclosure_of F) proof let X be non empty finite set ; ::_thesis: for F being Dependency-set of X holds Dependency-closure F = X deps_encl_by (enclosure_of F) let F be Dependency-set of X; ::_thesis: Dependency-closure F = X deps_encl_by (enclosure_of F) set B = enclosure_of F; set H = X deps_encl_by (enclosure_of F); reconsider H = X deps_encl_by (enclosure_of F) as Full-family of X by Th33; A1: for G being Dependency-set of X st F c= G & G is full_family holds H c= G by Th37; F c= H by Th37; hence Dependency-closure F = X deps_encl_by (enclosure_of F) by A1, Def24; ::_thesis: verum end; theorem Th39: :: ARMSTRNG:39 for X being set for K being Subset of X for B being Subset-Family of X st B = {X} \/ { A where A is Subset of X : not K c= A } holds ( B is (B1) & B is (B2) ) proof let X be set ; ::_thesis: for K being Subset of X for B being Subset-Family of X st B = {X} \/ { A where A is Subset of X : not K c= A } holds ( B is (B1) & B is (B2) ) let K be Subset of X; ::_thesis: for B being Subset-Family of X st B = {X} \/ { A where A is Subset of X : not K c= A } holds ( B is (B1) & B is (B2) ) let BB be Subset-Family of X; ::_thesis: ( BB = {X} \/ { A where A is Subset of X : not K c= A } implies ( BB is (B1) & BB is (B2) ) ) assume A1: BB = {X} \/ { B where B is Subset of X : not K c= B } ; ::_thesis: ( BB is (B1) & BB is (B2) ) X in {X} by TARSKI:def_1; then X in BB by A1, XBOOLE_0:def_3; hence BB is (B1) by Def4; ::_thesis: BB is (B2) set BB1 = { B where B is Subset of X : not K c= B } ; thus BB is (B2) ::_thesis: verum proof let a, b be set ; :: according to FINSUB_1:def_2 ::_thesis: ( not a in BB or not b in BB or a /\ b in BB ) assume that A2: a in BB and A3: b in BB ; ::_thesis: a /\ b in BB reconsider a9 = a, b9 = b as Subset of X by A2, A3; percases ( ( a in {X} & b in {X} ) or ( a in {X} & b in { B where B is Subset of X : not K c= B } ) or ( a in { B where B is Subset of X : not K c= B } & b in {X} ) or ( a in { B where B is Subset of X : not K c= B } & b in { B where B is Subset of X : not K c= B } ) ) by A1, A2, A3, XBOOLE_0:def_3; supposeA4: ( a in {X} & b in {X} ) ; ::_thesis: a /\ b in BB then A5: b = X by TARSKI:def_1; a = X by A4, TARSKI:def_1; then a /\ b in {X} by A5, TARSKI:def_1; hence a /\ b in BB by A1, XBOOLE_0:def_3; ::_thesis: verum end; supposeA6: ( a in {X} & b in { B where B is Subset of X : not K c= B } ) ; ::_thesis: a /\ b in BB then a = X by TARSKI:def_1; then a9 /\ b9 = b by XBOOLE_1:28; hence a /\ b in BB by A1, A6, XBOOLE_0:def_3; ::_thesis: verum end; supposeA7: ( a in { B where B is Subset of X : not K c= B } & b in {X} ) ; ::_thesis: a /\ b in BB then b = X by TARSKI:def_1; then a9 /\ b9 = a by XBOOLE_1:28; hence a /\ b in BB by A1, A7, XBOOLE_0:def_3; ::_thesis: verum end; suppose ( a in { B where B is Subset of X : not K c= B } & b in { B where B is Subset of X : not K c= B } ) ; ::_thesis: a /\ b in BB then ex B1 being Subset of X st ( b = B1 & not K c= B1 ) ; then not K c= a /\ b by XBOOLE_1:18; then a9 /\ b9 in { B where B is Subset of X : not K c= B } ; hence a /\ b in BB by A1, XBOOLE_0:def_3; ::_thesis: verum end; end; end; end; theorem :: ARMSTRNG:40 for X being non empty finite set for F being Dependency-set of X for K being Subset of X st F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } holds {X} \/ { B where B is Subset of X : not K c= B } = saturated-subsets F proof let X be non empty finite set ; ::_thesis: for F being Dependency-set of X for K being Subset of X st F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } holds {X} \/ { B where B is Subset of X : not K c= B } = saturated-subsets F let F be Dependency-set of X; ::_thesis: for K being Subset of X st F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } holds {X} \/ { B where B is Subset of X : not K c= B } = saturated-subsets F let K be Subset of X; ::_thesis: ( F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } implies {X} \/ { B where B is Subset of X : not K c= B } = saturated-subsets F ) set BB = {X} \/ { B where B is Subset of X : not K c= B } ; {X} \/ { B where B is Subset of X : not K c= B } c= bool X proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in {X} \/ { B where B is Subset of X : not K c= B } or x in bool X ) assume A1: x in {X} \/ { B where B is Subset of X : not K c= B } ; ::_thesis: x in bool X percases ( x in {X} or x in { B where B is Subset of X : not K c= B } ) by A1, XBOOLE_0:def_3; supposeA2: x in {X} ; ::_thesis: x in bool X {X} c= bool X by ZFMISC_1:68; hence x in bool X by A2; ::_thesis: verum end; suppose x in { B where B is Subset of X : not K c= B } ; ::_thesis: x in bool X then ex B being Subset of X st ( x = B & not K c= B ) ; hence x in bool X ; ::_thesis: verum end; end; end; then reconsider BB9 = {X} \/ { B where B is Subset of X : not K c= B } as non empty Subset-Family of X ; set G = { [a,b] where a, b is Subset of X : for c being set st c in BB9 & a c= c holds b c= c } ; A3: { [a,b] where a, b is Subset of X : for c being set st c in BB9 & a c= c holds b c= c } = X deps_encl_by BB9 ; A4: BB9 is (B2) by Th39; assume A5: F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } ; ::_thesis: {X} \/ { B where B is Subset of X : not K c= B } = saturated-subsets F now__::_thesis:_for_x_being_set_holds_ (_(_x_in_F_implies_x_in__{__[a,b]_where_a,_b_is_Subset_of_X_:_for_c_being_set_st_c_in_BB9_&_a_c=_c_holds_ b_c=_c__}__)_&_(_x_in__{__[a,b]_where_a,_b_is_Subset_of_X_:_for_c_being_set_st_c_in_BB9_&_a_c=_c_holds_ b_c=_c__}__implies_x_in_F_)_) let x be set ; ::_thesis: ( ( x in F implies x in { [a,b] where a, b is Subset of X : for c being set st c in BB9 & a c= c holds b c= c } ) & ( x in { [a,b] where a, b is Subset of X : for c being set st c in BB9 & a c= c holds b c= c } implies x in F ) ) hereby ::_thesis: ( x in { [a,b] where a, b is Subset of X : for c being set st c in BB9 & a c= c holds b c= c } implies x in F ) assume x in F ; ::_thesis: x in { [a,b] where a, b is Subset of X : for c being set st c in BB9 & a c= c holds b c= c } then consider a, b being Subset of X such that A6: x = [a,b] and A7: ( K c= a or b c= a ) by A5; now__::_thesis:_for_c_being_set_st_c_in_BB9_&_a_c=_c_holds_ b_c=_c let c be set ; ::_thesis: ( c in BB9 & a c= c implies b c= b1 ) assume that A8: c in BB9 and A9: a c= c ; ::_thesis: b c= b1 percases ( K c= a or b c= a ) by A7; supposeA10: K c= a ; ::_thesis: b c= b1 thus b c= c ::_thesis: verum proof percases ( c in {X} or c in { B where B is Subset of X : not K c= B } ) by A8, XBOOLE_0:def_3; suppose c in {X} ; ::_thesis: b c= c then c = X by TARSKI:def_1; hence b c= c ; ::_thesis: verum end; suppose c in { B where B is Subset of X : not K c= B } ; ::_thesis: b c= c then ex B being Subset of X st ( c = B & not K c= B ) ; hence b c= c by A9, A10, XBOOLE_1:1; ::_thesis: verum end; end; end; end; suppose b c= a ; ::_thesis: b c= b1 hence b c= c by A9, XBOOLE_1:1; ::_thesis: verum end; end; end; hence x in { [a,b] where a, b is Subset of X : for c being set st c in BB9 & a c= c holds b c= c } by A6; ::_thesis: verum end; assume x in { [a,b] where a, b is Subset of X : for c being set st c in BB9 & a c= c holds b c= c } ; ::_thesis: x in F then consider a, b being Subset of X such that A11: x = [a,b] and A12: for c being set st c in BB9 & a c= c holds b c= c ; now__::_thesis:_(_not_K_c=_a_implies_b_c=_a_) assume not K c= a ; ::_thesis: b c= a then a in { B where B is Subset of X : not K c= B } ; then a in BB9 by XBOOLE_0:def_3; hence b c= a by A12; ::_thesis: verum end; hence x in F by A5, A11; ::_thesis: verum end; then A13: F = { [a,b] where a, b is Subset of X : for c being set st c in BB9 & a c= c holds b c= c } by TARSKI:1; BB9 is (B1) by Th39; hence {X} \/ { B where B is Subset of X : not K c= B } = saturated-subsets F by A4, A3, A13, Th35; ::_thesis: verum end; theorem :: ARMSTRNG:41 for X being finite set for F being Dependency-set of X for K being Subset of X st F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } holds {X} \/ { B where B is Subset of X : not K c= B } = saturated-subsets F proof let X be finite set ; ::_thesis: for F being Dependency-set of X for K being Subset of X st F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } holds {X} \/ { B where B is Subset of X : not K c= B } = saturated-subsets F let F be Dependency-set of X; ::_thesis: for K being Subset of X st F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } holds {X} \/ { B where B is Subset of X : not K c= B } = saturated-subsets F let K be Subset of X; ::_thesis: ( F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } implies {X} \/ { B where B is Subset of X : not K c= B } = saturated-subsets F ) set BB = {X} \/ { B where B is Subset of X : not K c= B } ; set M = {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } ; set ss = saturated-subsets F; assume F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } ; ::_thesis: {X} \/ { B where B is Subset of X : not K c= B } = saturated-subsets F then A1: {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } = Maximal_wrt F by Th30; A2: [#] X = X ; now__::_thesis:_for_x_being_set_holds_ (_(_x_in_{X}_\/__{__B_where_B_is_Subset_of_X_:_not_K_c=_B__}__implies_x_in_saturated-subsets_F_)_&_(_x_in_saturated-subsets_F_implies_x_in_{X}_\/__{__B_where_B_is_Subset_of_X_:_not_K_c=_B__}__)_) let x be set ; ::_thesis: ( ( x in {X} \/ { B where B is Subset of X : not K c= B } implies x in saturated-subsets F ) & ( x in saturated-subsets F implies b1 in {X} \/ { b2 where B is Subset of X : not K c= b2 } ) ) hereby ::_thesis: ( x in saturated-subsets F implies b1 in {X} \/ { b2 where B is Subset of X : not K c= b2 } ) assume A3: x in {X} \/ { B where B is Subset of X : not K c= B } ; ::_thesis: x in saturated-subsets F percases ( x in {X} or x in { B where B is Subset of X : not K c= B } ) by A3, XBOOLE_0:def_3; supposeA4: x in {X} ; ::_thesis: x in saturated-subsets F [K,X] in {[K,X]} by TARSKI:def_1; then [K,X] in {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } by XBOOLE_0:def_3; then A5: K ^|^ X,F by A1, Def17; x = X by A4, TARSKI:def_1; hence x in saturated-subsets F by A2, A5; ::_thesis: verum end; suppose x in { B where B is Subset of X : not K c= B } ; ::_thesis: x in saturated-subsets F then consider B being Subset of X such that A6: x = B and A7: not K c= B ; [B,B] in { [A,A] where A is Subset of X : not K c= A } by A7; then [B,B] in {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } by XBOOLE_0:def_3; then B ^|^ B,F by A1, Def17; hence x in saturated-subsets F by A6; ::_thesis: verum end; end; end; assume x in saturated-subsets F ; ::_thesis: b1 in {X} \/ { b2 where B is Subset of X : not K c= b2 } then consider b, a being Subset of X such that A8: x = b and A9: a ^|^ b,F by Th31; A10: [a,b] in {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } by A1, A9, Def17; percases ( [a,b] in {[K,X]} or [a,b] in { [A,A] where A is Subset of X : not K c= A } ) by A10, XBOOLE_0:def_3; suppose [a,b] in {[K,X]} ; ::_thesis: b1 in {X} \/ { b2 where B is Subset of X : not K c= b2 } then [a,b] = [K,X] by TARSKI:def_1; then b = X by XTUPLE_0:1; then b in {X} by TARSKI:def_1; hence x in {X} \/ { B where B is Subset of X : not K c= B } by A8, XBOOLE_0:def_3; ::_thesis: verum end; suppose [a,b] in { [A,A] where A is Subset of X : not K c= A } ; ::_thesis: b1 in {X} \/ { b2 where B is Subset of X : not K c= b2 } then consider c being Subset of X such that A11: [a,b] = [c,c] and A12: not K c= c ; A13: c in { B where B is Subset of X : not K c= B } by A12; b = c by A11, XTUPLE_0:1; hence x in {X} \/ { B where B is Subset of X : not K c= B } by A8, A13, XBOOLE_0:def_3; ::_thesis: verum end; end; end; hence {X} \/ { B where B is Subset of X : not K c= B } = saturated-subsets F by TARSKI:1; ::_thesis: verum end; definition let X, G be set ; let B be Subset-Family of X; predG is_generator-set_of B means :Def25: :: ARMSTRNG:def 25 ( G c= B & B = { (Intersect S) where S is Subset-Family of X : S c= G } ); end; :: deftheorem Def25 defines is_generator-set_of ARMSTRNG:def_25_:_ for X, G being set for B being Subset-Family of X holds ( G is_generator-set_of B iff ( G c= B & B = { (Intersect S) where S is Subset-Family of X : S c= G } ) ); theorem :: ARMSTRNG:42 for X being non empty finite set for G being Subset-Family of X holds G is_generator-set_of saturated-subsets (X deps_encl_by G) proof let X be non empty finite set ; ::_thesis: for G being Subset-Family of X holds G is_generator-set_of saturated-subsets (X deps_encl_by G) let G be Subset-Family of X; ::_thesis: G is_generator-set_of saturated-subsets (X deps_encl_by G) set F = X deps_encl_by G; set ssF = saturated-subsets (X deps_encl_by G); X deps_encl_by G is full_family by Th33; then A1: ( saturated-subsets (X deps_encl_by G) is (B1) & saturated-subsets (X deps_encl_by G) is (B2) ) by Th32; thus G is_generator-set_of saturated-subsets (X deps_encl_by G) ::_thesis: verum proof set H = { (Intersect S) where S is Subset-Family of X : S c= G } ; thus A2: G c= saturated-subsets (X deps_encl_by G) by Th34; :: according to ARMSTRNG:def_25 ::_thesis: saturated-subsets (X deps_encl_by G) = { (Intersect S) where S is Subset-Family of X : S c= G } now__::_thesis:_for_x_being_set_holds_ (_(_x_in_saturated-subsets_(X_deps_encl_by_G)_implies_x_in__{__(Intersect_S)_where_S_is_Subset-Family_of_X_:_S_c=_G__}__)_&_(_x_in__{__(Intersect_S)_where_S_is_Subset-Family_of_X_:_S_c=_G__}__implies_x_in_saturated-subsets_(X_deps_encl_by_G)_)_) let x be set ; ::_thesis: ( ( x in saturated-subsets (X deps_encl_by G) implies x in { (Intersect S) where S is Subset-Family of X : S c= G } ) & ( x in { (Intersect S) where S is Subset-Family of X : S c= G } implies x in saturated-subsets (X deps_encl_by G) ) ) hereby ::_thesis: ( x in { (Intersect S) where S is Subset-Family of X : S c= G } implies x in saturated-subsets (X deps_encl_by G) ) assume x in saturated-subsets (X deps_encl_by G) ; ::_thesis: x in { (Intersect S) where S is Subset-Family of X : S c= G } then consider b9, a9 being Subset of X such that A3: x = b9 and A4: a9 ^|^ b9,X deps_encl_by G by Th31; [a9,b9] in Maximal_wrt (X deps_encl_by G) by A4, Def17; then [a9,b9] in X deps_encl_by G ; then consider a, b being Subset of X such that A5: [a,b] = [a9,b9] and A6: for c being set st c in G & a c= c holds b c= c ; set C = { c where c is Subset of X : ( c in G & a c= c ) } ; { c where c is Subset of X : ( c in G & a c= c ) } c= bool X proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { c where c is Subset of X : ( c in G & a c= c ) } or x in bool X ) assume x in { c where c is Subset of X : ( c in G & a c= c ) } ; ::_thesis: x in bool X then ex c being Subset of X st ( x = c & c in G & a c= c ) ; hence x in bool X ; ::_thesis: verum end; then reconsider C = { c where c is Subset of X : ( c in G & a c= c ) } as Subset-Family of X ; now__::_thesis:_for_z1_being_set_st_z1_in_C_holds_ b_c=_z1 let z1 be set ; ::_thesis: ( z1 in C implies b c= z1 ) assume z1 in C ; ::_thesis: b c= z1 then ex c being Subset of X st ( z1 = c & c in G & a c= c ) ; hence b c= z1 by A6; ::_thesis: verum end; then A7: b c= Intersect C by MSSUBFAM:4; set ic = Intersect C; A8: b = b9 by A5, XTUPLE_0:1; A9: C c= G proof let c be set ; :: according to TARSKI:def_3 ::_thesis: ( not c in C or c in G ) assume c in C ; ::_thesis: c in G then ex cc being Subset of X st ( cc = c & cc in G & a c= cc ) ; hence c in G ; ::_thesis: verum end; thus x in { (Intersect S) where S is Subset-Family of X : S c= G } ::_thesis: verum proof percases ( b = Intersect C or b <> Intersect C ) ; suppose b = Intersect C ; ::_thesis: x in { (Intersect S) where S is Subset-Family of X : S c= G } hence x in { (Intersect S) where S is Subset-Family of X : S c= G } by A3, A8, A9; ::_thesis: verum end; supposeA10: b <> Intersect C ; ::_thesis: x in { (Intersect S) where S is Subset-Family of X : S c= G } reconsider ic = Intersect C as Subset of X ; now__::_thesis:_for_c_being_set_st_c_in_G_&_a_c=_c_holds_ ic_c=_c let c be set ; ::_thesis: ( c in G & a c= c implies ic c= c ) assume that A11: c in G and A12: a c= c ; ::_thesis: ic c= c c in C by A11, A12; hence ic c= c by MSSUBFAM:2; ::_thesis: verum end; then A13: [a,ic] in X deps_encl_by G ; [a,b] <= [a,ic] by A7, Th13; hence x in { (Intersect S) where S is Subset-Family of X : S c= G } by A4, A5, A8, A10, A13, Th27; ::_thesis: verum end; end; end; end; assume x in { (Intersect S) where S is Subset-Family of X : S c= G } ; ::_thesis: x in saturated-subsets (X deps_encl_by G) then A14: ex S being Subset-Family of X st ( Intersect S = x & S c= G ) ; X in saturated-subsets (X deps_encl_by G) by A1, Def4; hence x in saturated-subsets (X deps_encl_by G) by A1, A2, A14, Th1, XBOOLE_1:1; ::_thesis: verum end; hence saturated-subsets (X deps_encl_by G) = { (Intersect S) where S is Subset-Family of X : S c= G } by TARSKI:1; ::_thesis: verum end; end; theorem Th43: :: ARMSTRNG:43 for X being non empty finite set for F being Full-family of X ex G being Subset-Family of X st ( G is_generator-set_of saturated-subsets F & F = X deps_encl_by G ) proof let X be non empty finite set ; ::_thesis: for F being Full-family of X ex G being Subset-Family of X st ( G is_generator-set_of saturated-subsets F & F = X deps_encl_by G ) let F be Full-family of X; ::_thesis: ex G being Subset-Family of X st ( G is_generator-set_of saturated-subsets F & F = X deps_encl_by G ) set G = saturated-subsets F; take saturated-subsets F ; ::_thesis: ( saturated-subsets F is_generator-set_of saturated-subsets F & F = X deps_encl_by (saturated-subsets F) ) A1: ( saturated-subsets F is (B1) & saturated-subsets F is (B2) ) by Th32; thus saturated-subsets F is_generator-set_of saturated-subsets F ::_thesis: F = X deps_encl_by (saturated-subsets F) proof set H = { (Intersect S) where S is Subset-Family of X : S c= saturated-subsets F } ; thus saturated-subsets F c= saturated-subsets F ; :: according to ARMSTRNG:def_25 ::_thesis: saturated-subsets F = { (Intersect S) where S is Subset-Family of X : S c= saturated-subsets F } now__::_thesis:_for_x_being_set_holds_ (_(_x_in_saturated-subsets_F_implies_x_in__{__(Intersect_S)_where_S_is_Subset-Family_of_X_:_S_c=_saturated-subsets_F__}__)_&_(_x_in__{__(Intersect_S)_where_S_is_Subset-Family_of_X_:_S_c=_saturated-subsets_F__}__implies_x_in_saturated-subsets_F_)_) let x be set ; ::_thesis: ( ( x in saturated-subsets F implies x in { (Intersect S) where S is Subset-Family of X : S c= saturated-subsets F } ) & ( x in { (Intersect S) where S is Subset-Family of X : S c= saturated-subsets F } implies x in saturated-subsets F ) ) hereby ::_thesis: ( x in { (Intersect S) where S is Subset-Family of X : S c= saturated-subsets F } implies x in saturated-subsets F ) set sx = {x}; assume A2: x in saturated-subsets F ; ::_thesis: x in { (Intersect S) where S is Subset-Family of X : S c= saturated-subsets F } then A3: {x} c= saturated-subsets F by ZFMISC_1:31; reconsider sx = {x} as Subset-Family of X by A2, ZFMISC_1:31; A4: Intersect sx = meet sx by SETFAM_1:def_9; Intersect sx in { (Intersect S) where S is Subset-Family of X : S c= saturated-subsets F } by A3; hence x in { (Intersect S) where S is Subset-Family of X : S c= saturated-subsets F } by A4, SETFAM_1:10; ::_thesis: verum end; assume x in { (Intersect S) where S is Subset-Family of X : S c= saturated-subsets F } ; ::_thesis: x in saturated-subsets F then A5: ex S being Subset-Family of X st ( Intersect S = x & S c= saturated-subsets F ) ; X in saturated-subsets F by A1, Def4; hence x in saturated-subsets F by A1, A5, Th1; ::_thesis: verum end; hence saturated-subsets F = { (Intersect S) where S is Subset-Family of X : S c= saturated-subsets F } by TARSKI:1; ::_thesis: verum end; thus F = X deps_encl_by (saturated-subsets F) by A1, Th35; ::_thesis: verum end; theorem :: ARMSTRNG:44 for X being set for B being non empty finite Subset-Family of X st B is (B1) & B is (B2) holds /\-IRR B is_generator-set_of B proof let X be set ; ::_thesis: for B being non empty finite Subset-Family of X st B is (B1) & B is (B2) holds /\-IRR B is_generator-set_of B let B be non empty finite Subset-Family of X; ::_thesis: ( B is (B1) & B is (B2) implies /\-IRR B is_generator-set_of B ) assume A1: ( B is (B1) & B is (B2) ) ; ::_thesis: /\-IRR B is_generator-set_of B set G = /\-IRR B; set H = { (Intersect S) where S is Subset-Family of X : S c= /\-IRR B } ; thus /\-IRR B c= B ; :: according to ARMSTRNG:def_25 ::_thesis: B = { (Intersect S) where S is Subset-Family of X : S c= /\-IRR B } A2: X in B by A1, Def4; now__::_thesis:_for_x_being_set_holds_ (_(_x_in_B_implies_x_in__{__(Intersect_S)_where_S_is_Subset-Family_of_X_:_S_c=_/\-IRR_B__}__)_&_(_x_in__{__(Intersect_S)_where_S_is_Subset-Family_of_X_:_S_c=_/\-IRR_B__}__implies_x_in_B_)_) let x be set ; ::_thesis: ( ( x in B implies x in { (Intersect S) where S is Subset-Family of X : S c= /\-IRR B } ) & ( x in { (Intersect S) where S is Subset-Family of X : S c= /\-IRR B } implies x in B ) ) hereby ::_thesis: ( x in { (Intersect S) where S is Subset-Family of X : S c= /\-IRR B } implies x in B ) assume x in B ; ::_thesis: x in { (Intersect S) where S is Subset-Family of X : S c= /\-IRR B } then reconsider xx = x as Element of B ; consider yz being non empty Subset of B such that A3: xx = meet yz and A4: for s being set st s in yz holds s is_/\-irreducible_in B by Th3; reconsider yz = yz as non empty Subset-Family of X by XBOOLE_1:1; A5: yz c= /\-IRR B proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in yz or x in /\-IRR B ) assume x in yz ; ::_thesis: x in /\-IRR B then x is_/\-irreducible_in B by A4; hence x in /\-IRR B by Def3; ::_thesis: verum end; Intersect yz = meet yz by SETFAM_1:def_9; hence x in { (Intersect S) where S is Subset-Family of X : S c= /\-IRR B } by A3, A5; ::_thesis: verum end; assume x in { (Intersect S) where S is Subset-Family of X : S c= /\-IRR B } ; ::_thesis: x in B then ex S being Subset-Family of X st ( x = Intersect S & S c= /\-IRR B ) ; hence x in B by A1, A2, Th1, XBOOLE_1:1; ::_thesis: verum end; hence B = { (Intersect S) where S is Subset-Family of X : S c= /\-IRR B } by TARSKI:1; ::_thesis: verum end; theorem :: ARMSTRNG:45 for X, G being set for B being non empty finite Subset-Family of X st B is (B1) & B is (B2) & G is_generator-set_of B holds /\-IRR B c= G \/ {X} proof let X, G be set ; ::_thesis: for B being non empty finite Subset-Family of X st B is (B1) & B is (B2) & G is_generator-set_of B holds /\-IRR B c= G \/ {X} let B be non empty finite Subset-Family of X; ::_thesis: ( B is (B1) & B is (B2) & G is_generator-set_of B implies /\-IRR B c= G \/ {X} ) assume that A1: ( B is (B1) & B is (B2) ) and A2: G is_generator-set_of B ; ::_thesis: /\-IRR B c= G \/ {X} A3: B = { (Intersect S) where S is Subset-Family of X : S c= G } by A2, Def25; A4: G c= B by A2, Def25; let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in /\-IRR B or x in G \/ {X} ) assume A5: x in /\-IRR B ; ::_thesis: x in G \/ {X} then reconsider xx = x as Element of B ; A6: xx is_/\-irreducible_in B by A5, Def3; assume A7: not x in G \/ {X} ; ::_thesis: contradiction then not x in {X} by XBOOLE_0:def_3; then A8: x <> X by TARSKI:def_1; x in B by A5; then consider S being Subset-Family of X such that A9: x = Intersect S and A10: S c= G by A3; not x in S by A10, A7, XBOOLE_0:def_3; hence contradiction by A1, A4, A9, A10, A8, A6, Th4, XBOOLE_1:1; ::_thesis: verum end; begin definition let n be Element of NAT ; let D be non empty set ; mode Tuple of n,D is Element of n -tuples_on D; end; theorem :: ARMSTRNG:46 for X being non empty finite set for F being Full-family of X ex R being DB-Rel st ( the Attributes of R = X & ( for a being Element of X holds the Domains of R . a = INT ) & F = Dependency-str R ) proof let X be non empty finite set ; ::_thesis: for F being Full-family of X ex R being DB-Rel st ( the Attributes of R = X & ( for a being Element of X holds the Domains of R . a = INT ) & F = Dependency-str R ) let F be Full-family of X; ::_thesis: ex R being DB-Rel st ( the Attributes of R = X & ( for a being Element of X holds the Domains of R . a = INT ) & F = Dependency-str R ) reconsider D = X --> INT as non-empty ManySortedSet of X ; consider G being Subset-Family of X such that G is_generator-set_of saturated-subsets F and A1: F = X deps_encl_by G by Th43; consider H being FinSequence such that A2: rng H = G and H is one-to-one by FINSEQ_4:58; A3: dom D = X by PARTFUN1:def_2; A4: now__::_thesis:_(_dom_(X_-->_0)_=_dom_D_&_(_for_x_being_set_st_x_in_dom_D_holds_ (X_-->_0)_._x_in_D_._x_)_) set f = X --> 0; thus dom (X --> 0) = dom D by A3, FUNCOP_1:13; ::_thesis: for x being set st x in dom D holds (X --> 0) . x in D . x let x be set ; ::_thesis: ( x in dom D implies (X --> 0) . x in D . x ) assume A5: x in dom D ; ::_thesis: (X --> 0) . x in D . x then (X --> 0) . x = 0 by FUNCOP_1:7; then (X --> 0) . x in NAT ; then (X --> 0) . x in INT by NUMBERS:17; hence (X --> 0) . x in D . x by A5, FUNCOP_1:7; ::_thesis: verum end; then A6: X --> 0 is Element of product D by CARD_3:def_5; reconsider H = H as FinSequence of G by A2, FINSEQ_1:def_4; percases ( G is empty or not G is empty ) ; supposeA7: G is empty ; ::_thesis: ex R being DB-Rel st ( the Attributes of R = X & ( for a being Element of X holds the Domains of R . a = INT ) & F = Dependency-str R ) set R = {(X --> 0)}; {(X --> 0)} c= product D proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in {(X --> 0)} or x in product D ) assume x in {(X --> 0)} ; ::_thesis: x in product D then x = X --> 0 by TARSKI:def_1; hence x in product D by A4, CARD_3:def_5; ::_thesis: verum end; then reconsider R = {(X --> 0)} as non empty Subset of (product D) ; set BD = DB-Rel(# X,D,R #); take DB-Rel(# X,D,R #) ; ::_thesis: ( the Attributes of DB-Rel(# X,D,R #) = X & ( for a being Element of X holds the Domains of DB-Rel(# X,D,R #) . a = INT ) & F = Dependency-str DB-Rel(# X,D,R #) ) thus ( the Attributes of DB-Rel(# X,D,R #) = X & ( for a being Element of X holds the Domains of DB-Rel(# X,D,R #) . a = INT ) ) by FUNCOP_1:7; ::_thesis: F = Dependency-str DB-Rel(# X,D,R #) set Ds = Dependency-str DB-Rel(# X,D,R #); now__::_thesis:_for_x_being_set_holds_ (_(_x_in_F_implies_x_in_Dependency-str_DB-Rel(#_X,D,R_#)_)_&_(_x_in_Dependency-str_DB-Rel(#_X,D,R_#)_implies_x_in_F_)_) let x be set ; ::_thesis: ( ( x in F implies x in Dependency-str DB-Rel(# X,D,R #) ) & ( x in Dependency-str DB-Rel(# X,D,R #) implies x in F ) ) hereby ::_thesis: ( x in Dependency-str DB-Rel(# X,D,R #) implies x in F ) assume x in F ; ::_thesis: x in Dependency-str DB-Rel(# X,D,R #) then consider A, B being Subset of X such that A8: x = [A,B] and for g being set st g in G & A c= g holds B c= g by A1; reconsider A = A, B = B as Subset of the Attributes of DB-Rel(# X,D,R #) ; A >|> B, DB-Rel(# X,D,R #) proof let f, g be Element of the Relationship of DB-Rel(# X,D,R #); :: according to ARMSTRNG:def_7 ::_thesis: ( f | A = g | A implies f | B = g | B ) f = X --> 0 by TARSKI:def_1; hence ( f | A = g | A implies f | B = g | B ) by TARSKI:def_1; ::_thesis: verum end; hence x in Dependency-str DB-Rel(# X,D,R #) by A8; ::_thesis: verum end; assume x in Dependency-str DB-Rel(# X,D,R #) ; ::_thesis: x in F then consider A, B being Subset of the Attributes of DB-Rel(# X,D,R #) such that A9: x = [A,B] and A >|> B, DB-Rel(# X,D,R #) ; for g being set st g in G & A c= g holds B c= g by A7; hence x in F by A1, A9; ::_thesis: verum end; hence F = Dependency-str DB-Rel(# X,D,R #) by TARSKI:1; ::_thesis: verum end; supposeA10: not G is empty ; ::_thesis: ex R being DB-Rel st ( the Attributes of R = X & ( for a being Element of X holds the Domains of R . a = INT ) & F = Dependency-str R ) then not H is empty by A2; then reconsider n = len H as non empty Element of NAT ; defpred S1[ set , Element of n -tuples_on BOOLEAN] means for i being Element of NAT st i in Seg n holds ( ( $1 in H . i implies $2 . i = 0 ) & ( not $1 in H . i implies $2 . i = 1 ) ); A11: now__::_thesis:_for_x_being_Element_of_X_ex_y_being_Element_of_n_-tuples_on_BOOLEAN_st_S1[x,y] let x be Element of X; ::_thesis: ex y being Element of n -tuples_on BOOLEAN st S1[x,y] defpred S2[ set , set ] means ( ( x in H . $1 implies $2 = 0 ) & ( not x in H . $1 implies $2 = 1 ) ); A12: for i being Nat st i in Seg n holds ex x being Element of BOOLEAN st S2[i,x] proof let i be Nat; ::_thesis: ( i in Seg n implies ex x being Element of BOOLEAN st S2[i,x] ) assume i in Seg n ; ::_thesis: ex x being Element of BOOLEAN st S2[i,x] percases ( x in H . i or not x in H . i ) ; supposeA13: x in H . i ; ::_thesis: ex x being Element of BOOLEAN st S2[i,x] reconsider b = FALSE as Element of BOOLEAN ; take b ; ::_thesis: S2[i,b] thus S2[i,b] by A13; ::_thesis: verum end; supposeA14: not x in H . i ; ::_thesis: ex x being Element of BOOLEAN st S2[i,x] reconsider b = TRUE as Element of BOOLEAN ; take b ; ::_thesis: S2[i,b] thus S2[i,b] by A14; ::_thesis: verum end; end; end; consider y being FinSequence of BOOLEAN such that A15: dom y = Seg n and A16: for i being Nat st i in Seg n holds S2[i,y . i] from FINSEQ_1:sch_5(A12); A17: y in BOOLEAN * by FINSEQ_1:def_11; len y = n by A15, FINSEQ_1:def_3; then y in { s where s is Element of BOOLEAN * : len s = n } by A17; then reconsider y = y as Element of n -tuples_on BOOLEAN ; take y = y; ::_thesis: S1[x,y] thus S1[x,y] by A16; ::_thesis: verum end; consider M being Function of X,(n -tuples_on BOOLEAN) such that A18: for x being Element of X holds S1[x,M . x] from FUNCT_2:sch_3(A11); set R = { f where f is Element of product D : ex i being Element of NAT st for x being Element of X holds f . x = Absval ((n -BinarySequence i) '&' (M . x)) } ; A19: { f where f is Element of product D : ex i being Element of NAT st for x being Element of X holds f . x = Absval ((n -BinarySequence i) '&' (M . x)) } c= product D proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { f where f is Element of product D : ex i being Element of NAT st for x being Element of X holds f . x = Absval ((n -BinarySequence i) '&' (M . x)) } or x in product D ) assume x in { f where f is Element of product D : ex i being Element of NAT st for x being Element of X holds f . x = Absval ((n -BinarySequence i) '&' (M . x)) } ; ::_thesis: x in product D then ex f being Element of product D st ( x = f & ex i being Element of NAT st for x being Element of X holds f . x = Absval ((n -BinarySequence i) '&' (M . x)) ) ; hence x in product D ; ::_thesis: verum end; now__::_thesis:_ex_i_being_Element_of_NAT_st_ for_x_being_Element_of_X_holds_(X_-->_0)_._x_=_Absval_((n_-BinarySequence_i)_'&'_(M_._x)) take i = 0 ; ::_thesis: for x being Element of X holds (X --> 0) . x = Absval ((n -BinarySequence i) '&' (M . x)) set f = X --> 0; let x be Element of X; ::_thesis: (X --> 0) . x = Absval ((n -BinarySequence i) '&' (M . x)) A20: (n -BinarySequence i) '&' (M . x) = n -BinarySequence i by Th5 .= 0* n by BINARI_3:25 ; thus (X --> 0) . x = 0 by FUNCOP_1:7 .= Absval ((n -BinarySequence i) '&' (M . x)) by A20, BINARI_3:6 ; ::_thesis: verum end; then X --> 0 in { f where f is Element of product D : ex i being Element of NAT st for x being Element of X holds f . x = Absval ((n -BinarySequence i) '&' (M . x)) } by A6; then reconsider R = { f where f is Element of product D : ex i being Element of NAT st for x being Element of X holds f . x = Absval ((n -BinarySequence i) '&' (M . x)) } as non empty Subset of (product D) by A19; set BD = DB-Rel(# X,D,R #); take DB-Rel(# X,D,R #) ; ::_thesis: ( the Attributes of DB-Rel(# X,D,R #) = X & ( for a being Element of X holds the Domains of DB-Rel(# X,D,R #) . a = INT ) & F = Dependency-str DB-Rel(# X,D,R #) ) thus ( the Attributes of DB-Rel(# X,D,R #) = X & ( for a being Element of X holds the Domains of DB-Rel(# X,D,R #) . a = INT ) ) by FUNCOP_1:7; ::_thesis: F = Dependency-str DB-Rel(# X,D,R #) set Ds = Dependency-str DB-Rel(# X,D,R #); A21: dom H = Seg n by FINSEQ_1:def_3; now__::_thesis:_for_x_being_set_holds_ (_(_x_in_F_implies_x_in_Dependency-str_DB-Rel(#_X,D,R_#)_)_&_(_x_in_Dependency-str_DB-Rel(#_X,D,R_#)_implies_x_in_F_)_) let x be set ; ::_thesis: ( ( x in F implies x in Dependency-str DB-Rel(# X,D,R #) ) & ( x in Dependency-str DB-Rel(# X,D,R #) implies x in F ) ) hereby ::_thesis: ( x in Dependency-str DB-Rel(# X,D,R #) implies x in F ) assume x in F ; ::_thesis: x in Dependency-str DB-Rel(# X,D,R #) then consider A, B being Subset of X such that A22: x = [A,B] and A23: for g being set st g in G & A c= g holds B c= g by A1; reconsider A9 = A, B9 = B as Subset of the Attributes of DB-Rel(# X,D,R #) ; A9 >|> B9, DB-Rel(# X,D,R #) proof let f, g be Element of the Relationship of DB-Rel(# X,D,R #); :: according to ARMSTRNG:def_7 ::_thesis: ( f | A9 = g | A9 implies f | B9 = g | B9 ) assume A24: f | A9 = g | A9 ; ::_thesis: f | B9 = g | B9 f in R ; then consider Rf being Element of product D such that A25: f = Rf and A26: ex i being Element of NAT st for x being Element of X holds Rf . x = Absval ((n -BinarySequence i) '&' (M . x)) ; consider fi being Element of NAT such that A27: for x being Element of X holds Rf . x = Absval ((n -BinarySequence fi) '&' (M . x)) by A26; g in R ; then consider Rg being Element of product D such that A28: g = Rg and A29: ex i being Element of NAT st for x being Element of X holds Rg . x = Absval ((n -BinarySequence i) '&' (M . x)) ; consider gi being Element of NAT such that A30: for x being Element of X holds Rg . x = Absval ((n -BinarySequence gi) '&' (M . x)) by A29; A31: dom g = dom D by A28, CARD_3:9 .= dom f by A25, CARD_3:9 ; now__::_thesis:_(_dom_(g_|_B)_=_(dom_f)_/\_B_&_(_for_a_being_set_st_a_in_dom_(g_|_B)_holds_ (g_|_B)_._a_=_f_._a_)_) set nbg = n -BinarySequence gi; set nbf = n -BinarySequence fi; thus A32: dom (g | B) = (dom f) /\ B by A31, RELAT_1:61; ::_thesis: for a being set st a in dom (g | B) holds (g | B) . a = f . a let a be set ; ::_thesis: ( a in dom (g | B) implies (g | B) . a = f . a ) assume A33: a in dom (g | B) ; ::_thesis: (g | B) . a = f . a reconsider x = a as Element of X by A32, A33; reconsider Mx = M . x as Tuple of n,BOOLEAN ; set ng = (n -BinarySequence gi) '&' (M . x); set nf = (n -BinarySequence fi) '&' (M . x); A34: dom (M . x) = Seg n by Lm2; A35: dom ((n -BinarySequence fi) '&' (M . x)) = Seg n by Lm1; A36: a in B by A32, A33, XBOOLE_0:def_4; now__::_thesis:_(_dom_((n_-BinarySequence_fi)_'&'_(M_._x))_=_dom_((n_-BinarySequence_gi)_'&'_(M_._x))_&_(_for_i_being_set_st_i_in_dom_((n_-BinarySequence_fi)_'&'_(M_._x))_holds_ ((n_-BinarySequence_fi)_'&'_(M_._x))_._i_=_((n_-BinarySequence_gi)_'&'_(M_._x))_._i_)_) thus dom ((n -BinarySequence fi) '&' (M . x)) = dom ((n -BinarySequence gi) '&' (M . x)) by A35, Lm1; ::_thesis: for i being set st i in dom ((n -BinarySequence fi) '&' (M . x)) holds ((n -BinarySequence fi) '&' (M . x)) . b2 = ((n -BinarySequence gi) '&' (M . x)) . b2 let i be set ; ::_thesis: ( i in dom ((n -BinarySequence fi) '&' (M . x)) implies ((n -BinarySequence fi) '&' (M . x)) . b1 = ((n -BinarySequence gi) '&' (M . x)) . b1 ) assume A37: i in dom ((n -BinarySequence fi) '&' (M . x)) ; ::_thesis: ((n -BinarySequence fi) '&' (M . x)) . b1 = ((n -BinarySequence gi) '&' (M . x)) . b1 percases ( A c= H . i or not A c= H . i ) ; suppose A c= H . i ; ::_thesis: ((n -BinarySequence fi) '&' (M . x)) . b1 = ((n -BinarySequence gi) '&' (M . x)) . b1 then A38: B c= H . i by A2, A21, A23, A35, A37, FUNCT_1:3; A39: Mx /. i = Mx . i by A34, A35, A37, PARTFUN1:def_6 .= 0 by A18, A36, A35, A37, A38 ; thus ((n -BinarySequence fi) '&' (M . x)) . i = ((n -BinarySequence fi) /. i) '&' (Mx /. i) by A35, A37, Def5 .= ((n -BinarySequence gi) /. i) '&' (Mx /. i) by A39 .= ((n -BinarySequence gi) '&' (M . x)) . i by A35, A37, Def5 ; ::_thesis: verum end; supposeA40: not A c= H . i ; ::_thesis: ((n -BinarySequence fi) '&' (M . x)) . b1 = ((n -BinarySequence gi) '&' (M . x)) . b1 thus ((n -BinarySequence fi) '&' (M . x)) . i = ((n -BinarySequence gi) '&' (M . x)) . i ::_thesis: verum proof consider xx being set such that A41: xx in A and A42: not xx in H . i by A40, TARSKI:def_3; reconsider xx = xx as Element of X by A41; A43: f . xx = (g | A) . xx by A24, A41, FUNCT_1:49 .= g . xx by A41, FUNCT_1:49 ; reconsider Mxx = M . xx as Tuple of n,BOOLEAN ; A44: f . xx = Absval ((n -BinarySequence fi) '&' (M . xx)) by A25, A27; A45: g . xx = Absval ((n -BinarySequence gi) '&' (M . xx)) by A28, A30; dom (M . xx) = Seg n by Lm2; then A46: Mxx /. i = Mxx . i by A35, A37, PARTFUN1:def_6 .= 1 by A18, A35, A37, A42 ; then A47: (n -BinarySequence fi) /. i = ((n -BinarySequence fi) /. i) '&' (Mxx /. i) .= ((n -BinarySequence fi) '&' (M . xx)) . i by A35, A37, Def5 .= ((n -BinarySequence gi) '&' (M . xx)) . i by A43, A44, A45, BINARI_3:2 .= ((n -BinarySequence gi) /. i) '&' (Mxx /. i) by A35, A37, Def5 .= (n -BinarySequence gi) /. i by A46 ; thus ((n -BinarySequence fi) '&' (M . x)) . i = ((n -BinarySequence fi) /. i) '&' (Mx /. i) by A35, A37, Def5 .= ((n -BinarySequence gi) '&' (M . x)) . i by A35, A37, A47, Def5 ; ::_thesis: verum end; end; end; end; then (n -BinarySequence fi) '&' (M . x) = (n -BinarySequence gi) '&' (M . x) by FUNCT_1:2; then g . a = Absval ((n -BinarySequence fi) '&' (M . x)) by A28, A30 .= f . a by A25, A27 ; hence (g | B) . a = f . a by A33, FUNCT_1:47; ::_thesis: verum end; hence f | B9 = g | B9 by FUNCT_1:46; ::_thesis: verum end; hence x in Dependency-str DB-Rel(# X,D,R #) by A22; ::_thesis: verum end; assume x in Dependency-str DB-Rel(# X,D,R #) ; ::_thesis: x in F then consider A, B being Subset of the Attributes of DB-Rel(# X,D,R #) such that A48: x = [A,B] and A49: A >|> B, DB-Rel(# X,D,R #) ; now__::_thesis:_for_gg_being_set_st_gg_in_G_&_A_c=_gg_holds_ B_c=_gg deffunc H1( Element of X) -> Element of NAT = Absval ((n -BinarySequence 0) '&' (M . $1)); let gg be set ; ::_thesis: ( gg in G & A c= gg implies B c= gg ) assume that A50: gg in G and A51: A c= gg and A52: not B c= gg ; ::_thesis: contradiction reconsider gg = gg as Element of G by A50; consider f being Function of X,NAT such that A53: for x being Element of X holds f . x = H1(x) from FUNCT_2:sch_4(); A54: now__::_thesis:_for_x_being_set_st_x_in_dom_D_holds_ f_._x_in_D_._x let x be set ; ::_thesis: ( x in dom D implies f . x in D . x ) assume x in dom D ; ::_thesis: f . x in D . x then reconsider x9 = x as Element of X ; f . x = Absval ((n -BinarySequence 0) '&' (M . x9)) by A53; then f . x in NAT ; then f . x9 in INT by NUMBERS:17; hence f . x in D . x by FUNCOP_1:7; ::_thesis: verum end; A55: dom f = dom D by A3, FUNCT_2:def_1; then reconsider f = f as Element of product D by A54, CARD_3:def_5; consider i being Nat such that A56: i in dom H and A57: H . i = gg by A2, A10, FINSEQ_2:10; i <> 0 by A21, A56, FINSEQ_1:1; then consider k being Nat such that A58: i = k + 1 by NAT_1:6; consider bx being set such that A59: bx in B and A60: not bx in gg by A52, TARSKI:def_3; reconsider bx = bx as Element of X by A59; reconsider Mbx = M . bx as Tuple of n,BOOLEAN ; A61: f in R by A53; dom Mbx = Seg n by Lm1; then A62: Mbx /. i = Mbx . i by A21, A56, PARTFUN1:def_6 .= 1 by A21, A18, A60, A56, A57 ; reconsider k = k as Element of NAT by ORDINAL1:def_12; deffunc H2( Element of X) -> Element of NAT = Absval ((n -BinarySequence (2 to_power k)) '&' (M . $1)); consider g being Function of X,NAT such that A63: for x being Element of X holds g . x = H2(x) from FUNCT_2:sch_4(); A64: now__::_thesis:_for_x_being_set_st_x_in_dom_D_holds_ g_._x_in_D_._x let x be set ; ::_thesis: ( x in dom D implies g . x in D . x ) assume x in dom D ; ::_thesis: g . x in D . x then reconsider x9 = x as Element of X ; g . x = Absval ((n -BinarySequence (2 to_power k)) '&' (M . x9)) by A63; then g . x in NAT ; then g . x9 in INT by NUMBERS:17; hence g . x in D . x by FUNCOP_1:7; ::_thesis: verum end; A65: dom g = dom D by A3, FUNCT_2:def_1; then reconsider g = g as Element of product D by A64, CARD_3:def_5; i <= n by A21, A56, FINSEQ_1:1; then A66: k < n by A58, NAT_1:13; now__::_thesis:_(_dom_(f_|_A)_=_(dom_g)_/\_A_&_(_for_x_being_set_st_x_in_dom_(f_|_A)_holds_ (f_|_A)_._x_=_g_._x_)_) thus A67: dom (f | A) = (dom g) /\ A by A55, A65, RELAT_1:61; ::_thesis: for x being set st x in dom (f | A) holds (f | A) . x = g . x let x be set ; ::_thesis: ( x in dom (f | A) implies (f | A) . x = g . x ) assume A68: x in dom (f | A) ; ::_thesis: (f | A) . x = g . x then reconsider a = x as Element of X by A67; set bs0 = n -BinarySequence 0; set bsi = n -BinarySequence (2 to_power k); A69: g . a = Absval ((n -BinarySequence (2 to_power k)) '&' (M . a)) by A63; set L = (n -BinarySequence 0) '&' (M . a); set R = (n -BinarySequence (2 to_power k)) '&' (M . a); reconsider Ma = M . a as Tuple of n,BOOLEAN ; A70: x in A by A68; A71: now__::_thesis:_(_dom_((n_-BinarySequence_0)_'&'_(M_._a))_=_dom_((n_-BinarySequence_(2_to_power_k))_'&'_(M_._a))_&_(_for_j_being_set_st_j_in_dom_((n_-BinarySequence_0)_'&'_(M_._a))_holds_ ((n_-BinarySequence_0)_'&'_(M_._a))_._j_=_((n_-BinarySequence_(2_to_power_k))_'&'_(M_._a))_._j_)_) thus dom ((n -BinarySequence 0) '&' (M . a)) = Seg n by Lm1 .= dom ((n -BinarySequence (2 to_power k)) '&' (M . a)) by Lm1 ; ::_thesis: for j being set st j in dom ((n -BinarySequence 0) '&' (M . a)) holds ((n -BinarySequence 0) '&' (M . a)) . b2 = ((n -BinarySequence (2 to_power k)) '&' (M . a)) . b2 let j be set ; ::_thesis: ( j in dom ((n -BinarySequence 0) '&' (M . a)) implies ((n -BinarySequence 0) '&' (M . a)) . b1 = ((n -BinarySequence (2 to_power k)) '&' (M . a)) . b1 ) A72: n -BinarySequence 0 = 0* n by BINARI_3:25 .= n |-> 0 by EUCLID:def_4 ; assume A73: j in dom ((n -BinarySequence 0) '&' (M . a)) ; ::_thesis: ((n -BinarySequence 0) '&' (M . a)) . b1 = ((n -BinarySequence (2 to_power k)) '&' (M . a)) . b1 then reconsider nj = j as Element of NAT ; A74: j in Seg n by A73, Lm1; dom (n -BinarySequence 0) = Seg n by Lm1; then A75: (n -BinarySequence 0) /. nj = (n -BinarySequence 0) . nj by A74, PARTFUN1:def_6 .= 0 by A72 ; A76: ((n -BinarySequence 0) '&' (M . a)) . j = ((n -BinarySequence 0) /. nj) '&' (Ma /. nj) by A74, Def5 .= 0 by A75 ; percases ( i <> nj or i = nj ) ; supposeA77: i <> nj ; ::_thesis: ((n -BinarySequence 0) '&' (M . a)) . b1 = ((n -BinarySequence (2 to_power k)) '&' (M . a)) . b1 dom (n -BinarySequence (2 to_power k)) = Seg n by Lm1; then A78: (n -BinarySequence (2 to_power k)) /. nj = (n -BinarySequence (2 to_power k)) . nj by A74, PARTFUN1:def_6 .= FALSE by A58, A66, A74, A77, Th7 ; ((n -BinarySequence (2 to_power k)) '&' (M . a)) . j = ((n -BinarySequence (2 to_power k)) /. nj) '&' (Ma /. nj) by A74, Def5; hence ((n -BinarySequence 0) '&' (M . a)) . j = ((n -BinarySequence (2 to_power k)) '&' (M . a)) . j by A76, A78; ::_thesis: verum end; supposeA79: i = nj ; ::_thesis: ((n -BinarySequence 0) '&' (M . a)) . b1 = ((n -BinarySequence (2 to_power k)) '&' (M . a)) . b1 dom Ma = Seg n by Lm1; then A80: Ma /. nj = Ma . i by A74, A79, PARTFUN1:def_6 .= 0 by A18, A51, A57, A70, A74, A79 ; ((n -BinarySequence (2 to_power k)) '&' (M . a)) . j = ((n -BinarySequence (2 to_power k)) /. nj) '&' (Ma /. nj) by A74, Def5 .= 0 by A80 ; hence ((n -BinarySequence 0) '&' (M . a)) . j = ((n -BinarySequence (2 to_power k)) '&' (M . a)) . j by A76; ::_thesis: verum end; end; end; (f | A) . a = f . a by A68, FUNCT_1:49 .= Absval ((n -BinarySequence 0) '&' (M . a)) by A53 ; hence (f | A) . x = g . x by A69, A71, FUNCT_1:2; ::_thesis: verum end; then A81: f | A = g | A by FUNCT_1:46; set bs0 = n -BinarySequence 0; set bsi = n -BinarySequence (2 to_power k); A82: n -BinarySequence 0 = 0* n by BINARI_3:25 .= n |-> 0 by EUCLID:def_4 ; dom (n -BinarySequence 0) = Seg n by Lm1; then A83: (n -BinarySequence 0) /. i = (n -BinarySequence 0) . i by A21, A56, PARTFUN1:def_6 .= 0 by A82 ; dom (n -BinarySequence (2 to_power k)) = Seg n by Lm1; then A84: (n -BinarySequence (2 to_power k)) /. i = (n -BinarySequence (2 to_power k)) . i by A21, A56, PARTFUN1:def_6 .= 1 by A58, A66, Th7 ; A85: ((n -BinarySequence (2 to_power k)) '&' Mbx) . i = ((n -BinarySequence (2 to_power k)) /. i) '&' (Mbx /. i) by A21, A56, Def5 .= (n -BinarySequence (2 to_power k)) /. i by A62 ; A86: ((n -BinarySequence 0) '&' Mbx) . i = ((n -BinarySequence 0) /. i) '&' (Mbx /. i) by A21, A56, Def5 .= (n -BinarySequence 0) /. i by A62 ; g in R by A63; then A87: f | B = g | B by A49, A61, A81, Def7; Absval ((n -BinarySequence 0) '&' (M . bx)) = f . bx by A53 .= (f | B) . bx by A59, FUNCT_1:49 .= g . bx by A59, A87, FUNCT_1:49 .= Absval ((n -BinarySequence (2 to_power k)) '&' (M . bx)) by A63 ; hence contradiction by A83, A86, A85, A84, BINARI_3:2; ::_thesis: verum end; hence x in F by A1, A48; ::_thesis: verum end; hence F = Dependency-str DB-Rel(# X,D,R #) by TARSKI:1; ::_thesis: verum end; end; end; begin Lm3: for X, F, BB being set st 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 } holds for x, y being Subset of X holds ( [x,y] in F iff for c being set st c in BB & x c= c holds y c= c ) proof let X, F, BB be set ; ::_thesis: ( 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 } implies for x, y being Subset of X holds ( [x,y] in F iff for c being set st c in BB & x c= c holds y c= c ) ) assume A1: 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 } ; ::_thesis: for x, y being Subset of X holds ( [x,y] in F iff for c being set st c in BB & x c= c holds y c= c ) let x, y be Subset of X; ::_thesis: ( [x,y] in F iff for c being set st c in BB & x c= c holds y c= c ) hereby ::_thesis: ( ( for c being set st c in BB & x c= c holds y c= c ) implies [x,y] in F ) assume [x,y] in F ; ::_thesis: for c being set st c in BB & x c= c holds y c= c then consider a, b being Subset of X such that A2: [x,y] = [a,b] and A3: for c being set st c in BB & a c= c holds b c= c by A1; A4: y = b by A2, XTUPLE_0:1; x = a by A2, XTUPLE_0:1; hence for c being set st c in BB & x c= c holds y c= c by A3, A4; ::_thesis: verum end; assume for c being set st c in BB & x c= c holds y c= c ; ::_thesis: [x,y] in F hence [x,y] in F by A1; ::_thesis: verum end; definition let X be set ; let F be Dependency-set of X; func candidate-keys F -> Subset-Family of X equals :: ARMSTRNG:def 26 { A where A is Subset of X : [A,X] in Maximal_wrt F } ; coherence { A where A is Subset of X : [A,X] in Maximal_wrt F } is Subset-Family of X proof set B = { A where A is Subset of X : [A,X] in Maximal_wrt F } ; { A where A is Subset of X : [A,X] in Maximal_wrt F } c= bool X proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { A where A is Subset of X : [A,X] in Maximal_wrt F } or x in bool X ) assume x in { A where A is Subset of X : [A,X] in Maximal_wrt F } ; ::_thesis: x in bool X then ex A being Subset of X st ( x = A & [A,X] in Maximal_wrt F ) ; hence x in bool X ; ::_thesis: verum end; hence { A where A is Subset of X : [A,X] in Maximal_wrt F } is Subset-Family of X ; ::_thesis: verum end; end; :: deftheorem defines candidate-keys ARMSTRNG:def_26_:_ for X being set for F being Dependency-set of X holds candidate-keys F = { A where A is Subset of X : [A,X] in Maximal_wrt F } ; theorem :: ARMSTRNG:47 for X being finite set for F being Dependency-set of X for K being Subset of X st F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } holds candidate-keys F = {K} proof let X be finite set ; ::_thesis: for F being Dependency-set of X for K being Subset of X st F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } holds candidate-keys F = {K} let F be Dependency-set of X; ::_thesis: for K being Subset of X st F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } holds candidate-keys F = {K} let K be Subset of X; ::_thesis: ( F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } implies candidate-keys F = {K} ) assume F = { [A,B] where A, B is Subset of X : ( K c= A or B c= A ) } ; ::_thesis: candidate-keys F = {K} then A1: Maximal_wrt F = {[K,X]} \/ { [A,A] where A is Subset of X : not K c= A } by Th30; now__::_thesis:_for_x_being_set_holds_ (_(_x_in_candidate-keys_F_implies_x_in_{K}_)_&_(_x_in_{K}_implies_x_in_candidate-keys_F_)_) let x be set ; ::_thesis: ( ( x in candidate-keys F implies x in {K} ) & ( x in {K} implies x in candidate-keys F ) ) hereby ::_thesis: ( x in {K} implies x in candidate-keys F ) assume x in candidate-keys F ; ::_thesis: x in {K} then consider a being Subset of X such that A2: x = a and A3: [a,X] in Maximal_wrt F ; percases ( [a,X] in {[K,X]} or [a,X] in { [A,A] where A is Subset of X : not K c= A } ) by A1, A3, XBOOLE_0:def_3; suppose [a,X] in {[K,X]} ; ::_thesis: x in {K} then [a,X] = [K,X] by TARSKI:def_1; then a = K by XTUPLE_0:1; hence x in {K} by A2, TARSKI:def_1; ::_thesis: verum end; suppose [a,X] in { [A,A] where A is Subset of X : not K c= A } ; ::_thesis: x in {K} then consider A being Subset of X such that A4: [a,X] = [A,A] and A5: not K c= A ; X = A by A4, XTUPLE_0:1; hence x in {K} by A5; ::_thesis: verum end; end; end; assume x in {K} ; ::_thesis: x in candidate-keys F then A6: x = K by TARSKI:def_1; [K,X] in {[K,X]} by TARSKI:def_1; then [K,X] in Maximal_wrt F by A1, XBOOLE_0:def_3; hence x in candidate-keys F by A6; ::_thesis: verum end; hence candidate-keys F = {K} by TARSKI:1; ::_thesis: verum end; notation let X be set ; antonym (C1) X for empty ; end; definition let X be set ; attrX is without_proper_subsets means :Def27: :: ARMSTRNG:def 27 for x, y being set st x in X & y in X & x c= y holds x = y; end; :: deftheorem Def27 defines without_proper_subsets ARMSTRNG:def_27_:_ for X being set holds ( X is without_proper_subsets iff for x, y being set st x in X & y in X & x c= y holds x = y ); notation let X be set ; synonym (C2) X for without_proper_subsets ; end; theorem :: ARMSTRNG:48 for R being DB-Rel holds ( candidate-keys (Dependency-str R) is (C1) & candidate-keys (Dependency-str R) is (C2) ) proof let D be DB-Rel ; ::_thesis: ( candidate-keys (Dependency-str D) is (C1) & candidate-keys (Dependency-str D) is (C2) ) set F = Dependency-str D; set X = the Attributes of D; A1: Dependency-str D is full_family by Th23; then A2: Maximal_wrt (Dependency-str D) is (M2) by Th28; saturated-subsets (Dependency-str D) is (B1) by A1, Th32; then the Attributes of D in saturated-subsets (Dependency-str D) by Def4; then consider B, A being Subset of the Attributes of D such that A3: the Attributes of D = B and A4: A ^|^ B, Dependency-str D by Th31; [A, the Attributes of D] in Maximal_wrt (Dependency-str D) by A3, A4, Def17; then A in candidate-keys (Dependency-str D) ; hence not candidate-keys (Dependency-str D) is empty ; ::_thesis: candidate-keys (Dependency-str D) is (C2) let k1, k2 be set ; :: according to ARMSTRNG:def_27 ::_thesis: ( k1 in candidate-keys (Dependency-str D) & k2 in candidate-keys (Dependency-str D) & k1 c= k2 implies k1 = k2 ) assume that A5: k1 in candidate-keys (Dependency-str D) and A6: k2 in candidate-keys (Dependency-str D) and A7: k1 c= k2 ; ::_thesis: k1 = k2 consider a2 being Subset of the Attributes of D such that A8: k2 = a2 and A9: [a2, the Attributes of D] in Maximal_wrt (Dependency-str D) by A6; consider a1 being Subset of the Attributes of D such that A10: k1 = a1 and A11: [a1, the Attributes of D] in Maximal_wrt (Dependency-str D) by A5; [a1,([#] the Attributes of D)] >= [a2,([#] the Attributes of D)] by A7, A10, A8, Th13; hence k1 = k2 by A10, A11, A8, A9, A2, Def19; ::_thesis: verum end; theorem :: ARMSTRNG:49 for X being finite set for C being Subset-Family of X st C is (C1) & C is (C2) holds ex F being Full-family of X st C = candidate-keys F proof let X be finite set ; ::_thesis: for C being Subset-Family of X st C is (C1) & C is (C2) holds ex F being Full-family of X st C = candidate-keys F let C be Subset-Family of X; ::_thesis: ( C is (C1) & C is (C2) implies ex F being Full-family of X st C = candidate-keys F ) 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 where b is Subset of X : for K being Subset of X st K in C holds not K c= b } c= bool X proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { b where b is Subset of X : for K being Subset of X st K in C holds not K c= b } or x in bool X ) assume x in { b where b is Subset of X : for K being Subset of X st K in C holds not K c= b } ; ::_thesis: x in bool X 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 x in bool X ; ::_thesis: verum end; then reconsider BB = { b where b is Subset of X : for K being Subset of X st K in C holds not K c= 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 } ; { [a,b] where a, b is Subset of X : for c being set st c in BB & a c= c holds b c= c } = X deps_encl_by BB ; then reconsider 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 } as Full-family of X by Th33; assume A2: C is (C1) ; ::_thesis: ( not C is (C2) or ex F being Full-family of X st C = candidate-keys F ) assume A3: C is (C2) ; ::_thesis: ex F being Full-family of X st C = candidate-keys F A4: now__::_thesis:_for_x_being_set_st_x_in_C_holds_ [x,X]_in_Maximal_wrt_F let x be set ; ::_thesis: ( x in C implies [x,X] in Maximal_wrt F ) assume A5: x in C ; ::_thesis: [x,X] in Maximal_wrt F then reconsider x9 = x as Subset of X ; now__::_thesis:_for_c_being_set_st_c_in_BB_&_x9_c=_c_holds_ X_c=_c let c be set ; ::_thesis: ( c in BB & x9 c= c implies X c= c ) assume that A6: c in BB and A7: x9 c= c ; ::_thesis: 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 A6; hence X c= c by A5, A7; ::_thesis: verum 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, Th13; X c= b by A9, Th13; then A11: b = X by XBOOLE_0:def_10; assume A12: not [x,X] in Maximal_wrt F ; ::_thesis: contradiction now__::_thesis:_for_K_being_Subset_of_X_st_K_in_C_holds_ not_K_c=_a let K be Subset of X; ::_thesis: ( K in C implies not K c= a ) assume A13: K in C ; ::_thesis: not K c= a assume A14: K c= a ; ::_thesis: contradiction then K c= x9 by A10, XBOOLE_1:1; then K = x9 by A3, A5, A13, Def27; hence contradiction by A8, A10, A11, A12, A14, XBOOLE_0:def_10; ::_thesis: verum 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; ::_thesis: verum end; take F ; ::_thesis: C = candidate-keys F now__::_thesis:_for_x_being_set_holds_ (_(_x_in_C_implies_x_in_candidate-keys_F_)_&_(_x_in_candidate-keys_F_implies_x_in_C_)_) let x be set ; ::_thesis: ( ( x in C implies x in candidate-keys F ) & ( x in candidate-keys F implies x in C ) ) hereby ::_thesis: ( x in candidate-keys F implies x in C ) assume A15: x in C ; ::_thesis: x in candidate-keys F then [x,X] in Maximal_wrt F by A4; hence x in candidate-keys F by A15; ::_thesis: verum end; assume x in candidate-keys F ; ::_thesis: x in C 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 ; ::_thesis: contradiction now__::_thesis:_for_K_being_Subset_of_X_holds_ (_not_K_in_C_or_not_K_c=_A_) A19: A ^|^ X,F by A17, Def17; given K being Subset of X such that A20: K in C and A21: K c= A ; ::_thesis: contradiction A22: [K,([#] X)] >= [A,([#] X)] by A21, Th13; [K,X] in Maximal_wrt F by A4, A20; hence contradiction by A16, A18, A20, A19, A22, Th27; ::_thesis: verum end; then A23: A in BB ; for c being set holds ( not c in BB or c = X or not A c= c ) proof let c be set ; ::_thesis: ( not c in BB or c = X or not A c= c ) assume that A24: c in BB and A25: not c = X ; ::_thesis: not A c= c assume A c= c ; ::_thesis: contradiction then X c= c by A1, A17, A24, Lm3; hence contradiction by A24, A25, XBOOLE_0:def_10; ::_thesis: verum 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 for K being set holds not K in C ; hence contradiction by A2, XBOOLE_0:def_1; ::_thesis: verum end; hence C = candidate-keys F by TARSKI:1; ::_thesis: verum end; theorem :: ARMSTRNG:50 for X being 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) proof let X be finite set ; ::_thesis: 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; ::_thesis: 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 ; ::_thesis: ( 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 } ; ::_thesis: C = candidate-keys (X deps_encl_by B) B c= bool X proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in B or x in bool X ) assume x in B ; ::_thesis: x in bool X 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 ) ) by A3; hence x in bool X ; ::_thesis: verum end; then reconsider BB = B as Subset-Family of X ; set F = X deps_encl_by B; A4: [#] X = X ; A5: now__::_thesis:_for_x_being_set_st_x_in_C_holds_ [x,X]_in_Maximal_wrt_(X_deps_encl_by_B) let x be set ; ::_thesis: ( x in C implies [x,X] in Maximal_wrt (X deps_encl_by B) ) assume A6: x in C ; ::_thesis: [x,X] in Maximal_wrt (X deps_encl_by B) then reconsider x9 = x as Subset of X ; now__::_thesis:_for_c_being_set_st_c_in_BB_&_x9_c=_c_holds_ X_c=_c let c be set ; ::_thesis: ( c in BB & x9 c= c implies X c= c ) assume that A7: c in BB and A8: x9 c= c ; ::_thesis: 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; ::_thesis: 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, Th13; X c= b by A10, Th13; then A12: b = X by XBOOLE_0:def_10; assume A13: not [x,X] in Maximal_wrt (X deps_encl_by B) ; ::_thesis: contradiction now__::_thesis:_for_K_being_Subset_of_X_st_K_in_C_holds_ not_K_c=_a let K be Subset of X; ::_thesis: ( K in C implies not K c= a ) assume A14: K in C ; ::_thesis: not K c= a assume A15: K c= a ; ::_thesis: contradiction then K c= x9 by A11, XBOOLE_1:1; then K = x9 by A2, A6, A14, Def27; hence contradiction by A9, A11, A12, A13, A15, XBOOLE_0:def_10; ::_thesis: verum end; then 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; ::_thesis: verum end; now__::_thesis:_for_x_being_set_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 set ; ::_thesis: ( ( 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 ) ) hereby ::_thesis: ( x in candidate-keys (X deps_encl_by B) implies x in C ) assume A16: x in C ; ::_thesis: x in candidate-keys (X deps_encl_by B) then [x,X] in Maximal_wrt (X deps_encl_by B) by A5; hence x in candidate-keys (X deps_encl_by B) by A16; ::_thesis: verum end; assume x in candidate-keys (X deps_encl_by B) ; ::_thesis: x in C then 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 ; ::_thesis: contradiction now__::_thesis:_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, Def17; given K being Subset of X such that A21: K in C and A22: K c= A ; ::_thesis: contradiction A23: [K,([#] X)] >= [A,([#] X)] by A22, Th13; [K,X] in Maximal_wrt (X deps_encl_by B) by A5, A21; hence contradiction by A17, A19, A21, A20, A23, Th27; ::_thesis: 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 ) proof let c be set ; ::_thesis: ( not c in BB or c = X or not A c= c ) assume that A25: c in BB and A26: not c = X ; ::_thesis: not A c= c assume A c= c ; ::_thesis: contradiction then X c= c by A4, A18, A25, Lm3; hence contradiction by A25, A26, XBOOLE_0:def_10; ::_thesis: verum end; 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 set holds not K in C ; hence contradiction by A1, XBOOLE_0:def_1; ::_thesis: verum end; hence C = candidate-keys (X deps_encl_by B) by TARSKI:1; ::_thesis: verum end; theorem :: ARMSTRNG:51 for X being non empty finite set for C being Subset-Family of X st C is (C1) & C is (C2) holds ex R being DB-Rel st ( the Attributes of R = X & C = candidate-keys (Dependency-str R) ) proof let X be non empty finite set ; ::_thesis: for C being Subset-Family of X st C is (C1) & C is (C2) holds ex R being DB-Rel st ( the Attributes of R = X & C = candidate-keys (Dependency-str R) ) let C be Subset-Family of X; ::_thesis: ( C is (C1) & C is (C2) implies ex R being DB-Rel st ( the Attributes of R = X & C = candidate-keys (Dependency-str R) ) ) assume that A1: C is (C1) and A2: C is (C2) ; ::_thesis: ex R being DB-Rel st ( the Attributes of R = X & C = candidate-keys (Dependency-str R) ) reconsider D = X --> (bool X) as non-empty ManySortedSet of X ; set M = { L where L is Subset of X : for K being Subset of X st K in C holds L /\ K <> {} } ; reconsider M0 = { L where L is Subset of X : for K being Subset of X st K in C holds L /\ K <> {} } \/ {0} as non empty set ; set R = { ((X --> 0) +* (L --> L)) where L is Subset of X : L in M0 } ; A3: { ((X --> 0) +* (L --> L)) where L is Subset of X : L in M0 } c= product D proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { ((X --> 0) +* (L --> L)) where L is Subset of X : L in M0 } or x in product D ) A4: dom D = X by PARTFUN1:def_2; assume x in { ((X --> 0) +* (L --> L)) where L is Subset of X : L in M0 } ; ::_thesis: x in product D then consider L being Subset of X such that A5: x = (X --> 0) +* (L --> L) and L in M0 ; set g = (X --> 0) +* (L --> L); A6: dom (L --> L) = L by FUNCOP_1:13; A7: now__::_thesis:_for_x_being_set_st_x_in_dom_D_holds_ ((X_-->_0)_+*_(L_-->_L))_._x_in_D_._x let x be set ; ::_thesis: ( x in dom D implies ((X --> 0) +* (L --> L)) . b1 in D . b1 ) assume A8: x in dom D ; ::_thesis: ((X --> 0) +* (L --> L)) . b1 in D . b1 A9: D . x = bool X by A8, FUNCOP_1:7; percases ( x in L or not x in L ) ; supposeA10: x in L ; ::_thesis: ((X --> 0) +* (L --> L)) . b1 in D . b1 then ((X --> 0) +* (L --> L)) . x = (L --> L) . x by A6, FUNCT_4:13 .= L by A10, FUNCOP_1:7 ; hence ((X --> 0) +* (L --> L)) . x in D . x by A9; ::_thesis: verum end; suppose not x in L ; ::_thesis: ((X --> 0) +* (L --> L)) . b1 in D . b1 then ((X --> 0) +* (L --> L)) . x = (X --> 0) . x by A6, FUNCT_4:11 .= {} X by A8, FUNCOP_1:7 ; hence ((X --> 0) +* (L --> L)) . x in D . x by A9; ::_thesis: verum end; end; end; dom ((X --> 0) +* (L --> L)) = (dom (X --> 0)) \/ L by A6, FUNCT_4:def_1 .= X \/ L by FUNCOP_1:13 .= X by XBOOLE_1:12 ; hence x in product D by A5, A4, A7, CARD_3:def_5; ::_thesis: verum end; 0 in {0} by TARSKI:def_1; then 0 in { L where L is Subset of X : for K being Subset of X st K in C holds L /\ K <> {} } \/ {0} by XBOOLE_0:def_3; then (X --> 0) +* (({} X) --> ({} X)) in { ((X --> 0) +* (L --> L)) where L is Subset of X : L in M0 } ; then reconsider R = { ((X --> 0) +* (L --> L)) where L is Subset of X : L in M0 } as non empty Subset of (product D) by A3; take DB = DB-Rel(# X,D,R #); ::_thesis: ( the Attributes of DB = X & C = candidate-keys (Dependency-str DB) ) thus the Attributes of DB = X ; ::_thesis: C = candidate-keys (Dependency-str DB) set ds = Dependency-str DB; set ck = { A where A is Subset of X : [A,X] in Maximal_wrt (Dependency-str DB) } ; A11: [#] X = X ; A12: now__::_thesis:_for_x_being_set_st_x_in_C_holds_ x_in__{__A_where_A_is_Subset_of_X_:_[A,X]_in_Maximal_wrt_(Dependency-str_DB)__}_ let x be set ; ::_thesis: ( x in C implies x in { A where A is Subset of X : [A,X] in Maximal_wrt (Dependency-str DB) } ) assume A13: x in C ; ::_thesis: x in { A where A is Subset of X : [A,X] in Maximal_wrt (Dependency-str DB) } then reconsider A = x as Subset of X ; reconsider AA = A, XA = X as Subset of the Attributes of DB by A11; now__::_thesis:_for_f,_g_being_Element_of_the_Relationship_of_DB_st_f_|_A_=_g_|_A_holds_ f_|_X_=_g_|_X let f, g be Element of the Relationship of DB; ::_thesis: ( f | A = g | A implies b1 | X = b2 | X ) assume A14: f | A = g | A ; ::_thesis: b1 | X = b2 | X f in R ; then consider Lf being Subset of X such that A15: f = (X --> 0) +* (Lf --> Lf) and A16: Lf in M0 ; A17: ( Lf in { L where L is Subset of X : for K being Subset of X st K in C holds L /\ K <> {} } or Lf in {0} ) by A16, XBOOLE_0:def_3; A18: dom (Lf --> Lf) = Lf by FUNCOP_1:13; g in R ; then consider Lg being Subset of X such that A19: g = (X --> 0) +* (Lg --> Lg) and A20: Lg in M0 ; A21: ( Lg in { L where L is Subset of X : for K being Subset of X st K in C holds L /\ K <> {} } or Lg in {0} ) by A20, XBOOLE_0:def_3; A22: dom (Lg --> Lg) = Lg by FUNCOP_1:13; percases ( ( Lf in { L where L is Subset of X : for K being Subset of X st K in C holds L /\ K <> {} } & Lg in { L where L is Subset of X : for K being Subset of X st K in C holds L /\ K <> {} } ) or ( Lf in { L where L is Subset of X : for K being Subset of X st K in C holds L /\ K <> {} } & Lg = 0 ) or ( Lf = 0 & Lg in { L where L is Subset of X : for K being Subset of X st K in C holds L /\ K <> {} } ) or ( Lf = 0 & Lg = 0 ) ) by A17, A21, TARSKI:def_1; suppose ( Lf in { L where L is Subset of X : for K being Subset of X st K in C holds L /\ K <> {} } & Lg in { L where L is Subset of X : for K being Subset of X st K in C holds L /\ K <> {} } ) ; ::_thesis: b1 | X = b2 | X then ex Lff being Subset of X st ( Lf = Lff & ( for K being Subset of X st K in C holds Lff /\ K <> {} ) ) ; then A23: Lf /\ A <> {} by A13; then consider a being set such that A24: a in Lf /\ A by XBOOLE_0:def_1; A25: ( g . a = 0 or g . a = Lg ) proof percases ( a in Lg or not a in Lg ) ; supposeA26: a in Lg ; ::_thesis: ( g . a = 0 or g . a = Lg ) then g . a = (Lg --> Lg) . a by A19, A22, FUNCT_4:13; hence ( g . a = 0 or g . a = Lg ) by A26, FUNCOP_1:7; ::_thesis: verum end; suppose not a in Lg ; ::_thesis: ( g . a = 0 or g . a = Lg ) then g . a = (X --> 0) . a by A19, A22, FUNCT_4:11; hence ( g . a = 0 or g . a = Lg ) by A24, FUNCOP_1:7; ::_thesis: verum end; end; end; A27: a in Lf by A24, XBOOLE_0:def_4; A28: a in A by A24, XBOOLE_0:def_4; then A29: (g | A) . a = g . a by FUNCT_1:49; (f | A) . a = f . a by A28, FUNCT_1:49 .= (Lf --> Lf) . a by A15, A18, A27, FUNCT_4:13 .= Lf by A27, FUNCOP_1:7 ; hence f | X = g | X by A14, A15, A19, A23, A29, A25; ::_thesis: verum end; supposeA30: ( Lf in { L where L is Subset of X : for K being Subset of X st K in C holds L /\ K <> {} } & Lg = 0 ) ; ::_thesis: b1 | X = b2 | X then ex L being Subset of X st ( Lf = L & ( for K being Subset of X st K in C holds L /\ K <> {} ) ) ; then A31: Lf /\ A <> {} by A13; then consider a being set such that A32: a in Lf /\ A by XBOOLE_0:def_1; A33: a in A by A32, XBOOLE_0:def_4; then A34: (g | A) . a = g . a by FUNCT_1:49 .= ((X --> 0) +* {}) . a by A19, A30 .= (X --> 0) . a .= {} by A32, FUNCOP_1:7 ; A35: a in Lf by A32, XBOOLE_0:def_4; (f | A) . a = f . a by A33, FUNCT_1:49 .= (Lf --> Lf) . a by A15, A18, A35, FUNCT_4:13 .= Lf by A35, FUNCOP_1:7 ; hence f | X = g | X by A14, A31, A34; ::_thesis: verum end; supposeA36: ( Lf = 0 & Lg in { L where L is Subset of X : for K being Subset of X st K in C holds L /\ K <> {} } ) ; ::_thesis: b1 | X = b2 | X then ex L being Subset of X st ( Lg = L & ( for K being Subset of X st K in C holds L /\ K <> {} ) ) ; then A37: Lg /\ A <> {} by A13; then consider a being set such that A38: a in Lg /\ A by XBOOLE_0:def_1; A39: a in A by A38, XBOOLE_0:def_4; then A40: (f | A) . a = f . a by FUNCT_1:49 .= ((X --> 0) +* {}) . a by A15, A36 .= (X --> 0) . a .= {} by A38, FUNCOP_1:7 ; A41: a in Lg by A38, XBOOLE_0:def_4; (g | A) . a = g . a by A39, FUNCT_1:49 .= (Lg --> Lg) . a by A19, A22, A41, FUNCT_4:13 .= Lg by A41, FUNCOP_1:7 ; hence f | X = g | X by A14, A37, A40; ::_thesis: verum end; suppose ( Lf = 0 & Lg = 0 ) ; ::_thesis: b1 | X = b2 | X hence f | X = g | X by A15, A19; ::_thesis: verum end; end; end; then AA >|> XA,DB by Def7; then [A,X] in Dependency-str DB ; then consider a, b being Subset of X such that A42: [a,b] in Maximal_wrt (Dependency-str DB) and A43: [a,b] >= [A,([#] X)] by Th26; A44: a c= A by A43, Th13; [a,b] in Dependency-str DB by A42; then consider aa, XX being Subset of the Attributes of DB such that A45: [a,b] = [aa,XX] and A46: aa >|> XX,DB ; A47: a = aa by A45, XTUPLE_0:1; A48: b = XX by A45, XTUPLE_0:1; A49: X c= b by A43, Th13; then A50: b = X by XBOOLE_0:def_10; now__::_thesis:_not_a_<>_A set r1 = (X --> 0) +* ((a `) --> (a `)); set r0 = X --> 0; assume A51: a <> A ; ::_thesis: contradiction A52: now__::_thesis:_not_a_`_=_{} assume a ` = {} ; ::_thesis: contradiction then a ` c= a by XBOOLE_1:2; then a = X by A11, SUBSET_1:19; hence contradiction by A44, A51, XBOOLE_0:def_10; ::_thesis: verum end; then consider y being set such that A53: y in a ` by XBOOLE_0:def_1; now__::_thesis:_for_K_being_Subset_of_X_st_K_in_C_holds_ not_(a_`)_/\_K_=_{} let K be Subset of X; ::_thesis: ( K in C implies not (a `) /\ K = {} ) assume A54: K in C ; ::_thesis: not (a `) /\ K = {} assume (a `) /\ K = {} ; ::_thesis: contradiction then K misses a ` by XBOOLE_0:def_7; then A55: K c= a by SUBSET_1:24; then K c= A by A44, XBOOLE_1:1; then K = A by A2, A13, A54, Def27; hence contradiction by A44, A51, A55, XBOOLE_0:def_10; ::_thesis: verum end; then a ` in { L where L is Subset of X : for K being Subset of X st K in C holds L /\ K <> {} } ; then a ` in M0 by XBOOLE_0:def_3; then A56: (X --> 0) +* ((a `) --> (a `)) in R ; 0 in {0} by TARSKI:def_1; then 0 in M0 by XBOOLE_0:def_3; then (X --> 0) +* (({} X) --> ({} X)) in R ; then (X --> 0) +* {} in R ; then reconsider r0 = X --> 0, r1 = (X --> 0) +* ((a `) --> (a `)) as Element of the Relationship of DB by A56; A57: (r0 | X) . y = r0 . y by A53, FUNCT_1:49 .= 0 by A53, FUNCOP_1:7 ; A58: dom ((a `) --> (a `)) = a ` by FUNCOP_1:13; now__::_thesis:_(_dom_(r0_|_a)_=_(dom_r1)_/\_a_&_(_for_x_being_set_st_x_in_dom_(r0_|_a)_holds_ (r0_|_a)_._x_=_r1_._x_)_) A59: dom r1 = (dom (X --> 0)) \/ (dom ((a `) --> (a `))) by FUNCT_4:def_1 .= X \/ (dom ((a `) --> (a `))) by FUNCOP_1:13 .= X \/ (a `) by FUNCOP_1:13 .= X by XBOOLE_1:12 ; dom r0 = X by FUNCOP_1:13; hence dom (r0 | a) = (dom r1) /\ a by A59, RELAT_1:61; ::_thesis: for x being set st x in dom (r0 | a) holds (r0 | a) . x = r1 . x let x be set ; ::_thesis: ( x in dom (r0 | a) implies (r0 | a) . x = r1 . x ) assume A60: x in dom (r0 | a) ; ::_thesis: (r0 | a) . x = r1 . x dom (r0 | a) = (dom r0) /\ a by RELAT_1:61; then A61: x in a by A60, XBOOLE_0:def_4; a misses a ` by XBOOLE_1:79; then a /\ (a `) = {} by XBOOLE_0:def_7; then A62: not x in a ` by A61, XBOOLE_0:def_4; thus (r0 | a) . x = (X --> 0) . x by A61, FUNCT_1:49 .= r1 . x by A58, A62, FUNCT_4:11 ; ::_thesis: verum end; then A63: r0 | a = r1 | a by FUNCT_1:46; (r1 | X) . y = r1 . y by A53, FUNCT_1:49 .= ((a `) --> (a `)) . y by A58, A53, FUNCT_4:13 .= a ` by A53, FUNCOP_1:7 ; hence contradiction by A50, A46, A47, A48, A63, A52, A57, Def7; ::_thesis: verum end; then [A,X] in Maximal_wrt (Dependency-str DB) by A42, A49, XBOOLE_0:def_10; hence x in { A where A is Subset of X : [A,X] in Maximal_wrt (Dependency-str DB) } ; ::_thesis: verum end; now__::_thesis:_for_x_being_set_holds_ (_(_x_in_C_implies_x_in__{__A_where_A_is_Subset_of_X_:_[A,X]_in_Maximal_wrt_(Dependency-str_DB)__}__)_&_(_x_in__{__A_where_A_is_Subset_of_X_:_[A,X]_in_Maximal_wrt_(Dependency-str_DB)__}__implies_x_in_C_)_) let x be set ; ::_thesis: ( ( x in C implies x in { A where A is Subset of X : [A,X] in Maximal_wrt (Dependency-str DB) } ) & ( x in { A where A is Subset of X : [A,X] in Maximal_wrt (Dependency-str DB) } implies x in C ) ) thus ( x in C implies x in { A where A is Subset of X : [A,X] in Maximal_wrt (Dependency-str DB) } ) by A12; ::_thesis: ( x in { A where A is Subset of X : [A,X] in Maximal_wrt (Dependency-str DB) } implies x in C ) assume x in { A where A is Subset of X : [A,X] in Maximal_wrt (Dependency-str DB) } ; ::_thesis: x in C then consider A being Subset of X such that A64: x = A and A65: [A,X] in Maximal_wrt (Dependency-str DB) ; [A,X] in Dependency-str DB by A65; then consider aa, XX being Subset of the Attributes of DB such that A66: [A,X] = [aa,XX] and A67: aa >|> XX,DB ; A68: X = XX by A66, XTUPLE_0:1; A69: now__::_thesis:_for_K_being_set_st_K_in_C_&_K_c=_A_holds_ not_K_<>_A A70: A ^|^ [#] X, Dependency-str DB by A65, Def17; let K be set ; ::_thesis: ( K in C & K c= A implies not K <> A ) assume that A71: K in C and A72: K c= A ; ::_thesis: not K <> A K in { A where A is Subset of X : [A,X] in Maximal_wrt (Dependency-str DB) } by A12, A71; then consider B being Subset of X such that A73: K = B and A74: [B,X] in Maximal_wrt (Dependency-str DB) ; assume A75: K <> A ; ::_thesis: contradiction reconsider AA = A, B = B, XA = X as Subset of the Attributes of DB by A11; [AA,XA] <= [B,XA] by A72, A73, Th13; hence contradiction by A73, A74, A75, A70, Th27; ::_thesis: verum end; set m = { a where a is Element of X : ( not a in A & ex K being set st ( K in C & a in K ) ) } ; A76: now__::_thesis:_for_x_being_set_st_x_in__{__a_where_a_is_Element_of_X_:_(_not_a_in_A_&_ex_K_being_set_st_ (_K_in_C_&_a_in_K_)_)__}__holds_ x_in_X let x be set ; ::_thesis: ( x in { a where a is Element of X : ( not a in A & ex K being set st ( K in C & a in K ) ) } implies x in X ) assume x in { a where a is Element of X : ( not a in A & ex K being set st ( K in C & a in K ) ) } ; ::_thesis: x in X then ex a being Element of X st ( x = a & not a in A & ex K being set st ( K in C & a in K ) ) ; hence x in X ; ::_thesis: verum end; consider K being set such that A77: K in C by A1, XBOOLE_0:def_1; reconsider K = K as Subset of X by A77; A78: A = aa by A66, XTUPLE_0:1; assume A79: not x in C ; ::_thesis: contradiction then not K c= A by A64, A69, A77; then consider k being set such that A80: k in K and A81: not k in A by TARSKI:def_3; reconsider k = k as Element of X by A80; A82: k in { a where a is Element of X : ( not a in A & ex K being set st ( K in C & a in K ) ) } by A77, A80, A81; then consider n being set such that A83: n in { a where a is Element of X : ( not a in A & ex K being set st ( K in C & a in K ) ) } ; reconsider m = { a where a is Element of X : ( not a in A & ex K being set st ( K in C & a in K ) ) } as Subset of X by A76, TARSKI:def_3; set r0 = X --> 0; set r1 = (X --> 0) +* (m --> m); now__::_thesis:_for_K_being_Subset_of_X_st_K_in_C_holds_ m_/\_K_<>_{} let K be Subset of X; ::_thesis: ( K in C implies m /\ K <> {} ) assume A84: K in C ; ::_thesis: m /\ K <> {} not K c= A by A64, A69, A79, A84; then consider k being set such that A85: k in K and A86: not k in A by TARSKI:def_3; k in m by A84, A85, A86; hence m /\ K <> {} by A85, XBOOLE_0:def_4; ::_thesis: verum end; then m in { L where L is Subset of X : for K being Subset of X st K in C holds L /\ K <> {} } ; then m in M0 by XBOOLE_0:def_3; then A87: (X --> 0) +* (m --> m) in R ; 0 in {0} by TARSKI:def_1; then 0 in M0 by XBOOLE_0:def_3; then (X --> 0) +* (({} X) --> ({} X)) in R ; then (X --> 0) +* {} in R ; then reconsider r0 = X --> 0, r1 = (X --> 0) +* (m --> m) as Element of the Relationship of DB by A87; A88: dom (m --> m) = m by FUNCOP_1:13; now__::_thesis:_(_dom_(r0_|_A)_=_(dom_r1)_/\_A_&_(_for_x_being_set_st_x_in_dom_(r0_|_A)_holds_ (r0_|_A)_._x_=_r1_._x_)_) A89: dom r1 = (dom (X --> 0)) \/ (dom (m --> m)) by FUNCT_4:def_1 .= X \/ (dom (m --> m)) by FUNCOP_1:13 .= X \/ m by FUNCOP_1:13 .= X by XBOOLE_1:12 ; dom r0 = X by FUNCOP_1:13; hence dom (r0 | A) = (dom r1) /\ A by A89, RELAT_1:61; ::_thesis: for x being set st x in dom (r0 | A) holds (r0 | A) . x = r1 . x A90: dom (r0 | A) = (dom r0) /\ A by RELAT_1:61; let x be set ; ::_thesis: ( x in dom (r0 | A) implies (r0 | A) . x = r1 . x ) assume A91: x in dom (r0 | A) ; ::_thesis: (r0 | A) . x = r1 . x A92: now__::_thesis:_not_x_in_m assume x in m ; ::_thesis: contradiction then ex a being Element of X st ( x = a & not a in A & ex K being set st ( K in C & a in K ) ) ; hence contradiction by A90, A91, XBOOLE_0:def_4; ::_thesis: verum end; x in A by A90, A91, XBOOLE_0:def_4; hence (r0 | A) . x = (X --> 0) . x by FUNCT_1:49 .= r1 . x by A88, A92, FUNCT_4:11 ; ::_thesis: verum end; then A93: r0 | A = r1 | A by FUNCT_1:46; A94: (r1 | X) . n = r1 . n by A83, FUNCT_1:49 .= (m --> m) . n by A83, A88, FUNCT_4:13 .= m by A83, FUNCOP_1:7 ; A95: m c= X ; then (r0 | X) . n = r0 . n by A83, FUNCT_1:49 .= 0 by A83, A95, FUNCOP_1:7 ; hence contradiction by A82, A93, A67, A78, A68, A94, Def7; ::_thesis: verum end; hence C = candidate-keys (Dependency-str DB) by TARSKI:1; ::_thesis: verum end; begin definition let X be set ; let F be Dependency-set of X; attrF is (DC4) means :Def28: :: ARMSTRNG:def 28 for A, B, C being Subset of X st [A,B] in F & [A,C] in F holds [A,(B \/ C)] in F; attrF is (DC5) means :Def29: :: ARMSTRNG:def 29 for A, B, C, D being Subset of X st [A,B] in F & [(B \/ C),D] in F holds [(A \/ C),D] in F; attrF is (DC6) means :Def30: :: ARMSTRNG:def 30 for A, B, C being Subset of X st [A,B] in F holds [(A \/ C),B] in F; end; :: deftheorem Def28 defines (DC4) ARMSTRNG:def_28_:_ for X being set for F being Dependency-set of X holds ( F is (DC4) iff for A, B, C being Subset of X st [A,B] in F & [A,C] in F holds [A,(B \/ C)] in F ); :: deftheorem Def29 defines (DC5) ARMSTRNG:def_29_:_ for X being set for F being Dependency-set of X holds ( F is (DC5) iff for A, B, C, D being Subset of X st [A,B] in F & [(B \/ C),D] in F holds [(A \/ C),D] in F ); :: deftheorem Def30 defines (DC6) ARMSTRNG:def_30_:_ for X being set for F being Dependency-set of X holds ( F is (DC6) iff for A, B, C being Subset of X st [A,B] in F holds [(A \/ C),B] in F ); theorem :: ARMSTRNG:52 for X being set for F being Dependency-set of X holds ( F is (F1) & F is (F2) & F is (F3) & F is (F4) iff ( F is (F2) & F is (DC3) & F is (F4) ) ) ; theorem :: ARMSTRNG:53 for X being set for F being Dependency-set of X holds ( F is (F1) & F is (F2) & F is (F3) & F is (F4) iff ( F is (DC1) & F is (DC3) & F is (DC4) ) ) proof let X be set ; ::_thesis: for F being Dependency-set of X holds ( F is (F1) & F is (F2) & F is (F3) & F is (F4) iff ( F is (DC1) & F is (DC3) & F is (DC4) ) ) let F be Dependency-set of X; ::_thesis: ( F is (F1) & F is (F2) & F is (F3) & F is (F4) iff ( F is (DC1) & F is (DC3) & F is (DC4) ) ) hereby ::_thesis: ( F is (DC1) & F is (DC3) & F is (DC4) implies ( F is (F1) & F is (F2) & F is (F3) & F is (F4) ) ) assume that A1: F is (F1) and A2: F is (F2) and A3: F is (F3) and A4: F is (F4) ; ::_thesis: ( F is (DC1) & F is (DC3) & F is (DC4) ) thus F is (DC1) by A2; ::_thesis: ( F is (DC3) & F is (DC4) ) thus F is (DC3) by A1, A3; ::_thesis: F is (DC4) thus F is (DC4) ::_thesis: verum proof let A, B, C be Subset of X; :: according to ARMSTRNG:def_28 ::_thesis: ( [A,B] in F & [A,C] in F implies [A,(B \/ C)] in F ) assume that A5: [A,B] in F and A6: [A,C] in F ; ::_thesis: [A,(B \/ C)] in F [(A \/ A),(B \/ C)] in F by A4, A5, A6, Def13; hence [A,(B \/ C)] in F ; ::_thesis: verum end; end; assume that A7: F is (DC1) and A8: F is (DC3) and A9: F is (DC4) ; ::_thesis: ( F is (F1) & F is (F2) & F is (F3) & F is (F4) ) thus F is (F1) by A7, A8; ::_thesis: ( F is (F2) & F is (F3) & F is (F4) ) thus F is (F2) by A7; ::_thesis: ( F is (F3) & F is (F4) ) thus F is (F3) by A7, A8; ::_thesis: F is (F4) let A, B, A9, B9 be Subset of X; :: according to ARMSTRNG:def_13 ::_thesis: ( [A,B] in F & [A9,B9] in F implies [(A \/ A9),(B \/ B9)] in F ) assume that A10: [A,B] in F and A11: [A9,B9] in F ; ::_thesis: [(A \/ A9),(B \/ B9)] in F A9 c= A \/ A9 by XBOOLE_1:7; then [(A \/ A9),A9] in F by A8, Def15; then A12: [(A \/ A9),B9] in F by A7, A11, Th18; A c= A \/ A9 by XBOOLE_1:7; then [(A \/ A9),A] in F by A8, Def15; then [(A \/ A9),B] in F by A7, A10, Th18; hence [(A \/ A9),(B \/ B9)] in F by A9, A12, Def28; ::_thesis: verum end; theorem :: ARMSTRNG:54 for X being set for F being Dependency-set of X holds ( F is (F1) & F is (F2) & F is (F3) & F is (F4) iff ( F is (DC2) & F is (DC5) & F is (DC6) ) ) proof let X be set ; ::_thesis: for F being Dependency-set of X holds ( F is (F1) & F is (F2) & F is (F3) & F is (F4) iff ( F is (DC2) & F is (DC5) & F is (DC6) ) ) let F be Dependency-set of X; ::_thesis: ( F is (F1) & F is (F2) & F is (F3) & F is (F4) iff ( F is (DC2) & F is (DC5) & F is (DC6) ) ) hereby ::_thesis: ( F is (DC2) & F is (DC5) & F is (DC6) implies ( F is (F1) & F is (F2) & F is (F3) & F is (F4) ) ) assume that A1: F is (F1) and A2: F is (F2) and A3: F is (F3) and A4: F is (F4) ; ::_thesis: ( F is (DC2) & F is (DC5) & F is (DC6) ) thus F is (DC2) by A1; ::_thesis: ( F is (DC5) & F is (DC6) ) thus F is (DC5) ::_thesis: F is (DC6) proof let A, B, C, D be Subset of X; :: according to ARMSTRNG:def_29 ::_thesis: ( [A,B] in F & [(B \/ C),D] in F implies [(A \/ C),D] in F ) assume that A5: [A,B] in F and A6: [(B \/ C),D] in F ; ::_thesis: [(A \/ C),D] in F [C,C] in F by A1, Def11; then [(A \/ C),(B \/ C)] in F by A4, A5, Def13; hence [(A \/ C),D] in F by A2, A6, Th18; ::_thesis: verum end; thus F is (DC6) ::_thesis: verum proof let A, B, C be Subset of X; :: according to ARMSTRNG:def_30 ::_thesis: ( [A,B] in F implies [(A \/ C),B] in F ) assume A7: [A,B] in F ; ::_thesis: [(A \/ C),B] in F A c= A \/ C by XBOOLE_1:7; then [(A \/ C),A] in F by A1, A3, Def15; hence [(A \/ C),B] in F by A2, A7, Th18; ::_thesis: verum end; end; assume that A8: F is (DC2) and A9: F is (DC5) and A10: F is (DC6) ; ::_thesis: ( F is (F1) & F is (F2) & F is (F3) & F is (F4) ) thus F is (F1) by A8; ::_thesis: ( F is (F2) & F is (F3) & F is (F4) ) A11: now__::_thesis:_for_A,_B,_C_being_Subset_of_X_st_[A,B]_in_F_&_[B,C]_in_F_holds_ [A,C]_in_F let A, B, C be Subset of X; ::_thesis: ( [A,B] in F & [B,C] in F implies [A,C] in F ) assume that A12: [A,B] in F and A13: [B,C] in F ; ::_thesis: [A,C] in F [(B \/ A),C] in F by A10, A13, Def30; then [(A \/ A),C] in F by A9, A12, Def29; hence [A,C] in F ; ::_thesis: verum end; hence F is (F2) by Th18; ::_thesis: ( F is (F3) & F is (F4) ) thus F is (F3) ::_thesis: F is (F4) proof let A, B, A9, B9 be Subset of X; :: according to ARMSTRNG:def_12 ::_thesis: ( [A,B] in F & [A,B] >= [A9,B9] implies [A9,B9] in F ) assume that A14: [A,B] in F and A15: [A,B] >= [A9,B9] ; ::_thesis: [A9,B9] in F A c= A9 by A15, Th13; then A9 = A \/ (A9 \ A) by XBOOLE_1:45; then A16: [A9,B] in F by A10, A14, Def30; B9 c= B by A15, Th13; then A17: B = B9 \/ (B \ B9) by XBOOLE_1:45; [B9,B9] in F by A8, Def11; then [B,B9] in F by A10, A17, Def30; hence [A9,B9] in F by A11, A16; ::_thesis: verum end; let A, B, A9, B9 be Subset of X; :: according to ARMSTRNG:def_13 ::_thesis: ( [A,B] in F & [A9,B9] in F implies [(A \/ A9),(B \/ B9)] in F ) assume that A18: [A,B] in F and A19: [A9,B9] in F ; ::_thesis: [(A \/ A9),(B \/ B9)] in F [(B \/ B9),(B \/ B9)] in F by A8, Def11; then [(A \/ B9),(B \/ B9)] in F by A9, A18, Def29; hence [(A \/ A9),(B \/ B9)] in F by A9, A19, Def29; ::_thesis: verum end; definition let X be set ; let F be Dependency-set of X; func charact_set F -> set equals :: ARMSTRNG:def 31 { A where A is Subset of X : ex a, b being Subset of X st ( [a,b] in F & a c= A & not b c= A ) } ; correctness coherence { A where A is Subset of X : ex a, b being Subset of X st ( [a,b] in F & a c= A & not b c= A ) } is set ; ; end; :: deftheorem defines charact_set ARMSTRNG:def_31_:_ for X being set for F being Dependency-set of X holds charact_set F = { A where A is Subset of X : ex a, b being Subset of X st ( [a,b] in F & a c= A & not b c= A ) } ; theorem Th55: :: ARMSTRNG:55 for X, A being set for F being Dependency-set of X st A in charact_set F holds ( A is Subset of X & ex a, b being Subset of X st ( [a,b] in F & a c= A & not b c= A ) ) proof let X, A be set ; ::_thesis: for F being Dependency-set of X st A in charact_set F holds ( A is Subset of X & ex a, b being Subset of X st ( [a,b] in F & a c= A & not b c= A ) ) let F be Dependency-set of X; ::_thesis: ( A in charact_set F implies ( A is Subset of X & ex a, b being Subset of X st ( [a,b] in F & a c= A & not b c= A ) ) ) assume A in charact_set F ; ::_thesis: ( A is Subset of X & ex a, b being Subset of X st ( [a,b] in F & a c= A & not b c= A ) ) then ex Y being Subset of X st ( A = Y & ex a, b being Subset of X st ( [a,b] in F & a c= Y & not b c= Y ) ) ; hence ( A is Subset of X & ex a, b being Subset of X st ( [a,b] in F & a c= A & not b c= A ) ) ; ::_thesis: verum end; theorem :: ARMSTRNG:56 for X being set for A being Subset of X for F being Dependency-set of X st ex a, b being Subset of X st ( [a,b] in F & a c= A & not b c= A ) holds A in charact_set F ; theorem Th57: :: ARMSTRNG:57 for X being non empty finite set for 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 non empty finite set ; ::_thesis: for F being Dependency-set of A holds ( ( for A, B being Subset of A holds ( [A,B] in Dependency-closure F iff for a being Subset of A st A c= a & not B c= a holds a in charact_set F ) ) & saturated-subsets (Dependency-closure F) = (bool A) \ (charact_set F) ) let F be Dependency-set of A; ::_thesis: ( ( for A, B being Subset of A holds ( [A,B] in Dependency-closure F iff for a being Subset of A st A c= a & not B c= a holds a in charact_set F ) ) & saturated-subsets (Dependency-closure F) = (bool A) \ (charact_set F) ) 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__::_thesis:_for_c_being_set_holds_ (_(_c_in_(bool_A)_\_(charact_set_F)_implies_c_in__{__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__}__)_&_(_c_in__{__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__}__implies_c_in_(bool_A)_\_(charact_set_F)_)_) let c be set ; ::_thesis: ( ( c in (bool A) \ (charact_set F) implies c in { 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 } ) & ( c in { 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 } implies c in (bool A) \ (charact_set F) ) ) hereby ::_thesis: ( c in { 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 } implies c in (bool A) \ (charact_set F) ) assume A1: c in (bool A) \ (charact_set F) ; ::_thesis: c in { 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 } 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= c holds y c= c by A1; hence c in { 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 } by A1; ::_thesis: verum end; assume c in { 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 } ; ::_thesis: c in (bool A) \ (charact_set F) 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 (bool A) \ (charact_set F) by A2, XBOOLE_0:def_5; ::_thesis: verum end; then A4: (bool A) \ (charact_set F) = { 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 } by TARSKI:1; reconsider B = (bool A) \ (charact_set F) as Subset-Family of A ; A5: { 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 } = 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: { [a,b] where a, b is Subset of A : for c being set st c in B & a c= c holds b c= c } = A deps_encl_by B ; then reconsider 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 } as Dependency-set of A ; F c= Dependency-closure F by Def24; then A8: FF c= Dependency-closure F by A4, A5, A7, Th37; A9: FF is full_family by A7, Th33; F c= FF by A4, A5, A7, Th37; then A10: Dependency-closure F c= FF by A9, Def24; hereby ::_thesis: saturated-subsets (Dependency-closure F) = (bool A) \ (charact_set F) let X, Y be Subset of A; ::_thesis: ( ( [X,Y] in Dependency-closure F implies for a being Subset of A st X c= a & not Y c= a holds a in charact_set F ) & ( ( for a being Subset of A st X c= a & not Y c= a holds a in charact_set F ) implies [X,Y] in Dependency-closure F ) ) hereby ::_thesis: ( ( for a being Subset of A st X c= a & not Y c= a holds a in charact_set F ) implies [X,Y] in Dependency-closure F ) assume [X,Y] in Dependency-closure F ; ::_thesis: for a being Subset of A st X c= a & not Y c= a holds a in charact_set F 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; ::_thesis: ( X c= a & not Y c= a implies a in charact_set F ) assume that A14: X c= a and A15: not Y c= a ; ::_thesis: a in charact_set F assume not a in charact_set F ; ::_thesis: contradiction 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; ::_thesis: verum end; assume A17: for a being Subset of A st X c= a & not Y c= a holds a in charact_set F ; ::_thesis: [X,Y] in Dependency-closure F now__::_thesis:_for_c_being_set_st_c_in_B_&_X_c=_c_holds_ Y_c=_c let c be set ; ::_thesis: ( c in B & X c= c implies Y c= c ) assume that A18: c in B and A19: X c= c and A20: not Y c= c ; ::_thesis: contradiction reconsider c = 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; ::_thesis: verum end; then [X,Y] in FF ; hence [X,Y] in Dependency-closure F by A8; ::_thesis: verum end; for x, y being 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) by Def4; Dependency-closure F = FF by A10, A8, XBOOLE_0:def_10; hence saturated-subsets (Dependency-closure F) = (bool A) \ (charact_set F) by A21, A6, A7, Th35; ::_thesis: verum end; theorem :: ARMSTRNG:58 for X being non empty finite set for F, G being Dependency-set of X st charact_set F = charact_set G holds Dependency-closure F = Dependency-closure G proof let A be non empty finite set ; ::_thesis: for F, G being Dependency-set of A st charact_set F = charact_set G holds Dependency-closure F = Dependency-closure G let F, G be Dependency-set of A; ::_thesis: ( charact_set F = charact_set G implies Dependency-closure F = Dependency-closure G ) assume A1: charact_set F = charact_set G ; ::_thesis: Dependency-closure F = Dependency-closure G set DCF = Dependency-closure F; set DCG = Dependency-closure G; now__::_thesis:_for_x_being_set_holds_ (_(_x_in_Dependency-closure_F_implies_x_in_Dependency-closure_G_)_&_(_x_in_Dependency-closure_G_implies_x_in_Dependency-closure_F_)_) let x be set ; ::_thesis: ( ( x in Dependency-closure F implies x in Dependency-closure G ) & ( x in Dependency-closure G implies x in Dependency-closure F ) ) hereby ::_thesis: ( x in Dependency-closure G implies x in Dependency-closure F ) assume A2: x in Dependency-closure F ; ::_thesis: x in Dependency-closure G then consider a, b being Subset of A such that A3: x = [a,b] by Th9; for c being Subset of A st a c= c & not b c= c holds c in charact_set G by A1, A2, A3, Th57; hence x in Dependency-closure G by A3, Th57; ::_thesis: verum end; assume A4: x in Dependency-closure G ; ::_thesis: x in Dependency-closure F then consider a, b being Subset of A such that A5: x = [a,b] by Th9; for c being Subset of A st a c= c & not b c= c holds c in charact_set F by A1, A4, A5, Th57; hence x in Dependency-closure F by A5, Th57; ::_thesis: verum end; hence Dependency-closure F = Dependency-closure G by TARSKI:1; ::_thesis: verum end; theorem Th59: :: ARMSTRNG:59 for X being non empty finite set for F being Dependency-set of X holds charact_set F = charact_set (Dependency-closure F) proof let X be non empty finite set ; ::_thesis: for F being Dependency-set of X holds charact_set F = charact_set (Dependency-closure F) let F be Dependency-set of X; ::_thesis: charact_set F = charact_set (Dependency-closure F) set dcF = Dependency-closure F; now__::_thesis:_for_A_being_set_holds_ (_(_A_in_charact_set_F_implies_A_in_charact_set_(Dependency-closure_F)_)_&_(_A_in_charact_set_(Dependency-closure_F)_implies_A_in_charact_set_F_)_) set B = { c where c is Subset of X : for x, y being Subset of X st [x,y] in F & x c= c holds y c= c } ; let A be set ; ::_thesis: ( ( A in charact_set F implies A in charact_set (Dependency-closure F) ) & ( A in charact_set (Dependency-closure F) implies A in charact_set F ) ) hereby ::_thesis: ( A in charact_set (Dependency-closure F) implies A in charact_set F ) A1: F c= Dependency-closure F by Def24; assume A2: A in charact_set F ; ::_thesis: A in charact_set (Dependency-closure F) then A3: A is Subset of X by Th55; ex x, y being Subset of X st ( [x,y] in F & x c= A & not y c= A ) by A2, Th55; hence A in charact_set (Dependency-closure F) by A1, A3; ::_thesis: verum end; assume A4: A in charact_set (Dependency-closure F) ; ::_thesis: A in charact_set F then consider x, y being Subset of X such that A5: [x,y] in Dependency-closure F and A6: x c= A and A7: not y c= A by Th55; A8: A is Subset of X by A4, Th55; assume not A in charact_set F ; ::_thesis: contradiction then for x, y being Subset of X st [x,y] in F & x c= A holds y c= A by A8; then A9: A in { c where c is Subset of X : for x, y being Subset of X st [x,y] in F & x c= c holds y c= c } by A8; { c where c is Subset of X : for x, y being Subset of X st [x,y] in F & x c= c holds y c= c } = enclosure_of F ; then Dependency-closure F = X deps_encl_by { c where c is Subset of X : for x, y being Subset of X st [x,y] in F & x c= c holds y c= c } by Th38; then consider a, b being Subset of X such that A10: [x,y] = [a,b] and A11: for c being set st c in { c where c is Subset of X : for x, y being Subset of X st [x,y] in F & x c= c holds y c= c } & a c= c holds b c= c by A5; A12: y = b by A10, XTUPLE_0:1; x = a by A10, XTUPLE_0:1; hence contradiction by A6, A7, A11, A12, A9; ::_thesis: verum end; hence charact_set F = charact_set (Dependency-closure F) by TARSKI:1; ::_thesis: verum end; definition let A, K be set ; let F be Dependency-set of A; predK is_p_i_w_ncv_of F means :Def32: :: ARMSTRNG:def 32 ( ( for a being Subset of A st K c= a & a <> A holds a in charact_set F ) & ( for k being set st k c< K holds ex a being Subset of A st ( k c= a & a <> A & not a in charact_set F ) ) ); end; :: deftheorem Def32 defines is_p_i_w_ncv_of ARMSTRNG:def_32_:_ for A, K being set for F being Dependency-set of A holds ( K is_p_i_w_ncv_of F iff ( ( for a being Subset of A st K c= a & a <> A holds a in charact_set F ) & ( for k being set st k c< K holds ex a being Subset of A st ( k c= a & a <> A & not a in charact_set F ) ) ) ); theorem :: ARMSTRNG:60 for X being non empty finite set for F being Dependency-set of X for K being Subset of X holds ( K in candidate-keys (Dependency-closure F) iff K is_p_i_w_ncv_of F ) proof let X be non empty finite set ; ::_thesis: for F being Dependency-set of X for K being Subset of X holds ( K in candidate-keys (Dependency-closure F) iff K is_p_i_w_ncv_of F ) let F be Dependency-set of X; ::_thesis: for K being Subset of X holds ( K in candidate-keys (Dependency-closure F) iff K is_p_i_w_ncv_of F ) let K be Subset of X; ::_thesis: ( K in candidate-keys (Dependency-closure F) iff K is_p_i_w_ncv_of F ) set dcF = Dependency-closure F; set S = { P where P is Subset of X : [K,P] in Dependency-closure F } ; { P where P is Subset of X : [K,P] in Dependency-closure F } c= bool X proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { P where P is Subset of X : [K,P] in Dependency-closure F } or x in bool X ) assume x in { P where P is Subset of X : [K,P] in Dependency-closure F } ; ::_thesis: x in bool X then ex P being Subset of X st ( x = P & [K,P] in Dependency-closure F ) ; hence x in bool X ; ::_thesis: verum end; then reconsider S = { P where P is Subset of X : [K,P] in Dependency-closure F } as Subset-Family of X ; set ck = candidate-keys (Dependency-closure F); set B = { c where c is Subset of X : for x, y being Subset of X st [x,y] in F & x c= c holds y c= c } ; [K,K] in Dependency-closure F by Def11; then K in S ; then consider m being set such that A1: m in S and A2: for B being set st B in S & m c= B holds B = m by FINSET_1:6; { c where c is Subset of X : for x, y being Subset of X st [x,y] in F & x c= c holds y c= c } = enclosure_of F ; then A3: Dependency-closure F = X deps_encl_by { c where c is Subset of X : for x, y being Subset of X st [x,y] in F & x c= c holds y c= c } by Th38; hereby ::_thesis: ( K is_p_i_w_ncv_of F implies K in candidate-keys (Dependency-closure F) ) assume K in candidate-keys (Dependency-closure F) ; ::_thesis: K is_p_i_w_ncv_of F then consider A being Subset of X such that A4: K = A and A5: [A,X] in Maximal_wrt (Dependency-closure F) ; A6: A ^|^ X, Dependency-closure F by A5, Def17; [A,([#] X)] in Dependency-closure F by A5; then consider a, b being Subset of X such that A7: [A,X] = [a,b] and A8: for c being set st c in { c where c is Subset of X : for x, y being Subset of X st [x,y] in F & x c= c holds y c= c } & a c= c holds b c= c by A3; A9: X = b by A7, XTUPLE_0:1; A10: A = a by A7, XTUPLE_0:1; thus K is_p_i_w_ncv_of F ::_thesis: verum proof hereby :: according to ARMSTRNG:def_32 ::_thesis: for k being set st k c< K holds ex a being Subset of X st ( k c= a & a <> X & not a in charact_set F ) let z be Subset of X; ::_thesis: ( K c= z & z <> X implies z in charact_set F ) assume that A11: K c= z and A12: z <> X and A13: not z in charact_set F ; ::_thesis: contradiction for x, y being Subset of X st [x,y] in F & x c= z holds y c= z by A13; then z in { c where c is Subset of X : for x, y being Subset of X st [x,y] in F & x c= c holds y c= c } ; then X c= z by A4, A8, A10, A9, A11; hence contradiction by A12, XBOOLE_0:def_10; ::_thesis: verum end; let k be set ; ::_thesis: ( k c< K implies ex a being Subset of X st ( k c= a & a <> X & not a in charact_set F ) ) assume A14: k c< K ; ::_thesis: ex a being Subset of X st ( k c= a & a <> X & not a in charact_set F ) then k c= A by A4, XBOOLE_0:def_8; then reconsider k = k as Subset of X by XBOOLE_1:1; set S = { P where P is Subset of X : [k,P] in Dependency-closure F } ; { P where P is Subset of X : [k,P] in Dependency-closure F } c= bool X proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { P where P is Subset of X : [k,P] in Dependency-closure F } or x in bool X ) assume x in { P where P is Subset of X : [k,P] in Dependency-closure F } ; ::_thesis: x in bool X then ex P being Subset of X st ( x = P & [k,P] in Dependency-closure F ) ; hence x in bool X ; ::_thesis: verum end; then reconsider S = { P where P is Subset of X : [k,P] in Dependency-closure F } as Subset-Family of X ; [k,k] in Dependency-closure F by Def11; then k in S ; then consider m being set such that A15: m in S and A16: for B being set st B in S & m c= B holds B = m by FINSET_1:6; consider P being Subset of X such that A17: m = P and A18: [k,P] in Dependency-closure F by A15; [k,k] in Dependency-closure F by Def11; then A19: [(k \/ k),(k \/ P)] in Dependency-closure F by A18, Def13; assume A20: for a being Subset of X holds ( not k c= a or not a <> X or a in charact_set F ) ; ::_thesis: contradiction A21: [k,([#] X)] in Dependency-closure F proof percases ( k \/ P = X or k \/ P <> X ) ; suppose k \/ P = X ; ::_thesis: [k,([#] X)] in Dependency-closure F hence [k,([#] X)] in Dependency-closure F by A19; ::_thesis: verum end; suppose k \/ P <> X ; ::_thesis: [k,([#] X)] in Dependency-closure F then k \/ P in charact_set F by A20, XBOOLE_1:7; then k \/ P in charact_set (Dependency-closure F) by Th59; then consider x, y being Subset of X such that A22: [x,y] in Dependency-closure F and A23: x c= k \/ P and A24: not y c= k \/ P by Th55; [(k \/ P),(k \/ P)] in Dependency-closure F by Def11; then [(x \/ (k \/ P)),(y \/ (k \/ P))] in Dependency-closure F by A22, Def13; then [(k \/ P),(y \/ (k \/ P))] in Dependency-closure F by A23, XBOOLE_1:12; then [k,(y \/ (k \/ P))] in Dependency-closure F by A19, Th18; then A25: y \/ (k \/ P) in S ; P c= k \/ P by XBOOLE_1:7; then P = y \/ (k \/ P) by A16, A17, A25, XBOOLE_1:10; hence [k,([#] X)] in Dependency-closure F by A24, XBOOLE_1:7, XBOOLE_1:10; ::_thesis: verum end; end; end; k c= K by A14, XBOOLE_0:def_8; then [K,([#] X)] <= [k,([#] X)] by Th13; hence contradiction by A4, A6, A14, A21, Th27; ::_thesis: verum end; end; consider P being Subset of X such that A26: m = P and A27: [K,P] in Dependency-closure F by A1; [K,K] in Dependency-closure F by Def11; then A28: [(K \/ K),(K \/ P)] in Dependency-closure F by A27, Def13; assume A29: K is_p_i_w_ncv_of F ; ::_thesis: K in candidate-keys (Dependency-closure F) A30: K c= K \/ P by XBOOLE_1:7; A31: [K,([#] X)] in Dependency-closure F proof percases ( K \/ P = X or K \/ P <> X ) ; suppose K \/ P = X ; ::_thesis: [K,([#] X)] in Dependency-closure F hence [K,([#] X)] in Dependency-closure F by A28; ::_thesis: verum end; suppose K \/ P <> X ; ::_thesis: [K,([#] X)] in Dependency-closure F then K \/ P in charact_set F by A29, A30, Def32; then K \/ P in charact_set (Dependency-closure F) by Th59; then consider x, y being Subset of X such that A32: [x,y] in Dependency-closure F and A33: x c= K \/ P and A34: not y c= K \/ P by Th55; [(K \/ P),(K \/ P)] in Dependency-closure F by Def11; then [(x \/ (K \/ P)),(y \/ (K \/ P))] in Dependency-closure F by A32, Def13; then [(K \/ P),(y \/ (K \/ P))] in Dependency-closure F by A33, XBOOLE_1:12; then [K,(y \/ (K \/ P))] in Dependency-closure F by A28, Th18; then A35: y \/ (K \/ P) in S ; P c= K \/ P by XBOOLE_1:7; then P = y \/ (K \/ P) by A2, A26, A35, XBOOLE_1:10; hence [K,([#] X)] in Dependency-closure F by A34, XBOOLE_1:7, XBOOLE_1:10; ::_thesis: verum end; end; end; now__::_thesis:_for_x9,_y9_being_Subset_of_X_st_[x9,y9]_in_Dependency-closure_F_&_(_K_<>_x9_or_X_<>_y9_)_holds_ not_[K,([#]_X)]_<=_[x9,y9] let x9, y9 be Subset of X; ::_thesis: ( [x9,y9] in Dependency-closure F & ( K <> x9 or X <> y9 ) implies not [K,([#] X)] <= [x9,y9] ) assume that A36: [x9,y9] in Dependency-closure F and A37: ( K <> x9 or X <> y9 ) and A38: [K,([#] X)] <= [x9,y9] ; ::_thesis: contradiction A39: X c= y9 by A38, Th13; x9 c= K by A38, Th13; then x9 c< K by A37, A39, XBOOLE_0:def_8, XBOOLE_0:def_10; then consider a being Subset of X such that A40: x9 c= a and A41: a <> X and A42: not a in charact_set F by A29, Def32; X = y9 by A39, XBOOLE_0:def_10; then A43: not y9 c= a by A41, XBOOLE_0:def_10; not a in charact_set (Dependency-closure F) by A42, Th59; hence contradiction by A36, A40, A43; ::_thesis: verum end; then K ^|^ X, Dependency-closure F by A31, Th27; then [K,X] in Maximal_wrt (Dependency-closure F) by Def17; hence K in candidate-keys (Dependency-closure F) ; ::_thesis: verum end;