:: CARD_FIN semantic presentation begin theorem Th1: :: CARD_FIN:1 for X, Y being finite set st X c= Y & card X = card Y holds X = Y proof let X, Y be finite set ; ::_thesis: ( X c= Y & card X = card Y implies X = Y ) assume that A1: X c= Y and A2: card X = card Y ; ::_thesis: X = Y card (Y \ X) = (card Y) - (card X) by A1, CARD_2:44; then Y \ X = {} by A2; then Y c= X by XBOOLE_1:37; hence X = Y by A1, XBOOLE_0:def_10; ::_thesis: verum end; theorem Th2: :: CARD_FIN:2 for X, Y being finite set for x, y being set st ( Y = {} implies X = {} ) & not x in X holds card (Funcs (X,Y)) = card { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } proof defpred S1[ set , set , set ] means 1 = 1; let X, Y be finite set ; ::_thesis: for x, y being set st ( Y = {} implies X = {} ) & not x in X holds card (Funcs (X,Y)) = card { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } let x, y be set ; ::_thesis: ( ( Y = {} implies X = {} ) & not x in X implies card (Funcs (X,Y)) = card { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } ) assume A1: ( Y = {} implies X = {} ) ; ::_thesis: ( x in X or card (Funcs (X,Y)) = card { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } ) set F2 = { f where f is Function of (X \/ {x}),(Y \/ {y}) : ( S1[f,X \/ {x},Y \/ {y}] & rng (f | X) c= Y & f . x = y ) } ; A2: for f being Function of (X \/ {x}),(Y \/ {y}) st f . x = y holds ( S1[f,X \/ {x},Y \/ {y}] iff S1[f | X,X,Y] ) ; set F1 = { f where f is Function of X,Y : S1[f,X,Y] } ; assume A3: not x in X ; ::_thesis: card (Funcs (X,Y)) = card { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } set F3 = { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } ; A4: Funcs (X,Y) c= { f where f is Function of X,Y : S1[f,X,Y] } proof let F be set ; :: according to TARSKI:def_3 ::_thesis: ( not F in Funcs (X,Y) or F in { f where f is Function of X,Y : S1[f,X,Y] } ) assume F in Funcs (X,Y) ; ::_thesis: F in { f where f is Function of X,Y : S1[f,X,Y] } then F is Function of X,Y by FUNCT_2:66; hence F in { f where f is Function of X,Y : S1[f,X,Y] } ; ::_thesis: verum end; A5: { f where f is Function of (X \/ {x}),(Y \/ {y}) : ( S1[f,X \/ {x},Y \/ {y}] & rng (f | X) c= Y & f . x = y ) } c= { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } proof let F be set ; :: according to TARSKI:def_3 ::_thesis: ( not F in { f where f is Function of (X \/ {x}),(Y \/ {y}) : ( S1[f,X \/ {x},Y \/ {y}] & rng (f | X) c= Y & f . x = y ) } or F in { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } ) assume F in { f where f is Function of (X \/ {x}),(Y \/ {y}) : ( S1[f,X \/ {x},Y \/ {y}] & rng (f | X) c= Y & f . x = y ) } ; ::_thesis: F in { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } then ex f being Function of (X \/ {x}),(Y \/ {y}) st ( f = F & S1[f,X \/ {x},Y \/ {y}] & rng (f | X) c= Y & f . x = y ) ; hence F in { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } ; ::_thesis: verum end; A6: ( Y is empty implies X is empty ) by A1; A7: card { f where f is Function of X,Y : S1[f,X,Y] } = card { f where f is Function of (X \/ {x}),(Y \/ {y}) : ( S1[f,X \/ {x},Y \/ {y}] & rng (f | X) c= Y & f . x = y ) } from STIRL2_1:sch_4(A6, A3, A2); A8: { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } c= { f where f is Function of (X \/ {x}),(Y \/ {y}) : ( S1[f,X \/ {x},Y \/ {y}] & rng (f | X) c= Y & f . x = y ) } proof let F be set ; :: according to TARSKI:def_3 ::_thesis: ( not F in { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } or F in { f where f is Function of (X \/ {x}),(Y \/ {y}) : ( S1[f,X \/ {x},Y \/ {y}] & rng (f | X) c= Y & f . x = y ) } ) assume F in { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } ; ::_thesis: F in { f where f is Function of (X \/ {x}),(Y \/ {y}) : ( S1[f,X \/ {x},Y \/ {y}] & rng (f | X) c= Y & f . x = y ) } then ex f being Function of (X \/ {x}),(Y \/ {y}) st ( f = F & rng (f | X) c= Y & f . x = y ) ; hence F in { f where f is Function of (X \/ {x}),(Y \/ {y}) : ( S1[f,X \/ {x},Y \/ {y}] & rng (f | X) c= Y & f . x = y ) } ; ::_thesis: verum end; { f where f is Function of X,Y : S1[f,X,Y] } c= Funcs (X,Y) proof let F be set ; :: according to TARSKI:def_3 ::_thesis: ( not F in { f where f is Function of X,Y : S1[f,X,Y] } or F in Funcs (X,Y) ) assume F in { f where f is Function of X,Y : S1[f,X,Y] } ; ::_thesis: F in Funcs (X,Y) then ex f being Function of X,Y st ( f = F & S1[f,X,Y] ) ; hence F in Funcs (X,Y) by A1, FUNCT_2:8; ::_thesis: verum end; then Funcs (X,Y) = { f where f is Function of X,Y : S1[f,X,Y] } by A4, XBOOLE_0:def_10; hence card (Funcs (X,Y)) = card { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } by A5, A8, A7, XBOOLE_0:def_10; ::_thesis: verum end; theorem Th3: :: CARD_FIN:3 for X, Y being finite set for x, y being set st not x in X & y in Y holds card (Funcs (X,Y)) = card { F where F is Function of (X \/ {x}),Y : F . x = y } proof let X, Y be finite set ; ::_thesis: for x, y being set st not x in X & y in Y holds card (Funcs (X,Y)) = card { F where F is Function of (X \/ {x}),Y : F . x = y } let x, y be set ; ::_thesis: ( not x in X & y in Y implies card (Funcs (X,Y)) = card { F where F is Function of (X \/ {x}),Y : F . x = y } ) assume that A1: not x in X and A2: y in Y ; ::_thesis: card (Funcs (X,Y)) = card { F where F is Function of (X \/ {x}),Y : F . x = y } set F2 = { F where F is Function of (X \/ {x}),Y : F . x = y } ; set F1 = { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } ; {y} c= Y by A2, ZFMISC_1:31; then A3: Y = Y \/ {y} by XBOOLE_1:12; A4: { F where F is Function of (X \/ {x}),Y : F . x = y } c= { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } proof let f be set ; :: according to TARSKI:def_3 ::_thesis: ( not f in { F where F is Function of (X \/ {x}),Y : F . x = y } or f in { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } ) assume f in { F where F is Function of (X \/ {x}),Y : F . x = y } ; ::_thesis: f in { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } then consider F being Function of (X \/ {x}),Y such that A5: ( f = F & F . x = y ) ; rng (F | X) c= Y ; hence f in { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } by A3, A5; ::_thesis: verum end; { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } c= { F where F is Function of (X \/ {x}),Y : F . x = y } proof let f be set ; :: according to TARSKI:def_3 ::_thesis: ( not f in { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } or f in { F where F is Function of (X \/ {x}),Y : F . x = y } ) assume f in { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } ; ::_thesis: f in { F where F is Function of (X \/ {x}),Y : F . x = y } then ex F being Function of (X \/ {x}),(Y \/ {y}) st ( f = F & rng (F | X) c= Y & F . x = y ) ; hence f in { F where F is Function of (X \/ {x}),Y : F . x = y } by A3; ::_thesis: verum end; then { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( rng (F | X) c= Y & F . x = y ) } = { F where F is Function of (X \/ {x}),Y : F . x = y } by A4, XBOOLE_0:def_10; hence card (Funcs (X,Y)) = card { F where F is Function of (X \/ {x}),Y : F . x = y } by A1, A2, Th2; ::_thesis: verum end; theorem Th4: :: CARD_FIN:4 for Y, X being finite set st ( Y = {} implies X = {} ) holds card (Funcs (X,Y)) = (card Y) |^ (card X) proof let Y, X be finite set ; ::_thesis: ( ( Y = {} implies X = {} ) implies card (Funcs (X,Y)) = (card Y) |^ (card X) ) assume A1: ( Y = {} implies X = {} ) ; ::_thesis: card (Funcs (X,Y)) = (card Y) |^ (card X) percases ( Y is empty or not Y is empty ) ; supposeA2: Y is empty ; ::_thesis: card (Funcs (X,Y)) = (card Y) |^ (card X) then card (Funcs (X,Y)) = 1 by A1, ALTCAT_1:2, CARD_1:30; hence card (Funcs (X,Y)) = (card Y) |^ (card X) by A1, A2, CARD_1:27, NEWTON:4; ::_thesis: verum end; supposeA3: not Y is empty ; ::_thesis: card (Funcs (X,Y)) = (card Y) |^ (card X) defpred S1[ Nat] means for X, Y being finite set st not Y is empty & card X = $1 holds card (Funcs (X,Y)) = (card Y) |^ (card X); A4: for n being Nat st S1[n] holds S1[n + 1] proof defpred S2[ set ] means 1 = 1; let n be Nat; ::_thesis: ( S1[n] implies S1[n + 1] ) assume A5: S1[n] ; ::_thesis: S1[n + 1] let X, Y be finite set ; ::_thesis: ( not Y is empty & card X = n + 1 implies card (Funcs (X,Y)) = (card Y) |^ (card X) ) assume that A6: not Y is empty and A7: card X = n + 1 ; ::_thesis: card (Funcs (X,Y)) = (card Y) |^ (card X) reconsider nn = n as Element of NAT by ORDINAL1:def_12; reconsider cY = (card Y) |^ nn as Element of NAT ; card Y,Y are_equipotent by CARD_1:def_2; then consider f being Function such that A8: f is one-to-one and A9: dom f = card Y and A10: rng f = Y by WELLORD2:def_4; reconsider f = f as Function of (card Y),Y by A9, A10, FUNCT_2:1; consider x being set such that A11: x in X by A7, CARD_1:27, XBOOLE_0:def_1; A12: ( f is onto & f is one-to-one ) by A8, A10, FUNCT_2:def_3; consider F being XFinSequence of such that A13: dom F = card Y and A14: card { g where g is Function of X,Y : S2[g] } = Sum F and A15: for k being Nat st k in dom F holds F . k = card { g where g is Function of X,Y : ( S2[g] & g . x = f . k ) } from STIRL2_1:sch_6(A12, A6, A11); A16: for k being Nat st k in dom F holds F . k = cY proof set Xx = X \ {x}; let k be Nat; ::_thesis: ( k in dom F implies F . k = cY ) assume A17: k in dom F ; ::_thesis: F . k = cY A18: f . k in rng f by A9, A13, A17, FUNCT_1:def_3; set F3 = { g where g is Function of X,Y : ( S2[g] & g . x = f . k ) } ; set F2 = { g where g is Function of ((X \ {x}) \/ {x}),Y : g . x = f . k } ; A19: { g where g is Function of X,Y : ( S2[g] & g . x = f . k ) } c= { g where g is Function of ((X \ {x}) \/ {x}),Y : g . x = f . k } proof let G be set ; :: according to TARSKI:def_3 ::_thesis: ( not G in { g where g is Function of X,Y : ( S2[g] & g . x = f . k ) } or G in { g where g is Function of ((X \ {x}) \/ {x}),Y : g . x = f . k } ) assume G in { g where g is Function of X,Y : ( S2[g] & g . x = f . k ) } ; ::_thesis: G in { g where g is Function of ((X \ {x}) \/ {x}),Y : g . x = f . k } then A20: ex g being Function of X,Y st ( g = G & S2[g] & g . x = f . k ) ; (X \ {x}) \/ {x} = X by A11, ZFMISC_1:116; hence G in { g where g is Function of ((X \ {x}) \/ {x}),Y : g . x = f . k } by A20; ::_thesis: verum end; { g where g is Function of ((X \ {x}) \/ {x}),Y : g . x = f . k } c= { g where g is Function of X,Y : ( S2[g] & g . x = f . k ) } proof let G be set ; :: according to TARSKI:def_3 ::_thesis: ( not G in { g where g is Function of ((X \ {x}) \/ {x}),Y : g . x = f . k } or G in { g where g is Function of X,Y : ( S2[g] & g . x = f . k ) } ) assume G in { g where g is Function of ((X \ {x}) \/ {x}),Y : g . x = f . k } ; ::_thesis: G in { g where g is Function of X,Y : ( S2[g] & g . x = f . k ) } then A21: ex g being Function of ((X \ {x}) \/ {x}),Y st ( g = G & g . x = f . k ) ; (X \ {x}) \/ {x} = X by A11, ZFMISC_1:116; hence G in { g where g is Function of X,Y : ( S2[g] & g . x = f . k ) } by A21; ::_thesis: verum end; then A22: { g where g is Function of ((X \ {x}) \/ {x}),Y : g . x = f . k } = { g where g is Function of X,Y : ( S2[g] & g . x = f . k ) } by A19, XBOOLE_0:def_10; card (X \ {x}) = n by A7, A11, STIRL2_1:55; then A23: card (Funcs ((X \ {x}),Y)) = cY by A5, A18; x in {x} by TARSKI:def_1; then not x in X \ {x} by XBOOLE_0:def_5; then card (Funcs ((X \ {x}),Y)) = card { g where g is Function of ((X \ {x}) \/ {x}),Y : g . x = f . k } by A18, Th3; hence F . k = cY by A15, A17, A22, A23; ::_thesis: verum end; then for k being Nat st k in dom F holds F . k >= cY ; then A24: Sum F >= (len F) * ((card Y) |^ n) by AFINSQ_2:60; set F1 = { g where g is Function of X,Y : S2[g] } ; A25: Funcs (X,Y) c= { g where g is Function of X,Y : S2[g] } proof let G be set ; :: according to TARSKI:def_3 ::_thesis: ( not G in Funcs (X,Y) or G in { g where g is Function of X,Y : S2[g] } ) assume G in Funcs (X,Y) ; ::_thesis: G in { g where g is Function of X,Y : S2[g] } then G is Function of X,Y by FUNCT_2:66; hence G in { g where g is Function of X,Y : S2[g] } ; ::_thesis: verum end; { g where g is Function of X,Y : S2[g] } c= Funcs (X,Y) proof let G be set ; :: according to TARSKI:def_3 ::_thesis: ( not G in { g where g is Function of X,Y : S2[g] } or G in Funcs (X,Y) ) assume G in { g where g is Function of X,Y : S2[g] } ; ::_thesis: G in Funcs (X,Y) then ex g being Function of X,Y st ( g = G & S2[g] ) ; hence G in Funcs (X,Y) by A6, FUNCT_2:8; ::_thesis: verum end; then A26: Funcs (X,Y) = { g where g is Function of X,Y : S2[g] } by A25, XBOOLE_0:def_10; for k being Nat st k in dom F holds F . k <= cY by A16; then Sum F <= (len F) * ((card Y) |^ n) by AFINSQ_2:59; then Sum F = (card Y) * ((card Y) |^ n) by A13, A24, XXREAL_0:1; hence card (Funcs (X,Y)) = (card Y) |^ (card X) by A7, A14, A26, NEWTON:6; ::_thesis: verum end; A27: S1[ 0 ] proof let X, Y be finite set ; ::_thesis: ( not Y is empty & card X = 0 implies card (Funcs (X,Y)) = (card Y) |^ (card X) ) assume that not Y is empty and A28: card X = 0 ; ::_thesis: card (Funcs (X,Y)) = (card Y) |^ (card X) X is empty by A28; then Funcs (X,Y) = {{}} by FUNCT_5:57; then card (Funcs (X,Y)) = 1 by CARD_1:30; hence card (Funcs (X,Y)) = (card Y) |^ (card X) by A28, NEWTON:4; ::_thesis: verum end; for n being Nat holds S1[n] from NAT_1:sch_2(A27, A4); hence card (Funcs (X,Y)) = (card Y) |^ (card X) by A3; ::_thesis: verum end; end; end; theorem Th5: :: CARD_FIN:5 for X, Y being finite set for x, y being set st ( Y is empty implies X is empty ) & not x in X & not y in Y holds card { F where F is Function of X,Y : F is one-to-one } = card { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( F is one-to-one & F . x = y ) } proof let X, Y be finite set ; ::_thesis: for x, y being set st ( Y is empty implies X is empty ) & not x in X & not y in Y holds card { F where F is Function of X,Y : F is one-to-one } = card { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( F is one-to-one & F . x = y ) } let x, y be set ; ::_thesis: ( ( Y is empty implies X is empty ) & not x in X & not y in Y implies card { F where F is Function of X,Y : F is one-to-one } = card { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( F is one-to-one & F . x = y ) } ) assume that A1: ( Y is empty implies X is empty ) and A2: not x in X and A3: not y in Y ; ::_thesis: card { F where F is Function of X,Y : F is one-to-one } = card { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( F is one-to-one & F . x = y ) } defpred S1[ Function, set , set ] means ( $1 is one-to-one & rng ($1 | X) c= Y ); A4: for f being Function of (X \/ {x}),(Y \/ {y}) st f . x = y holds ( S1[f,X \/ {x},Y \/ {y}] iff S1[f | X,X,Y] ) proof let f be Function of (X \/ {x}),(Y \/ {y}); ::_thesis: ( f . x = y implies ( S1[f,X \/ {x},Y \/ {y}] iff S1[f | X,X,Y] ) ) assume A5: f . x = y ; ::_thesis: ( S1[f,X \/ {x},Y \/ {y}] iff S1[f | X,X,Y] ) thus ( S1[f,X \/ {x},Y \/ {y}] implies S1[f | X,X,Y] ) by FUNCT_1:52; ::_thesis: ( S1[f | X,X,Y] implies S1[f,X \/ {x},Y \/ {y}] ) thus ( S1[f | X,X,Y] implies S1[f,X \/ {x},Y \/ {y}] ) ::_thesis: verum proof ( (X \/ {x}) /\ X = X & dom f = X \/ {x} ) by FUNCT_2:def_1, XBOOLE_1:21; then A6: dom (f | X) = X by RELAT_1:61; assume that A7: f | X is one-to-one and A8: rng ((f | X) | X) c= Y ; ::_thesis: S1[f,X \/ {x},Y \/ {y}] rng (f | X) c= Y by A8; then f | X is Function of X,Y by A6, FUNCT_2:2; hence S1[f,X \/ {x},Y \/ {y}] by A1, A3, A5, A7, A8, STIRL2_1:58; ::_thesis: verum end; end; set F3 = { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( F is one-to-one & F . x = y ) } ; A9: { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( F is one-to-one & F . x = y ) } c= { f where f is Function of (X \/ {x}),(Y \/ {y}) : ( S1[f,X \/ {x},Y \/ {y}] & rng (f | X) c= Y & f . x = y ) } proof let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( F is one-to-one & F . x = y ) } or z in { f where f is Function of (X \/ {x}),(Y \/ {y}) : ( S1[f,X \/ {x},Y \/ {y}] & rng (f | X) c= Y & f . x = y ) } ) assume z in { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( F is one-to-one & F . x = y ) } ; ::_thesis: z in { f where f is Function of (X \/ {x}),(Y \/ {y}) : ( S1[f,X \/ {x},Y \/ {y}] & rng (f | X) c= Y & f . x = y ) } then consider F being Function of (X \/ {x}),(Y \/ {y}) such that A10: z = F and A11: ( F is one-to-one & F . x = y ) ; rng (F | X) c= Y proof A12: dom F = X \/ {x} by FUNCT_2:def_1; x in {x} by TARSKI:def_1; then A13: x in dom F by A12, XBOOLE_0:def_3; assume not rng (F | X) c= Y ; ::_thesis: contradiction then consider fz being set such that A14: fz in rng (F | X) and A15: not fz in Y by TARSKI:def_3; consider z being set such that A16: z in dom (F | X) and A17: fz = (F | X) . z by A14, FUNCT_1:def_3; A18: z in dom F by A16, RELAT_1:57; A19: ( fz in Y or fz in {y} ) by A14, XBOOLE_0:def_3; A20: z in X by A16; F . z = (F | X) . z by A16, FUNCT_1:47; then y = F . z by A15, A17, A19, TARSKI:def_1; hence contradiction by A2, A11, A13, A20, A18, FUNCT_1:def_4; ::_thesis: verum end; hence z in { f where f is Function of (X \/ {x}),(Y \/ {y}) : ( S1[f,X \/ {x},Y \/ {y}] & rng (f | X) c= Y & f . x = y ) } by A10, A11; ::_thesis: verum end; A21: { f where f is Function of (X \/ {x}),(Y \/ {y}) : ( S1[f,X \/ {x},Y \/ {y}] & rng (f | X) c= Y & f . x = y ) } c= { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( F is one-to-one & F . x = y ) } proof let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in { f where f is Function of (X \/ {x}),(Y \/ {y}) : ( S1[f,X \/ {x},Y \/ {y}] & rng (f | X) c= Y & f . x = y ) } or z in { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( F is one-to-one & F . x = y ) } ) assume z in { f where f is Function of (X \/ {x}),(Y \/ {y}) : ( S1[f,X \/ {x},Y \/ {y}] & rng (f | X) c= Y & f . x = y ) } ; ::_thesis: z in { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( F is one-to-one & F . x = y ) } then ex f being Function of (X \/ {x}),(Y \/ {y}) st ( z = f & S1[f,X \/ {x},Y \/ {y}] & rng (f | X) c= Y & f . x = y ) ; hence z in { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( F is one-to-one & F . x = y ) } ; ::_thesis: verum end; set F2 = { f where f is Function of X,Y : ( f is one-to-one & rng (f | X) c= Y ) } ; set F1 = { F where F is Function of X,Y : F is one-to-one } ; A22: { F where F is Function of X,Y : F is one-to-one } c= { f where f is Function of X,Y : ( f is one-to-one & rng (f | X) c= Y ) } proof let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in { F where F is Function of X,Y : F is one-to-one } or z in { f where f is Function of X,Y : ( f is one-to-one & rng (f | X) c= Y ) } ) assume z in { F where F is Function of X,Y : F is one-to-one } ; ::_thesis: z in { f where f is Function of X,Y : ( f is one-to-one & rng (f | X) c= Y ) } then consider F being Function of X,Y such that A23: ( z = F & F is one-to-one ) ; rng (F | X) c= rng F ; hence z in { f where f is Function of X,Y : ( f is one-to-one & rng (f | X) c= Y ) } by A23; ::_thesis: verum end; A24: not x in X by A2; A25: card { f where f is Function of X,Y : S1[f,X,Y] } = card { f where f is Function of (X \/ {x}),(Y \/ {y}) : ( S1[f,X \/ {x},Y \/ {y}] & rng (f | X) c= Y & f . x = y ) } from STIRL2_1:sch_4(A1, A24, A4); { f where f is Function of X,Y : ( f is one-to-one & rng (f | X) c= Y ) } c= { F where F is Function of X,Y : F is one-to-one } proof let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in { f where f is Function of X,Y : ( f is one-to-one & rng (f | X) c= Y ) } or z in { F where F is Function of X,Y : F is one-to-one } ) assume z in { f where f is Function of X,Y : ( f is one-to-one & rng (f | X) c= Y ) } ; ::_thesis: z in { F where F is Function of X,Y : F is one-to-one } then ex f being Function of X,Y st ( z = f & f is one-to-one & rng (f | X) c= Y ) ; hence z in { F where F is Function of X,Y : F is one-to-one } ; ::_thesis: verum end; then { f where f is Function of X,Y : ( f is one-to-one & rng (f | X) c= Y ) } = { F where F is Function of X,Y : F is one-to-one } by A22, XBOOLE_0:def_10; hence card { F where F is Function of X,Y : F is one-to-one } = card { F where F is Function of (X \/ {x}),(Y \/ {y}) : ( F is one-to-one & F . x = y ) } by A9, A21, A25, XBOOLE_0:def_10; ::_thesis: verum end; theorem :: CARD_FIN:6 for n, k being Nat holds (n !) / ((n -' k) !) is Element of NAT proof let n, k be Nat; ::_thesis: (n !) / ((n -' k) !) is Element of NAT ( n in NAT & k in NAT ) by ORDINAL1:def_12; then (n !) / ((n -' k) !) is integer by IRRAT_1:36, NAT_D:35; hence (n !) / ((n -' k) !) is Element of NAT by INT_1:3; ::_thesis: verum end; theorem Th7: :: CARD_FIN:7 for X, Y being finite set st card X <= card Y holds card { F where F is Function of X,Y : F is one-to-one } = ((card Y) !) / (((card Y) -' (card X)) !) proof let X, Y be finite set ; ::_thesis: ( card X <= card Y implies card { F where F is Function of X,Y : F is one-to-one } = ((card Y) !) / (((card Y) -' (card X)) !) ) defpred S1[ Nat] means for X, Y being finite set st card Y = $1 & card X <= card Y holds card { F where F is Function of X,Y : F is one-to-one } = ((card Y) !) / (((card Y) -' (card X)) !); A1: for n being Nat st S1[n] holds S1[n + 1] proof let n be Nat; ::_thesis: ( S1[n] implies S1[n + 1] ) assume A2: S1[n] ; ::_thesis: S1[n + 1] let X, Y be finite set ; ::_thesis: ( card Y = n + 1 & card X <= card Y implies card { F where F is Function of X,Y : F is one-to-one } = ((card Y) !) / (((card Y) -' (card X)) !) ) assume that A3: card Y = n + 1 and A4: card X <= card Y ; ::_thesis: card { F where F is Function of X,Y : F is one-to-one } = ((card Y) !) / (((card Y) -' (card X)) !) percases ( X is empty or not X is empty ) ; supposeA5: X is empty ; ::_thesis: card { F where F is Function of X,Y : F is one-to-one } = ((card Y) !) / (((card Y) -' (card X)) !) set F1 = { F where F is Function of X,Y : F is one-to-one } ; A6: { F where F is Function of X,Y : F is one-to-one } c= {{}} proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { F where F is Function of X,Y : F is one-to-one } or x in {{}} ) assume x in { F where F is Function of X,Y : F is one-to-one } ; ::_thesis: x in {{}} then ex F being Function of X,Y st ( x = F & F is one-to-one ) ; then x = {} by A5; hence x in {{}} by TARSKI:def_1; ::_thesis: verum end; A7: rng {} c= Y by XBOOLE_1:2; (card Y) - (card X) = card Y by A5, CARD_1:27; then A8: ((card Y) -' (card X)) ! = (card Y) ! by XREAL_0:def_2; (card Y) ! > 0 by NEWTON:17; then A9: ((card Y) !) / (((card Y) -' (card X)) !) = 1 by A8, XCMPLX_1:60; dom {} = X by A5; then {} is Function of X,Y by A7, FUNCT_2:2; then {} in { F where F is Function of X,Y : F is one-to-one } ; then { F where F is Function of X,Y : F is one-to-one } = {{}} by A6, ZFMISC_1:33; hence card { F where F is Function of X,Y : F is one-to-one } = ((card Y) !) / (((card Y) -' (card X)) !) by A9, CARD_1:30; ::_thesis: verum end; suppose not X is empty ; ::_thesis: card { F where F is Function of X,Y : F is one-to-one } = ((card Y) !) / (((card Y) -' (card X)) !) then consider x being set such that A10: x in X by XBOOLE_0:def_1; defpred S2[ Function] means $1 is one-to-one ; card Y,Y are_equipotent by CARD_1:def_2; then consider f being Function such that A11: f is one-to-one and A12: dom f = card Y and A13: rng f = Y by WELLORD2:def_4; reconsider f = f as Function of (card Y),Y by A12, A13, FUNCT_2:1; A14: not Y is empty by A3; A15: ( f is onto & f is one-to-one ) by A11, A13, FUNCT_2:def_3; consider F being XFinSequence of such that A16: dom F = card Y and A17: card { g where g is Function of X,Y : S2[g] } = Sum F and A18: for k being Nat st k in dom F holds F . k = card { g where g is Function of X,Y : ( S2[g] & g . x = f . k ) } from STIRL2_1:sch_6(A15, A14, A10); A19: for k being Nat st k in dom F holds F . k = (n !) / (((card Y) -' (card X)) !) proof card X > 0 by A10; then reconsider cX1 = (card X) - 1 as Element of NAT by NAT_1:20; set Xx = X \ {x}; x in {x} by TARSKI:def_1; then A20: not x in X \ {x} by XBOOLE_0:def_5; A21: X = (X \ {x}) \/ {x} by A10, ZFMISC_1:116; A22: (cX1 + 1) - 1 <= (n + 1) - 1 by A3, A4, XREAL_1:9; then A23: n - cX1 >= cX1 - cX1 by XREAL_1:9; let k be Nat; ::_thesis: ( k in dom F implies F . k = (n !) / (((card Y) -' (card X)) !) ) assume A24: k in dom F ; ::_thesis: F . k = (n !) / (((card Y) -' (card X)) !) A25: f . k in Y by A12, A13, A16, A24, FUNCT_1:def_3; set Yy = Y \ {(f . k)}; A26: Y = (Y \ {(f . k)}) \/ {(f . k)} by A25, ZFMISC_1:116; f . k in {(f . k)} by TARSKI:def_1; then A27: not f . k in Y \ {(f . k)} by XBOOLE_0:def_5; cX1 + 1 <= n + 1 by A3, A4; then A28: card (X \ {x}) = cX1 by A10, STIRL2_1:55; A29: card (Y \ {(f . k)}) = n by A3, A25, STIRL2_1:55; then A30: ( Y \ {(f . k)} is empty implies X \ {x} is empty ) by A22, A28, CARD_1:27; A31: card { g where g is Function of (X \ {x}),(Y \ {(f . k)}) : g is one-to-one } = (n !) / (((card (Y \ {(f . k)})) -' (card (X \ {x}))) !) by A2, A22, A28, A29; (card Y) - (card X) >= (card X) - (card X) by A4, XREAL_1:9; then (card Y) -' (card X) = (((card (Y \ {(f . k)})) + 1) - 1) - (((card (X \ {x})) + 1) - 1) by A3, A28, A29, XREAL_0:def_2 .= (card (Y \ {(f . k)})) -' (card (X \ {x})) by A28, A29, A23, XREAL_0:def_2 ; then card { g where g is Function of X,Y : ( g is one-to-one & g . x = f . k ) } = (n !) / (((card Y) -' (card X)) !) by A31, A26, A21, A27, A20, A30, Th5; hence F . k = (n !) / (((card Y) -' (card X)) !) by A18, A24; ::_thesis: verum end; then for k being Nat st k in dom F holds F . k >= (n !) / (((card Y) -' (card X)) !) ; then A32: Sum F >= (len F) * ((n !) / (((card Y) -' (card X)) !)) by AFINSQ_2:60; for k being Nat st k in dom F holds F . k <= (n !) / (((card Y) -' (card X)) !) by A19; then Sum F <= (len F) * ((n !) / (((card Y) -' (card X)) !)) by AFINSQ_2:59; then Sum F = (n + 1) * ((n !) / (((card Y) -' (card X)) !)) by A3, A16, A32, XXREAL_0:1 .= ((n + 1) * (n !)) / (((card Y) -' (card X)) !) by XCMPLX_1:74 .= ((card Y) !) / (((card Y) -' (card X)) !) by A3, NEWTON:15 ; hence card { F where F is Function of X,Y : F is one-to-one } = ((card Y) !) / (((card Y) -' (card X)) !) by A17; ::_thesis: verum end; end; end; A33: S1[ 0 ] proof let X, Y be finite set ; ::_thesis: ( card Y = 0 & card X <= card Y implies card { F where F is Function of X,Y : F is one-to-one } = ((card Y) !) / (((card Y) -' (card X)) !) ) assume that A34: card Y = 0 and A35: card X <= card Y ; ::_thesis: card { F where F is Function of X,Y : F is one-to-one } = ((card Y) !) / (((card Y) -' (card X)) !) (card Y) - (card X) = 0 by A34, A35; then A36: ((card Y) -' (card X)) ! = 1 by NEWTON:12, XREAL_0:def_2; set F1 = { F where F is Function of X,Y : F is one-to-one } ; A37: { F where F is Function of X,Y : F is one-to-one } c= {{}} proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { F where F is Function of X,Y : F is one-to-one } or x in {{}} ) assume x in { F where F is Function of X,Y : F is one-to-one } ; ::_thesis: x in {{}} then A38: ex F being Function of X,Y st ( x = F & F is one-to-one ) ; Y = {} by A34; then x = {} by A38; hence x in {{}} by TARSKI:def_1; ::_thesis: verum end; ( dom {} = X & rng {} = Y ) by A34, A35; then {} is Function of X,Y by FUNCT_2:1; then {} in { F where F is Function of X,Y : F is one-to-one } ; then { F where F is Function of X,Y : F is one-to-one } = {{}} by A37, ZFMISC_1:33; hence card { F where F is Function of X,Y : F is one-to-one } = ((card Y) !) / (((card Y) -' (card X)) !) by A34, A36, CARD_1:30, NEWTON:12; ::_thesis: verum end; for n being Nat holds S1[n] from NAT_1:sch_2(A33, A1); hence ( card X <= card Y implies card { F where F is Function of X,Y : F is one-to-one } = ((card Y) !) / (((card Y) -' (card X)) !) ) ; ::_thesis: verum end; theorem Th8: :: CARD_FIN:8 for X being finite set holds card { F where F is Function of X,X : F is Permutation of X } = (card X) ! proof let X be finite set ; ::_thesis: card { F where F is Function of X,X : F is Permutation of X } = (card X) ! set F1 = { F where F is Function of X,X : F is one-to-one } ; set F2 = { F where F is Function of X,X : F is Permutation of X } ; A1: { F where F is Function of X,X : F is one-to-one } c= { F where F is Function of X,X : F is Permutation of X } proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { F where F is Function of X,X : F is one-to-one } or x in { F where F is Function of X,X : F is Permutation of X } ) assume x in { F where F is Function of X,X : F is one-to-one } ; ::_thesis: x in { F where F is Function of X,X : F is Permutation of X } then consider F being Function of X,X such that A2: x = F and A3: F is one-to-one ; card X = card X ; then F is onto by A3, STIRL2_1:60; hence x in { F where F is Function of X,X : F is Permutation of X } by A2, A3; ::_thesis: verum end; ((card X) -' (card X)) ! = 1 by NEWTON:12, XREAL_1:232; then A4: ((card X) !) / (((card X) -' (card X)) !) = (card X) ! ; { F where F is Function of X,X : F is Permutation of X } c= { F where F is Function of X,X : F is one-to-one } proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { F where F is Function of X,X : F is Permutation of X } or x in { F where F is Function of X,X : F is one-to-one } ) assume x in { F where F is Function of X,X : F is Permutation of X } ; ::_thesis: x in { F where F is Function of X,X : F is one-to-one } then ex F being Function of X,X st ( x = F & F is Permutation of X ) ; hence x in { F where F is Function of X,X : F is one-to-one } ; ::_thesis: verum end; then { F where F is Function of X,X : F is one-to-one } = { F where F is Function of X,X : F is Permutation of X } by A1, XBOOLE_0:def_10; hence card { F where F is Function of X,X : F is Permutation of X } = (card X) ! by A4, Th7; ::_thesis: verum end; definition let X be finite set ; let k be Nat; let x1, x2 be set ; func Choose (X,k,x1,x2) -> Subset of (Funcs (X,{x1,x2})) means :Def1: :: CARD_FIN:def 1 for x being set holds ( x in it iff ex f being Function of X,{x1,x2} st ( f = x & card (f " {x1}) = k ) ); existence ex b1 being Subset of (Funcs (X,{x1,x2})) st for x being set holds ( x in b1 iff ex f being Function of X,{x1,x2} st ( f = x & card (f " {x1}) = k ) ) proof defpred S1[ set ] means ex f being Function of X,{x1,x2} st ( $1 = f & card (f " {x1}) = k ); consider F being set such that A1: for x being set holds ( x in F iff ( x in bool [:X,{x1,x2}:] & S1[x] ) ) from XBOOLE_0:sch_1(); F c= Funcs (X,{x1,x2}) proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in F or x in Funcs (X,{x1,x2}) ) assume x in F ; ::_thesis: x in Funcs (X,{x1,x2}) then ex f being Function of X,{x1,x2} st ( x = f & card (f " {x1}) = k ) by A1; hence x in Funcs (X,{x1,x2}) by FUNCT_2:8; ::_thesis: verum end; then reconsider F = F as Subset of (Funcs (X,{x1,x2})) ; take F ; ::_thesis: for x being set holds ( x in F iff ex f being Function of X,{x1,x2} st ( f = x & card (f " {x1}) = k ) ) let x be set ; ::_thesis: ( x in F iff ex f being Function of X,{x1,x2} st ( f = x & card (f " {x1}) = k ) ) thus ( x in F implies ex f being Function of X,{x1,x2} st ( x = f & card (f " {x1}) = k ) ) by A1; ::_thesis: ( ex f being Function of X,{x1,x2} st ( f = x & card (f " {x1}) = k ) implies x in F ) given f being Function of X,{x1,x2} such that A2: ( x = f & card (f " {x1}) = k ) ; ::_thesis: x in F thus x in F by A1, A2; ::_thesis: verum end; uniqueness for b1, b2 being Subset of (Funcs (X,{x1,x2})) st ( for x being set holds ( x in b1 iff ex f being Function of X,{x1,x2} st ( f = x & card (f " {x1}) = k ) ) ) & ( for x being set holds ( x in b2 iff ex f being Function of X,{x1,x2} st ( f = x & card (f " {x1}) = k ) ) ) holds b1 = b2 proof let F1, F2 be Subset of (Funcs (X,{x1,x2})); ::_thesis: ( ( for x being set holds ( x in F1 iff ex f being Function of X,{x1,x2} st ( f = x & card (f " {x1}) = k ) ) ) & ( for x being set holds ( x in F2 iff ex f being Function of X,{x1,x2} st ( f = x & card (f " {x1}) = k ) ) ) implies F1 = F2 ) assume that A3: for x being set holds ( x in F1 iff ex f being Function of X,{x1,x2} st ( x = f & card (f " {x1}) = k ) ) and A4: for x being set holds ( x in F2 iff ex f being Function of X,{x1,x2} st ( x = f & card (f " {x1}) = k ) ) ; ::_thesis: F1 = F2 for x being set holds ( x in F1 iff x in F2 ) proof let x be set ; ::_thesis: ( x in F1 iff x in F2 ) ( x in F1 iff ex f being Function of X,{x1,x2} st ( x = f & card (f " {x1}) = k ) ) by A3; hence ( x in F1 iff x in F2 ) by A4; ::_thesis: verum end; hence F1 = F2 by TARSKI:1; ::_thesis: verum end; end; :: deftheorem Def1 defines Choose CARD_FIN:def_1_:_ for X being finite set for k being Nat for x1, x2 being set for b5 being Subset of (Funcs (X,{x1,x2})) holds ( b5 = Choose (X,k,x1,x2) iff for x being set holds ( x in b5 iff ex f being Function of X,{x1,x2} st ( f = x & card (f " {x1}) = k ) ) ); theorem :: CARD_FIN:9 for x1 being set for X being finite set for k being Nat st card X <> k holds Choose (X,k,x1,x1) is empty proof let x1 be set ; ::_thesis: for X being finite set for k being Nat st card X <> k holds Choose (X,k,x1,x1) is empty let X be finite set ; ::_thesis: for k being Nat st card X <> k holds Choose (X,k,x1,x1) is empty let k be Nat; ::_thesis: ( card X <> k implies Choose (X,k,x1,x1) is empty ) assume A1: card X <> k ; ::_thesis: Choose (X,k,x1,x1) is empty assume not Choose (X,k,x1,x1) is empty ; ::_thesis: contradiction then consider y being set such that A2: y in Choose (X,k,x1,x1) by XBOOLE_0:def_1; consider f being Function of X,{x1,x1} such that f = y and A3: card (f " {x1}) = k by A2, Def1; percases ( rng f is empty or not rng f is empty ) ; supposeA4: rng f is empty ; ::_thesis: contradiction A5: dom f = X by FUNCT_2:def_1; dom f = {} by A4, RELAT_1:42; hence contradiction by A1, A3, A5; ::_thesis: verum end; supposeA6: not rng f is empty ; ::_thesis: contradiction {x1,x1} = {x1} by ENUMSET1:29; then rng f = {x1} by A6, ZFMISC_1:33; then f " {x1} = dom f by RELAT_1:134; hence contradiction by A1, A3, FUNCT_2:def_1; ::_thesis: verum end; end; end; theorem Th10: :: CARD_FIN:10 for x1, x2 being set for X being finite set for k being Nat st card X < k holds Choose (X,k,x1,x2) is empty proof let x1, x2 be set ; ::_thesis: for X being finite set for k being Nat st card X < k holds Choose (X,k,x1,x2) is empty let X be finite set ; ::_thesis: for k being Nat st card X < k holds Choose (X,k,x1,x2) is empty let k be Nat; ::_thesis: ( card X < k implies Choose (X,k,x1,x2) is empty ) assume A1: card X < k ; ::_thesis: Choose (X,k,x1,x2) is empty assume not Choose (X,k,x1,x2) is empty ; ::_thesis: contradiction then consider z being set such that A2: z in Choose (X,k,x1,x2) by XBOOLE_0:def_1; ex f being Function of X,{x1,x2} st ( f = z & card (f " {x1}) = k ) by A2, Def1; hence contradiction by A1, NAT_1:43; ::_thesis: verum end; theorem Th11: :: CARD_FIN:11 for x1, x2 being set for X being finite set st x1 <> x2 holds card (Choose (X,0,x1,x2)) = 1 proof let x1, x2 be set ; ::_thesis: for X being finite set st x1 <> x2 holds card (Choose (X,0,x1,x2)) = 1 let X be finite set ; ::_thesis: ( x1 <> x2 implies card (Choose (X,0,x1,x2)) = 1 ) assume A1: x1 <> x2 ; ::_thesis: card (Choose (X,0,x1,x2)) = 1 percases ( X is empty or not X is empty ) ; supposeA2: X is empty ; ::_thesis: card (Choose (X,0,x1,x2)) = 1 dom {} = X by A2; then reconsider Empty = {} as Function of X,{x1,x2} by XBOOLE_1:2; A3: Choose (X,0,x1,x2) c= {Empty} proof let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in Choose (X,0,x1,x2) or z in {Empty} ) assume z in Choose (X,0,x1,x2) ; ::_thesis: z in {Empty} then consider f being Function of X,{x1,x2} such that A4: z = f and card (f " {x1}) = 0 by Def1; dom f = X by FUNCT_2:def_1; then f = Empty ; hence z in {Empty} by A4, TARSKI:def_1; ::_thesis: verum end; ( Empty " {x1} = {} & card {} = 0 ) ; then Empty in Choose (X,0,x1,x2) by Def1; then Choose (X,0,x1,x2) = {Empty} by A3, ZFMISC_1:33; hence card (Choose (X,0,x1,x2)) = 1 by CARD_1:30; ::_thesis: verum end; supposeA5: not X is empty ; ::_thesis: card (Choose (X,0,x1,x2)) = 1 then consider f being Function such that A6: dom f = X and A7: rng f = {x2} by FUNCT_1:5; rng f c= {x1,x2} by A7, ZFMISC_1:36; then A8: f is Function of X,{x1,x2} by A6, FUNCT_2:2; A9: Choose (X,0,x1,x2) c= {f} proof let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in Choose (X,0,x1,x2) or z in {f} ) assume z in Choose (X,0,x1,x2) ; ::_thesis: z in {f} then consider g being Function of X,{x1,x2} such that A10: z = g and A11: card (g " {x1}) = 0 by Def1; g " {x1} = {} by A11; then not x1 in rng g by FUNCT_1:72; then ( not rng g = {x1} & not rng g = {x1,x2} ) by TARSKI:def_1, TARSKI:def_2; then ( dom g = X & rng g = {x2} ) by A5, FUNCT_2:def_1, ZFMISC_1:36; then g = f by A6, A7, FUNCT_1:7; hence z in {f} by A10, TARSKI:def_1; ::_thesis: verum end; not x1 in rng f by A1, A7, TARSKI:def_1; then A12: f " {x1} = {} by FUNCT_1:72; card {} = 0 ; then f in Choose (X,0,x1,x2) by A12, A8, Def1; then Choose (X,0,x1,x2) = {f} by A9, ZFMISC_1:33; hence card (Choose (X,0,x1,x2)) = 1 by CARD_1:30; ::_thesis: verum end; end; end; theorem Th12: :: CARD_FIN:12 for x1, x2 being set for X being finite set holds card (Choose (X,(card X),x1,x2)) = 1 proof let x1, x2 be set ; ::_thesis: for X being finite set holds card (Choose (X,(card X),x1,x2)) = 1 let X be finite set ; ::_thesis: card (Choose (X,(card X),x1,x2)) = 1 percases ( X is empty or not X is empty ) ; supposeA1: X is empty ; ::_thesis: card (Choose (X,(card X),x1,x2)) = 1 dom {} = X by A1; then reconsider Empty = {} as Function of X,{x1,x2} by XBOOLE_1:2; A2: Choose (X,(card X),x1,x2) c= {Empty} proof let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in Choose (X,(card X),x1,x2) or z in {Empty} ) assume z in Choose (X,(card X),x1,x2) ; ::_thesis: z in {Empty} then consider f being Function of X,{x1,x2} such that A3: z = f and card (f " {x1}) = card X by Def1; dom f = X by FUNCT_2:def_1; then f = Empty ; hence z in {Empty} by A3, TARSKI:def_1; ::_thesis: verum end; Empty " {x1} = {} ; then Empty in Choose (X,(card X),x1,x2) by A1, Def1; then Choose (X,(card X),x1,x2) = {Empty} by A2, ZFMISC_1:33; hence card (Choose (X,(card X),x1,x2)) = 1 by CARD_1:30; ::_thesis: verum end; supposeA4: not X is empty ; ::_thesis: card (Choose (X,(card X),x1,x2)) = 1 then consider f being Function such that A5: dom f = X and A6: rng f = {x1} by FUNCT_1:5; rng f c= {x1,x2} by A6, ZFMISC_1:36; then A7: f is Function of X,{x1,x2} by A5, FUNCT_2:2; A8: Choose (X,(card X),x1,x2) c= {f} proof let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in Choose (X,(card X),x1,x2) or z in {f} ) assume z in Choose (X,(card X),x1,x2) ; ::_thesis: z in {f} then consider g being Function of X,{x1,x2} such that A9: z = g and A10: card (g " {x1}) = card X by Def1; A11: now__::_thesis:_rng_g_=_{x1} percases ( x1 = x2 or x1 <> x2 ) ; suppose x1 = x2 ; ::_thesis: rng g = {x1} then {x1,x2} = {x1} by ENUMSET1:29; hence rng g = {x1} by A4, ZFMISC_1:33; ::_thesis: verum end; supposeA12: x1 <> x2 ; ::_thesis: rng g = {x1} g " {x2} = {} proof assume g " {x2} <> {} ; ::_thesis: contradiction then consider z being set such that A13: z in g " {x2} by XBOOLE_0:def_1; g . z in {x2} by A13, FUNCT_1:def_7; then A14: g . z = x2 by TARSKI:def_1; g " {x1} = X by A10, Th1; then g . z in {x1} by A13, FUNCT_1:def_7; hence contradiction by A12, A14, TARSKI:def_1; ::_thesis: verum end; then not x2 in rng g by FUNCT_1:72; then ( not rng g = {x2} & not rng g = {x1,x2} ) by TARSKI:def_1, TARSKI:def_2; hence rng g = {x1} by A4, ZFMISC_1:36; ::_thesis: verum end; end; end; dom g = X by FUNCT_2:def_1; then g = f by A5, A6, A11, FUNCT_1:7; hence z in {f} by A9, TARSKI:def_1; ::_thesis: verum end; card (f " {x1}) = card X by A5, A6, RELAT_1:134; then f in Choose (X,(card X),x1,x2) by A7, Def1; then Choose (X,(card X),x1,x2) = {f} by A8, ZFMISC_1:33; hence card (Choose (X,(card X),x1,x2)) = 1 by CARD_1:30; ::_thesis: verum end; end; end; theorem Th13: :: CARD_FIN:13 for z, x, y being set for X being finite set for k being Nat st not z in X holds card (Choose (X,k,x,y)) = card { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } proof let z, x, y be set ; ::_thesis: for X being finite set for k being Nat st not z in X holds card (Choose (X,k,x,y)) = card { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } let X be finite set ; ::_thesis: for k being Nat st not z in X holds card (Choose (X,k,x,y)) = card { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } let k be Nat; ::_thesis: ( not z in X implies card (Choose (X,k,x,y)) = card { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } ) set F1 = { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } ; defpred S1[ set , set , set ] means for f being Function st f = $1 holds card ((f | X) " {x}) = k; A1: for f being Function of (X \/ {z}),({x,y} \/ {x}) st f . z = x holds ( S1[f,X \/ {z},{x,y} \/ {x}] iff S1[f | X,X,{x,y}] ) proof let f be Function of (X \/ {z}),({x,y} \/ {x}); ::_thesis: ( f . z = x implies ( S1[f,X \/ {z},{x,y} \/ {x}] iff S1[f | X,X,{x,y}] ) ) assume f . z = x ; ::_thesis: ( S1[f,X \/ {z},{x,y} \/ {x}] iff S1[f | X,X,{x,y}] ) f | X = (f | X) | X ; hence ( S1[f,X \/ {z},{x,y} \/ {x}] iff S1[f | X,X,{x,y}] ) ; ::_thesis: verum end; set F3 = { f where f is Function of (X \/ {z}),({x,y} \/ {x}) : ( S1[f,X \/ {z},{x,y} \/ {x}] & rng (f | X) c= {x,y} & f . z = x ) } ; set F2 = { f where f is Function of X,{x,y} : S1[f,X,{x,y}] } ; assume A2: not z in X ; ::_thesis: card (Choose (X,k,x,y)) = card { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } A3: { f where f is Function of (X \/ {z}),({x,y} \/ {x}) : ( S1[f,X \/ {z},{x,y} \/ {x}] & rng (f | X) c= {x,y} & f . z = x ) } c= { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } proof {x} \/ {x,y} = {x,x,y} by ENUMSET1:2; then A4: {x,y} \/ {x} = {x,y} by ENUMSET1:30; z in {z} by TARSKI:def_1; then A5: z in X \/ {z} by XBOOLE_0:def_3; let x1 be set ; :: according to TARSKI:def_3 ::_thesis: ( not x1 in { f where f is Function of (X \/ {z}),({x,y} \/ {x}) : ( S1[f,X \/ {z},{x,y} \/ {x}] & rng (f | X) c= {x,y} & f . z = x ) } or x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } ) assume x1 in { f where f is Function of (X \/ {z}),({x,y} \/ {x}) : ( S1[f,X \/ {z},{x,y} \/ {x}] & rng (f | X) c= {x,y} & f . z = x ) } ; ::_thesis: x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } then consider f being Function of (X \/ {z}),({x,y} \/ {x}) such that A6: x1 = f and A7: S1[f,X \/ {z},{x,y} \/ {x}] and rng (f | X) c= {x,y} and A8: f . z = x ; ( dom f = X \/ {z} & (X \/ {z}) \ {z} = X ) by A2, FUNCT_2:def_1, ZFMISC_1:117; then A9: {z} \/ ((f | X) " {x}) = f " {x} by A8, A5, AFINSQ_2:66; not z in (dom f) /\ X by A2, XBOOLE_0:def_4; then not z in dom (f | X) by RELAT_1:61; then A10: not z in (f | X) " {x} by FUNCT_1:def_7; card ((f | X) " {x}) = k by A7; then card (f " {x}) = k + 1 by A9, A10, CARD_2:41; hence x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } by A6, A8, A4; ::_thesis: verum end; A11: { f where f is Function of X,{x,y} : S1[f,X,{x,y}] } c= Choose (X,k,x,y) proof let x1 be set ; :: according to TARSKI:def_3 ::_thesis: ( not x1 in { f where f is Function of X,{x,y} : S1[f,X,{x,y}] } or x1 in Choose (X,k,x,y) ) assume x1 in { f where f is Function of X,{x,y} : S1[f,X,{x,y}] } ; ::_thesis: x1 in Choose (X,k,x,y) then consider f being Function of X,{x,y} such that A12: x1 = f and A13: S1[f,X,{x,y}] ; f | X = f ; then card (f " {x}) = k by A13; hence x1 in Choose (X,k,x,y) by A12, Def1; ::_thesis: verum end; A14: Choose (X,k,x,y) c= { f where f is Function of X,{x,y} : S1[f,X,{x,y}] } proof let x1 be set ; :: according to TARSKI:def_3 ::_thesis: ( not x1 in Choose (X,k,x,y) or x1 in { f where f is Function of X,{x,y} : S1[f,X,{x,y}] } ) assume x1 in Choose (X,k,x,y) ; ::_thesis: x1 in { f where f is Function of X,{x,y} : S1[f,X,{x,y}] } then consider f being Function of X,{x,y} such that A15: x1 = f and A16: card (f " {x}) = k by Def1; dom f = X by FUNCT_2:def_1; then S1[f,X,{x,y}] by A16, RELAT_1:68; hence x1 in { f where f is Function of X,{x,y} : S1[f,X,{x,y}] } by A15; ::_thesis: verum end; A17: ( {x,y} is empty implies X is empty ) ; A18: card { f where f is Function of X,{x,y} : S1[f,X,{x,y}] } = card { f where f is Function of (X \/ {z}),({x,y} \/ {x}) : ( S1[f,X \/ {z},{x,y} \/ {x}] & rng (f | X) c= {x,y} & f . z = x ) } from STIRL2_1:sch_4(A17, A2, A1); { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } c= { f where f is Function of (X \/ {z}),({x,y} \/ {x}) : ( S1[f,X \/ {z},{x,y} \/ {x}] & rng (f | X) c= {x,y} & f . z = x ) } proof z in {z} by TARSKI:def_1; then A19: z in X \/ {z} by XBOOLE_0:def_3; let x1 be set ; :: according to TARSKI:def_3 ::_thesis: ( not x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } or x1 in { f where f is Function of (X \/ {z}),({x,y} \/ {x}) : ( S1[f,X \/ {z},{x,y} \/ {x}] & rng (f | X) c= {x,y} & f . z = x ) } ) assume x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } ; ::_thesis: x1 in { f where f is Function of (X \/ {z}),({x,y} \/ {x}) : ( S1[f,X \/ {z},{x,y} \/ {x}] & rng (f | X) c= {x,y} & f . z = x ) } then consider f being Function of (X \/ {z}),{x,y} such that A20: x1 = f and A21: card (f " {x}) = k + 1 and A22: f . z = x ; not z in (dom f) /\ X by A2, XBOOLE_0:def_4; then not z in dom (f | X) by RELAT_1:61; then A23: not z in (f | X) " {x} by FUNCT_1:def_7; ( dom f = X \/ {z} & (X \/ {z}) \ {z} = X ) by A2, FUNCT_2:def_1, ZFMISC_1:117; then ((f | X) " {x}) \/ {z} = f " {x} by A22, A19, AFINSQ_2:66; then (card ((f | X) " {x})) + 1 = k + 1 by A21, A23, CARD_2:41; then A24: S1[f,X \/ {z},{x,y} \/ {x}] ; {x} \/ {x,y} = {x,x,y} by ENUMSET1:2; then ( rng (f | X) c= {x,y} & f is Function of (X \/ {z}),({x,y} \/ {x}) ) by ENUMSET1:30; hence x1 in { f where f is Function of (X \/ {z}),({x,y} \/ {x}) : ( S1[f,X \/ {z},{x,y} \/ {x}] & rng (f | X) c= {x,y} & f . z = x ) } by A20, A22, A24; ::_thesis: verum end; then { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } = { f where f is Function of (X \/ {z}),({x,y} \/ {x}) : ( S1[f,X \/ {z},{x,y} \/ {x}] & rng (f | X) c= {x,y} & f . z = x ) } by A3, XBOOLE_0:def_10; hence card (Choose (X,k,x,y)) = card { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } by A11, A14, A18, XBOOLE_0:def_10; ::_thesis: verum end; theorem Th14: :: CARD_FIN:14 for z, x, y being set for X being finite set for k being Nat st not z in X & x <> y holds card (Choose (X,k,x,y)) = card { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k & f . z = y ) } proof let z, x, y be set ; ::_thesis: for X being finite set for k being Nat st not z in X & x <> y holds card (Choose (X,k,x,y)) = card { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k & f . z = y ) } let X be finite set ; ::_thesis: for k being Nat st not z in X & x <> y holds card (Choose (X,k,x,y)) = card { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k & f . z = y ) } let k be Nat; ::_thesis: ( not z in X & x <> y implies card (Choose (X,k,x,y)) = card { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k & f . z = y ) } ) assume that A1: not z in X and A2: x <> y ; ::_thesis: card (Choose (X,k,x,y)) = card { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k & f . z = y ) } defpred S1[ set , set , set ] means for f being Function st f = $1 holds card (f " {x}) = k; A3: for f being Function of (X \/ {z}),({x,y} \/ {y}) st f . z = y holds ( S1[f,X \/ {z},{x,y} \/ {y}] iff S1[f | X,X,{x,y}] ) proof let f be Function of (X \/ {z}),({x,y} \/ {y}); ::_thesis: ( f . z = y implies ( S1[f,X \/ {z},{x,y} \/ {y}] iff S1[f | X,X,{x,y}] ) ) assume A4: f . z = y ; ::_thesis: ( S1[f,X \/ {z},{x,y} \/ {y}] iff S1[f | X,X,{x,y}] ) ( (X \/ {z}) \ {z} = X & dom f = X \/ {z} ) by A1, FUNCT_2:def_1, ZFMISC_1:117; then (f | X) " {x} = f " {x} by A2, A4, AFINSQ_2:67; hence ( S1[f,X \/ {z},{x,y} \/ {y}] iff S1[f | X,X,{x,y}] ) ; ::_thesis: verum end; set F2 = { f where f is Function of (X \/ {z}),({x,y} \/ {y}) : ( S1[f,X \/ {z},{x,y} \/ {y}] & rng (f | X) c= {x,y} & f . z = y ) } ; set F1 = { f where f is Function of X,{x,y} : S1[f,X,{x,y}] } ; A5: ( {x,y} is empty implies X is empty ) ; A6: card { f where f is Function of X,{x,y} : S1[f,X,{x,y}] } = card { f where f is Function of (X \/ {z}),({x,y} \/ {y}) : ( S1[f,X \/ {z},{x,y} \/ {y}] & rng (f | X) c= {x,y} & f . z = y ) } from STIRL2_1:sch_4(A5, A1, A3); set F3 = { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k & f . z = y ) } ; A7: { f where f is Function of (X \/ {z}),({x,y} \/ {y}) : ( S1[f,X \/ {z},{x,y} \/ {y}] & rng (f | X) c= {x,y} & f . z = y ) } c= { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k & f . z = y ) } proof let x1 be set ; :: according to TARSKI:def_3 ::_thesis: ( not x1 in { f where f is Function of (X \/ {z}),({x,y} \/ {y}) : ( S1[f,X \/ {z},{x,y} \/ {y}] & rng (f | X) c= {x,y} & f . z = y ) } or x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k & f . z = y ) } ) assume x1 in { f where f is Function of (X \/ {z}),({x,y} \/ {y}) : ( S1[f,X \/ {z},{x,y} \/ {y}] & rng (f | X) c= {x,y} & f . z = y ) } ; ::_thesis: x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k & f . z = y ) } then consider f being Function of (X \/ {z}),({x,y} \/ {y}) such that A8: x1 = f and A9: S1[f,X \/ {z},{x,y} \/ {y}] and rng (f | X) c= {x,y} and A10: f . z = y ; {x,y} \/ {y} = {y,y,x} by ENUMSET1:2; then A11: f is Function of (X \/ {z}),{x,y} by ENUMSET1:30; card (f " {x}) = k by A9; hence x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k & f . z = y ) } by A8, A10, A11; ::_thesis: verum end; A12: { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k & f . z = y ) } c= { f where f is Function of (X \/ {z}),({x,y} \/ {y}) : ( S1[f,X \/ {z},{x,y} \/ {y}] & rng (f | X) c= {x,y} & f . z = y ) } proof let x1 be set ; :: according to TARSKI:def_3 ::_thesis: ( not x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k & f . z = y ) } or x1 in { f where f is Function of (X \/ {z}),({x,y} \/ {y}) : ( S1[f,X \/ {z},{x,y} \/ {y}] & rng (f | X) c= {x,y} & f . z = y ) } ) assume x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k & f . z = y ) } ; ::_thesis: x1 in { f where f is Function of (X \/ {z}),({x,y} \/ {y}) : ( S1[f,X \/ {z},{x,y} \/ {y}] & rng (f | X) c= {x,y} & f . z = y ) } then consider f being Function of (X \/ {z}),{x,y} such that A13: f = x1 and A14: card (f " {x}) = k and A15: f . z = y ; {x,y} \/ {y} = {y,y,x} by ENUMSET1:2; then A16: ( rng (f | X) c= {x,y} & f is Function of (X \/ {z}),({x,y} \/ {y}) ) by ENUMSET1:30; S1[f,X \/ {z},{x,y} \/ {y}] by A14; hence x1 in { f where f is Function of (X \/ {z}),({x,y} \/ {y}) : ( S1[f,X \/ {z},{x,y} \/ {y}] & rng (f | X) c= {x,y} & f . z = y ) } by A13, A15, A16; ::_thesis: verum end; A17: Choose (X,k,x,y) c= { f where f is Function of X,{x,y} : S1[f,X,{x,y}] } proof let x1 be set ; :: according to TARSKI:def_3 ::_thesis: ( not x1 in Choose (X,k,x,y) or x1 in { f where f is Function of X,{x,y} : S1[f,X,{x,y}] } ) assume x1 in Choose (X,k,x,y) ; ::_thesis: x1 in { f where f is Function of X,{x,y} : S1[f,X,{x,y}] } then consider f being Function of X,{x,y} such that A18: x1 = f and A19: card (f " {x}) = k by Def1; S1[f,X,{x,y}] by A19; hence x1 in { f where f is Function of X,{x,y} : S1[f,X,{x,y}] } by A18; ::_thesis: verum end; { f where f is Function of X,{x,y} : S1[f,X,{x,y}] } c= Choose (X,k,x,y) proof let x1 be set ; :: according to TARSKI:def_3 ::_thesis: ( not x1 in { f where f is Function of X,{x,y} : S1[f,X,{x,y}] } or x1 in Choose (X,k,x,y) ) assume x1 in { f where f is Function of X,{x,y} : S1[f,X,{x,y}] } ; ::_thesis: x1 in Choose (X,k,x,y) then consider f being Function of X,{x,y} such that A20: x1 = f and A21: S1[f,X,{x,y}] ; card (f " {x}) = k by A21; hence x1 in Choose (X,k,x,y) by A20, Def1; ::_thesis: verum end; then Choose (X,k,x,y) = { f where f is Function of X,{x,y} : S1[f,X,{x,y}] } by A17, XBOOLE_0:def_10; hence card (Choose (X,k,x,y)) = card { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k & f . z = y ) } by A7, A12, A6, XBOOLE_0:def_10; ::_thesis: verum end; Lm1: for x, y, z being set for X being finite set for k being Nat st x <> y holds ( { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } \/ { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } = Choose ((X \/ {z}),(k + 1),x,y) & { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } misses { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } ) proof let x, y, z be set ; ::_thesis: for X being finite set for k being Nat st x <> y holds ( { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } \/ { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } = Choose ((X \/ {z}),(k + 1),x,y) & { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } misses { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } ) let X be finite set ; ::_thesis: for k being Nat st x <> y holds ( { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } \/ { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } = Choose ((X \/ {z}),(k + 1),x,y) & { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } misses { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } ) let k be Nat; ::_thesis: ( x <> y implies ( { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } \/ { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } = Choose ((X \/ {z}),(k + 1),x,y) & { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } misses { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } ) ) set F1 = { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } ; set F2 = { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } ; assume A1: x <> y ; ::_thesis: ( { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } \/ { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } = Choose ((X \/ {z}),(k + 1),x,y) & { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } misses { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } ) A2: { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } misses { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } proof assume { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } meets { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } ; ::_thesis: contradiction then { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } /\ { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } <> {} by XBOOLE_0:def_7; then consider x1 being set such that A3: x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } /\ { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } by XBOOLE_0:def_1; x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } by A3, XBOOLE_0:def_4; then A4: ex f2 being Function of (X \/ {z}),{x,y} st ( x1 = f2 & card (f2 " {x}) = k + 1 & f2 . z = y ) ; x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } by A3, XBOOLE_0:def_4; then ex f1 being Function of (X \/ {z}),{x,y} st ( x1 = f1 & card (f1 " {x}) = k + 1 & f1 . z = x ) ; hence contradiction by A1, A4; ::_thesis: verum end; A5: { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } c= Choose ((X \/ {z}),(k + 1),x,y) proof let x1 be set ; :: according to TARSKI:def_3 ::_thesis: ( not x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } or x1 in Choose ((X \/ {z}),(k + 1),x,y) ) assume x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } ; ::_thesis: x1 in Choose ((X \/ {z}),(k + 1),x,y) then ex f being Function of (X \/ {z}),{x,y} st ( x1 = f & card (f " {x}) = k + 1 & f . z = y ) ; hence x1 in Choose ((X \/ {z}),(k + 1),x,y) by Def1; ::_thesis: verum end; A6: Choose ((X \/ {z}),(k + 1),x,y) c= { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } \/ { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } proof let x1 be set ; :: according to TARSKI:def_3 ::_thesis: ( not x1 in Choose ((X \/ {z}),(k + 1),x,y) or x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } \/ { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } ) assume x1 in Choose ((X \/ {z}),(k + 1),x,y) ; ::_thesis: x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } \/ { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } then consider f being Function of (X \/ {z}),{x,y} such that A7: ( f = x1 & card (f " {x}) = k + 1 ) by Def1; z in {z} by TARSKI:def_1; then A8: z in X \/ {z} by XBOOLE_0:def_3; dom f = X \/ {z} by FUNCT_2:def_1; then f . z in rng f by A8, FUNCT_1:def_3; then ( f . z = x or f . z = y ) by TARSKI:def_2; then ( x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } or x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } ) by A7; hence x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } \/ { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } by XBOOLE_0:def_3; ::_thesis: verum end; { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } c= Choose ((X \/ {z}),(k + 1),x,y) proof let x1 be set ; :: according to TARSKI:def_3 ::_thesis: ( not x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } or x1 in Choose ((X \/ {z}),(k + 1),x,y) ) assume x1 in { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } ; ::_thesis: x1 in Choose ((X \/ {z}),(k + 1),x,y) then ex f being Function of (X \/ {z}),{x,y} st ( x1 = f & card (f " {x}) = k + 1 & f . z = x ) ; hence x1 in Choose ((X \/ {z}),(k + 1),x,y) by Def1; ::_thesis: verum end; then { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } \/ { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } c= Choose ((X \/ {z}),(k + 1),x,y) by A5, XBOOLE_1:8; hence ( { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } \/ { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } = Choose ((X \/ {z}),(k + 1),x,y) & { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } misses { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } ) by A6, A2, XBOOLE_0:def_10; ::_thesis: verum end; theorem Th15: :: CARD_FIN:15 for x, y, z being set for X being finite set for k being Nat st x <> y & not z in X holds card (Choose ((X \/ {z}),(k + 1),x,y)) = (card (Choose (X,(k + 1),x,y))) + (card (Choose (X,k,x,y))) proof let x, y, z be set ; ::_thesis: for X being finite set for k being Nat st x <> y & not z in X holds card (Choose ((X \/ {z}),(k + 1),x,y)) = (card (Choose (X,(k + 1),x,y))) + (card (Choose (X,k,x,y))) let X be finite set ; ::_thesis: for k being Nat st x <> y & not z in X holds card (Choose ((X \/ {z}),(k + 1),x,y)) = (card (Choose (X,(k + 1),x,y))) + (card (Choose (X,k,x,y))) let k be Nat; ::_thesis: ( x <> y & not z in X implies card (Choose ((X \/ {z}),(k + 1),x,y)) = (card (Choose (X,(k + 1),x,y))) + (card (Choose (X,k,x,y))) ) assume that A1: x <> y and A2: not z in X ; ::_thesis: card (Choose ((X \/ {z}),(k + 1),x,y)) = (card (Choose (X,(k + 1),x,y))) + (card (Choose (X,k,x,y))) set F2 = { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } ; set F1 = { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } ; A3: { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } \/ { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } = Choose ((X \/ {z}),(k + 1),x,y) by A1, Lm1; ( { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } c= { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } \/ { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } & { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } c= { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } \/ { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } ) by XBOOLE_1:7; then reconsider F1 = { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = x ) } , F2 = { f where f is Function of (X \/ {z}),{x,y} : ( card (f " {x}) = k + 1 & f . z = y ) } as finite set by A3; A4: card F1 = card (Choose (X,k,x,y)) by A2, Th13; ( card (F1 \/ F2) = (card F1) + (card F2) & card F2 = card (Choose (X,(k + 1),x,y)) ) by A1, A2, Lm1, Th14, CARD_2:40; hence card (Choose ((X \/ {z}),(k + 1),x,y)) = (card (Choose (X,(k + 1),x,y))) + (card (Choose (X,k,x,y))) by A1, A4, Lm1; ::_thesis: verum end; theorem Th16: :: CARD_FIN:16 for x, y being set for X being finite set for k being Nat st x <> y holds card (Choose (X,k,x,y)) = (card X) choose k proof let x, y be set ; ::_thesis: for X being finite set for k being Nat st x <> y holds card (Choose (X,k,x,y)) = (card X) choose k let X be finite set ; ::_thesis: for k being Nat st x <> y holds card (Choose (X,k,x,y)) = (card X) choose k let k be Nat; ::_thesis: ( x <> y implies card (Choose (X,k,x,y)) = (card X) choose k ) defpred S1[ Nat] means for k being Nat for X being finite set st k + (card X) <= $1 holds card (Choose (X,k,x,y)) = (card X) choose k; assume A1: x <> y ; ::_thesis: card (Choose (X,k,x,y)) = (card X) choose k A2: for n being Nat st S1[n] holds S1[n + 1] proof let n be Nat; ::_thesis: ( S1[n] implies S1[n + 1] ) assume A3: S1[n] ; ::_thesis: S1[n + 1] let k be Nat; ::_thesis: for X being finite set st k + (card X) <= n + 1 holds card (Choose (X,k,x,y)) = (card X) choose k let X be finite set ; ::_thesis: ( k + (card X) <= n + 1 implies card (Choose (X,k,x,y)) = (card X) choose k ) assume A4: k + (card X) <= n + 1 ; ::_thesis: card (Choose (X,k,x,y)) = (card X) choose k percases ( k + (card X) < n + 1 or k + (card X) = n + 1 ) by A4, XXREAL_0:1; suppose k + (card X) < n + 1 ; ::_thesis: card (Choose (X,k,x,y)) = (card X) choose k then k + (card X) <= n by NAT_1:13; hence card (Choose (X,k,x,y)) = (card X) choose k by A3; ::_thesis: verum end; supposeA5: k + (card X) = n + 1 ; ::_thesis: card (Choose (X,k,x,y)) = (card X) choose k percases ( ( k = 0 & card X >= 0 ) or ( k > 0 & card X = 0 ) or ( k > 0 & card X > 0 ) ) ; supposeA6: ( k = 0 & card X >= 0 ) ; ::_thesis: card (Choose (X,k,x,y)) = (card X) choose k then card (Choose (X,k,x,y)) = 1 by A1, Th11; hence card (Choose (X,k,x,y)) = (card X) choose k by A6, NEWTON:19; ::_thesis: verum end; supposeA7: ( k > 0 & card X = 0 ) ; ::_thesis: card (Choose (X,k,x,y)) = (card X) choose k then Choose (X,k,x,y) is empty by Th10; hence card (Choose (X,k,x,y)) = (card X) choose k by A7, NEWTON:def_3; ::_thesis: verum end; supposeA8: ( k > 0 & card X > 0 ) ; ::_thesis: card (Choose (X,k,x,y)) = (card X) choose k then reconsider cXz = (card X) - 1 as Element of NAT by NAT_1:20; reconsider k1 = k - 1 as Element of NAT by A8, NAT_1:20; consider z being set such that A9: z in X by A8, CARD_1:27, XBOOLE_0:def_1; set Xz = X \ {z}; z in {z} by TARSKI:def_1; then A10: not z in X \ {z} by XBOOLE_0:def_5; (X \ {z}) \/ {z} = X by A9, ZFMISC_1:116; then A11: card (Choose (X,(k1 + 1),x,y)) = (card (Choose ((X \ {z}),(k1 + 1),x,y))) + (card (Choose ((X \ {z}),k1,x,y))) by A1, A10, Th15; card X = cXz + 1 ; then A12: card (X \ {z}) = cXz by A9, STIRL2_1:55; cXz < cXz + 1 by NAT_1:13; then A13: card (X \ {z}) < card X by A9, STIRL2_1:55; then k + (card (X \ {z})) < n + 1 by A5, XREAL_1:8; then k + (card (X \ {z})) <= n by NAT_1:13; then A14: card (Choose ((X \ {z}),(k1 + 1),x,y)) = (card (X \ {z})) choose (k1 + 1) by A3; k1 < k1 + 1 by NAT_1:13; then k1 + (card (X \ {z})) < n + 1 by A5, A13, XREAL_1:8; then k1 + (card (X \ {z})) <= n by NAT_1:13; then A15: card (Choose ((X \ {z}),k1,x,y)) = (card (X \ {z})) choose k1 by A3; card X = cXz + 1 ; hence card (Choose (X,k,x,y)) = (card X) choose k by A14, A15, A11, A12, NEWTON:22; ::_thesis: verum end; end; end; end; end; A16: S1[ 0 ] proof let k be Nat; ::_thesis: for X being finite set st k + (card X) <= 0 holds card (Choose (X,k,x,y)) = (card X) choose k let X be finite set ; ::_thesis: ( k + (card X) <= 0 implies card (Choose (X,k,x,y)) = (card X) choose k ) A17: 0 choose 0 = 1 by NEWTON:19; assume k + (card X) <= 0 ; ::_thesis: card (Choose (X,k,x,y)) = (card X) choose k then ( k + (card X) = 0 & card X = 0 ) ; hence card (Choose (X,k,x,y)) = (card X) choose k by A1, Th11, A17; ::_thesis: verum end; for n being Nat holds S1[n] from NAT_1:sch_2(A16, A2); then S1[k + (card X)] ; hence card (Choose (X,k,x,y)) = (card X) choose k ; ::_thesis: verum end; theorem Th17: :: CARD_FIN:17 for x, y being set for Y, X being finite set st x <> y holds (Y --> y) +* (X --> x) in Choose ((X \/ Y),(card X),x,y) proof let x, y be set ; ::_thesis: for Y, X being finite set st x <> y holds (Y --> y) +* (X --> x) in Choose ((X \/ Y),(card X),x,y) let Y, X be finite set ; ::_thesis: ( x <> y implies (Y --> y) +* (X --> x) in Choose ((X \/ Y),(card X),x,y) ) set F = (Y --> y) +* (X --> x); ( dom (Y --> y) = Y & dom (X --> x) = X ) by FUNCOP_1:13; then A1: dom ((Y --> y) +* (X --> x)) = X \/ Y by FUNCT_4:def_1; {y} c= {x,y} by ZFMISC_1:7; then A2: rng (Y --> y) c= {x,y} by XBOOLE_1:1; {x} c= {x,y} by ZFMISC_1:7; then rng (X --> x) c= {x,y} by XBOOLE_1:1; then ( rng ((Y --> y) +* (X --> x)) c= (rng (X --> x)) \/ (rng (Y --> y)) & (rng (X --> x)) \/ (rng (Y --> y)) c= {x,y} ) by A2, FUNCT_4:17, XBOOLE_1:8; then reconsider F = (Y --> y) +* (X --> x) as Function of (X \/ Y),{x,y} by A1, FUNCT_2:2, XBOOLE_1:1; assume A3: x <> y ; ::_thesis: (Y --> y) +* (X --> x) in Choose ((X \/ Y),(card X),x,y) A4: F " {x} c= X proof let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in F " {x} or z in X ) assume A5: z in F " {x} ; ::_thesis: z in X A6: ( z in X or z in Y ) by A5, XBOOLE_0:def_3; F . z in {x} by A5, FUNCT_1:def_7; then A7: F . z = x by TARSKI:def_1; z in dom F by A5, FUNCT_1:def_7; then A8: z in (dom (X --> x)) \/ (dom (Y --> y)) by FUNCT_4:def_1; assume A9: not z in X ; ::_thesis: contradiction X = dom (X --> x) by FUNCOP_1:13; then F . z = (Y --> y) . z by A9, A8, FUNCT_4:def_1; hence contradiction by A3, A9, A6, A7, FUNCOP_1:7; ::_thesis: verum end; X c= F " {x} proof let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in X or z in F " {x} ) assume A10: z in X ; ::_thesis: z in F " {x} A11: z in dom F by A1, A10, XBOOLE_0:def_3; z in dom (X --> x) by A10, FUNCOP_1:13; then A12: F . z = (X --> x) . z by FUNCT_4:13; (X --> x) . z = x by A10, FUNCOP_1:7; then F . z in {x} by A12, TARSKI:def_1; hence z in F " {x} by A11, FUNCT_1:def_7; ::_thesis: verum end; then X = F " {x} by A4, XBOOLE_0:def_10; hence (Y --> y) +* (X --> x) in Choose ((X \/ Y),(card X),x,y) by Def1; ::_thesis: verum end; theorem Th18: :: CARD_FIN:18 for x, y being set for X, Y being finite set st x <> y & X misses Y holds (X --> x) +* (Y --> y) in Choose ((X \/ Y),(card X),x,y) proof let x, y be set ; ::_thesis: for X, Y being finite set st x <> y & X misses Y holds (X --> x) +* (Y --> y) in Choose ((X \/ Y),(card X),x,y) let X, Y be finite set ; ::_thesis: ( x <> y & X misses Y implies (X --> x) +* (Y --> y) in Choose ((X \/ Y),(card X),x,y) ) assume that A1: x <> y and A2: X misses Y ; ::_thesis: (X --> x) +* (Y --> y) in Choose ((X \/ Y),(card X),x,y) ( dom (X --> x) = X & dom (Y --> y) = Y ) by FUNCOP_1:13; then (X --> x) +* (Y --> y) = (Y --> y) +* (X --> x) by A2, FUNCT_4:35; hence (X --> x) +* (Y --> y) in Choose ((X \/ Y),(card X),x,y) by A1, Th17; ::_thesis: verum end; definition let F, Ch be Function; let y be set ; func Intersection (F,Ch,y) -> Subset of (union (rng F)) means :Def2: :: CARD_FIN:def 2 for z being set holds ( z in it iff ( z in union (rng F) & ( for x being set st x in dom Ch & Ch . x = y holds z in F . x ) ) ); existence ex b1 being Subset of (union (rng F)) st for z being set holds ( z in b1 iff ( z in union (rng F) & ( for x being set st x in dom Ch & Ch . x = y holds z in F . x ) ) ) proof defpred S1[ set ] means for x being set st x in dom Ch & Ch . x = y holds $1 in F . x; consider I being set such that A1: for z being set holds ( z in I iff ( z in union (rng F) & S1[z] ) ) from XBOOLE_0:sch_1(); I c= union (rng F) proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in I or x in union (rng F) ) assume x in I ; ::_thesis: x in union (rng F) hence x in union (rng F) by A1; ::_thesis: verum end; then reconsider I = I as Subset of (union (rng F)) ; take I ; ::_thesis: for z being set holds ( z in I iff ( z in union (rng F) & ( for x being set st x in dom Ch & Ch . x = y holds z in F . x ) ) ) thus for z being set holds ( z in I iff ( z in union (rng F) & ( for x being set st x in dom Ch & Ch . x = y holds z in F . x ) ) ) by A1; ::_thesis: verum end; uniqueness for b1, b2 being Subset of (union (rng F)) st ( for z being set holds ( z in b1 iff ( z in union (rng F) & ( for x being set st x in dom Ch & Ch . x = y holds z in F . x ) ) ) ) & ( for z being set holds ( z in b2 iff ( z in union (rng F) & ( for x being set st x in dom Ch & Ch . x = y holds z in F . x ) ) ) ) holds b1 = b2 proof let I1, I2 be Subset of (union (rng F)); ::_thesis: ( ( for z being set holds ( z in I1 iff ( z in union (rng F) & ( for x being set st x in dom Ch & Ch . x = y holds z in F . x ) ) ) ) & ( for z being set holds ( z in I2 iff ( z in union (rng F) & ( for x being set st x in dom Ch & Ch . x = y holds z in F . x ) ) ) ) implies I1 = I2 ) assume that A2: for z being set holds ( z in I1 iff ( z in union (rng F) & ( for x being set st x in dom Ch & Ch . x = y holds z in F . x ) ) ) and A3: for z being set holds ( z in I2 iff ( z in union (rng F) & ( for x being set st x in dom Ch & Ch . x = y holds z in F . x ) ) ) ; ::_thesis: I1 = I2 for z being set holds ( z in I1 iff z in I2 ) proof let z be set ; ::_thesis: ( z in I1 iff z in I2 ) ( z in I1 iff ( z in union (rng F) & ( for x being set st x in dom Ch & Ch . x = y holds z in F . x ) ) ) by A2; hence ( z in I1 iff z in I2 ) by A3; ::_thesis: verum end; hence I1 = I2 by TARSKI:1; ::_thesis: verum end; end; :: deftheorem Def2 defines Intersection CARD_FIN:def_2_:_ for F, Ch being Function for y being set for b4 being Subset of (union (rng F)) holds ( b4 = Intersection (F,Ch,y) iff for z being set holds ( z in b4 iff ( z in union (rng F) & ( for x being set st x in dom Ch & Ch . x = y holds z in F . x ) ) ) ); theorem Th19: :: CARD_FIN:19 for x, y being set for F, Ch being Function st not (dom F) /\ (Ch " {x}) is empty holds ( y in Intersection (F,Ch,x) iff for z being set st z in dom Ch & Ch . z = x holds y in F . z ) proof let x, y be set ; ::_thesis: for F, Ch being Function st not (dom F) /\ (Ch " {x}) is empty holds ( y in Intersection (F,Ch,x) iff for z being set st z in dom Ch & Ch . z = x holds y in F . z ) let F, Ch be Function; ::_thesis: ( not (dom F) /\ (Ch " {x}) is empty implies ( y in Intersection (F,Ch,x) iff for z being set st z in dom Ch & Ch . z = x holds y in F . z ) ) assume A1: not (dom F) /\ (Ch " {x}) is empty ; ::_thesis: ( y in Intersection (F,Ch,x) iff for z being set st z in dom Ch & Ch . z = x holds y in F . z ) thus ( y in Intersection (F,Ch,x) implies for z being set st z in dom Ch & Ch . z = x holds y in F . z ) by Def2; ::_thesis: ( ( for z being set st z in dom Ch & Ch . z = x holds y in F . z ) implies y in Intersection (F,Ch,x) ) thus ( ( for z being set st z in dom Ch & Ch . z = x holds y in F . z ) implies y in Intersection (F,Ch,x) ) ::_thesis: verum proof consider z being set such that A2: z in (dom F) /\ (Ch " {x}) by A1, XBOOLE_0:def_1; A3: z in Ch " {x} by A2, XBOOLE_0:def_4; then Ch . z in {x} by FUNCT_1:def_7; then A4: Ch . z = x by TARSKI:def_1; z in dom F by A2, XBOOLE_0:def_4; then A5: F . z in rng F by FUNCT_1:def_3; assume A6: for z being set st z in dom Ch & Ch . z = x holds y in F . z ; ::_thesis: y in Intersection (F,Ch,x) z in dom Ch by A3, FUNCT_1:def_7; then y in F . z by A6, A4; then y in union (rng F) by A5, TARSKI:def_4; hence y in Intersection (F,Ch,x) by A6, Def2; ::_thesis: verum end; end; theorem Th20: :: CARD_FIN:20 for y being set for F, Ch being Function st not Intersection (F,Ch,y) is empty holds Ch " {y} c= dom F proof let y be set ; ::_thesis: for F, Ch being Function st not Intersection (F,Ch,y) is empty holds Ch " {y} c= dom F let F, Ch be Function; ::_thesis: ( not Intersection (F,Ch,y) is empty implies Ch " {y} c= dom F ) assume not Intersection (F,Ch,y) is empty ; ::_thesis: Ch " {y} c= dom F then consider z being set such that A1: z in Intersection (F,Ch,y) by XBOOLE_0:def_1; assume not Ch " {y} c= dom F ; ::_thesis: contradiction then consider x being set such that A2: x in Ch " {y} and A3: not x in dom F by TARSKI:def_3; Ch . x in {y} by A2, FUNCT_1:def_7; then A4: Ch . x = y by TARSKI:def_1; x in dom Ch by A2, FUNCT_1:def_7; then z in F . x by A1, A4, Def2; hence contradiction by A3, FUNCT_1:def_2; ::_thesis: verum end; theorem :: CARD_FIN:21 for y being set for F, Ch being Function st not Intersection (F,Ch,y) is empty holds for x1, x2 being set st x1 in Ch " {y} & x2 in Ch " {y} holds F . x1 meets F . x2 proof let y be set ; ::_thesis: for F, Ch being Function st not Intersection (F,Ch,y) is empty holds for x1, x2 being set st x1 in Ch " {y} & x2 in Ch " {y} holds F . x1 meets F . x2 let F, Ch be Function; ::_thesis: ( not Intersection (F,Ch,y) is empty implies for x1, x2 being set st x1 in Ch " {y} & x2 in Ch " {y} holds F . x1 meets F . x2 ) assume not Intersection (F,Ch,y) is empty ; ::_thesis: for x1, x2 being set st x1 in Ch " {y} & x2 in Ch " {y} holds F . x1 meets F . x2 then consider z being set such that A1: z in Intersection (F,Ch,y) by XBOOLE_0:def_1; let x1, x2 be set ; ::_thesis: ( x1 in Ch " {y} & x2 in Ch " {y} implies F . x1 meets F . x2 ) assume that A2: x1 in Ch " {y} and A3: x2 in Ch " {y} ; ::_thesis: F . x1 meets F . x2 Ch . x2 in {y} by A3, FUNCT_1:def_7; then A4: Ch . x2 = y by TARSKI:def_1; Ch . x1 in {y} by A2, FUNCT_1:def_7; then A5: Ch . x1 = y by TARSKI:def_1; x2 in dom Ch by A3, FUNCT_1:def_7; then A6: z in F . x2 by A1, A4, Def2; x1 in dom Ch by A2, FUNCT_1:def_7; then z in F . x1 by A1, A5, Def2; hence F . x1 meets F . x2 by A6, XBOOLE_0:3; ::_thesis: verum end; theorem Th22: :: CARD_FIN:22 for z, y being set for F, Ch being Function st z in Intersection (F,Ch,y) & y in rng Ch holds ex x being set st ( x in dom Ch & Ch . x = y & z in F . x ) proof let z, y be set ; ::_thesis: for F, Ch being Function st z in Intersection (F,Ch,y) & y in rng Ch holds ex x being set st ( x in dom Ch & Ch . x = y & z in F . x ) let F, Ch be Function; ::_thesis: ( z in Intersection (F,Ch,y) & y in rng Ch implies ex x being set st ( x in dom Ch & Ch . x = y & z in F . x ) ) assume that A1: z in Intersection (F,Ch,y) and A2: y in rng Ch ; ::_thesis: ex x being set st ( x in dom Ch & Ch . x = y & z in F . x ) Ch " {y} <> {} by A2, FUNCT_1:72; then consider x being set such that A3: x in Ch " {y} by XBOOLE_0:def_1; Ch . x in {y} by A3, FUNCT_1:def_7; then A4: Ch . x = y by TARSKI:def_1; A5: x in dom Ch by A3, FUNCT_1:def_7; x in dom Ch by A3, FUNCT_1:def_7; then z in F . x by A1, A4, Def2; hence ex x being set st ( x in dom Ch & Ch . x = y & z in F . x ) by A4, A5; ::_thesis: verum end; theorem :: CARD_FIN:23 for y being set for F, Ch being Function st ( F is empty or union (rng F) is empty ) holds Intersection (F,Ch,y) = union (rng F) by RELAT_1:38, ZFMISC_1:2; theorem Th24: :: CARD_FIN:24 for y being set for F, Ch being Function st F | (Ch " {y}) = (Ch " {y}) --> (union (rng F)) holds Intersection (F,Ch,y) = union (rng F) proof let y be set ; ::_thesis: for F, Ch being Function st F | (Ch " {y}) = (Ch " {y}) --> (union (rng F)) holds Intersection (F,Ch,y) = union (rng F) let F, Ch be Function; ::_thesis: ( F | (Ch " {y}) = (Ch " {y}) --> (union (rng F)) implies Intersection (F,Ch,y) = union (rng F) ) set ChF = (Ch " {y}) --> (union (rng F)); assume A1: F | (Ch " {y}) = (Ch " {y}) --> (union (rng F)) ; ::_thesis: Intersection (F,Ch,y) = union (rng F) union (rng F) c= Intersection (F,Ch,y) proof let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in union (rng F) or z in Intersection (F,Ch,y) ) assume A2: z in union (rng F) ; ::_thesis: z in Intersection (F,Ch,y) now__::_thesis:_for_x_being_set_st_x_in_dom_Ch_&_Ch_._x_=_y_holds_ z_in_F_._x let x be set ; ::_thesis: ( x in dom Ch & Ch . x = y implies z in F . x ) assume that A3: x in dom Ch and A4: Ch . x = y ; ::_thesis: z in F . x Ch . x in {y} by A4, TARSKI:def_1; then A5: x in Ch " {y} by A3, FUNCT_1:def_7; then ( dom ((Ch " {y}) --> (union (rng F))) = Ch " {y} & ((Ch " {y}) --> (union (rng F))) . x = union (rng F) ) by FUNCOP_1:7, FUNCOP_1:13; hence z in F . x by A1, A2, A5, FUNCT_1:47; ::_thesis: verum end; hence z in Intersection (F,Ch,y) by A2, Def2; ::_thesis: verum end; hence Intersection (F,Ch,y) = union (rng F) by XBOOLE_0:def_10; ::_thesis: verum end; theorem :: CARD_FIN:25 for y being set for F, Ch being Function st not union (rng F) is empty & Intersection (F,Ch,y) = union (rng F) holds F | (Ch " {y}) = (Ch " {y}) --> (union (rng F)) proof let y be set ; ::_thesis: for F, Ch being Function st not union (rng F) is empty & Intersection (F,Ch,y) = union (rng F) holds F | (Ch " {y}) = (Ch " {y}) --> (union (rng F)) let F, Ch be Function; ::_thesis: ( not union (rng F) is empty & Intersection (F,Ch,y) = union (rng F) implies F | (Ch " {y}) = (Ch " {y}) --> (union (rng F)) ) set ChF = (Ch " {y}) --> (union (rng F)); assume that A1: not union (rng F) is empty and A2: Intersection (F,Ch,y) = union (rng F) ; ::_thesis: F | (Ch " {y}) = (Ch " {y}) --> (union (rng F)) A3: (dom F) /\ (Ch " {y}) = dom (F | (Ch " {y})) by RELAT_1:61; (dom F) /\ (Ch " {y}) = Ch " {y} by A1, A2, Th20, XBOOLE_1:28; then A4: dom (F | (Ch " {y})) = dom ((Ch " {y}) --> (union (rng F))) by A3, FUNCOP_1:13; assume F | (Ch " {y}) <> (Ch " {y}) --> (union (rng F)) ; ::_thesis: contradiction then consider x being set such that A5: x in dom (F | (Ch " {y})) and A6: (F | (Ch " {y})) . x <> ((Ch " {y}) --> (union (rng F))) . x by A4, FUNCT_1:2; x in (dom F) /\ (Ch " {y}) by A5, RELAT_1:61; then A7: x in dom F by XBOOLE_0:def_4; x in (dom F) /\ (Ch " {y}) by A5, RELAT_1:61; then A8: x in Ch " {y} by XBOOLE_0:def_4; then A9: ((Ch " {y}) --> (union (rng F))) . x = union (rng F) by FUNCOP_1:7; Ch . x in {y} by A8, FUNCT_1:def_7; then A10: Ch . x = y by TARSKI:def_1; F . x = (F | (Ch " {y})) . x by A5, FUNCT_1:47; then (F | (Ch " {y})) . x in rng F by A7, FUNCT_1:def_3; then (F | (Ch " {y})) . x c= ((Ch " {y}) --> (union (rng F))) . x by A9, ZFMISC_1:74; then not union (rng F) c= (F | (Ch " {y})) . x by A6, A9, XBOOLE_0:def_10; then consider z being set such that A11: z in union (rng F) and A12: not z in (F | (Ch " {y})) . x by TARSKI:def_3; x in dom Ch by A8, FUNCT_1:def_7; then z in F . x by A2, A11, A10, Def2; hence contradiction by A5, A12, FUNCT_1:47; ::_thesis: verum end; theorem Th26: :: CARD_FIN:26 for y being set for F being Function holds Intersection (F,{},y) = union (rng F) proof let y be set ; ::_thesis: for F being Function holds Intersection (F,{},y) = union (rng F) let F be Function; ::_thesis: Intersection (F,{},y) = union (rng F) F | ({} " {y}) = ({} " {y}) --> (union (rng F)) ; hence Intersection (F,{},y) = union (rng F) by Th24; ::_thesis: verum end; theorem Th27: :: CARD_FIN:27 for y, X9 being set for F, Ch being Function holds Intersection (F,Ch,y) c= Intersection (F,(Ch | X9),y) proof let y, X9 be set ; ::_thesis: for F, Ch being Function holds Intersection (F,Ch,y) c= Intersection (F,(Ch | X9),y) let F, Ch be Function; ::_thesis: Intersection (F,Ch,y) c= Intersection (F,(Ch | X9),y) let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in Intersection (F,Ch,y) or z in Intersection (F,(Ch | X9),y) ) assume A1: z in Intersection (F,Ch,y) ; ::_thesis: z in Intersection (F,(Ch | X9),y) now__::_thesis:_for_x_being_set_st_x_in_dom_(Ch_|_X9)_&_(Ch_|_X9)_._x_=_y_holds_ z_in_F_._x let x be set ; ::_thesis: ( x in dom (Ch | X9) & (Ch | X9) . x = y implies z in F . x ) assume that A2: x in dom (Ch | X9) and A3: (Ch | X9) . x = y ; ::_thesis: z in F . x x in (dom Ch) /\ X9 by A2, RELAT_1:61; then A4: x in dom Ch by XBOOLE_0:def_4; Ch . x = y by A2, A3, FUNCT_1:47; hence z in F . x by A1, A4, Def2; ::_thesis: verum end; hence z in Intersection (F,(Ch | X9),y) by A1, Def2; ::_thesis: verum end; theorem Th28: :: CARD_FIN:28 for y, X9 being set for Ch, F being Function st Ch " {y} = (Ch | X9) " {y} holds Intersection (F,Ch,y) = Intersection (F,(Ch | X9),y) proof let y, X9 be set ; ::_thesis: for Ch, F being Function st Ch " {y} = (Ch | X9) " {y} holds Intersection (F,Ch,y) = Intersection (F,(Ch | X9),y) let Ch, F be Function; ::_thesis: ( Ch " {y} = (Ch | X9) " {y} implies Intersection (F,Ch,y) = Intersection (F,(Ch | X9),y) ) assume A1: Ch " {y} = (Ch | X9) " {y} ; ::_thesis: Intersection (F,Ch,y) = Intersection (F,(Ch | X9),y) A2: Intersection (F,(Ch | X9),y) c= Intersection (F,Ch,y) proof let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in Intersection (F,(Ch | X9),y) or z in Intersection (F,Ch,y) ) assume A3: z in Intersection (F,(Ch | X9),y) ; ::_thesis: z in Intersection (F,Ch,y) now__::_thesis:_for_x_being_set_st_x_in_dom_Ch_&_Ch_._x_=_y_holds_ z_in_F_._x let x be set ; ::_thesis: ( x in dom Ch & Ch . x = y implies z in F . x ) assume that A4: x in dom Ch and A5: Ch . x = y ; ::_thesis: z in F . x Ch . x in {y} by A5, TARSKI:def_1; then A6: x in (Ch | X9) " {y} by A1, A4, FUNCT_1:def_7; then (Ch | X9) . x in {y} by FUNCT_1:def_7; then A7: (Ch | X9) . x = y by TARSKI:def_1; x in dom (Ch | X9) by A6, FUNCT_1:def_7; hence z in F . x by A3, A7, Def2; ::_thesis: verum end; hence z in Intersection (F,Ch,y) by A3, Def2; ::_thesis: verum end; Intersection (F,Ch,y) c= Intersection (F,(Ch | X9),y) by Th27; hence Intersection (F,Ch,y) = Intersection (F,(Ch | X9),y) by A2, XBOOLE_0:def_10; ::_thesis: verum end; theorem Th29: :: CARD_FIN:29 for X9, y being set for F, Ch being Function holds Intersection ((F | X9),Ch,y) c= Intersection (F,Ch,y) proof let X9, y be set ; ::_thesis: for F, Ch being Function holds Intersection ((F | X9),Ch,y) c= Intersection (F,Ch,y) let F, Ch be Function; ::_thesis: Intersection ((F | X9),Ch,y) c= Intersection (F,Ch,y) let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in Intersection ((F | X9),Ch,y) or z in Intersection (F,Ch,y) ) assume A1: z in Intersection ((F | X9),Ch,y) ; ::_thesis: z in Intersection (F,Ch,y) A2: now__::_thesis:_for_x_being_set_st_x_in_dom_Ch_&_Ch_._x_=_y_holds_ z_in_F_._x A3: Ch " {y} c= dom (F | X9) by A1, Th20; let x be set ; ::_thesis: ( x in dom Ch & Ch . x = y implies z in F . x ) assume that A4: x in dom Ch and A5: Ch . x = y ; ::_thesis: z in F . x Ch . x in {y} by A5, TARSKI:def_1; then A6: x in Ch " {y} by A4, FUNCT_1:def_7; z in (F | X9) . x by A1, A4, A5, Def2; hence z in F . x by A6, A3, FUNCT_1:47; ::_thesis: verum end; ( union (rng (F | X9)) c= union (rng F) & z in union (rng (F | X9)) ) by A1, RELAT_1:70, ZFMISC_1:77; hence z in Intersection (F,Ch,y) by A2, Def2; ::_thesis: verum end; theorem Th30: :: CARD_FIN:30 for y, X9 being set for Ch, F being Function st y in rng Ch & Ch " {y} c= X9 holds Intersection ((F | X9),Ch,y) = Intersection (F,Ch,y) proof let y, X9 be set ; ::_thesis: for Ch, F being Function st y in rng Ch & Ch " {y} c= X9 holds Intersection ((F | X9),Ch,y) = Intersection (F,Ch,y) let Ch, F be Function; ::_thesis: ( y in rng Ch & Ch " {y} c= X9 implies Intersection ((F | X9),Ch,y) = Intersection (F,Ch,y) ) assume that A1: y in rng Ch and A2: Ch " {y} c= X9 ; ::_thesis: Intersection ((F | X9),Ch,y) = Intersection (F,Ch,y) A3: Intersection (F,Ch,y) c= Intersection ((F | X9),Ch,y) proof let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in Intersection (F,Ch,y) or z in Intersection ((F | X9),Ch,y) ) assume A4: z in Intersection (F,Ch,y) ; ::_thesis: z in Intersection ((F | X9),Ch,y) A5: now__::_thesis:_for_x_being_set_st_x_in_dom_Ch_&_Ch_._x_=_y_holds_ z_in_(F_|_X9)_._x let x be set ; ::_thesis: ( x in dom Ch & Ch . x = y implies z in (F | X9) . x ) assume that A6: x in dom Ch and A7: Ch . x = y ; ::_thesis: z in (F | X9) . x Ch . x in {y} by A7, TARSKI:def_1; then A8: x in Ch " {y} by A6, FUNCT_1:def_7; z in F . x by A4, A6, A7, Def2; then x in dom F by FUNCT_1:def_2; then x in (dom F) /\ X9 by A2, A8, XBOOLE_0:def_4; then A9: x in dom (F | X9) by RELAT_1:61; z in F . x by A4, A6, A7, Def2; hence z in (F | X9) . x by A9, FUNCT_1:47; ::_thesis: verum end; consider x being set such that A10: x in dom Ch and A11: Ch . x = y and A12: z in F . x by A1, A4, Th22; Ch . x in {y} by A11, TARSKI:def_1; then A13: x in Ch " {y} by A10, FUNCT_1:def_7; x in dom F by A12, FUNCT_1:def_2; then x in (dom F) /\ X9 by A2, A13, XBOOLE_0:def_4; then x in dom (F | X9) by RELAT_1:61; then A14: (F | X9) . x in rng (F | X9) by FUNCT_1:def_3; z in (F | X9) . x by A5, A10, A11; then z in union (rng (F | X9)) by A14, TARSKI:def_4; hence z in Intersection ((F | X9),Ch,y) by A5, Def2; ::_thesis: verum end; Intersection ((F | X9),Ch,y) c= Intersection (F,Ch,y) by Th29; hence Intersection ((F | X9),Ch,y) = Intersection (F,Ch,y) by A3, XBOOLE_0:def_10; ::_thesis: verum end; theorem Th31: :: CARD_FIN:31 for x, y being set for Ch, F being Function st x in Ch " {y} holds Intersection (F,Ch,y) c= F . x proof let x, y be set ; ::_thesis: for Ch, F being Function st x in Ch " {y} holds Intersection (F,Ch,y) c= F . x let Ch, F be Function; ::_thesis: ( x in Ch " {y} implies Intersection (F,Ch,y) c= F . x ) assume A1: x in Ch " {y} ; ::_thesis: Intersection (F,Ch,y) c= F . x then A2: x in dom Ch by FUNCT_1:def_7; Ch . x in {y} by A1, FUNCT_1:def_7; then A3: Ch . x = y by TARSKI:def_1; let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in Intersection (F,Ch,y) or z in F . x ) assume z in Intersection (F,Ch,y) ; ::_thesis: z in F . x hence z in F . x by A2, A3, Def2; ::_thesis: verum end; theorem Th32: :: CARD_FIN:32 for x, y being set for Ch, F being Function st x in Ch " {y} holds (Intersection (F,(Ch | ((dom Ch) \ {x})),y)) /\ (F . x) = Intersection (F,Ch,y) proof let x, y be set ; ::_thesis: for Ch, F being Function st x in Ch " {y} holds (Intersection (F,(Ch | ((dom Ch) \ {x})),y)) /\ (F . x) = Intersection (F,Ch,y) let Ch, F be Function; ::_thesis: ( x in Ch " {y} implies (Intersection (F,(Ch | ((dom Ch) \ {x})),y)) /\ (F . x) = Intersection (F,Ch,y) ) set d = (dom Ch) \ {x}; set Chd = Ch | ((dom Ch) \ {x}); set I1 = Intersection (F,Ch,y); set I2 = Intersection (F,(Ch | ((dom Ch) \ {x})),y); assume x in Ch " {y} ; ::_thesis: (Intersection (F,(Ch | ((dom Ch) \ {x})),y)) /\ (F . x) = Intersection (F,Ch,y) then A1: Intersection (F,Ch,y) c= F . x by Th31; A2: (Intersection (F,(Ch | ((dom Ch) \ {x})),y)) /\ (F . x) c= Intersection (F,Ch,y) proof let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in (Intersection (F,(Ch | ((dom Ch) \ {x})),y)) /\ (F . x) or z in Intersection (F,Ch,y) ) assume A3: z in (Intersection (F,(Ch | ((dom Ch) \ {x})),y)) /\ (F . x) ; ::_thesis: z in Intersection (F,Ch,y) now__::_thesis:_for_x1_being_set_st_x1_in_dom_Ch_&_Ch_._x1_=_y_holds_ z_in_F_._x1 let x1 be set ; ::_thesis: ( x1 in dom Ch & Ch . x1 = y implies z in F . b1 ) assume that A4: x1 in dom Ch and A5: Ch . x1 = y ; ::_thesis: z in F . b1 percases ( x1 in (dom Ch) \ {x} or x1 in {x} ) by A4, XBOOLE_0:def_5; supposeA6: x1 in (dom Ch) \ {x} ; ::_thesis: z in F . b1 A7: z in Intersection (F,(Ch | ((dom Ch) \ {x})),y) by A3, XBOOLE_0:def_4; A8: ( (dom Ch) /\ ((dom Ch) \ {x}) = dom (Ch | ((dom Ch) \ {x})) & (dom Ch) /\ ((dom Ch) \ {x}) = (dom Ch) \ {x} ) by RELAT_1:61, XBOOLE_1:28; then (Ch | ((dom Ch) \ {x})) . x1 = y by A5, A6, FUNCT_1:47; hence z in F . x1 by A6, A8, A7, Def2; ::_thesis: verum end; suppose x1 in {x} ; ::_thesis: z in F . b1 then x1 = x by TARSKI:def_1; hence z in F . x1 by A3, XBOOLE_0:def_4; ::_thesis: verum end; end; end; hence z in Intersection (F,Ch,y) by A3, Def2; ::_thesis: verum end; Intersection (F,Ch,y) c= Intersection (F,(Ch | ((dom Ch) \ {x})),y) by Th27; then Intersection (F,Ch,y) c= (Intersection (F,(Ch | ((dom Ch) \ {x})),y)) /\ (F . x) by A1, XBOOLE_1:19; hence (Intersection (F,(Ch | ((dom Ch) \ {x})),y)) /\ (F . x) = Intersection (F,Ch,y) by A2, XBOOLE_0:def_10; ::_thesis: verum end; theorem Th33: :: CARD_FIN:33 for x1, x2 being set for F, Ch1, Ch2 being Function st Ch1 " {x1} = Ch2 " {x2} holds Intersection (F,Ch1,x1) = Intersection (F,Ch2,x2) proof let x1, x2 be set ; ::_thesis: for F, Ch1, Ch2 being Function st Ch1 " {x1} = Ch2 " {x2} holds Intersection (F,Ch1,x1) = Intersection (F,Ch2,x2) let F be Function; ::_thesis: for Ch1, Ch2 being Function st Ch1 " {x1} = Ch2 " {x2} holds Intersection (F,Ch1,x1) = Intersection (F,Ch2,x2) let Ch1, Ch2 be Function; ::_thesis: ( Ch1 " {x1} = Ch2 " {x2} implies Intersection (F,Ch1,x1) = Intersection (F,Ch2,x2) ) assume A1: Ch1 " {x1} = Ch2 " {x2} ; ::_thesis: Intersection (F,Ch1,x1) = Intersection (F,Ch2,x2) thus Intersection (F,Ch1,x1) c= Intersection (F,Ch2,x2) :: according to XBOOLE_0:def_10 ::_thesis: Intersection (F,Ch2,x2) c= Intersection (F,Ch1,x1) proof let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in Intersection (F,Ch1,x1) or z in Intersection (F,Ch2,x2) ) assume A2: z in Intersection (F,Ch1,x1) ; ::_thesis: z in Intersection (F,Ch2,x2) now__::_thesis:_for_x_being_set_st_x_in_dom_Ch2_&_Ch2_._x_=_x2_holds_ z_in_F_._x let x be set ; ::_thesis: ( x in dom Ch2 & Ch2 . x = x2 implies z in F . x ) assume that A3: x in dom Ch2 and A4: Ch2 . x = x2 ; ::_thesis: z in F . x Ch2 . x in {x2} by A4, TARSKI:def_1; then A5: x in Ch1 " {x1} by A1, A3, FUNCT_1:def_7; then Ch1 . x in {x1} by FUNCT_1:def_7; then A6: Ch1 . x = x1 by TARSKI:def_1; x in dom Ch1 by A5, FUNCT_1:def_7; hence z in F . x by A2, A6, Def2; ::_thesis: verum end; hence z in Intersection (F,Ch2,x2) by A2, Def2; ::_thesis: verum end; thus Intersection (F,Ch2,x2) c= Intersection (F,Ch1,x1) ::_thesis: verum proof let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in Intersection (F,Ch2,x2) or z in Intersection (F,Ch1,x1) ) assume A7: z in Intersection (F,Ch2,x2) ; ::_thesis: z in Intersection (F,Ch1,x1) now__::_thesis:_for_x_being_set_st_x_in_dom_Ch1_&_Ch1_._x_=_x1_holds_ z_in_F_._x let x be set ; ::_thesis: ( x in dom Ch1 & Ch1 . x = x1 implies z in F . x ) assume that A8: x in dom Ch1 and A9: Ch1 . x = x1 ; ::_thesis: z in F . x Ch1 . x in {x1} by A9, TARSKI:def_1; then A10: x in Ch2 " {x2} by A1, A8, FUNCT_1:def_7; then Ch2 . x in {x2} by FUNCT_1:def_7; then A11: Ch2 . x = x2 by TARSKI:def_1; x in dom Ch2 by A10, FUNCT_1:def_7; hence z in F . x by A7, A11, Def2; ::_thesis: verum end; hence z in Intersection (F,Ch1,x1) by A7, Def2; ::_thesis: verum end; end; theorem Th34: :: CARD_FIN:34 for y being set for Ch, F being Function st Ch " {y} = {} holds Intersection (F,Ch,y) = union (rng F) proof let y be set ; ::_thesis: for Ch, F being Function st Ch " {y} = {} holds Intersection (F,Ch,y) = union (rng F) let Ch, F be Function; ::_thesis: ( Ch " {y} = {} implies Intersection (F,Ch,y) = union (rng F) ) reconsider E = {} as set ; A1: ( Ch | E = {} & Intersection (F,{},y) = union (rng F) ) by Th26; assume Ch " {y} = {} ; ::_thesis: Intersection (F,Ch,y) = union (rng F) then (Ch | E) " {y} = Ch " {y} ; hence Intersection (F,Ch,y) = union (rng F) by A1, Th33; ::_thesis: verum end; theorem Th35: :: CARD_FIN:35 for x, y being set for Ch, F being Function st {x} = Ch " {y} holds Intersection (F,Ch,y) = F . x proof let x, y be set ; ::_thesis: for Ch, F being Function st {x} = Ch " {y} holds Intersection (F,Ch,y) = F . x let Ch, F be Function; ::_thesis: ( {x} = Ch " {y} implies Intersection (F,Ch,y) = F . x ) A1: (dom Ch) \ {x} misses {x} by XBOOLE_1:79; assume A2: {x} = Ch " {y} ; ::_thesis: Intersection (F,Ch,y) = F . x then (Ch | ((dom Ch) \ {x})) " {y} = ((dom Ch) \ {x}) /\ {x} by FUNCT_1:70; then (Ch | ((dom Ch) \ {x})) " {y} = {} by A1, XBOOLE_0:def_7; then A3: Intersection (F,(Ch | ((dom Ch) \ {x})),y) = union (rng F) by Th34; x in Ch " {y} by A2, TARSKI:def_1; then A4: (union (rng F)) /\ (F . x) = Intersection (F,Ch,y) by A3, Th32; percases ( x in dom F or not x in dom F ) ; suppose x in dom F ; ::_thesis: Intersection (F,Ch,y) = F . x then F . x in rng F by FUNCT_1:def_3; hence Intersection (F,Ch,y) = F . x by A4, XBOOLE_1:28, ZFMISC_1:74; ::_thesis: verum end; suppose not x in dom F ; ::_thesis: Intersection (F,Ch,y) = F . x then F . x = {} by FUNCT_1:def_2; hence Intersection (F,Ch,y) = F . x by A4; ::_thesis: verum end; end; end; theorem Th36: :: CARD_FIN:36 for x1, x2, y being set for Ch, F being Function st {x1,x2} = Ch " {y} holds Intersection (F,Ch,y) = (F . x1) /\ (F . x2) proof let x1, x2, y be set ; ::_thesis: for Ch, F being Function st {x1,x2} = Ch " {y} holds Intersection (F,Ch,y) = (F . x1) /\ (F . x2) let Ch, F be Function; ::_thesis: ( {x1,x2} = Ch " {y} implies Intersection (F,Ch,y) = (F . x1) /\ (F . x2) ) assume A1: {x1,x2} = Ch " {y} ; ::_thesis: Intersection (F,Ch,y) = (F . x1) /\ (F . x2) percases ( x1 = x2 or x1 <> x2 ) ; supposeA2: x1 = x2 ; ::_thesis: Intersection (F,Ch,y) = (F . x1) /\ (F . x2) then Ch " {y} = {x1} by A1, ENUMSET1:29; hence Intersection (F,Ch,y) = (F . x1) /\ (F . x2) by A2, Th35; ::_thesis: verum end; supposeA3: x1 <> x2 ; ::_thesis: Intersection (F,Ch,y) = (F . x1) /\ (F . x2) ( (Ch " {y}) /\ ((dom Ch) \ {x1}) = ((Ch " {y}) /\ (dom Ch)) \ {x1} & (Ch " {y}) /\ (dom Ch) = {x1,x2} ) by A1, RELAT_1:132, XBOOLE_1:28, XBOOLE_1:49; then (Ch " {y}) /\ ((dom Ch) \ {x1}) = {x2} by A3, ZFMISC_1:17; then A4: (Ch | ((dom Ch) \ {x1})) " {y} = {x2} by FUNCT_1:70; x1 in Ch " {y} by A1, TARSKI:def_2; then (Intersection (F,(Ch | ((dom Ch) \ {x1})),y)) /\ (F . x1) = Intersection (F,Ch,y) by Th32; hence Intersection (F,Ch,y) = (F . x1) /\ (F . x2) by A4, Th35; ::_thesis: verum end; end; end; theorem :: CARD_FIN:37 for y, x being set for F being Function st not F is empty holds ( y in Intersection (F,((dom F) --> x),x) iff for z being set st z in dom F holds y in F . z ) proof let y, x be set ; ::_thesis: for F being Function st not F is empty holds ( y in Intersection (F,((dom F) --> x),x) iff for z being set st z in dom F holds y in F . z ) let F be Function; ::_thesis: ( not F is empty implies ( y in Intersection (F,((dom F) --> x),x) iff for z being set st z in dom F holds y in F . z ) ) assume A1: not F is empty ; ::_thesis: ( y in Intersection (F,((dom F) --> x),x) iff for z being set st z in dom F holds y in F . z ) set Ch = (dom F) --> x; thus ( y in Intersection (F,((dom F) --> x),x) implies for z being set st z in dom F holds y in F . z ) ::_thesis: ( ( for z being set st z in dom F holds y in F . z ) implies y in Intersection (F,((dom F) --> x),x) ) proof assume A2: y in Intersection (F,((dom F) --> x),x) ; ::_thesis: for z being set st z in dom F holds y in F . z let z be set ; ::_thesis: ( z in dom F implies y in F . z ) assume z in dom F ; ::_thesis: y in F . z then ( z in dom ((dom F) --> x) & ((dom F) --> x) . z = x ) by FUNCOP_1:7, FUNCOP_1:13; hence y in F . z by A2, Def2; ::_thesis: verum end; ((dom F) --> x) " {x} = dom F by FUNCOP_1:15; then A3: (dom F) /\ (((dom F) --> x) " {x}) = dom F ; assume for z being set st z in dom F holds y in F . z ; ::_thesis: y in Intersection (F,((dom F) --> x),x) then for z being set st z in dom ((dom F) --> x) & ((dom F) --> x) . z = x holds y in F . z ; hence y in Intersection (F,((dom F) --> x),x) by A1, A3, Th19; ::_thesis: verum end; registration let F be finite-yielding Function; let X be set ; clusterF | X -> finite-yielding ; coherence F | X is finite-yielding proof let x be set ; :: according to FINSET_1:def_4 ::_thesis: ( not x in dom (F | X) or (F | X) . x is finite ) assume x in dom (F | X) ; ::_thesis: (F | X) . x is finite then (F | X) . x = F . x by FUNCT_1:47; hence (F | X) . x is finite ; ::_thesis: verum end; end; registration let F be finite-yielding Function; let G be Function; clusterG (#) F -> finite-yielding ; coherence F * G is finite-yielding proof let x be set ; :: according to FINSET_1:def_4 ::_thesis: ( not x in dom (F * G) or (F * G) . x is finite ) assume x in dom (F * G) ; ::_thesis: (F * G) . x is finite then (F * G) . x = F . (G . x) by FUNCT_1:12; hence (F * G) . x is finite ; ::_thesis: verum end; cluster Intersect (F,G) -> finite-yielding ; coherence Intersect (F,G) is finite-yielding proof let x be set ; :: according to FINSET_1:def_4 ::_thesis: ( not x in dom (Intersect (F,G)) or (Intersect (F,G)) . x is finite ) assume x in dom (Intersect (F,G)) ; ::_thesis: (Intersect (F,G)) . x is finite then x in (dom F) /\ (dom G) by YELLOW20:def_2; then (Intersect (F,G)) . x = (F . x) /\ (G . x) by YELLOW20:def_2; hence (Intersect (F,G)) . x is finite ; ::_thesis: verum end; end; theorem :: CARD_FIN:38 for y being set for Ch being Function for Fy being finite-yielding Function st y in rng Ch holds Intersection (Fy,Ch,y) is finite proof let y be set ; ::_thesis: for Ch being Function for Fy being finite-yielding Function st y in rng Ch holds Intersection (Fy,Ch,y) is finite let Ch be Function; ::_thesis: for Fy being finite-yielding Function st y in rng Ch holds Intersection (Fy,Ch,y) is finite let Fy be finite-yielding Function; ::_thesis: ( y in rng Ch implies Intersection (Fy,Ch,y) is finite ) assume y in rng Ch ; ::_thesis: Intersection (Fy,Ch,y) is finite then consider x being set such that A1: x in dom Ch and A2: Ch . x = y by FUNCT_1:def_3; Ch . x in {y} by A2, TARSKI:def_1; then x in Ch " {y} by A1, FUNCT_1:def_7; then Intersection (Fy,Ch,y) c= Fy . x by Th31; hence Intersection (Fy,Ch,y) is finite ; ::_thesis: verum end; theorem Th39: :: CARD_FIN:39 for Fy being finite-yielding Function st dom Fy is finite holds union (rng Fy) is finite proof let Fy be finite-yielding Function; ::_thesis: ( dom Fy is finite implies union (rng Fy) is finite ) assume dom Fy is finite ; ::_thesis: union (rng Fy) is finite then rng Fy is finite by FINSET_1:8; hence union (rng Fy) is finite ; ::_thesis: verum end; theorem :: CARD_FIN:40 for x being set for n, k being Nat holds ( x in Choose (n,k,1,0) iff ex F being XFinSequence of st ( F = x & dom F = n & rng F c= {0,1} & Sum F = k ) ) proof let x be set ; ::_thesis: for n, k being Nat holds ( x in Choose (n,k,1,0) iff ex F being XFinSequence of st ( F = x & dom F = n & rng F c= {0,1} & Sum F = k ) ) let n, k be Nat; ::_thesis: ( x in Choose (n,k,1,0) iff ex F being XFinSequence of st ( F = x & dom F = n & rng F c= {0,1} & Sum F = k ) ) thus ( x in Choose (n,k,1,0) implies ex F being XFinSequence of st ( F = x & dom F = n & rng F c= {0,1} & Sum F = k ) ) ::_thesis: ( ex F being XFinSequence of st ( F = x & dom F = n & rng F c= {0,1} & Sum F = k ) implies x in Choose (n,k,1,0) ) proof assume x in Choose (n,k,1,0) ; ::_thesis: ex F being XFinSequence of st ( F = x & dom F = n & rng F c= {0,1} & Sum F = k ) then consider F being Function of n,{0,1} such that A1: ( x = F & card (F " {1}) = k ) by Def1; A2: rng F c= {0,1} ; dom F = n by FUNCT_2:def_1; then reconsider F = F as XFinSequence by AFINSQ_1:5; rng F is Subset of NAT by A2, XBOOLE_1:1; then reconsider F = F as XFinSequence of by RELAT_1:def_19; take F ; ::_thesis: ( F = x & dom F = n & rng F c= {0,1} & Sum F = k ) Sum F = 1 * (card (F " {1})) by A2, AFINSQ_2:68; hence ( F = x & dom F = n & rng F c= {0,1} & Sum F = k ) by A1, A2, FUNCT_2:def_1; ::_thesis: verum end; given F being XFinSequence of such that A3: F = x and A4: ( dom F = n & rng F c= {0,1} & Sum F = k ) ; ::_thesis: x in Choose (n,k,1,0) ( 1 * (card (F " {1})) = k & F is Function of n,{0,1} ) by A4, AFINSQ_2:68, FUNCT_2:2; hence x in Choose (n,k,1,0) by A3, Def1; ::_thesis: verum end; Lm2: for X being finite set ex P being Function of (card X),X st P is one-to-one proof let X be finite set ; ::_thesis: ex P being Function of (card X),X st P is one-to-one card X,X are_equipotent by CARD_1:def_2; then consider P being Function such that A1: P is one-to-one and A2: ( dom P = card X & rng P = X ) by WELLORD2:def_4; P is Function of (card X),X by A2, FUNCT_2:1; hence ex P being Function of (card X),X st P is one-to-one by A1; ::_thesis: verum end; definition canceled; let k be Nat; let F be finite-yielding Function; assume A1: dom F is finite ; func Card_Intersection (F,k) -> Element of NAT means :Def4: :: CARD_FIN:def 4 for x, y being set for X being finite set for P being Function of (card (Choose (X,k,x,y))),(Choose (X,k,x,y)) st dom F = X & P is one-to-one & x <> y holds ex XFS being XFinSequence of st ( dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (F,f,x)) ) & it = Sum XFS ); existence ex b1 being Element of NAT st for x, y being set for X being finite set for P being Function of (card (Choose (X,k,x,y))),(Choose (X,k,x,y)) st dom F = X & P is one-to-one & x <> y holds ex XFS being XFinSequence of st ( dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (F,f,x)) ) & b1 = Sum XFS ) proof reconsider D = dom F as finite set by A1; set Ch1 = Choose (D,k,0,1); card (Choose (D,k,0,1)), Choose (D,k,0,1) are_equipotent by CARD_1:def_2; then consider P1 being Function such that A2: P1 is one-to-one and A3: dom P1 = card (Choose (D,k,0,1)) and A4: rng P1 = Choose (D,k,0,1) by WELLORD2:def_4; reconsider P1 = P1 as Function of (card (Choose (D,k,0,1))),(Choose (D,k,0,1)) by A3, A4, FUNCT_2:1; defpred S1[ set , set ] means for f being Function st f = P1 . $1 holds $2 = card (Intersection (F,f,0)); A5: for x being set st x in card (Choose (D,k,0,1)) holds ex y being set st ( y in NAT & S1[x,y] ) proof let x be set ; ::_thesis: ( x in card (Choose (D,k,0,1)) implies ex y being set st ( y in NAT & S1[x,y] ) ) assume x in card (Choose (D,k,0,1)) ; ::_thesis: ex y being set st ( y in NAT & S1[x,y] ) then x in dom P1 by CARD_1:27, FUNCT_2:def_1; then P1 . x in rng P1 by FUNCT_1:def_3; then consider f being Function of D,{0,1} such that A6: f = P1 . x and card (f " {0}) = k by Def1; union (rng F) is finite by A1, Th39; then reconsider I = Intersection (F,f,0) as finite set ; take card I ; ::_thesis: ( card I in NAT & S1[x, card I] ) thus ( card I in NAT & S1[x, card I] ) by A6; ::_thesis: verum end; consider XFS1 being Function of (card (Choose (D,k,0,1))),NAT such that A7: for x being set st x in card (Choose (D,k,0,1)) holds S1[x,XFS1 . x] from FUNCT_2:sch_1(A5); A8: dom XFS1 = card (Choose (D,k,0,1)) by FUNCT_2:def_1; then reconsider XFS1 = XFS1 as XFinSequence by AFINSQ_1:5; reconsider XFS1 = XFS1 as XFinSequence of ; reconsider S = Sum XFS1 as Element of NAT by ORDINAL1:def_12; take S ; ::_thesis: for x, y being set for X being finite set for P being Function of (card (Choose (X,k,x,y))),(Choose (X,k,x,y)) st dom F = X & P is one-to-one & x <> y holds ex XFS being XFinSequence of st ( dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (F,f,x)) ) & S = Sum XFS ) let x, y be set ; ::_thesis: for X being finite set for P being Function of (card (Choose (X,k,x,y))),(Choose (X,k,x,y)) st dom F = X & P is one-to-one & x <> y holds ex XFS being XFinSequence of st ( dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (F,f,x)) ) & S = Sum XFS ) let X be finite set ; ::_thesis: for P being Function of (card (Choose (X,k,x,y))),(Choose (X,k,x,y)) st dom F = X & P is one-to-one & x <> y holds ex XFS being XFinSequence of st ( dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (F,f,x)) ) & S = Sum XFS ) let P be Function of (card (Choose (X,k,x,y))),(Choose (X,k,x,y)); ::_thesis: ( dom F = X & P is one-to-one & x <> y implies ex XFS being XFinSequence of st ( dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (F,f,x)) ) & S = Sum XFS ) ) assume that A9: dom F = X and A10: P is one-to-one and A11: x <> y ; ::_thesis: ex XFS being XFinSequence of st ( dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (F,f,x)) ) & S = Sum XFS ) defpred S2[ set , set ] means for f1 being Function of D,{0,1} for f being Function of X,{x,y} st f1 = P1 . $1 & f = P . $2 holds ( f1 " {0} = f " {x} & ( for z being set st z in X holds ( ( f1 . z = 0 implies f . z = x ) & ( f . z = x implies f1 . z = 0 ) & ( f1 . z = 1 implies f . z = y ) & ( f . z = y implies f1 . z = 1 ) ) ) ); set Ch = Choose (X,k,x,y); A12: for x1 being set st x1 in card (Choose (D,k,0,1)) holds ex x2 being set st ( x2 in card (Choose (D,k,0,1)) & S2[x1,x2] ) proof card (card (Choose (X,k,x,y))) = card (Choose (X,k,x,y)) ; then P is onto by A10, STIRL2_1:60; then A13: rng P = Choose (X,k,x,y) by FUNCT_2:def_3; let x1 be set ; ::_thesis: ( x1 in card (Choose (D,k,0,1)) implies ex x2 being set st ( x2 in card (Choose (D,k,0,1)) & S2[x1,x2] ) ) assume x1 in card (Choose (D,k,0,1)) ; ::_thesis: ex x2 being set st ( x2 in card (Choose (D,k,0,1)) & S2[x1,x2] ) then P1 . x1 in rng P1 by A3, FUNCT_1:def_3; then consider f1 being Function of D,{0,1} such that A14: f1 = P1 . x1 and A15: card (f1 " {0}) = k by Def1; defpred S3[ set , set ] means ( ( f1 . $1 = 0 implies $2 = x ) & ( $2 = x implies f1 . $1 = 0 ) & ( f1 . $1 = 1 implies $2 = y ) & ( $2 = y implies f1 . $1 = 1 ) ); A16: for d being set st d in X holds ex fd being set st ( fd in {x,y} & S3[d,fd] ) proof let d be set ; ::_thesis: ( d in X implies ex fd being set st ( fd in {x,y} & S3[d,fd] ) ) assume d in X ; ::_thesis: ex fd being set st ( fd in {x,y} & S3[d,fd] ) then d in dom f1 by A9, FUNCT_2:def_1; then f1 . d in rng f1 by FUNCT_1:def_3; then A17: ( f1 . d = 0 or f1 . d = 1 ) by TARSKI:def_2; ( x in {x,y} & y in {x,y} ) by TARSKI:def_2; hence ex fd being set st ( fd in {x,y} & S3[d,fd] ) by A11, A17; ::_thesis: verum end; consider f being Function of X,{x,y} such that A18: for d being set st d in X holds S3[d,f . d] from FUNCT_2:sch_1(A16); A19: dom f1 = D by FUNCT_2:def_1; A20: f1 " {0} c= f " {x} proof let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in f1 " {0} or z in f " {x} ) assume A21: z in f1 " {0} ; ::_thesis: z in f " {x} then f1 . z in {0} by FUNCT_1:def_7; then A22: f1 . z = 0 by TARSKI:def_1; A23: dom f1 = dom f by A9, A19, FUNCT_2:def_1; then z in dom f by A19, A21; then f . z = x by A18, A22; then f . z in {x} by TARSKI:def_1; hence z in f " {x} by A19, A21, A23, FUNCT_1:def_7; ::_thesis: verum end; A24: f " {x} c= f1 " {0} proof let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in f " {x} or z in f1 " {0} ) assume A25: z in f " {x} ; ::_thesis: z in f1 " {0} then f . z in {x} by FUNCT_1:def_7; then f . z = x by TARSKI:def_1; then f1 . z = 0 by A18, A25; then f1 . z in {0} by TARSKI:def_1; hence z in f1 " {0} by A9, A19, A25, FUNCT_1:def_7; ::_thesis: verum end; then f " {x} = f1 " {0} by A20, XBOOLE_0:def_10; then f in Choose (X,k,x,y) by A15, Def1; then consider x2 being set such that A26: x2 in dom P and A27: P . x2 = f by A13, FUNCT_1:def_3; take x2 ; ::_thesis: ( x2 in card (Choose (D,k,0,1)) & S2[x1,x2] ) ( card (Choose (X,k,x,y)) = (card X) choose k & card (Choose (D,k,0,1)) = (card D) choose k ) by A11, Th16; hence x2 in card (Choose (D,k,0,1)) by A9, A26; ::_thesis: S2[x1,x2] let f19 be Function of D,{0,1}; ::_thesis: for f being Function of X,{x,y} st f19 = P1 . x1 & f = P . x2 holds ( f19 " {0} = f " {x} & ( for z being set st z in X holds ( ( f19 . z = 0 implies f . z = x ) & ( f . z = x implies f19 . z = 0 ) & ( f19 . z = 1 implies f . z = y ) & ( f . z = y implies f19 . z = 1 ) ) ) ) let f9 be Function of X,{x,y}; ::_thesis: ( f19 = P1 . x1 & f9 = P . x2 implies ( f19 " {0} = f9 " {x} & ( for z being set st z in X holds ( ( f19 . z = 0 implies f9 . z = x ) & ( f9 . z = x implies f19 . z = 0 ) & ( f19 . z = 1 implies f9 . z = y ) & ( f9 . z = y implies f19 . z = 1 ) ) ) ) ) assume A28: ( f19 = P1 . x1 & f9 = P . x2 ) ; ::_thesis: ( f19 " {0} = f9 " {x} & ( for z being set st z in X holds ( ( f19 . z = 0 implies f9 . z = x ) & ( f9 . z = x implies f19 . z = 0 ) & ( f19 . z = 1 implies f9 . z = y ) & ( f9 . z = y implies f19 . z = 1 ) ) ) ) thus f9 " {x} = f19 " {0} by A14, A24, A20, A27, A28, XBOOLE_0:def_10; ::_thesis: for z being set st z in X holds ( ( f19 . z = 0 implies f9 . z = x ) & ( f9 . z = x implies f19 . z = 0 ) & ( f19 . z = 1 implies f9 . z = y ) & ( f9 . z = y implies f19 . z = 1 ) ) let z be set ; ::_thesis: ( z in X implies ( ( f19 . z = 0 implies f9 . z = x ) & ( f9 . z = x implies f19 . z = 0 ) & ( f19 . z = 1 implies f9 . z = y ) & ( f9 . z = y implies f19 . z = 1 ) ) ) assume z in X ; ::_thesis: ( ( f19 . z = 0 implies f9 . z = x ) & ( f9 . z = x implies f19 . z = 0 ) & ( f19 . z = 1 implies f9 . z = y ) & ( f9 . z = y implies f19 . z = 1 ) ) hence ( ( f19 . z = 0 implies f9 . z = x ) & ( f9 . z = x implies f19 . z = 0 ) & ( f19 . z = 1 implies f9 . z = y ) & ( f9 . z = y implies f19 . z = 1 ) ) by A14, A18, A27, A28; ::_thesis: verum end; consider Perm being Function of (card (Choose (D,k,0,1))),(card (Choose (D,k,0,1))) such that A29: for x1 being set st x1 in card (Choose (D,k,0,1)) holds S2[x1,Perm . x1] from FUNCT_2:sch_1(A12); now__::_thesis:_for_z1,_z2_being_set_st_z1_in_dom_Perm_&_z2_in_dom_Perm_&_Perm_._z1_=_Perm_._z2_holds_ z1_=_z2 A30: ( Choose (X,k,x,y) = {} implies card (Choose (X,k,x,y)) = {} ) ; let z1, z2 be set ; ::_thesis: ( z1 in dom Perm & z2 in dom Perm & Perm . z1 = Perm . z2 implies z1 = z2 ) assume that A31: z1 in dom Perm and A32: z2 in dom Perm and A33: Perm . z1 = Perm . z2 ; ::_thesis: z1 = z2 ( card (Choose (X,k,x,y)) = (card X) choose k & card (Choose (D,k,0,1)) = (card D) choose k ) by A11, Th16; then Perm . z1 in card (Choose (X,k,x,y)) by A9, A31; then Perm . z1 in dom P by A30, FUNCT_2:def_1; then P . (Perm . z1) in rng P by FUNCT_1:def_3; then consider PPermz1 being Function of X,{x,y} such that A34: PPermz1 = P . (Perm . z1) and card (PPermz1 " {x}) = k by Def1; P1 . z2 in rng P1 by A3, A32, FUNCT_1:def_3; then consider P1z2 being Function of D,{0,1} such that A35: P1 . z2 = P1z2 and card (P1z2 " {0}) = k by Def1; P1 . z1 in rng P1 by A3, A31, FUNCT_1:def_3; then consider P1z1 being Function of D,{0,1} such that A36: P1 . z1 = P1z1 and card (P1z1 " {0}) = k by Def1; A37: for z being set st z in dom P1z1 holds P1z1 . z = P1z2 . z proof let z be set ; ::_thesis: ( z in dom P1z1 implies P1z1 . z = P1z2 . z ) assume A38: z in dom P1z1 ; ::_thesis: P1z1 . z = P1z2 . z A39: P1z1 . z in rng P1z1 by A38, FUNCT_1:def_3; percases ( P1z1 . z = 0 or P1z1 . z = 1 ) by A39, TARSKI:def_2; supposeA40: P1z1 . z = 0 ; ::_thesis: P1z1 . z = P1z2 . z then PPermz1 . z = x by A9, A29, A31, A36, A34, A38; hence P1z1 . z = P1z2 . z by A9, A29, A32, A33, A35, A34, A38, A40; ::_thesis: verum end; supposeA41: P1z1 . z = 1 ; ::_thesis: P1z1 . z = P1z2 . z then PPermz1 . z = y by A9, A29, A31, A36, A34, A38; hence P1z1 . z = P1z2 . z by A9, A29, A32, A33, A35, A34, A38, A41; ::_thesis: verum end; end; end; ( dom P1z1 = D & dom P1z2 = D ) by FUNCT_2:def_1; then P1z1 = P1z2 by A37, FUNCT_1:def_11; hence z1 = z2 by A2, A3, A31, A32, A36, A35, FUNCT_1:def_4; ::_thesis: verum end; then A42: Perm is one-to-one by FUNCT_1:def_4; card (card (Choose (D,k,0,1))) = card (card (Choose (D,k,0,1))) ; then A43: ( Perm is one-to-one & Perm is onto ) by A42, STIRL2_1:60; defpred S3[ set , set ] means for f being Function st f = P . $1 holds $2 = card (Intersection (F,f,x)); A44: for x1 being set st x1 in card (Choose (X,k,x,y)) holds ex x2 being set st ( x2 in NAT & S3[x1,x2] ) proof let x1 be set ; ::_thesis: ( x1 in card (Choose (X,k,x,y)) implies ex x2 being set st ( x2 in NAT & S3[x1,x2] ) ) assume x1 in card (Choose (X,k,x,y)) ; ::_thesis: ex x2 being set st ( x2 in NAT & S3[x1,x2] ) then x1 in dom P by CARD_1:27, FUNCT_2:def_1; then P . x1 in rng P by FUNCT_1:def_3; then consider f being Function of X,{x,y} such that A45: f = P . x1 and card (f " {x}) = k by Def1; union (rng F) is finite by A1, Th39; then reconsider I = Intersection (F,f,x) as finite set ; take card I ; ::_thesis: ( card I in NAT & S3[x1, card I] ) thus ( card I in NAT & S3[x1, card I] ) by A45; ::_thesis: verum end; consider XFS being Function of (card (Choose (X,k,x,y))),NAT such that A46: for x1 being set st x1 in card (Choose (X,k,x,y)) holds S3[x1,XFS . x1] from FUNCT_2:sch_1(A44); A47: dom XFS = card (Choose (X,k,x,y)) by FUNCT_2:def_1; then reconsider XFS = XFS as XFinSequence by AFINSQ_1:5; reconsider XFS = XFS as XFinSequence of ; take XFS ; ::_thesis: ( dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (F,f,x)) ) & S = Sum XFS ) ( Choose (X,k,x,y) = {} implies card (Choose (X,k,x,y)) = {} ) ; then dom P = card (Choose (X,k,x,y)) by FUNCT_2:def_1; hence A48: dom XFS = dom P by FUNCT_2:def_1; ::_thesis: ( ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (F,f,x)) ) & S = Sum XFS ) hence for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (F,f,x)) by A46; ::_thesis: S = Sum XFS A49: card (Choose (D,k,0,1)) = (card D) choose k by Th16; A50: card (Choose (X,k,x,y)) = (card X) choose k by A11, Th16; then card (Choose (D,k,0,1)) = dom XFS by A9, A49, FUNCT_2:def_1; then reconsider Perm = Perm as Permutation of (dom XFS) by A43; A51: dom XFS = dom XFS1 by A9, A47, A49, A50, FUNCT_2:def_1; A52: for z being set st z in dom XFS1 holds XFS1 . z = (XFS * Perm) . z proof let z be set ; ::_thesis: ( z in dom XFS1 implies XFS1 . z = (XFS * Perm) . z ) assume A53: z in dom XFS1 ; ::_thesis: XFS1 . z = (XFS * Perm) . z A54: z in dom Perm by A8, A53, FUNCT_2:52; P . (Perm . z) in rng P by A48, A51, A53, FUNCT_1:def_3; then consider p being Function of X,{x,y} such that A55: p = P . (Perm . z) and card (p " {x}) = k by Def1; A56: XFS . (Perm . z) = card (Intersection (F,p,x)) by A46, A47, A51, A53, A55; P1 . z in rng P1 by A3, A8, A53, FUNCT_1:def_3; then consider p1 being Function of D,{0,1} such that A57: p1 = P1 . z and card (p1 " {0}) = k by Def1; p1 " {0} = p " {x} by A8, A29, A53, A55, A57; then A58: Intersection (F,p1,0) = Intersection (F,p,x) by Th33; XFS1 . z = card (Intersection (F,p1,0)) by A7, A8, A53, A57; hence XFS1 . z = (XFS * Perm) . z by A58, A56, A54, FUNCT_1:13; ::_thesis: verum end; ( rng Perm c= dom XFS & dom Perm = dom XFS ) by FUNCT_2:52; then dom XFS1 = dom (XFS * Perm) by A51, RELAT_1:27; then XFS1 = XFS * Perm by A52, FUNCT_1:def_11; then A59: addnat "**" XFS = addnat "**" XFS1 by AFINSQ_2:45; addnat "**" XFS1 = Sum XFS1 by AFINSQ_2:51; hence S = Sum XFS by A59, AFINSQ_2:51; ::_thesis: verum end; uniqueness for b1, b2 being Element of NAT st ( for x, y being set for X being finite set for P being Function of (card (Choose (X,k,x,y))),(Choose (X,k,x,y)) st dom F = X & P is one-to-one & x <> y holds ex XFS being XFinSequence of st ( dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (F,f,x)) ) & b1 = Sum XFS ) ) & ( for x, y being set for X being finite set for P being Function of (card (Choose (X,k,x,y))),(Choose (X,k,x,y)) st dom F = X & P is one-to-one & x <> y holds ex XFS being XFinSequence of st ( dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (F,f,x)) ) & b2 = Sum XFS ) ) holds b1 = b2 proof reconsider D = dom F as finite set by A1; let n1, n2 be Element of NAT ; ::_thesis: ( ( for x, y being set for X being finite set for P being Function of (card (Choose (X,k,x,y))),(Choose (X,k,x,y)) st dom F = X & P is one-to-one & x <> y holds ex XFS being XFinSequence of st ( dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (F,f,x)) ) & n1 = Sum XFS ) ) & ( for x, y being set for X being finite set for P being Function of (card (Choose (X,k,x,y))),(Choose (X,k,x,y)) st dom F = X & P is one-to-one & x <> y holds ex XFS being XFinSequence of st ( dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (F,f,x)) ) & n2 = Sum XFS ) ) implies n1 = n2 ) assume that A60: for x, y being set for X being finite set for P being Function of (card (Choose (X,k,x,y))),(Choose (X,k,x,y)) st dom F = X & P is one-to-one & x <> y holds ex XFS being XFinSequence of st ( dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (F,f,x)) ) & n1 = Sum XFS ) and A61: for x, y being set for X being finite set for P being Function of (card (Choose (X,k,x,y))),(Choose (X,k,x,y)) st dom F = X & P is one-to-one & x <> y holds ex XFS being XFinSequence of st ( dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (F,f,x)) ) & n2 = Sum XFS ) ; ::_thesis: n1 = n2 set Ch1 = Choose (D,k,0,1); card (Choose (D,k,0,1)), Choose (D,k,0,1) are_equipotent by CARD_1:def_2; then consider P being Function such that A62: P is one-to-one and A63: ( dom P = card (Choose (D,k,0,1)) & rng P = Choose (D,k,0,1) ) by WELLORD2:def_4; reconsider P = P as Function of (card (Choose (D,k,0,1))),(Choose (D,k,0,1)) by A63, FUNCT_2:1; consider XFS1 being XFinSequence of such that A64: dom XFS1 = dom P and A65: for z being set for f being Function st z in dom XFS1 & f = P . z holds XFS1 . z = card (Intersection (F,f,0)) and A66: n1 = Sum XFS1 by A60, A62; consider XFS2 being XFinSequence of such that A67: dom XFS2 = dom P and A68: for z being set for f being Function st z in dom XFS2 & f = P . z holds XFS2 . z = card (Intersection (F,f,0)) and A69: n2 = Sum XFS2 by A61, A62; now__::_thesis:_for_z_being_set_st_z_in_dom_XFS1_holds_ XFS2_._z_=_XFS1_._z let z be set ; ::_thesis: ( z in dom XFS1 implies XFS2 . z = XFS1 . z ) assume A70: z in dom XFS1 ; ::_thesis: XFS2 . z = XFS1 . z P . z in rng P by A64, A70, FUNCT_1:def_3; then consider Pz being Function of D,{0,1} such that A71: Pz = P . z and card (Pz " {0}) = k by Def1; XFS2 . z = card (Intersection (F,Pz,0)) by A64, A67, A68, A70, A71; hence XFS2 . z = XFS1 . z by A65, A70, A71; ::_thesis: verum end; hence n1 = n2 by A64, A66, A67, A69, FUNCT_1:2; ::_thesis: verum end; end; :: deftheorem CARD_FIN:def_3_:_ canceled; :: deftheorem Def4 defines Card_Intersection CARD_FIN:def_4_:_ for k being Nat for F being finite-yielding Function st dom F is finite holds for b3 being Element of NAT holds ( b3 = Card_Intersection (F,k) iff for x, y being set for X being finite set for P being Function of (card (Choose (X,k,x,y))),(Choose (X,k,x,y)) st dom F = X & P is one-to-one & x <> y holds ex XFS being XFinSequence of st ( dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (F,f,x)) ) & b3 = Sum XFS ) ); theorem :: CARD_FIN:41 for k being Nat for Fy being finite-yielding Function for x, y being set for X being finite set for P being Function of (card (Choose (X,k,x,y))),(Choose (X,k,x,y)) st dom Fy = X & P is one-to-one & x <> y holds for XFS being XFinSequence of st dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (Fy,f,x)) ) holds Card_Intersection (Fy,k) = Sum XFS proof let k be Nat; ::_thesis: for Fy being finite-yielding Function for x, y being set for X being finite set for P being Function of (card (Choose (X,k,x,y))),(Choose (X,k,x,y)) st dom Fy = X & P is one-to-one & x <> y holds for XFS being XFinSequence of st dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (Fy,f,x)) ) holds Card_Intersection (Fy,k) = Sum XFS let Fy be finite-yielding Function; ::_thesis: for x, y being set for X being finite set for P being Function of (card (Choose (X,k,x,y))),(Choose (X,k,x,y)) st dom Fy = X & P is one-to-one & x <> y holds for XFS being XFinSequence of st dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (Fy,f,x)) ) holds Card_Intersection (Fy,k) = Sum XFS let x, y be set ; ::_thesis: for X being finite set for P being Function of (card (Choose (X,k,x,y))),(Choose (X,k,x,y)) st dom Fy = X & P is one-to-one & x <> y holds for XFS being XFinSequence of st dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (Fy,f,x)) ) holds Card_Intersection (Fy,k) = Sum XFS let X be finite set ; ::_thesis: for P being Function of (card (Choose (X,k,x,y))),(Choose (X,k,x,y)) st dom Fy = X & P is one-to-one & x <> y holds for XFS being XFinSequence of st dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (Fy,f,x)) ) holds Card_Intersection (Fy,k) = Sum XFS let P be Function of (card (Choose (X,k,x,y))),(Choose (X,k,x,y)); ::_thesis: ( dom Fy = X & P is one-to-one & x <> y implies for XFS being XFinSequence of st dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (Fy,f,x)) ) holds Card_Intersection (Fy,k) = Sum XFS ) assume ( dom Fy = X & P is one-to-one & x <> y ) ; ::_thesis: for XFS being XFinSequence of st dom XFS = dom P & ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (Fy,f,x)) ) holds Card_Intersection (Fy,k) = Sum XFS then consider XFS being XFinSequence of such that A1: dom XFS = dom P and A2: for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (Fy,f,x)) and A3: Card_Intersection (Fy,k) = Sum XFS by Def4; let XFS1 be XFinSequence of ; ::_thesis: ( dom XFS1 = dom P & ( for z being set for f being Function st z in dom XFS1 & f = P . z holds XFS1 . z = card (Intersection (Fy,f,x)) ) implies Card_Intersection (Fy,k) = Sum XFS1 ) assume that A4: dom XFS1 = dom P and A5: for z being set for f being Function st z in dom XFS1 & f = P . z holds XFS1 . z = card (Intersection (Fy,f,x)) ; ::_thesis: Card_Intersection (Fy,k) = Sum XFS1 now__::_thesis:_for_z_being_set_st_z_in_dom_XFS_holds_ XFS1_._z_=_XFS_._z let z be set ; ::_thesis: ( z in dom XFS implies XFS1 . z = XFS . z ) assume A6: z in dom XFS ; ::_thesis: XFS1 . z = XFS . z P . z in rng P by A1, A6, FUNCT_1:def_3; then consider Pz being Function of X,{x,y} such that A7: Pz = P . z and card (Pz " {x}) = k by Def1; XFS1 . z = card (Intersection (Fy,Pz,x)) by A4, A5, A1, A6, A7; hence XFS1 . z = XFS . z by A2, A6, A7; ::_thesis: verum end; hence Card_Intersection (Fy,k) = Sum XFS1 by A4, A1, A3, FUNCT_1:2; ::_thesis: verum end; theorem :: CARD_FIN:42 for k being Nat for Fy being finite-yielding Function st dom Fy is finite & k = 0 holds Card_Intersection (Fy,k) = card (union (rng Fy)) proof let k be Nat; ::_thesis: for Fy being finite-yielding Function st dom Fy is finite & k = 0 holds Card_Intersection (Fy,k) = card (union (rng Fy)) let Fy be finite-yielding Function; ::_thesis: ( dom Fy is finite & k = 0 implies Card_Intersection (Fy,k) = card (union (rng Fy)) ) assume that A1: dom Fy is finite and A2: k = 0 ; ::_thesis: Card_Intersection (Fy,k) = card (union (rng Fy)) reconsider X = dom Fy as finite set by A1; set Ch = Choose (X,k,0,1); consider P being Function of (card (Choose (X,k,0,1))),(Choose (X,k,0,1)) such that A3: P is one-to-one by Lm2; A4: card (Choose (X,k,0,1)) = 1 by A2, Th11; then A5: dom P = 1 by CARD_1:27, FUNCT_2:def_1; consider XFS being XFinSequence of such that A6: dom XFS = dom P and A7: for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (Fy,f,0)) and A8: Card_Intersection (Fy,k) = Sum XFS by A3, Def4; len XFS = 1 by A6, A4, CARD_1:27, FUNCT_2:def_1; then XFS = <%(XFS . 0)%> by AFINSQ_1:34; then A9: addnat "**" XFS = XFS . 0 by AFINSQ_2:37; A10: 0 in 1 by CARD_1:49, TARSKI:def_1; then P . 0 in rng P by A5, FUNCT_1:def_3; then consider P0 being Function of X,{0,1} such that A11: P0 = P . 0 and A12: card (P0 " {0}) = 0 by A2, Def1; P0 " {0} = {} by A12; then A13: Intersection (Fy,P0,0) = union (rng Fy) by Th34; XFS . 0 = card (Intersection (Fy,P0,0)) by A6, A7, A5, A10, A11; hence Card_Intersection (Fy,k) = card (union (rng Fy)) by A8, A13, A9, AFINSQ_2:51; ::_thesis: verum end; theorem Th43: :: CARD_FIN:43 for X being finite set for k being Nat for Fy being finite-yielding Function st dom Fy = X & k > card X holds Card_Intersection (Fy,k) = 0 proof let X be finite set ; ::_thesis: for k being Nat for Fy being finite-yielding Function st dom Fy = X & k > card X holds Card_Intersection (Fy,k) = 0 let k be Nat; ::_thesis: for Fy being finite-yielding Function st dom Fy = X & k > card X holds Card_Intersection (Fy,k) = 0 let Fy be finite-yielding Function; ::_thesis: ( dom Fy = X & k > card X implies Card_Intersection (Fy,k) = 0 ) assume that A1: dom Fy = X and A2: k > card X ; ::_thesis: Card_Intersection (Fy,k) = 0 set Ch = Choose (X,k,0,1); consider P being Function of (card (Choose (X,k,0,1))),(Choose (X,k,0,1)) such that A3: P is one-to-one by Lm2; consider XFS being XFinSequence of such that A4: dom XFS = dom P and for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (Fy,f,0)) and A5: Card_Intersection (Fy,k) = Sum XFS by A1, A3, Def4; Choose (X,k,0,1) is empty by A2, Th10; then XFS = 0 by A4; hence Card_Intersection (Fy,k) = 0 by A5; ::_thesis: verum end; theorem Th44: :: CARD_FIN:44 for Fy being finite-yielding Function for X being finite set st dom Fy = X holds for P being Function of (card X),X st P is one-to-one holds ex XFS being XFinSequence of st ( dom XFS = card X & ( for z being set st z in dom XFS holds XFS . z = card ((Fy * P) . z) ) & Card_Intersection (Fy,1) = Sum XFS ) proof let Fy be finite-yielding Function; ::_thesis: for X being finite set st dom Fy = X holds for P being Function of (card X),X st P is one-to-one holds ex XFS being XFinSequence of st ( dom XFS = card X & ( for z being set st z in dom XFS holds XFS . z = card ((Fy * P) . z) ) & Card_Intersection (Fy,1) = Sum XFS ) let X be finite set ; ::_thesis: ( dom Fy = X implies for P being Function of (card X),X st P is one-to-one holds ex XFS being XFinSequence of st ( dom XFS = card X & ( for z being set st z in dom XFS holds XFS . z = card ((Fy * P) . z) ) & Card_Intersection (Fy,1) = Sum XFS ) ) assume A1: dom Fy = X ; ::_thesis: for P being Function of (card X),X st P is one-to-one holds ex XFS being XFinSequence of st ( dom XFS = card X & ( for z being set st z in dom XFS holds XFS . z = card ((Fy * P) . z) ) & Card_Intersection (Fy,1) = Sum XFS ) let P be Function of (card X),X; ::_thesis: ( P is one-to-one implies ex XFS being XFinSequence of st ( dom XFS = card X & ( for z being set st z in dom XFS holds XFS . z = card ((Fy * P) . z) ) & Card_Intersection (Fy,1) = Sum XFS ) ) assume A2: P is one-to-one ; ::_thesis: ex XFS being XFinSequence of st ( dom XFS = card X & ( for z being set st z in dom XFS holds XFS . z = card ((Fy * P) . z) ) & Card_Intersection (Fy,1) = Sum XFS ) percases ( X = {} or X <> {} ) ; supposeA3: X = {} ; ::_thesis: ex XFS being XFinSequence of st ( dom XFS = card X & ( for z being set st z in dom XFS holds XFS . z = card ((Fy * P) . z) ) & Card_Intersection (Fy,1) = Sum XFS ) reconsider XFS = {} as XFinSequence ; ( rng {} c= {} & {} c= NAT ) ; then reconsider XFS = XFS as XFinSequence of by RELAT_1:def_19; take XFS ; ::_thesis: ( dom XFS = card X & ( for z being set st z in dom XFS holds XFS . z = card ((Fy * P) . z) ) & Card_Intersection (Fy,1) = Sum XFS ) thus ( card X = dom XFS & ( for z being set st z in dom XFS holds XFS . z = card ((Fy * P) . z) ) ) by A3, CARD_1:27; ::_thesis: Card_Intersection (Fy,1) = Sum XFS Sum XFS = 0 ; hence Card_Intersection (Fy,1) = Sum XFS by A1, A3, Th43, CARD_1:27; ::_thesis: verum end; suppose X <> {} ; ::_thesis: ex XFS being XFinSequence of st ( dom XFS = card X & ( for z being set st z in dom XFS holds XFS . z = card ((Fy * P) . z) ) & Card_Intersection (Fy,1) = Sum XFS ) then reconsider cX = card X as non empty set ; deffunc H1( Element of cX) -> Element of NAT = card ((Fy * P) . $1); consider XFS being Function of cX,NAT such that A4: for x being Element of cX holds XFS . x = H1(x) from FUNCT_2:sch_4(); A5: dom XFS = cX by FUNCT_2:def_1; then reconsider XFS = XFS as XFinSequence by AFINSQ_1:5; reconsider XFS = XFS as XFinSequence of ; take XFS ; ::_thesis: ( dom XFS = card X & ( for z being set st z in dom XFS holds XFS . z = card ((Fy * P) . z) ) & Card_Intersection (Fy,1) = Sum XFS ) thus card X = dom XFS by FUNCT_2:def_1; ::_thesis: ( ( for z being set st z in dom XFS holds XFS . z = card ((Fy * P) . z) ) & Card_Intersection (Fy,1) = Sum XFS ) thus for z being set st z in dom XFS holds XFS . z = card ((Fy * P) . z) by A4, A5; ::_thesis: Card_Intersection (Fy,1) = Sum XFS thus Card_Intersection (Fy,1) = Sum XFS ::_thesis: verum proof deffunc H2( set ) -> set = ((P . $1) .--> 0) +* ((X \ {(P . $1)}) --> 1); A6: for x being set st x in cX holds H2(x) in Choose (X,1,0,1) proof let x be set ; ::_thesis: ( x in cX implies H2(x) in Choose (X,1,0,1) ) assume x in cX ; ::_thesis: H2(x) in Choose (X,1,0,1) then x in dom P by CARD_1:27, FUNCT_2:def_1; then P . x in rng P by FUNCT_1:def_3; then A7: {(P . x)} \/ (X \ {(P . x)}) = X by ZFMISC_1:116; ( {(P . x)} misses X \ {(P . x)} & card {(P . x)} = 1 ) by CARD_1:30, XBOOLE_1:79; hence H2(x) in Choose (X,1,0,1) by A7, Th18; ::_thesis: verum end; consider P1 being Function of cX,(Choose (X,1,0,1)) such that A8: for z being set st z in cX holds P1 . z = H2(z) from FUNCT_2:sch_2(A6); Choose (X,1,0,1) c= rng P1 proof card X = card (card X) ; then A9: P is onto by A2, STIRL2_1:60; let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in Choose (X,1,0,1) or z in rng P1 ) assume z in Choose (X,1,0,1) ; ::_thesis: z in rng P1 then consider F being Function of X,{0,1} such that A10: F = z and A11: card (F " {0}) = 1 by Def1; consider x1 being set such that A12: F " {0} = {x1} by A11, CARD_2:42; A13: x1 in {x1} by TARSKI:def_1; then x1 in X by A12; then x1 in rng P by A9, FUNCT_2:def_3; then consider x2 being set such that A14: x2 in dom P and A15: P . x2 = x1 by FUNCT_1:def_3; A16: P1 . x2 = F proof set F1 = (X \ {(P . x2)}) --> 1; set F0 = (P . x2) .--> 0; set P1x = ((P . x2) .--> 0) +* ((X \ {(P . x2)}) --> 1); A17: {(P . x2)} \/ (X \ {(P . x2)}) = X by A12, A13, A15, ZFMISC_1:116; A18: now__::_thesis:_for_d_being_set_st_d_in_dom_F_holds_ (((P_._x2)_.-->_0)_+*_((X_\_{(P_._x2)})_-->_1))_._d_=_F_._d let d be set ; ::_thesis: ( d in dom F implies (((P . x2) .--> 0) +* ((X \ {(P . x2)}) --> 1)) . d = F . d ) assume A19: d in dom F ; ::_thesis: (((P . x2) .--> 0) +* ((X \ {(P . x2)}) --> 1)) . d = F . d now__::_thesis:_(((P_._x2)_.-->_0)_+*_((X_\_{(P_._x2)})_-->_1))_._d_=_F_._d percases ( d in {(P . x2)} or d in X \ {(P . x2)} ) by A17, A19, XBOOLE_0:def_3; supposeA20: d in {(P . x2)} ; ::_thesis: (((P . x2) .--> 0) +* ((X \ {(P . x2)}) --> 1)) . d = F . d A21: {(P . x2)} misses X \ {(P . x2)} by XBOOLE_1:79; ( dom ((P . x2) .--> 0) = {(P . x2)} & dom ((X \ {(P . x2)}) --> 1) = X \ {(P . x2)} ) by FUNCOP_1:13; then (((P . x2) .--> 0) +* ((X \ {(P . x2)}) --> 1)) . d = ((P . x2) .--> 0) . d by A20, A21, FUNCT_4:16; then A22: (((P . x2) .--> 0) +* ((X \ {(P . x2)}) --> 1)) . d = 0 by A20, FUNCOP_1:7; F . d in {0} by A12, A15, A20, FUNCT_1:def_7; hence (((P . x2) .--> 0) +* ((X \ {(P . x2)}) --> 1)) . d = F . d by A22, TARSKI:def_1; ::_thesis: verum end; supposeA23: d in X \ {(P . x2)} ; ::_thesis: (((P . x2) .--> 0) +* ((X \ {(P . x2)}) --> 1)) . d = F . d then d in dom ((X \ {(P . x2)}) --> 1) by FUNCT_2:def_1; then (((P . x2) .--> 0) +* ((X \ {(P . x2)}) --> 1)) . d = ((X \ {(P . x2)}) --> 1) . d by FUNCT_4:13; then A24: (((P . x2) .--> 0) +* ((X \ {(P . x2)}) --> 1)) . d = 1 by A23, FUNCOP_1:7; A25: X = dom F by FUNCT_2:def_1; not d in {x1} by A15, A23, XBOOLE_0:def_5; then not F . d in {0} by A12, A23, A25, FUNCT_1:def_7; then A26: not F . d = 0 by TARSKI:def_1; F . d in rng F by A23, A25, FUNCT_1:def_3; hence (((P . x2) .--> 0) +* ((X \ {(P . x2)}) --> 1)) . d = F . d by A24, A26, TARSKI:def_2; ::_thesis: verum end; end; end; hence (((P . x2) .--> 0) +* ((X \ {(P . x2)}) --> 1)) . d = F . d ; ::_thesis: verum end; dom ((P . x2) .--> 0) = {(P . x2)} by FUNCOP_1:13; then A27: X = (dom ((P . x2) .--> 0)) \/ (dom ((X \ {(P . x2)}) --> 1)) by A17, FUNCT_2:def_1; ( dom F = X & dom (((P . x2) .--> 0) +* ((X \ {(P . x2)}) --> 1)) = (dom ((P . x2) .--> 0)) \/ (dom ((X \ {(P . x2)}) --> 1)) ) by FUNCT_2:def_1, FUNCT_4:def_1; then ((P . x2) .--> 0) +* ((X \ {(P . x2)}) --> 1) = F by A27, A18, FUNCT_1:2; hence P1 . x2 = F by A8, A14; ::_thesis: verum end; card (Choose (X,1,0,1)) = (card X) choose 1 by Th16; then card (Choose (X,1,0,1)) = cX by NAT_1:14, NEWTON:23; then dom P1 = cX by CARD_1:27, FUNCT_2:def_1; hence z in rng P1 by A10, A14, A16, FUNCT_1:def_3; ::_thesis: verum end; then A28: Choose (X,1,0,1) = rng P1 by XBOOLE_0:def_10; then A29: P1 is onto by FUNCT_2:def_3; card (Choose (X,1,0,1)) = (card X) choose 1 by Th16; then A30: card X = card (Choose (X,1,0,1)) by A28, NAT_1:14, NEWTON:23; then reconsider P1 = P1 as Function of (card (Choose (X,1,0,1))),(Choose (X,1,0,1)) ; card (card X) = card X ; then P1 is one-to-one by A29, A30, STIRL2_1:60; then consider XFS1 being XFinSequence of such that A31: dom XFS1 = dom P1 and A32: for z being set for f being Function st z in dom XFS1 & f = P1 . z holds XFS1 . z = card (Intersection (Fy,f,0)) and A33: Card_Intersection (Fy,1) = Sum XFS1 by A1, Def4; ( Choose (X,1,0,1) = {} implies card (Choose (X,1,0,1)) = {} ) ; then A34: dom P1 = card (Choose (X,1,0,1)) by FUNCT_2:def_1; A35: for z being set st z in dom XFS1 holds XFS1 . z = XFS . z proof let z be set ; ::_thesis: ( z in dom XFS1 implies XFS1 . z = XFS . z ) assume A36: z in dom XFS1 ; ::_thesis: XFS1 . z = XFS . z H2(z) in Choose (X,1,0,1) by A6, A30, A31, A36; then consider f being Function of X,{0,1} such that A37: f = H2(z) and A38: card (f " {0}) = 1 by Def1; consider x1 being set such that A39: f " {0} = {x1} by A38, CARD_2:42; P1 . z = H2(z) by A8, A30, A31, A36; then A40: XFS1 . z = card (Intersection (Fy,f,0)) by A32, A36, A37; A41: 0 in {0} by TARSKI:def_1; A42: dom ((X \ {(P . z)}) --> 1) = X \ {(P . z)} by FUNCOP_1:13; A43: P . z in {(P . z)} by TARSKI:def_1; {(P . z)} = dom ((P . z) .--> 0) by FUNCOP_1:13; then A44: P . z in (dom ((P . z) .--> 0)) \/ (dom ((X \ {(P . z)}) --> 1)) by A43, XBOOLE_0:def_3; ( not P . z in X \ {(P . z)} & ((P . z) .--> 0) . (P . z) = 0 ) by A43, FUNCOP_1:7, XBOOLE_0:def_5; then A45: H2(z) . (P . z) = 0 by A44, A42, FUNCT_4:def_1; P . z in dom H2(z) by A44, FUNCT_4:def_1; then A46: P . z in f " {0} by A37, A45, A41, FUNCT_1:def_7; then P . z = x1 by A39, TARSKI:def_1; then A47: card (Intersection (Fy,f,0)) = card (Fy . (P . z)) by A39, Th35; A48: XFS . z = card ((Fy * P) . z) by A4, A30, A31, A36; z in dom P by A30, A31, A34, A36, A46, FUNCT_2:def_1; hence XFS1 . z = XFS . z by A47, A40, A48, FUNCT_1:13; ::_thesis: verum end; dom XFS1 = dom XFS by A30, A31, A34, FUNCT_2:def_1; hence Card_Intersection (Fy,1) = Sum XFS by A33, A35, FUNCT_1:def_11; ::_thesis: verum end; end; end; end; theorem Th45: :: CARD_FIN:45 for x being set for X being finite set for Fy being finite-yielding Function st dom Fy = X holds Card_Intersection (Fy,(card X)) = card (Intersection (Fy,(X --> x),x)) proof let x be set ; ::_thesis: for X being finite set for Fy being finite-yielding Function st dom Fy = X holds Card_Intersection (Fy,(card X)) = card (Intersection (Fy,(X --> x),x)) let X be finite set ; ::_thesis: for Fy being finite-yielding Function st dom Fy = X holds Card_Intersection (Fy,(card X)) = card (Intersection (Fy,(X --> x),x)) let Fy be finite-yielding Function; ::_thesis: ( dom Fy = X implies Card_Intersection (Fy,(card X)) = card (Intersection (Fy,(X --> x),x)) ) set Ch = Choose (X,(card X),x,{x}); consider P being Function of (card (Choose (X,(card X),x,{x}))),(Choose (X,(card X),x,{x})) such that A1: P is one-to-one by Lm2; x in {x} by TARSKI:def_1; then A2: x <> {x} ; assume dom Fy = X ; ::_thesis: Card_Intersection (Fy,(card X)) = card (Intersection (Fy,(X --> x),x)) then consider XFS being XFinSequence of such that A3: dom XFS = dom P and A4: ( ( for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (Fy,f,x)) ) & Card_Intersection (Fy,(card X)) = Sum XFS ) by A1, A2, Def4; A5: card (Choose (X,(card X),x,{x})) = 1 by Th12; then consider ch being set such that A6: Choose (X,(card X),x,{x}) = {ch} by CARD_2:42; x in {x} by TARSKI:def_1; then ( X \/ {} = X & {x} <> x ) ; then ({} --> {x}) +* (X --> x) in Choose (X,(card X),x,{x}) by Th17; then {} +* (X --> x) in Choose (X,(card X),x,{x}) ; then X --> x in Choose (X,(card X),x,{x}) ; then A7: X --> x = ch by A6, TARSKI:def_1; A8: ( Choose (X,(card X),x,{x}) = {} implies card (Choose (X,(card X),x,{x})) = {} ) ; then A9: dom P = card (Choose (X,(card X),x,{x})) by FUNCT_2:def_1; then 0 in dom P by A5, CARD_1:49, TARSKI:def_1; then P . 0 in rng P by FUNCT_1:def_3; then A10: P . 0 = ch by A6, TARSKI:def_1; len XFS = 1 by A3, A8, A5, FUNCT_2:def_1; then XFS = <%(XFS . 0)%> by AFINSQ_1:34; then addnat "**" XFS = XFS . 0 by AFINSQ_2:37; then A11: Sum XFS = XFS . 0 by AFINSQ_2:51; 0 in dom XFS by A3, A5, A9, CARD_1:49, TARSKI:def_1; hence Card_Intersection (Fy,(card X)) = card (Intersection (Fy,(X --> x),x)) by A4, A11, A10, A7; ::_thesis: verum end; theorem Th46: :: CARD_FIN:46 for x being set for X being finite set for Fy being finite-yielding Function st Fy = x .--> X holds Card_Intersection (Fy,1) = card X proof let x be set ; ::_thesis: for X being finite set for Fy being finite-yielding Function st Fy = x .--> X holds Card_Intersection (Fy,1) = card X let X be finite set ; ::_thesis: for Fy being finite-yielding Function st Fy = x .--> X holds Card_Intersection (Fy,1) = card X let Fy be finite-yielding Function; ::_thesis: ( Fy = x .--> X implies Card_Intersection (Fy,1) = card X ) assume A1: Fy = x .--> X ; ::_thesis: Card_Intersection (Fy,1) = card X then A2: dom Fy = {x} by FUNCOP_1:13; A3: x in {x} by TARSKI:def_1; then A4: (x .--> x) " {x} = {x} by FUNCOP_1:14; Fy . x = X by A1, A3, FUNCOP_1:7; then ( 1 = card {x} & Intersection (Fy,(x .--> x),x) = X ) by A4, Th35, CARD_1:30; hence Card_Intersection (Fy,1) = card X by A2, Th45; ::_thesis: verum end; theorem :: CARD_FIN:47 for x, y being set for X, Y being finite set for Fy being finite-yielding Function st x <> y & Fy = (x,y) --> (X,Y) holds ( Card_Intersection (Fy,1) = (card X) + (card Y) & Card_Intersection (Fy,2) = card (X /\ Y) ) proof let x, y be set ; ::_thesis: for X, Y being finite set for Fy being finite-yielding Function st x <> y & Fy = (x,y) --> (X,Y) holds ( Card_Intersection (Fy,1) = (card X) + (card Y) & Card_Intersection (Fy,2) = card (X /\ Y) ) let X, Y be finite set ; ::_thesis: for Fy being finite-yielding Function st x <> y & Fy = (x,y) --> (X,Y) holds ( Card_Intersection (Fy,1) = (card X) + (card Y) & Card_Intersection (Fy,2) = card (X /\ Y) ) let Fy be finite-yielding Function; ::_thesis: ( x <> y & Fy = (x,y) --> (X,Y) implies ( Card_Intersection (Fy,1) = (card X) + (card Y) & Card_Intersection (Fy,2) = card (X /\ Y) ) ) assume that A1: x <> y and A2: Fy = (x,y) --> (X,Y) ; ::_thesis: ( Card_Intersection (Fy,1) = (card X) + (card Y) & Card_Intersection (Fy,2) = card (X /\ Y) ) set P = (0,1) --> (x,y); A3: ( dom ((0,1) --> (x,y)) = {0,1} & rng ((0,1) --> (x,y)) = {x,y} ) by FUNCT_4:62, FUNCT_4:64; card {x,y} = 2 by A1, CARD_2:57; then reconsider P = (0,1) --> (x,y) as Function of (card {x,y}),{x,y} by A3, CARD_1:50, FUNCT_2:1; A4: card (card {x,y}) = card {x,y} ; A5: ( P . 0 = x & Fy . x = X ) by A1, A2, FUNCT_4:63; A6: ( P . 1 = y & Fy . y = Y ) by A2, FUNCT_4:63; A7: dom Fy = {x,y} by A2, FUNCT_4:62; rng P = {x,y} by FUNCT_4:64; then P is onto by FUNCT_2:def_3; then P is one-to-one by A4, STIRL2_1:60; then consider XFS being XFinSequence of such that A8: dom XFS = card {x,y} and A9: for z being set st z in dom XFS holds XFS . z = card ((Fy * P) . z) and A10: Card_Intersection (Fy,1) = Sum XFS by A7, Th44; len XFS = 2 by A1, A8, CARD_2:57; then A11: XFS = <%(XFS . 0),(XFS . 1)%> by AFINSQ_1:38; A12: dom P = {0,1} by FUNCT_4:62; then 1 in dom P by TARSKI:def_2; then A13: (Fy * P) . 1 = Fy . (P . 1) by FUNCT_1:13; 0 in {0} by TARSKI:def_1; then A14: ({x,y} --> 0) " {0} = {x,y} by FUNCOP_1:14; ( Fy . x = X & Fy . y = Y ) by A1, A2, FUNCT_4:63; then A15: Intersection (Fy,({x,y} --> 0),0) = X /\ Y by A14, Th36; 0 in dom P by A12, TARSKI:def_2; then A16: (Fy * P) . 0 = Fy . (P . 0) by FUNCT_1:13; A17: dom XFS = 2 by A1, A8, CARD_2:57; then 1 in dom XFS by CARD_1:50, TARSKI:def_2; then A18: XFS . 1 = card Y by A9, A6, A13; 0 in dom XFS by A17, CARD_1:50, TARSKI:def_2; then XFS . 0 = card X by A9, A5, A16; then addnat "**" XFS = addnat . ((card X),(card Y)) by A11, A18, AFINSQ_2:38; then A19: addnat "**" XFS = (card X) + (card Y) by BINOP_2:def_23; ( card {x,y} = 2 & dom Fy = {x,y} ) by A1, A2, CARD_2:57, FUNCT_4:62; hence ( Card_Intersection (Fy,1) = (card X) + (card Y) & Card_Intersection (Fy,2) = card (X /\ Y) ) by A10, A19, A15, Th45, AFINSQ_2:51; ::_thesis: verum end; theorem Th48: :: CARD_FIN:48 for Fy being finite-yielding Function for x being set st dom Fy is finite & x in dom Fy holds Card_Intersection (Fy,1) = (Card_Intersection ((Fy | ((dom Fy) \ {x})),1)) + (card (Fy . x)) proof let Fy be finite-yielding Function; ::_thesis: for x being set st dom Fy is finite & x in dom Fy holds Card_Intersection (Fy,1) = (Card_Intersection ((Fy | ((dom Fy) \ {x})),1)) + (card (Fy . x)) let x be set ; ::_thesis: ( dom Fy is finite & x in dom Fy implies Card_Intersection (Fy,1) = (Card_Intersection ((Fy | ((dom Fy) \ {x})),1)) + (card (Fy . x)) ) assume that A1: dom Fy is finite and A2: x in dom Fy ; ::_thesis: Card_Intersection (Fy,1) = (Card_Intersection ((Fy | ((dom Fy) \ {x})),1)) + (card (Fy . x)) reconsider X = dom Fy as finite set by A1; card X > 0 by A2; then reconsider k = (card X) - 1 as Element of NAT by NAT_1:20; set Xx = X \ {x}; A3: ( X \ {x} = {} implies card (X \ {x}) = {} ) ; consider Px being Function of (card (X \ {x})),(X \ {x}) such that A4: Px is one-to-one by Lm2; not card (X \ {x}) in card (X \ {x}) ; then consider P being Function of ((card (X \ {x})) \/ {(card (X \ {x}))}),((X \ {x}) \/ {x}) such that A5: P | (card (X \ {x})) = Px and A6: P . (card (X \ {x})) = x by A3, STIRL2_1:57; not x in X \ {x} by ZFMISC_1:56; then A7: P is one-to-one by A4, A3, A5, A6, STIRL2_1:58; A8: card X = k + 1 ; then A9: card (X \ {x}) = k by A2, STIRL2_1:55; then card X = (card (X \ {x})) \/ {(card (X \ {x}))} by A8, AFINSQ_1:2; then reconsider P = P as Function of (card X),X by A2, ZFMISC_1:116; consider XFS being XFinSequence of such that A10: dom XFS = card X and A11: for z being set st z in dom XFS holds XFS . z = card ((Fy * P) . z) and A12: Card_Intersection (Fy,1) = Sum XFS by A7, Th44; A13: P . k = x by A2, A6, A8, STIRL2_1:55; X /\ (X \ {x}) = X \ {x} by XBOOLE_1:28; then dom (Fy | (X \ {x})) = X \ {x} by RELAT_1:61; then consider XFSx being XFinSequence of such that A14: dom XFSx = card (X \ {x}) and A15: for z being set st z in dom XFSx holds XFSx . z = card (((Fy | (X \ {x})) * Px) . z) and A16: Card_Intersection ((Fy | (X \ {x})),1) = Sum XFSx by A4, Th44; k < k + 1 by NAT_1:13; then A17: k c= k + 1 by NAT_1:39; A18: for y being set st y in dom XFSx holds XFS . y = XFSx . y proof A19: ( X \ {x} = X /\ (X \ {x}) & X /\ (X \ {x}) = dom (Fy | (X \ {x})) ) by RELAT_1:61, XBOOLE_1:28; let y be set ; ::_thesis: ( y in dom XFSx implies XFS . y = XFSx . y ) assume A20: y in dom XFSx ; ::_thesis: XFS . y = XFSx . y A21: XFS . y = card ((Fy * P) . y) by A14, A9, A10, A11, A17, A20; A22: dom Px = k by A3, A9, FUNCT_2:def_1; then Px . y in rng Px by A14, A9, A20, FUNCT_1:def_3; then A23: (Fy | (X \ {x})) . (Px . y) = Fy . (Px . y) by A19, FUNCT_1:47; dom P = k + 1 by CARD_1:27, FUNCT_2:def_1; then A24: (Fy * P) . y = Fy . (P . y) by A14, A9, A17, A20, FUNCT_1:13; Px . y = P . y by A14, A5, A9, A20, A22, FUNCT_1:47; then (Fy * P) . y = ((Fy | (X \ {x})) * Px) . y by A14, A9, A20, A22, A24, A23, FUNCT_1:13; hence XFS . y = XFSx . y by A15, A20, A21; ::_thesis: verum end; k < k + 1 by NAT_1:13; then A25: k in card X by NAT_1:44; then k in dom P by CARD_1:27, FUNCT_2:def_1; then A26: (Fy * P) . k = Fy . (P . k) by FUNCT_1:13; (dom XFS) /\ k = dom XFSx by A14, A9, A10, A17, XBOOLE_1:28; then XFS | k = XFSx by A18, FUNCT_1:46; then A27: (Sum XFSx) + (XFS . k) = Sum (XFS | (k + 1)) by A10, A25, AFINSQ_2:65; XFS . k = card ((Fy * P) . k) by A10, A11, A25; hence Card_Intersection (Fy,1) = (Card_Intersection ((Fy | ((dom Fy) \ {x})),1)) + (card (Fy . x)) by A16, A10, A12, A27, A26, A13, RELAT_1:69; ::_thesis: verum end; theorem Th49: :: CARD_FIN:49 for X9 being set for F being Function holds ( dom (Intersect (F,((dom F) --> X9))) = dom F & ( for x being set st x in dom F holds (Intersect (F,((dom F) --> X9))) . x = (F . x) /\ X9 ) ) proof let X9 be set ; ::_thesis: for F being Function holds ( dom (Intersect (F,((dom F) --> X9))) = dom F & ( for x being set st x in dom F holds (Intersect (F,((dom F) --> X9))) . x = (F . x) /\ X9 ) ) let F be Function; ::_thesis: ( dom (Intersect (F,((dom F) --> X9))) = dom F & ( for x being set st x in dom F holds (Intersect (F,((dom F) --> X9))) . x = (F . x) /\ X9 ) ) dom ((dom F) --> X9) = dom F by FUNCOP_1:13; then A1: (dom F) /\ (dom ((dom F) --> X9)) = dom F ; hence dom F = dom (Intersect (F,((dom F) --> X9))) by YELLOW20:def_2; ::_thesis: for x being set st x in dom F holds (Intersect (F,((dom F) --> X9))) . x = (F . x) /\ X9 let x be set ; ::_thesis: ( x in dom F implies (Intersect (F,((dom F) --> X9))) . x = (F . x) /\ X9 ) assume A2: x in dom F ; ::_thesis: (Intersect (F,((dom F) --> X9))) . x = (F . x) /\ X9 then (Intersect (F,((dom F) --> X9))) . x = (F . x) /\ (((dom F) --> X9) . x) by A1, YELLOW20:def_2; hence (Intersect (F,((dom F) --> X9))) . x = (F . x) /\ X9 by A2, FUNCOP_1:7; ::_thesis: verum end; theorem Th50: :: CARD_FIN:50 for X9 being set for F being Function holds (union (rng F)) /\ X9 = union (rng (Intersect (F,((dom F) --> X9)))) proof let X9 be set ; ::_thesis: for F being Function holds (union (rng F)) /\ X9 = union (rng (Intersect (F,((dom F) --> X9)))) let F be Function; ::_thesis: (union (rng F)) /\ X9 = union (rng (Intersect (F,((dom F) --> X9)))) set I = Intersect (F,((dom F) --> X9)); thus (union (rng F)) /\ X9 c= union (rng (Intersect (F,((dom F) --> X9)))) :: according to XBOOLE_0:def_10 ::_thesis: union (rng (Intersect (F,((dom F) --> X9)))) c= (union (rng F)) /\ X9 proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in (union (rng F)) /\ X9 or x in union (rng (Intersect (F,((dom F) --> X9)))) ) assume A1: x in (union (rng F)) /\ X9 ; ::_thesis: x in union (rng (Intersect (F,((dom F) --> X9)))) A2: x in X9 by A1, XBOOLE_0:def_4; x in union (rng F) by A1, XBOOLE_0:def_4; then consider Fx being set such that A3: x in Fx and A4: Fx in rng F by TARSKI:def_4; consider x1 being set such that A5: x1 in dom F and A6: F . x1 = Fx by A4, FUNCT_1:def_3; x1 in dom (Intersect (F,((dom F) --> X9))) by A5, Th49; then A7: (Intersect (F,((dom F) --> X9))) . x1 in rng (Intersect (F,((dom F) --> X9))) by FUNCT_1:def_3; (Intersect (F,((dom F) --> X9))) . x1 = Fx /\ X9 by A5, A6, Th49; then x in (Intersect (F,((dom F) --> X9))) . x1 by A3, A2, XBOOLE_0:def_4; hence x in union (rng (Intersect (F,((dom F) --> X9)))) by A7, TARSKI:def_4; ::_thesis: verum end; thus union (rng (Intersect (F,((dom F) --> X9)))) c= (union (rng F)) /\ X9 ::_thesis: verum proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in union (rng (Intersect (F,((dom F) --> X9)))) or x in (union (rng F)) /\ X9 ) assume x in union (rng (Intersect (F,((dom F) --> X9)))) ; ::_thesis: x in (union (rng F)) /\ X9 then consider Ix being set such that A8: x in Ix and A9: Ix in rng (Intersect (F,((dom F) --> X9))) by TARSKI:def_4; consider x1 being set such that A10: x1 in dom (Intersect (F,((dom F) --> X9))) and A11: (Intersect (F,((dom F) --> X9))) . x1 = Ix by A9, FUNCT_1:def_3; A12: x1 in dom F by A10, Th49; then A13: F . x1 in rng F by FUNCT_1:def_3; A14: (Intersect (F,((dom F) --> X9))) . x1 = (F . x1) /\ X9 by A12, Th49; then x in F . x1 by A8, A11, XBOOLE_0:def_4; then A15: x in union (rng F) by A13, TARSKI:def_4; x in X9 by A8, A11, A14, XBOOLE_0:def_4; hence x in (union (rng F)) /\ X9 by A15, XBOOLE_0:def_4; ::_thesis: verum end; end; theorem Th51: :: CARD_FIN:51 for y, X9 being set for F, Ch being Function holds (Intersection (F,Ch,y)) /\ X9 = Intersection ((Intersect (F,((dom F) --> X9))),Ch,y) proof let y, X9 be set ; ::_thesis: for F, Ch being Function holds (Intersection (F,Ch,y)) /\ X9 = Intersection ((Intersect (F,((dom F) --> X9))),Ch,y) let F, Ch be Function; ::_thesis: (Intersection (F,Ch,y)) /\ X9 = Intersection ((Intersect (F,((dom F) --> X9))),Ch,y) set I = Intersect (F,((dom F) --> X9)); set Int1 = Intersection (F,Ch,y); set Int2 = Intersection ((Intersect (F,((dom F) --> X9))),Ch,y); thus (Intersection (F,Ch,y)) /\ X9 c= Intersection ((Intersect (F,((dom F) --> X9))),Ch,y) :: according to XBOOLE_0:def_10 ::_thesis: Intersection ((Intersect (F,((dom F) --> X9))),Ch,y) c= (Intersection (F,Ch,y)) /\ X9 proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in (Intersection (F,Ch,y)) /\ X9 or x in Intersection ((Intersect (F,((dom F) --> X9))),Ch,y) ) assume A1: x in (Intersection (F,Ch,y)) /\ X9 ; ::_thesis: x in Intersection ((Intersect (F,((dom F) --> X9))),Ch,y) A2: for z being set st z in dom Ch & Ch . z = y holds x in (Intersect (F,((dom F) --> X9))) . z proof A3: x in Intersection (F,Ch,y) by A1, XBOOLE_0:def_4; let z be set ; ::_thesis: ( z in dom Ch & Ch . z = y implies x in (Intersect (F,((dom F) --> X9))) . z ) assume ( z in dom Ch & Ch . z = y ) ; ::_thesis: x in (Intersect (F,((dom F) --> X9))) . z then A4: x in F . z by A3, Def2; then A5: z in dom F by FUNCT_1:def_2; x in X9 by A1, XBOOLE_0:def_4; then x in (F . z) /\ X9 by A4, XBOOLE_0:def_4; hence x in (Intersect (F,((dom F) --> X9))) . z by A5, Th49; ::_thesis: verum end; x in X9 by A1, XBOOLE_0:def_4; then x in (union (rng F)) /\ X9 by A1, XBOOLE_0:def_4; then x in union (rng (Intersect (F,((dom F) --> X9)))) by Th50; hence x in Intersection ((Intersect (F,((dom F) --> X9))),Ch,y) by A2, Def2; ::_thesis: verum end; thus Intersection ((Intersect (F,((dom F) --> X9))),Ch,y) c= (Intersection (F,Ch,y)) /\ X9 ::_thesis: verum proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in Intersection ((Intersect (F,((dom F) --> X9))),Ch,y) or x in (Intersection (F,Ch,y)) /\ X9 ) assume A6: x in Intersection ((Intersect (F,((dom F) --> X9))),Ch,y) ; ::_thesis: x in (Intersection (F,Ch,y)) /\ X9 x in union (rng (Intersect (F,((dom F) --> X9)))) by A6; then A7: x in (union (rng F)) /\ X9 by Th50; then A8: x in X9 by XBOOLE_0:def_4; A9: for z being set st z in dom Ch & Ch . z = y holds x in F . z proof A10: dom (Intersect (F,((dom F) --> X9))) = dom F by Th49; let z be set ; ::_thesis: ( z in dom Ch & Ch . z = y implies x in F . z ) assume ( z in dom Ch & Ch . z = y ) ; ::_thesis: x in F . z then A11: x in (Intersect (F,((dom F) --> X9))) . z by A6, Def2; then z in dom (Intersect (F,((dom F) --> X9))) by FUNCT_1:def_2; then x in (F . z) /\ X9 by A11, A10, Th49; hence x in F . z by XBOOLE_0:def_4; ::_thesis: verum end; x in union (rng F) by A7, XBOOLE_0:def_4; then x in Intersection (F,Ch,y) by A9, Def2; hence x in (Intersection (F,Ch,y)) /\ X9 by A8, XBOOLE_0:def_4; ::_thesis: verum end; end; theorem Th52: :: CARD_FIN:52 for F, G being XFinSequence st F is one-to-one & G is one-to-one & rng F misses rng G holds F ^ G is one-to-one proof let F, G be XFinSequence; ::_thesis: ( F is one-to-one & G is one-to-one & rng F misses rng G implies F ^ G is one-to-one ) assume that A1: F is one-to-one and A2: G is one-to-one and A3: rng F misses rng G ; ::_thesis: F ^ G is one-to-one len F, rng F are_equipotent by A1, WELLORD2:def_4; then A4: card (len F) = card (rng F) by CARD_1:5; len G, rng G are_equipotent by A2, WELLORD2:def_4; then A5: card (len G) = card (rng G) by CARD_1:5; reconsider FG = F ^ G as Function of (dom (F ^ G)),(rng (F ^ G)) by FUNCT_2:1; A6: dom (F ^ G) = (len F) + (len G) by AFINSQ_1:def_3; A7: FG is onto by FUNCT_2:def_3; card ((rng F) \/ (rng G)) = (card (rng F)) + (card (rng G)) by A3, CARD_2:40; then card (dom (F ^ G)) = card (rng (F ^ G)) by A4, A5, A6, AFINSQ_1:26; hence F ^ G is one-to-one by A7, STIRL2_1:60; ::_thesis: verum end; theorem Th53: :: CARD_FIN:53 for k being Nat for Fy being finite-yielding Function for X being finite set for x being set for n being Nat st dom Fy = X & x in dom Fy & k > 0 holds Card_Intersection (Fy,(k + 1)) = (Card_Intersection ((Fy | ((dom Fy) \ {x})),(k + 1))) + (Card_Intersection ((Intersect ((Fy | ((dom Fy) \ {x})),(((dom Fy) \ {x}) --> (Fy . x)))),k)) proof let k be Nat; ::_thesis: for Fy being finite-yielding Function for X being finite set for x being set for n being Nat st dom Fy = X & x in dom Fy & k > 0 holds Card_Intersection (Fy,(k + 1)) = (Card_Intersection ((Fy | ((dom Fy) \ {x})),(k + 1))) + (Card_Intersection ((Intersect ((Fy | ((dom Fy) \ {x})),(((dom Fy) \ {x}) --> (Fy . x)))),k)) let Fy be finite-yielding Function; ::_thesis: for X being finite set for x being set for n being Nat st dom Fy = X & x in dom Fy & k > 0 holds Card_Intersection (Fy,(k + 1)) = (Card_Intersection ((Fy | ((dom Fy) \ {x})),(k + 1))) + (Card_Intersection ((Intersect ((Fy | ((dom Fy) \ {x})),(((dom Fy) \ {x}) --> (Fy . x)))),k)) let X be finite set ; ::_thesis: for x being set for n being Nat st dom Fy = X & x in dom Fy & k > 0 holds Card_Intersection (Fy,(k + 1)) = (Card_Intersection ((Fy | ((dom Fy) \ {x})),(k + 1))) + (Card_Intersection ((Intersect ((Fy | ((dom Fy) \ {x})),(((dom Fy) \ {x}) --> (Fy . x)))),k)) let x be set ; ::_thesis: for n being Nat st dom Fy = X & x in dom Fy & k > 0 holds Card_Intersection (Fy,(k + 1)) = (Card_Intersection ((Fy | ((dom Fy) \ {x})),(k + 1))) + (Card_Intersection ((Intersect ((Fy | ((dom Fy) \ {x})),(((dom Fy) \ {x}) --> (Fy . x)))),k)) let n be Nat; ::_thesis: ( dom Fy = X & x in dom Fy & k > 0 implies Card_Intersection (Fy,(k + 1)) = (Card_Intersection ((Fy | ((dom Fy) \ {x})),(k + 1))) + (Card_Intersection ((Intersect ((Fy | ((dom Fy) \ {x})),(((dom Fy) \ {x}) --> (Fy . x)))),k)) ) assume that A1: dom Fy = X and A2: x in dom Fy and A3: k > 0 ; ::_thesis: Card_Intersection (Fy,(k + 1)) = (Card_Intersection ((Fy | ((dom Fy) \ {x})),(k + 1))) + (Card_Intersection ((Intersect ((Fy | ((dom Fy) \ {x})),(((dom Fy) \ {x}) --> (Fy . x)))),k)) set Xx = X \ {x}; A4: (X \ {x}) \/ {x} = X by A1, A2, ZFMISC_1:116; set I = Intersect ((Fy | ((dom Fy) \ {x})),(((dom Fy) \ {x}) --> (Fy . x))); set X1 = { f where f is Function of ((X \ {x}) \/ {x}),{1,0} : ( card (f " {1}) = k + 1 & f . x = 1 ) } ; set X0 = { f where f is Function of ((X \ {x}) \/ {x}),{1,0} : ( card (f " {1}) = k + 1 & f . x = 0 ) } ; { f where f is Function of ((X \ {x}) \/ {x}),{1,0} : ( card (f " {1}) = k + 1 & f . x = 0 ) } \/ { f where f is Function of ((X \ {x}) \/ {x}),{1,0} : ( card (f " {1}) = k + 1 & f . x = 1 ) } = Choose (((X \ {x}) \/ {x}),(k + 1),1,0) by Lm1; then reconsider X0 = { f where f is Function of ((X \ {x}) \/ {x}),{1,0} : ( card (f " {1}) = k + 1 & f . x = 0 ) } , X1 = { f where f is Function of ((X \ {x}) \/ {x}),{1,0} : ( card (f " {1}) = k + 1 & f . x = 1 ) } as finite set by FINSET_1:1, XBOOLE_1:7; consider P1 being Function of (card X1),X1 such that A5: P1 is one-to-one by Lm2; not x in X \ {x} by ZFMISC_1:56; then A6: card (Choose ((X \ {x}),k,1,0)) = card X1 by Th13; defpred S1[ set , set ] means ex f being Function st ( f = P1 . $1 & f in X1 & $2 = f | (X \ {x}) ); A7: for x1 being set st x1 in card X1 holds ex P1x1 being set st ( P1x1 in Choose ((X \ {x}),k,1,0) & S1[x1,P1x1] ) proof not x in X \ {x} by ZFMISC_1:56; then A8: ((X \ {x}) \/ {x}) \ {x} = X \ {x} by ZFMISC_1:117; let x1 be set ; ::_thesis: ( x1 in card X1 implies ex P1x1 being set st ( P1x1 in Choose ((X \ {x}),k,1,0) & S1[x1,P1x1] ) ) assume x1 in card X1 ; ::_thesis: ex P1x1 being set st ( P1x1 in Choose ((X \ {x}),k,1,0) & S1[x1,P1x1] ) then x1 in dom P1 by CARD_1:27, FUNCT_2:def_1; then A9: P1 . x1 in rng P1 by FUNCT_1:def_3; then P1 . x1 in X1 ; then consider P1x1 being Function of ((X \ {x}) \/ {x}),{1,0} such that A10: P1 . x1 = P1x1 and A11: card (P1x1 " {1}) = k + 1 and A12: P1x1 . x = 1 ; A13: dom P1x1 = (X \ {x}) \/ {x} by FUNCT_2:def_1; A14: rng (P1x1 | (X \ {x})) c= {1,0} ; ((X \ {x}) \/ {x}) /\ (X \ {x}) = X \ {x} by XBOOLE_1:7, XBOOLE_1:28; then dom (P1x1 | (X \ {x})) = X \ {x} by A13, RELAT_1:61; then reconsider Px = P1x1 | (X \ {x}) as Function of (X \ {x}),{1,0} by A14, FUNCT_2:2; A15: not x in Px " {1} by ZFMISC_1:56; ( x in {x} & dom P1x1 = (X \ {x}) \/ {x} ) by FUNCT_2:def_1, TARSKI:def_1; then x in dom P1x1 by XBOOLE_0:def_3; then P1x1 " {1} = (Px " {1}) \/ {x} by A12, A13, A8, AFINSQ_2:66; then k + 1 = (card (Px " {1})) + 1 by A11, A15, CARD_2:41; then Px in Choose ((X \ {x}),k,1,0) by Def1; hence ex P1x1 being set st ( P1x1 in Choose ((X \ {x}),k,1,0) & S1[x1,P1x1] ) by A9, A10; ::_thesis: verum end; consider P1x being Function of (card X1),(Choose ((X \ {x}),k,1,0)) such that A16: for x1 being set st x1 in card X1 holds S1[x1,P1x . x1] from FUNCT_2:sch_1(A7); for x1, x2 being set st x1 in dom P1x & x2 in dom P1x & P1x . x1 = P1x . x2 holds x1 = x2 proof let x1, x2 be set ; ::_thesis: ( x1 in dom P1x & x2 in dom P1x & P1x . x1 = P1x . x2 implies x1 = x2 ) assume that A17: x1 in dom P1x and A18: x2 in dom P1x and A19: P1x . x1 = P1x . x2 ; ::_thesis: x1 = x2 consider f2 being Function such that A20: f2 = P1 . x2 and A21: f2 in X1 and A22: P1x . x2 = f2 | (X \ {x}) by A16, A18; consider f1 being Function such that A23: f1 = P1 . x1 and A24: f1 in X1 and A25: P1x . x1 = f1 | (X \ {x}) by A16, A17; A26: ex F being Function of ((X \ {x}) \/ {x}),{1,0} st ( f1 = F & card (F " {1}) = k + 1 & F . x = 1 ) by A24; then A27: dom f1 = (X \ {x}) \/ {x} by FUNCT_2:def_1; A28: ex F being Function of ((X \ {x}) \/ {x}),{1,0} st ( f2 = F & card (F " {1}) = k + 1 & F . x = 1 ) by A21; then A29: dom f2 = (X \ {x}) \/ {x} by FUNCT_2:def_1; for z being set st z in dom f1 holds f1 . z = f2 . z proof let z be set ; ::_thesis: ( z in dom f1 implies f1 . z = f2 . z ) assume A30: z in dom f1 ; ::_thesis: f1 . z = f2 . z now__::_thesis:_f1_._z_=_f2_._z percases ( z in X \ {x} or z in {x} ) by A27, A30, XBOOLE_0:def_3; supposeA31: z in X \ {x} ; ::_thesis: f1 . z = f2 . z then z in (dom f1) /\ (X \ {x}) by A30, XBOOLE_0:def_4; then A32: (f1 | (X \ {x})) . z = f1 . z by FUNCT_1:48; z in (dom f2) /\ (X \ {x}) by A27, A29, A30, A31, XBOOLE_0:def_4; hence f1 . z = f2 . z by A19, A25, A22, A32, FUNCT_1:48; ::_thesis: verum end; suppose z in {x} ; ::_thesis: f1 . z = f2 . z then z = x by TARSKI:def_1; hence f1 . z = f2 . z by A26, A28; ::_thesis: verum end; end; end; hence f1 . z = f2 . z ; ::_thesis: verum end; then A33: f1 = f2 by A27, A29, FUNCT_1:2; ( X1 = {} implies card X1 = {} ) ; then dom P1 = card X1 by FUNCT_2:def_1; hence x1 = x2 by A5, A17, A18, A23, A20, A33, FUNCT_1:def_4; ::_thesis: verum end; then A34: P1x is one-to-one by FUNCT_1:def_4; (X \ {x}) /\ X = X \ {x} by XBOOLE_1:28; then A35: dom (Fy | ((dom Fy) \ {x})) = X \ {x} by A1, RELAT_1:61; then dom (Intersect ((Fy | ((dom Fy) \ {x})),(((dom Fy) \ {x}) --> (Fy . x)))) = X \ {x} by A1, Th49; then consider XFS1 being XFinSequence of such that A36: dom XFS1 = dom P1x and A37: for z being set for f being Function st z in dom XFS1 & f = P1x . z holds XFS1 . z = card (Intersection ((Intersect ((Fy | ((dom Fy) \ {x})),(((dom Fy) \ {x}) --> (Fy . x)))),f,1)) and A38: Card_Intersection ((Intersect ((Fy | ((dom Fy) \ {x})),(((dom Fy) \ {x}) --> (Fy . x)))),k) = Sum XFS1 by A6, A34, Def4; A39: addnat "**" XFS1 = Card_Intersection ((Intersect ((Fy | ((dom Fy) \ {x})),(((dom Fy) \ {x}) --> (Fy . x)))),k) by A38, AFINSQ_2:51; not x in X \ {x} by ZFMISC_1:56; then A40: card (Choose ((X \ {x}),(k + 1),1,0)) = card X0 by Th14; set Ch = Choose (X,(k + 1),1,0); consider P0 being Function of (card X0),X0 such that A41: P0 is one-to-one by Lm2; A42: ( X1 = {} implies card X1 = {} ) ; then A43: dom P1 = card X1 by FUNCT_2:def_1; A44: ( X0 = {} implies card X0 = {} ) ; then dom P0 = card X0 by FUNCT_2:def_1; then reconsider XP0 = P0, XP1 = P1 as XFinSequence by A43, AFINSQ_1:5; A45: card X0 = len XP0 by A44, FUNCT_2:def_1; defpred S2[ set , set ] means ex f being Function st ( f = P0 . $1 & f in X0 & $2 = f | (X \ {x}) ); A46: for x0 being set st x0 in card X0 holds ex P0x0 being set st ( P0x0 in Choose ((X \ {x}),(k + 1),1,0) & S2[x0,P0x0] ) proof let x0 be set ; ::_thesis: ( x0 in card X0 implies ex P0x0 being set st ( P0x0 in Choose ((X \ {x}),(k + 1),1,0) & S2[x0,P0x0] ) ) assume x0 in card X0 ; ::_thesis: ex P0x0 being set st ( P0x0 in Choose ((X \ {x}),(k + 1),1,0) & S2[x0,P0x0] ) then x0 in dom P0 by CARD_1:27, FUNCT_2:def_1; then A47: P0 . x0 in rng P0 by FUNCT_1:def_3; then P0 . x0 in X0 ; then consider P0x0 being Function of ((X \ {x}) \/ {x}),{1,0} such that A48: P0 . x0 = P0x0 and A49: card (P0x0 " {1}) = k + 1 and A50: P0x0 . x = 0 ; A51: dom P0x0 = (X \ {x}) \/ {x} by FUNCT_2:def_1; A52: rng (P0x0 | (X \ {x})) c= {1,0} ; ((X \ {x}) \/ {x}) /\ (X \ {x}) = X \ {x} by XBOOLE_1:7, XBOOLE_1:28; then dom (P0x0 | (X \ {x})) = X \ {x} by A51, RELAT_1:61; then reconsider Px = P0x0 | (X \ {x}) as Function of (X \ {x}),{1,0} by A52, FUNCT_2:2; not x in X \ {x} by ZFMISC_1:56; then ((X \ {x}) \/ {x}) \ {x} = X \ {x} by ZFMISC_1:117; then P0x0 " {1} = Px " {1} by A50, A51, AFINSQ_2:67; then Px in Choose ((X \ {x}),(k + 1),1,0) by A49, Def1; hence ex P0x0 being set st ( P0x0 in Choose ((X \ {x}),(k + 1),1,0) & S2[x0,P0x0] ) by A47, A48; ::_thesis: verum end; consider P0x being Function of (card X0),(Choose ((X \ {x}),(k + 1),1,0)) such that A53: for x1 being set st x1 in card X0 holds S2[x1,P0x . x1] from FUNCT_2:sch_1(A46); (rng P0) \/ (rng P1) c= X0 \/ X1 by XBOOLE_1:13; then rng (XP0 ^ XP1) c= X0 \/ X1 by AFINSQ_1:26; then A54: rng (XP0 ^ XP1) c= Choose (X,(k + 1),1,0) by A4, Lm1; A55: card X1 = len XP1 by A42, FUNCT_2:def_1; for x1, x2 being set st x1 in dom P0x & x2 in dom P0x & P0x . x1 = P0x . x2 holds x1 = x2 proof let x1, x2 be set ; ::_thesis: ( x1 in dom P0x & x2 in dom P0x & P0x . x1 = P0x . x2 implies x1 = x2 ) assume that A56: x1 in dom P0x and A57: x2 in dom P0x and A58: P0x . x1 = P0x . x2 ; ::_thesis: x1 = x2 consider f2 being Function such that A59: f2 = P0 . x2 and A60: f2 in X0 and A61: P0x . x2 = f2 | (X \ {x}) by A53, A57; consider f1 being Function such that A62: f1 = P0 . x1 and A63: f1 in X0 and A64: P0x . x1 = f1 | (X \ {x}) by A53, A56; A65: ex F being Function of ((X \ {x}) \/ {x}),{1,0} st ( f1 = F & card (F " {1}) = k + 1 & F . x = 0 ) by A63; then A66: dom f1 = (X \ {x}) \/ {x} by FUNCT_2:def_1; A67: ex F being Function of ((X \ {x}) \/ {x}),{1,0} st ( f2 = F & card (F " {1}) = k + 1 & F . x = 0 ) by A60; then A68: dom f2 = (X \ {x}) \/ {x} by FUNCT_2:def_1; for z being set st z in dom f1 holds f1 . z = f2 . z proof let z be set ; ::_thesis: ( z in dom f1 implies f1 . z = f2 . z ) assume A69: z in dom f1 ; ::_thesis: f1 . z = f2 . z now__::_thesis:_f1_._z_=_f2_._z percases ( z in X \ {x} or z in {x} ) by A66, A69, XBOOLE_0:def_3; supposeA70: z in X \ {x} ; ::_thesis: f1 . z = f2 . z then z in (dom f1) /\ (X \ {x}) by A69, XBOOLE_0:def_4; then A71: (f1 | (X \ {x})) . z = f1 . z by FUNCT_1:48; z in (dom f2) /\ (X \ {x}) by A66, A68, A69, A70, XBOOLE_0:def_4; hence f1 . z = f2 . z by A58, A64, A61, A71, FUNCT_1:48; ::_thesis: verum end; suppose z in {x} ; ::_thesis: f1 . z = f2 . z then z = x by TARSKI:def_1; hence f1 . z = f2 . z by A65, A67; ::_thesis: verum end; end; end; hence f1 . z = f2 . z ; ::_thesis: verum end; then A72: f1 = f2 by A66, A68, FUNCT_1:2; ( X0 = {} implies card X0 = {} ) ; then dom P0 = card X0 by FUNCT_2:def_1; hence x1 = x2 by A41, A56, A57, A62, A59, A72, FUNCT_1:def_4; ::_thesis: verum end; then P0x is one-to-one by FUNCT_1:def_4; then consider XFS0 being XFinSequence of such that A73: dom XFS0 = dom P0x and A74: for z being set for f being Function st z in dom XFS0 & f = P0x . z holds XFS0 . z = card (Intersection ((Fy | ((dom Fy) \ {x})),f,1)) and A75: Card_Intersection ((Fy | ((dom Fy) \ {x})),(k + 1)) = Sum XFS0 by A40, A35, Def4; ( Choose ((X \ {x}),(k + 1),1,0) = {} implies card (Choose ((X \ {x}),(k + 1),1,0)) = {} ) ; then A76: dom P0x = card X0 by A40, FUNCT_2:def_1; not x in X \ {x} by ZFMISC_1:56; then (card X0) + (card X1) = card (Choose (X,(k + 1),1,0)) by A40, A6, A4, Th15; then dom (XP0 ^ XP1) = card (Choose (X,(k + 1),1,0)) by A45, A55, AFINSQ_1:def_3; then reconsider XP01 = XP0 ^ XP1 as Function of (card (Choose (X,(k + 1),1,0))),(Choose (X,(k + 1),1,0)) by A54, FUNCT_2:2; rng P0 misses rng P1 by Lm1, XBOOLE_1:64; then XP01 is one-to-one by A41, A5, Th52; then consider XFS being XFinSequence of such that A77: dom XFS = dom XP01 and A78: for z being set for f being Function st z in dom XFS & f = XP01 . z holds XFS . z = card (Intersection (Fy,f,1)) and A79: Card_Intersection (Fy,(k + 1)) = Sum XFS by A1, Def4; A80: addnat "**" XFS = Card_Intersection (Fy,(k + 1)) by A79, AFINSQ_2:51; ( Choose ((X \ {x}),k,1,0) = {} implies card (Choose ((X \ {x}),k,1,0)) = {} ) ; then A81: dom P1x = card X1 by A6, FUNCT_2:def_1; A82: for n being Nat st n in dom XFS0 holds XFS . n = XFS0 . n proof let n be Nat; ::_thesis: ( n in dom XFS0 implies XFS . n = XFS0 . n ) assume A83: n in dom XFS0 ; ::_thesis: XFS . n = XFS0 . n consider fx being Function such that A84: fx = P0 . n and A85: fx in X0 and A86: P0x . n = fx | (X \ {x}) by A53, A73, A83; A87: XFS0 . n = card (Intersection ((Fy | (X \ {x})),(fx | (X \ {x})),1)) by A1, A74, A83, A86; A88: ex fx9 being Function of ((X \ {x}) \/ {x}),{1,0} st ( fx = fx9 & card (fx9 " {1}) = k + 1 & fx9 . x = 0 ) by A85; then consider x1 being set such that A89: x1 in fx " {1} by CARD_1:27, XBOOLE_0:def_1; fx . x1 in {1} by A89, FUNCT_1:def_7; then A90: fx . x1 = 1 by TARSKI:def_1; x1 in dom fx by A89, FUNCT_1:def_7; then A91: 1 in rng fx by A90, FUNCT_1:def_3; A92: (X \ {x}) \/ {x} = X by A1, A2, ZFMISC_1:116; A93: (dom XFS0) + 0 <= (dom XFS0) + (dom XFS1) by XREAL_1:7; dom fx = (X \ {x}) \/ {x} by A88, FUNCT_2:def_1; then A94: fx " {1} = (fx | (X \ {x})) " {1} by A88, A92, AFINSQ_2:67; n < dom XFS0 by A83, NAT_1:44; then n < (dom XFS0) + (dom XFS1) by A93, XXREAL_0:2; then n < dom XFS by A73, A36, A45, A55, A77, A76, A81, AFINSQ_1:def_3; then A95: n in dom XFS by NAT_1:44; XP01 . n = XP0 . n by A73, A45, A83, AFINSQ_1:def_3; then A96: XFS . n = card (Intersection (Fy,fx,1)) by A78, A84, A95; ( (fx | (X \ {x})) " {1} c= dom (fx | (X \ {x})) & dom (fx | (X \ {x})) c= X \ {x} ) by RELAT_1:58, RELAT_1:132; then Intersection ((Fy | (X \ {x})),fx,1) = Intersection (Fy,fx,1) by A94, A91, Th30, XBOOLE_1:1; hence XFS . n = XFS0 . n by A94, A96, A87, Th28; ::_thesis: verum end; ( X1 = {} implies card X1 = {} ) ; then A97: dom P1 = card X1 by FUNCT_2:def_1; A98: for n being Nat st n in dom XFS1 holds XFS . ((len XFS0) + n) = XFS1 . n proof A99: (X \ {x}) \/ {x} = X by A1, A2, ZFMISC_1:116; let n be Nat; ::_thesis: ( n in dom XFS1 implies XFS . ((len XFS0) + n) = XFS1 . n ) assume A100: n in dom XFS1 ; ::_thesis: XFS . ((len XFS0) + n) = XFS1 . n consider fx being Function such that A101: fx = P1 . n and A102: fx in X1 and A103: P1x . n = fx | (X \ {x}) by A16, A36, A100; consider fx9 being Function of ((X \ {x}) \/ {x}),{1,0} such that A104: fx = fx9 and A105: card (fx9 " {1}) = k + 1 and A106: fx9 . x = 1 by A102; A107: Intersection ((Intersect ((Fy | (X \ {x})),((X \ {x}) --> (Fy . x)))),(fx | (X \ {x})),1) = (Intersection ((Fy | (X \ {x})),(fx | (X \ {x})),1)) /\ (Fy . x) by A1, A35, Th51; A108: dom fx9 = (X \ {x}) \/ {x} by FUNCT_2:def_1; then A109: dom fx = X by A1, A2, A104, ZFMISC_1:116; A110: ( 1 in rng (fx | (X \ {x})) & (fx | (X \ {x})) " {1} c= X \ {x} ) proof A111: ( (fx | (X \ {x})) " {1} c= dom (fx | (X \ {x})) & dom (fx | (X \ {x})) = (dom fx) /\ (X \ {x}) ) by RELAT_1:61, RELAT_1:132; reconsider fx1 = (fx | (X \ {x})) " {1} as finite set ; not x in X \ {x} by ZFMISC_1:56; then not x in (dom fx) /\ (X \ {x}) by XBOOLE_0:def_4; then not x in dom (fx | (X \ {x})) by RELAT_1:61; then A112: not x in fx1 by FUNCT_1:def_7; {x} \/ fx1 = fx " {1} by A1, A2, A104, A106, A109, AFINSQ_2:66; then (card fx1) + 1 = k + 1 by A104, A105, A112, CARD_2:41; then consider y being set such that A113: y in fx1 by A3, CARD_1:27, XBOOLE_0:def_1; y in dom (fx | (X \ {x})) by A113, FUNCT_1:def_7; then A114: (fx | (X \ {x})) . y in rng (fx | (X \ {x})) by FUNCT_1:def_3; ( (dom fx) /\ (X \ {x}) c= X \ {x} & (fx | (X \ {x})) . y in {1} ) by A113, FUNCT_1:def_7, XBOOLE_1:17; hence ( 1 in rng (fx | (X \ {x})) & (fx | (X \ {x})) " {1} c= X \ {x} ) by A111, A114, TARSKI:def_1, XBOOLE_1:1; ::_thesis: verum end; n < dom XFS1 by A100, NAT_1:44; then (dom XFS0) + n < (dom XFS0) + (dom XFS1) by XREAL_1:8; then (dom XFS0) + n < dom XFS by A73, A36, A45, A55, A77, A76, A81, AFINSQ_1:def_3; then A115: (dom XFS0) + n in dom XFS by NAT_1:44; XP01 . (n + (len XP0)) = fx by A36, A97, A100, A101, AFINSQ_1:def_3; then A116: XFS . ((dom XFS0) + n) = card (Intersection (Fy,fx,1)) by A73, A45, A78, A76, A115; fx . x in {1} by A104, A106, TARSKI:def_1; then A117: x in fx " {1} by A1, A2, A104, A108, A99, FUNCT_1:def_7; XFS1 . n = card (Intersection ((Intersect ((Fy | (X \ {x})),((X \ {x}) --> (Fy . x)))),(fx | (X \ {x})),1)) by A1, A37, A100, A103; then XFS1 . n = card ((Intersection (Fy,(fx | (X \ {x})),1)) /\ (Fy . x)) by A110, A107, Th30; hence XFS . ((len XFS0) + n) = XFS1 . n by A117, A109, A116, Th32; ::_thesis: verum end; dom XFS = (len XFS0) + (len XFS1) by A73, A36, A45, A55, A77, A76, A81, AFINSQ_1:def_3; then XFS = XFS0 ^ XFS1 by A82, A98, AFINSQ_1:def_3; then A118: addnat "**" XFS = addnat . ((addnat "**" XFS0),(addnat "**" XFS1)) by AFINSQ_2:42; addnat "**" XFS0 = Card_Intersection ((Fy | ((dom Fy) \ {x})),(k + 1)) by A75, AFINSQ_2:51; hence Card_Intersection (Fy,(k + 1)) = (Card_Intersection ((Fy | ((dom Fy) \ {x})),(k + 1))) + (Card_Intersection ((Intersect ((Fy | ((dom Fy) \ {x})),(((dom Fy) \ {x}) --> (Fy . x)))),k)) by A118, A39, A80, BINOP_2:def_23; ::_thesis: verum end; theorem Th54: :: CARD_FIN:54 for x being set for F being Function st x in dom F holds union (rng F) = (union (rng (F | ((dom F) \ {x})))) \/ (F . x) proof let x be set ; ::_thesis: for F being Function st x in dom F holds union (rng F) = (union (rng (F | ((dom F) \ {x})))) \/ (F . x) let F be Function; ::_thesis: ( x in dom F implies union (rng F) = (union (rng (F | ((dom F) \ {x})))) \/ (F . x) ) set d = (dom F) \ {x}; set Fd = F | ((dom F) \ {x}); A1: F | (dom F) = F ; assume A2: x in dom F ; ::_thesis: union (rng F) = (union (rng (F | ((dom F) \ {x})))) \/ (F . x) then ((dom F) \ {x}) \/ {x} = dom F by ZFMISC_1:116; then F = (F | ((dom F) \ {x})) \/ (F | {x}) by A1, RELAT_1:78; then A3: rng F = (rng (F | ((dom F) \ {x}))) \/ (rng (F | {x})) by RELAT_1:12; Im (F,x) = {(F . x)} by A2, FUNCT_1:59; then rng (F | {x}) = {(F . x)} by RELAT_1:115; then union (rng F) = (union (rng (F | ((dom F) \ {x})))) \/ (union {(F . x)}) by A3, ZFMISC_1:78; hence union (rng F) = (union (rng (F | ((dom F) \ {x})))) \/ (F . x) by ZFMISC_1:25; ::_thesis: verum end; theorem Th55: :: CARD_FIN:55 for Fy being finite-yielding Function for X being finite set ex XFS being XFinSequence of st ( dom XFS = card X & ( for n being Nat st n in dom XFS holds XFS . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) ) ) proof let Fy be finite-yielding Function; ::_thesis: for X being finite set ex XFS being XFinSequence of st ( dom XFS = card X & ( for n being Nat st n in dom XFS holds XFS . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) ) ) let X be finite set ; ::_thesis: ex XFS being XFinSequence of st ( dom XFS = card X & ( for n being Nat st n in dom XFS holds XFS . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) ) ) defpred S1[ set , set ] means for n being Nat st n = $1 holds $2 = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))); A1: for k being Nat st k in card X holds ex x being Element of INT st S1[k,x] proof let k be Nat; ::_thesis: ( k in card X implies ex x being Element of INT st S1[k,x] ) assume k in card X ; ::_thesis: ex x being Element of INT st S1[k,x] reconsider C = ((- 1) |^ k) * (Card_Intersection (Fy,(k + 1))) as Element of INT ; take C ; ::_thesis: S1[k,C] thus S1[k,C] ; ::_thesis: verum end; consider XFS being XFinSequence of such that A2: ( dom XFS = card X & ( for k being Nat st k in card X holds S1[k,XFS . k] ) ) from STIRL2_1:sch_5(A1); take XFS ; ::_thesis: ( dom XFS = card X & ( for n being Nat st n in dom XFS holds XFS . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) ) ) thus ( dom XFS = card X & ( for n being Nat st n in dom XFS holds XFS . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) ) ) by A2; ::_thesis: verum end; theorem Th56: :: CARD_FIN:56 for Fy being finite-yielding Function for X being finite set st dom Fy = X holds for XFS being XFinSequence of st dom XFS = card X & ( for n being Nat st n in dom XFS holds XFS . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) ) holds card (union (rng Fy)) = Sum XFS proof defpred S1[ Nat] means for Fy being finite-yielding Function for X being finite set st dom Fy = X & card X = $1 holds for XFS being XFinSequence of st dom XFS = card X & ( for n being Nat st n in dom XFS holds XFS . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) ) holds card (union (rng Fy)) = Sum XFS; A1: for k being Nat st S1[k] holds S1[k + 1] proof let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] ) assume A2: S1[k] ; ::_thesis: S1[k + 1] let Fy be finite-yielding Function; ::_thesis: for X being finite set st dom Fy = X & card X = k + 1 holds for XFS being XFinSequence of st dom XFS = card X & ( for n being Nat st n in dom XFS holds XFS . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) ) holds card (union (rng Fy)) = Sum XFS let X be finite set ; ::_thesis: ( dom Fy = X & card X = k + 1 implies for XFS being XFinSequence of st dom XFS = card X & ( for n being Nat st n in dom XFS holds XFS . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) ) holds card (union (rng Fy)) = Sum XFS ) assume that A3: dom Fy = X and A4: card X = k + 1 ; ::_thesis: for XFS being XFinSequence of st dom XFS = card X & ( for n being Nat st n in dom XFS holds XFS . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) ) holds card (union (rng Fy)) = Sum XFS ( rng Fy is finite & ( for x being set st x in rng Fy holds x is finite ) ) by A3, FINSET_1:8; then reconsider urngFy = union (rng Fy) as finite set ; let XFS be XFinSequence of ; ::_thesis: ( dom XFS = card X & ( for n being Nat st n in dom XFS holds XFS . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) ) implies card (union (rng Fy)) = Sum XFS ) assume that A5: dom XFS = card X and A6: for n being Nat st n in dom XFS holds XFS . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) ; ::_thesis: card (union (rng Fy)) = Sum XFS percases ( k = 0 or k > 0 ) ; supposeA7: k = 0 ; ::_thesis: card (union (rng Fy)) = Sum XFS then len XFS = 1 by A4, A5; then A8: XFS = <%(XFS . 0)%> by AFINSQ_1:34; XFS . 0 is Element of INT by INT_1:def_2; then A9: addint "**" XFS = XFS . 0 by A8, AFINSQ_2:37; 0 in dom XFS by A4, A5, A7, CARD_1:49, TARSKI:def_1; then A10: XFS . 0 = ((- 1) |^ 0) * (Card_Intersection (Fy,(0 + 1))) by A6; consider x being set such that A11: dom Fy = {x} by A3, A4, A7, CARD_2:42; A12: rng Fy = {(Fy . x)} by A11, FUNCT_1:4; then A13: union (rng Fy) = Fy . x by ZFMISC_1:25; ( (- 1) |^ 0 = 1 & Fy = x .--> (Fy . x) ) by A11, A12, FUNCOP_1:9, NEWTON:4; then XFS . 0 = card (union (rng Fy)) by Th46, A13, A10; hence card (union (rng Fy)) = Sum XFS by A9, AFINSQ_2:50; ::_thesis: verum end; supposeA14: k > 0 ; ::_thesis: card (union (rng Fy)) = Sum XFS consider x being set such that A15: x in dom Fy by A3, A4, CARD_1:27, XBOOLE_0:def_1; set Xx = X \ {x}; A16: card (X \ {x}) = k by A3, A4, A15, STIRL2_1:55; set FyX = Fy | (X \ {x}); reconsider urngFyX = union (rng (Fy | (X \ {x}))) as finite set ; set Fyx = Fy . x; set I = Intersect ((Fy | (X \ {x})),((dom (Fy | (X \ {x}))) --> (Fy . x))); consider XFyX being XFinSequence of such that A17: dom XFyX = card (X \ {x}) and A18: for n being Nat st n in dom XFyX holds XFyX . n = ((- 1) |^ n) * (Card_Intersection ((Fy | (X \ {x})),(n + 1))) by Th55; urngFyX /\ (Fy . x) = union (rng (Intersect ((Fy | (X \ {x})),((dom (Fy | (X \ {x}))) --> (Fy . x))))) by Th50; then reconsider urngI = union (rng (Intersect ((Fy | (X \ {x})),((dom (Fy | (X \ {x}))) --> (Fy . x))))) as finite set ; consider XI being XFinSequence of such that A19: dom XI = card (X \ {x}) and A20: for n being Nat st n in dom XI holds XI . n = ((- 1) |^ n) * (Card_Intersection ((Intersect ((Fy | (X \ {x})),((dom (Fy | (X \ {x}))) --> (Fy . x)))),(n + 1))) by Th55; set XI1 = (- 1) (#) XI; reconsider XI1 = (- 1) (#) XI as XFinSequence of ; reconsider XcF = <%(card (Fy . x))%>, X0 = <%0%> as XFinSequence of ; reconsider F1 = <%(card (Fy . x))%> ^ XI1, F2 = XFyX ^ <%0%> as XFinSequence of ; A21: card (X \ {x}) = k by A3, A4, A15, STIRL2_1:55; 0 is Element of INT by INT_1:def_2; then A22: addint "**" X0 = 0 by AFINSQ_2:37; card (Fy . x) is Element of INT by INT_1:def_2; then A23: addint "**" XcF = card (Fy . x) by AFINSQ_2:37; A24: (- 1) * (Sum XI) = Sum XI1 by AFINSQ_2:64; A25: addint "**" F1 = addint . ((card (Fy . x)),(addint "**" XI1)) by A23, AFINSQ_2:42 .= (card (Fy . x)) + (addint "**" XI1) by BINOP_2:def_20 .= (card (Fy . x)) + (Sum XI1) by AFINSQ_2:50 ; A26: addint "**" F2 = addint . ((addint "**" XFyX),0) by A22, AFINSQ_2:42 .= (addint "**" XFyX) + 0 by BINOP_2:def_20 .= Sum XFyX by AFINSQ_2:50 ; A27: Sum (F1 ^ F2) = (Sum F1) + (Sum F2) by AFINSQ_2:55 .= (addint "**" F1) + (Sum F2) by AFINSQ_2:50 .= ((card (Fy . x)) + ((- 1) * (Sum XI))) + (Sum XFyX) by A24, A25, A26, AFINSQ_2:50 ; A28: urngFyX \/ (Fy . x) = urngFy by A3, A15, Th54; A29: urngFyX /\ (Fy . x) = urngI by Th50; A30: dom (Fy | (X \ {x})) = X \ {x} by A3, RELAT_1:62; then dom (Intersect ((Fy | (X \ {x})),((dom (Fy | (X \ {x}))) --> (Fy . x)))) = X \ {x} by Th49; then A31: card urngI = Sum XI by A2, A19, A20, A21; ( len <%(card (Fy . x))%> = 1 & len XI1 = card (X \ {x}) ) by A19, AFINSQ_1:33, VALUED_1:def_5; then A32: len F1 = k + 1 by A16, AFINSQ_1:17; A33: for n being Nat st n in dom XFS holds XFS . n = addint . ((F1 . n),(F2 . n)) proof let n be Nat; ::_thesis: ( n in dom XFS implies XFS . n = addint . ((F1 . n),(F2 . n)) ) assume A34: n in dom XFS ; ::_thesis: XFS . n = addint . ((F1 . n),(F2 . n)) reconsider N = n as Element of NAT by ORDINAL1:def_12; percases ( n = 0 or n > 0 ) ; supposeA35: n = 0 ; ::_thesis: XFS . n = addint . ((F1 . n),(F2 . n)) ( 0 in k & k = dom XFyX ) by A3, A4, A14, A15, A17, NAT_1:44, STIRL2_1:55; then A36: ( F2 . 0 = XFyX . 0 & XFyX . 0 = ((- 1) |^ 0) * (Card_Intersection ((Fy | (X \ {x})),(0 + 1))) ) by A18, AFINSQ_1:def_3; ( F1 . 0 = card (Fy . x) & (- 1) |^ 0 = 1 ) by AFINSQ_1:35, NEWTON:4; then A37: addint . ((F1 . 0),(F2 . 0)) = (card (Fy . x)) + (Card_Intersection ((Fy | (X \ {x})),(0 + 1))) by A36, BINOP_2:def_20; A38: (- 1) |^ 0 = 1 by NEWTON:4; XFS . 0 = ((- 1) |^ 0) * (Card_Intersection (Fy,(0 + 1))) by A6, A34, A35; hence XFS . n = addint . ((F1 . n),(F2 . n)) by A3, A15, A35, A37, A38, Th48; ::_thesis: verum end; supposeA39: n > 0 ; ::_thesis: XFS . n = addint . ((F1 . n),(F2 . n)) then reconsider n1 = n - 1 as Element of NAT by NAT_1:20; A40: len <%(card (Fy . x))%> = 1 by AFINSQ_1:33; A41: card (X \ {x}) = k by A3, A4, A15, STIRL2_1:55; A42: n < k + 1 by A4, A5, A34, NAT_1:44; then A43: n <= k by NAT_1:13; A44: n1 < n1 + 1 by NAT_1:13; then n1 < k by A43, XXREAL_0:2; then n1 in dom XI by A19, A41, NAT_1:44; then A45: ( XI1 . n1 = (- 1) * (XI . n1) & XI . n1 = ((- 1) |^ n1) * (Card_Intersection ((Intersect ((Fy | (X \ {x})),((dom (Fy | (X \ {x}))) --> (Fy . x)))),(n1 + 1))) ) by A20, VALUED_1:6; 0 + 1 <= n by A44, NAT_1:13; then F1 . n = ((- 1) * ((- 1) |^ n1)) * (Card_Intersection ((Intersect ((Fy | (X \ {x})),((dom (Fy | (X \ {x}))) --> (Fy . x)))),(n1 + 1))) by A32, A42, A40, A45, AFINSQ_1:19; then A46: F1 . n = ((- 1) |^ (n1 + 1)) * (Card_Intersection ((Intersect ((Fy | (X \ {x})),((dom (Fy | (X \ {x}))) --> (Fy . x)))),(n1 + 1))) by NEWTON:6; A47: XFS . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) by A6, A34; Card_Intersection (Fy,(n + 1)) = (Card_Intersection ((Fy | (X \ {x})),(n + 1))) + (Card_Intersection ((Intersect ((Fy | (X \ {x})),((dom (Fy | (X \ {x}))) --> (Fy . x)))),N)) by A3, A15, A30, A39, Th53; then A48: XFS . n = (((- 1) |^ n) * (Card_Intersection ((Fy | (X \ {x})),(n + 1)))) + (((- 1) |^ n) * (Card_Intersection ((Intersect ((Fy | (X \ {x})),((dom (Fy | (X \ {x}))) --> (Fy . x)))),N))) by A47; percases ( n < k or n = k ) by A43, XXREAL_0:1; suppose n < k ; ::_thesis: XFS . n = addint . ((F1 . n),(F2 . n)) then A49: n in k by NAT_1:44; card (X \ {x}) = k by A3, A4, A15, STIRL2_1:55; then ( XFyX . n = ((- 1) |^ n) * (Card_Intersection ((Fy | (X \ {x})),(n + 1))) & F2 . n = XFyX . n ) by A17, A18, A49, AFINSQ_1:def_3; hence XFS . n = addint . ((F1 . n),(F2 . n)) by A48, A46, BINOP_2:def_20; ::_thesis: verum end; supposeA50: n = k ; ::_thesis: XFS . n = addint . ((F1 . n),(F2 . n)) then n = card (X \ {x}) by A3, A4, A15, STIRL2_1:55; then n + 1 > card (X \ {x}) by NAT_1:13; then A51: Card_Intersection ((Fy | (X \ {x})),(n + 1)) = 0 by A30, Th43; n = len XFyX by A3, A4, A15, A17, A50, STIRL2_1:55; then F2 . n = 0 by AFINSQ_1:36; hence XFS . n = addint . ((F1 . n),(F2 . n)) by A48, A46, A51, BINOP_2:def_20; ::_thesis: verum end; end; end; end; end; card urngFyX = Sum XFyX by A2, A30, A17, A18, A21; then A52: card urngFy = ((Sum XFyX) + (card (Fy . x))) - (Sum XI) by A31, A28, A29, CARD_2:45; A53: len <%0%> = 1 by AFINSQ_1:33; len XFyX = card (X \ {x}) by A17; then A54: len F2 = k + 1 by A53, A16, AFINSQ_1:17; A55: len XFS = k + 1 by A4, A5; Sum XFS = addint "**" XFS by AFINSQ_2:50 .= addint "**" (F1 ^ F2) by A32, A54, A33, A55, AFINSQ_2:46 .= Sum (F1 ^ F2) by AFINSQ_2:50 ; hence card (union (rng Fy)) = Sum XFS by A27, A52; ::_thesis: verum end; end; end; A56: S1[ 0 ] proof let Fy be finite-yielding Function; ::_thesis: for X being finite set st dom Fy = X & card X = 0 holds for XFS being XFinSequence of st dom XFS = card X & ( for n being Nat st n in dom XFS holds XFS . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) ) holds card (union (rng Fy)) = Sum XFS let X be finite set ; ::_thesis: ( dom Fy = X & card X = 0 implies for XFS being XFinSequence of st dom XFS = card X & ( for n being Nat st n in dom XFS holds XFS . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) ) holds card (union (rng Fy)) = Sum XFS ) assume that A57: dom Fy = X and A58: card X = 0 ; ::_thesis: for XFS being XFinSequence of st dom XFS = card X & ( for n being Nat st n in dom XFS holds XFS . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) ) holds card (union (rng Fy)) = Sum XFS dom Fy = {} by A57, A58; then A59: rng Fy = {} by RELAT_1:42; let XFS be XFinSequence of ; ::_thesis: ( dom XFS = card X & ( for n being Nat st n in dom XFS holds XFS . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) ) implies card (union (rng Fy)) = Sum XFS ) assume that A60: dom XFS = card X and for n being Nat st n in dom XFS holds XFS . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) ; ::_thesis: card (union (rng Fy)) = Sum XFS len XFS = 0 by A58, A60; then addint "**" XFS = the_unity_wrt addint by AFINSQ_2:def_8 .= 0 by BINOP_2:4 ; hence card (union (rng Fy)) = Sum XFS by A59, A58, AFINSQ_2:50, ZFMISC_1:2; ::_thesis: verum end; for k being Nat holds S1[k] from NAT_1:sch_2(A56, A1); hence for Fy being finite-yielding Function for X being finite set st dom Fy = X holds for XFS being XFinSequence of st dom XFS = card X & ( for n being Nat st n in dom XFS holds XFS . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) ) holds card (union (rng Fy)) = Sum XFS ; ::_thesis: verum end; theorem Th57: :: CARD_FIN:57 for Fy being finite-yielding Function for X being finite set for n, k being Nat st dom Fy = X & ex x, y being set st ( x <> y & ( for f being Function st f in Choose (X,k,x,y) holds card (Intersection (Fy,f,x)) = n ) ) holds Card_Intersection (Fy,k) = n * ((card X) choose k) proof let Fy be finite-yielding Function; ::_thesis: for X being finite set for n, k being Nat st dom Fy = X & ex x, y being set st ( x <> y & ( for f being Function st f in Choose (X,k,x,y) holds card (Intersection (Fy,f,x)) = n ) ) holds Card_Intersection (Fy,k) = n * ((card X) choose k) let X be finite set ; ::_thesis: for n, k being Nat st dom Fy = X & ex x, y being set st ( x <> y & ( for f being Function st f in Choose (X,k,x,y) holds card (Intersection (Fy,f,x)) = n ) ) holds Card_Intersection (Fy,k) = n * ((card X) choose k) let n, k be Nat; ::_thesis: ( dom Fy = X & ex x, y being set st ( x <> y & ( for f being Function st f in Choose (X,k,x,y) holds card (Intersection (Fy,f,x)) = n ) ) implies Card_Intersection (Fy,k) = n * ((card X) choose k) ) assume A1: X = dom Fy ; ::_thesis: ( for x, y being set holds ( not x <> y or ex f being Function st ( f in Choose (X,k,x,y) & not card (Intersection (Fy,f,x)) = n ) ) or Card_Intersection (Fy,k) = n * ((card X) choose k) ) assume ex x, y being set st ( x <> y & ( for f being Function st f in Choose (X,k,x,y) holds card (Intersection (Fy,f,x)) = n ) ) ; ::_thesis: Card_Intersection (Fy,k) = n * ((card X) choose k) then consider x, y being set such that A2: x <> y and A3: for f being Function st f in Choose (X,k,x,y) holds card (Intersection (Fy,f,x)) = n ; set Ch = Choose (X,k,x,y); consider P being Function of (card (Choose (X,k,x,y))),(Choose (X,k,x,y)) such that A4: P is one-to-one by Lm2; consider XFS being XFinSequence of such that A5: dom XFS = dom P and A6: for z being set for f being Function st z in dom XFS & f = P . z holds XFS . z = card (Intersection (Fy,f,x)) and A7: Card_Intersection (Fy,k) = Sum XFS by A1, A2, A4, Def4; for z being set st z in dom XFS holds XFS . z = n proof let z be set ; ::_thesis: ( z in dom XFS implies XFS . z = n ) assume A8: z in dom XFS ; ::_thesis: XFS . z = n A9: P . z in rng P by A5, A8, FUNCT_1:def_3; then consider f being Function of X,{x,y} such that A10: f = P . z and card (f " {x}) = k by Def1; XFS . z = card (Intersection (Fy,f,x)) by A6, A8, A10; hence XFS . z = n by A3, A9, A10; ::_thesis: verum end; then A11: XFS = (dom XFS) --> n by FUNCOP_1:11; then A12: rng XFS c= {n} by FUNCOP_1:13; ( Choose (X,k,x,y) = {} implies card (Choose (X,k,x,y)) = {} ) ; then A13: dom P = card (Choose (X,k,x,y)) by FUNCT_2:def_1; n in {n} by TARSKI:def_1; then ( {n} c= {0,n} & XFS " {n} = dom P ) by A5, A11, FUNCOP_1:14, ZFMISC_1:7; then Sum XFS = n * (card (card (Choose (X,k,x,y)))) by A12, A13, AFINSQ_2:68, XBOOLE_1:1; hence Card_Intersection (Fy,k) = n * ((card X) choose k) by A2, A7, Th16; ::_thesis: verum end; theorem Th58: :: CARD_FIN:58 for Fy being finite-yielding Function for X being finite set st dom Fy = X holds for XF being XFinSequence of st dom XF = card X & ( for n being Nat st n in dom XF holds ex x, y being set st ( x <> y & ( for f being Function st f in Choose (X,(n + 1),x,y) holds card (Intersection (Fy,f,x)) = XF . n ) ) ) holds ex F being XFinSequence of st ( dom F = card X & card (union (rng Fy)) = Sum F & ( for n being Nat st n in dom F holds F . n = (((- 1) |^ n) * (XF . n)) * ((card X) choose (n + 1)) ) ) proof let Fy be finite-yielding Function; ::_thesis: for X being finite set st dom Fy = X holds for XF being XFinSequence of st dom XF = card X & ( for n being Nat st n in dom XF holds ex x, y being set st ( x <> y & ( for f being Function st f in Choose (X,(n + 1),x,y) holds card (Intersection (Fy,f,x)) = XF . n ) ) ) holds ex F being XFinSequence of st ( dom F = card X & card (union (rng Fy)) = Sum F & ( for n being Nat st n in dom F holds F . n = (((- 1) |^ n) * (XF . n)) * ((card X) choose (n + 1)) ) ) let X be finite set ; ::_thesis: ( dom Fy = X implies for XF being XFinSequence of st dom XF = card X & ( for n being Nat st n in dom XF holds ex x, y being set st ( x <> y & ( for f being Function st f in Choose (X,(n + 1),x,y) holds card (Intersection (Fy,f,x)) = XF . n ) ) ) holds ex F being XFinSequence of st ( dom F = card X & card (union (rng Fy)) = Sum F & ( for n being Nat st n in dom F holds F . n = (((- 1) |^ n) * (XF . n)) * ((card X) choose (n + 1)) ) ) ) assume A1: dom Fy = X ; ::_thesis: for XF being XFinSequence of st dom XF = card X & ( for n being Nat st n in dom XF holds ex x, y being set st ( x <> y & ( for f being Function st f in Choose (X,(n + 1),x,y) holds card (Intersection (Fy,f,x)) = XF . n ) ) ) holds ex F being XFinSequence of st ( dom F = card X & card (union (rng Fy)) = Sum F & ( for n being Nat st n in dom F holds F . n = (((- 1) |^ n) * (XF . n)) * ((card X) choose (n + 1)) ) ) let XF be XFinSequence of ; ::_thesis: ( dom XF = card X & ( for n being Nat st n in dom XF holds ex x, y being set st ( x <> y & ( for f being Function st f in Choose (X,(n + 1),x,y) holds card (Intersection (Fy,f,x)) = XF . n ) ) ) implies ex F being XFinSequence of st ( dom F = card X & card (union (rng Fy)) = Sum F & ( for n being Nat st n in dom F holds F . n = (((- 1) |^ n) * (XF . n)) * ((card X) choose (n + 1)) ) ) ) assume A2: ( dom XF = card X & ( for n being Nat st n in dom XF holds ex x, y being set st ( x <> y & ( for f being Function st f in Choose (X,(n + 1),x,y) holds card (Intersection (Fy,f,x)) = XF . n ) ) ) ) ; ::_thesis: ex F being XFinSequence of st ( dom F = card X & card (union (rng Fy)) = Sum F & ( for n being Nat st n in dom F holds F . n = (((- 1) |^ n) * (XF . n)) * ((card X) choose (n + 1)) ) ) defpred S1[ set , set ] means for n being Nat st n = $1 holds $2 = (((- 1) |^ n) * (XF . n)) * ((card X) choose (n + 1)); A3: for x being set st x in card X holds ex y being set st ( y in INT & S1[x,y] ) proof A4: card X is Subset of NAT by STIRL2_1:8; let x be set ; ::_thesis: ( x in card X implies ex y being set st ( y in INT & S1[x,y] ) ) assume x in card X ; ::_thesis: ex y being set st ( y in INT & S1[x,y] ) then reconsider x9 = x as Element of NAT by A4; reconsider xx = ((- 1) |^ x9) * (XF . x9) as Integer ; reconsider ch = (card X) choose (x9 + 1) as Integer ; take xx * ch ; ::_thesis: ( xx * ch in INT & S1[x,xx * ch] ) thus ( xx * ch in INT & S1[x,xx * ch] ) ; ::_thesis: verum end; consider F being Function of (card X),INT such that A5: for x being set st x in card X holds S1[x,F . x] from FUNCT_2:sch_1(A3); A6: dom F = card X by FUNCT_2:def_1; then reconsider F = F as XFinSequence by AFINSQ_1:5; reconsider F = F as XFinSequence of ; take F ; ::_thesis: ( dom F = card X & card (union (rng Fy)) = Sum F & ( for n being Nat st n in dom F holds F . n = (((- 1) |^ n) * (XF . n)) * ((card X) choose (n + 1)) ) ) for n being Nat st n in dom F holds F . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) proof let n be Nat; ::_thesis: ( n in dom F implies F . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) ) assume A7: n in dom F ; ::_thesis: F . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) ex x, y being set st ( x <> y & ( for f being Function st f in Choose (X,(n + 1),x,y) holds card (Intersection (Fy,f,x)) = XF . n ) ) by A2, A6, A7; then A8: Card_Intersection (Fy,(n + 1)) = (XF . n) * ((card X) choose (n + 1)) by A1, Th57; F . n = (((- 1) |^ n) * (XF . n)) * ((card X) choose (n + 1)) by A5, A6, A7; hence F . n = ((- 1) |^ n) * (Card_Intersection (Fy,(n + 1))) by A8; ::_thesis: verum end; hence ( dom F = card X & card (union (rng Fy)) = Sum F & ( for n being Nat st n in dom F holds F . n = (((- 1) |^ n) * (XF . n)) * ((card X) choose (n + 1)) ) ) by A1, A5, A6, Th56; ::_thesis: verum end; Lm3: for X, Y being finite set st not X is empty & not Y is empty holds ex F being XFinSequence of st ( dom F = card Y & ((card Y) |^ (card X)) - (Sum F) = card { f where f is Function of X,Y : f is onto } & ( for n being Nat st n in dom F holds F . n = (((- 1) |^ n) * ((card Y) choose (n + 1))) * ((((card Y) - n) - 1) |^ (card X)) ) ) proof let X, Y be finite set ; ::_thesis: ( not X is empty & not Y is empty implies ex F being XFinSequence of st ( dom F = card Y & ((card Y) |^ (card X)) - (Sum F) = card { f where f is Function of X,Y : f is onto } & ( for n being Nat st n in dom F holds F . n = (((- 1) |^ n) * ((card Y) choose (n + 1))) * ((((card Y) - n) - 1) |^ (card X)) ) ) ) assume that A1: not X is empty and A2: not Y is empty ; ::_thesis: ex F being XFinSequence of st ( dom F = card Y & ((card Y) |^ (card X)) - (Sum F) = card { f where f is Function of X,Y : f is onto } & ( for n being Nat st n in dom F holds F . n = (((- 1) |^ n) * ((card Y) choose (n + 1))) * ((((card Y) - n) - 1) |^ (card X)) ) ) defpred S1[ set , set ] means for n being Nat st n = $1 holds $2 = (((card Y) - n) - 1) |^ (card X); A3: for x being set st x in card Y holds ex y being set st ( y in NAT & S1[x,y] ) proof let x be set ; ::_thesis: ( x in card Y implies ex y being set st ( y in NAT & S1[x,y] ) ) assume A4: x in card Y ; ::_thesis: ex y being set st ( y in NAT & S1[x,y] ) card Y is Subset of NAT by STIRL2_1:8; then reconsider n = x as Element of NAT by A4; n < card Y by A4, NAT_1:44; then n + 1 <= card Y by NAT_1:13; then reconsider k = (card Y) - (n + 1) as Element of NAT by NAT_1:21; S1[n,k |^ (card X)] ; hence ex y being set st ( y in NAT & S1[x,y] ) ; ::_thesis: verum end; consider XF being Function of (card Y),NAT such that A5: for x being set st x in card Y holds S1[x,XF . x] from FUNCT_2:sch_1(A3); set Onto = { f where f is Function of X,Y : f is onto } ; deffunc H1( set ) -> set = { f where f is Function of X,Y : not $1 in rng f } ; A6: for x being set st x in Y holds H1(x) in bool (Funcs (X,Y)) proof let x be set ; ::_thesis: ( x in Y implies H1(x) in bool (Funcs (X,Y)) ) assume A7: x in Y ; ::_thesis: H1(x) in bool (Funcs (X,Y)) H1(x) c= Funcs (X,Y) proof let y be set ; :: according to TARSKI:def_3 ::_thesis: ( not y in H1(x) or y in Funcs (X,Y) ) assume y in H1(x) ; ::_thesis: y in Funcs (X,Y) then ex f being Function of X,Y st ( y = f & not x in rng f ) ; hence y in Funcs (X,Y) by A7, FUNCT_2:8; ::_thesis: verum end; hence H1(x) in bool (Funcs (X,Y)) ; ::_thesis: verum end; consider Fy9 being Function of Y,(bool (Funcs (X,Y))) such that A8: for x being set st x in Y holds Fy9 . x = H1(x) from FUNCT_2:sch_2(A6); for y being set st y in dom Fy9 holds Fy9 . y is finite proof let y be set ; ::_thesis: ( y in dom Fy9 implies Fy9 . y is finite ) assume y in dom Fy9 ; ::_thesis: Fy9 . y is finite then Fy9 . y in rng Fy9 by FUNCT_1:def_3; hence Fy9 . y is finite ; ::_thesis: verum end; then reconsider Fy = Fy9 as finite-yielding Function by FINSET_1:def_4; union (rng Fy9) c= union (bool (Funcs (X,Y))) by ZFMISC_1:77; then A9: union (rng Fy) c= Funcs (X,Y) by ZFMISC_1:81; reconsider u = union (rng Fy) as finite set ; A10: dom XF = card Y by FUNCT_2:def_1; then reconsider XF = XF as XFinSequence by AFINSQ_1:5; reconsider XF = XF as XFinSequence of ; A11: for n being Nat st n in dom XF holds ex x, y being set st ( x <> y & ( for f being Function st f in Choose (Y,(n + 1),x,y) holds card (Intersection (Fy,f,x)) = XF . n ) ) proof let n be Nat; ::_thesis: ( n in dom XF implies ex x, y being set st ( x <> y & ( for f being Function st f in Choose (Y,(n + 1),x,y) holds card (Intersection (Fy,f,x)) = XF . n ) ) ) assume A12: n in dom XF ; ::_thesis: ex x, y being set st ( x <> y & ( for f being Function st f in Choose (Y,(n + 1),x,y) holds card (Intersection (Fy,f,x)) = XF . n ) ) take 0 ; ::_thesis: ex y being set st ( 0 <> y & ( for f being Function st f in Choose (Y,(n + 1),0,y) holds card (Intersection (Fy,f,0)) = XF . n ) ) take 1 ; ::_thesis: ( 0 <> 1 & ( for f being Function st f in Choose (Y,(n + 1),0,1) holds card (Intersection (Fy,f,0)) = XF . n ) ) thus 0 <> 1 ; ::_thesis: for f being Function st f in Choose (Y,(n + 1),0,1) holds card (Intersection (Fy,f,0)) = XF . n let f9 be Function; ::_thesis: ( f9 in Choose (Y,(n + 1),0,1) implies card (Intersection (Fy,f9,0)) = XF . n ) assume f9 in Choose (Y,(n + 1),0,1) ; ::_thesis: card (Intersection (Fy,f9,0)) = XF . n then consider f being Function of Y,{0,1} such that A13: f = f9 and A14: card (f " {0}) = n + 1 by Def1; A15: Intersection (Fy,f,0) c= Funcs (X,(Y \ (f " {0}))) proof let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in Intersection (Fy,f,0) or z in Funcs (X,(Y \ (f " {0}))) ) assume A16: z in Intersection (Fy,f,0) ; ::_thesis: z in Funcs (X,(Y \ (f " {0}))) 0 in rng f by A14, CARD_1:27, FUNCT_1:72; then consider x1 being set such that A17: x1 in dom f and f . x1 = 0 and A18: z in Fy . x1 by A16, Th22; z in H1(x1) by A8, A17, A18; then consider g being Function of X,Y such that A19: z = g and not x1 in rng g ; A20: rng g c= Y \ (f " {0}) proof let gy be set ; :: according to TARSKI:def_3 ::_thesis: ( not gy in rng g or gy in Y \ (f " {0}) ) assume A21: gy in rng g ; ::_thesis: gy in Y \ (f " {0}) assume not gy in Y \ (f " {0}) ; ::_thesis: contradiction then A22: gy in f " {0} by A21, XBOOLE_0:def_5; then f . gy in {0} by FUNCT_1:def_7; then A23: f . gy = 0 by TARSKI:def_1; gy in dom f by A22, FUNCT_1:def_7; then g in Fy . gy by A16, A19, A23, Def2; then g in H1(gy) by A8, A21; then ex h being Function of X,Y st ( g = h & not gy in rng h ) ; hence contradiction by A21; ::_thesis: verum end; dom g = X by A17, FUNCT_2:def_1; hence z in Funcs (X,(Y \ (f " {0}))) by A19, A20, FUNCT_2:def_2; ::_thesis: verum end; reconsider I = Intersection (Fy,f,0) as finite set ; A24: card (Y \ (f " {0})) = (card Y) - (n + 1) by A14, CARD_2:44; Funcs (X,(Y \ (f " {0}))) c= Intersection (Fy,f,0) proof let g9 be set ; :: according to TARSKI:def_3 ::_thesis: ( not g9 in Funcs (X,(Y \ (f " {0}))) or g9 in Intersection (Fy,f,0) ) assume g9 in Funcs (X,(Y \ (f " {0}))) ; ::_thesis: g9 in Intersection (Fy,f,0) then consider g being Function such that A25: g9 = g and A26: dom g = X and A27: rng g c= Y \ (f " {0}) by FUNCT_2:def_2; reconsider gg = g as Function of X,Y by A26, A27, FUNCT_2:2, XBOOLE_1:1; consider y being set such that A28: y in f " {0} by A14, CARD_1:27, XBOOLE_0:def_1; not y in rng g by A27, A28, XBOOLE_0:def_5; then A29: gg in H1(y) ; dom Fy = Y by FUNCT_2:def_1; then A30: Fy9 . y in rng Fy9 by A28, FUNCT_1:def_3; A31: for z being set st z in dom f & f . z = 0 holds g in Fy . z proof let z be set ; ::_thesis: ( z in dom f & f . z = 0 implies g in Fy . z ) assume that A32: z in dom f and A33: f . z = 0 ; ::_thesis: g in Fy . z f . z in {0} by A33, TARSKI:def_1; then z in f " {0} by A32, FUNCT_1:def_7; then A34: not z in rng gg by A27, XBOOLE_0:def_5; Fy . z = H1(z) by A8, A32; hence g in Fy . z by A34; ::_thesis: verum end; H1(y) = Fy9 . y by A8, A28; then g in union (rng Fy) by A30, A29, TARSKI:def_4; hence g9 in Intersection (Fy,f,0) by A25, A31, Def2; ::_thesis: verum end; then A35: Funcs (X,(Y \ (f " {0}))) = Intersection (Fy,f,0) by A15, XBOOLE_0:def_10; now__::_thesis:_card_(Intersection_(Fy,f9,0))_=_XF_._n percases ( Y \ (f " {0}) = {} or Y \ (f " {0}) <> {} ) ; suppose Y \ (f " {0}) = {} ; ::_thesis: card (Intersection (Fy,f9,0)) = XF . n then ( card I = 0 & (((card Y) - n) - 1) |^ (card X) = 0 ) by A1, A15, A24, CARD_1:27, NAT_1:14, NEWTON:11; hence card (Intersection (Fy,f9,0)) = XF . n by A5, A10, A12, A13; ::_thesis: verum end; supposeA36: Y \ (f " {0}) <> {} ; ::_thesis: card (Intersection (Fy,f9,0)) = XF . n XF . n = (((card Y) - n) - 1) |^ (card X) by A5, A10, A12; hence card (Intersection (Fy,f9,0)) = XF . n by A13, A35, A24, A36, Th4; ::_thesis: verum end; end; end; hence card (Intersection (Fy,f9,0)) = XF . n ; ::_thesis: verum end; ( dom XF = card Y & dom Fy = Y ) by FUNCT_2:def_1; then consider F being XFinSequence of such that A37: dom F = card Y and A38: card (union (rng Fy)) = Sum F and A39: for n being Nat st n in dom F holds F . n = (((- 1) |^ n) * (XF . n)) * ((card Y) choose (n + 1)) by A11, Th58; take F ; ::_thesis: ( dom F = card Y & ((card Y) |^ (card X)) - (Sum F) = card { f where f is Function of X,Y : f is onto } & ( for n being Nat st n in dom F holds F . n = (((- 1) |^ n) * ((card Y) choose (n + 1))) * ((((card Y) - n) - 1) |^ (card X)) ) ) thus dom F = card Y by A37; ::_thesis: ( ((card Y) |^ (card X)) - (Sum F) = card { f where f is Function of X,Y : f is onto } & ( for n being Nat st n in dom F holds F . n = (((- 1) |^ n) * ((card Y) choose (n + 1))) * ((((card Y) - n) - 1) |^ (card X)) ) ) A40: card ((Funcs (X,Y)) \ u) = (card (Funcs (X,Y))) - (card u) by A9, CARD_2:44; A41: { f where f is Function of X,Y : f is onto } c= (Funcs (X,Y)) \ (union (rng Fy)) proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { f where f is Function of X,Y : f is onto } or x in (Funcs (X,Y)) \ (union (rng Fy)) ) assume x in { f where f is Function of X,Y : f is onto } ; ::_thesis: x in (Funcs (X,Y)) \ (union (rng Fy)) then consider f being Function of X,Y such that A42: x = f and A43: f is onto ; assume A44: not x in (Funcs (X,Y)) \ (union (rng Fy)) ; ::_thesis: contradiction f in Funcs (X,Y) by A2, FUNCT_2:8; then f in union (rng Fy) by A42, A44, XBOOLE_0:def_5; then consider Fyy being set such that A45: f in Fyy and A46: Fyy in rng Fy by TARSKI:def_4; consider y being set such that A47: y in dom Fy and A48: Fy . y = Fyy by A46, FUNCT_1:def_3; y in Y by A47, FUNCT_2:def_1; then f in H1(y) by A8, A45, A48; then A49: ex g being Function of X,Y st ( f = g & not y in rng g ) ; y in Y by A47, FUNCT_2:def_1; hence contradiction by A43, A49, FUNCT_2:def_3; ::_thesis: verum end; A50: (Funcs (X,Y)) \ (union (rng Fy)) c= { f where f is Function of X,Y : f is onto } proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in (Funcs (X,Y)) \ (union (rng Fy)) or x in { f where f is Function of X,Y : f is onto } ) assume A51: x in (Funcs (X,Y)) \ (union (rng Fy)) ; ::_thesis: x in { f where f is Function of X,Y : f is onto } consider f being Function such that A52: x = f and A53: ( dom f = X & rng f c= Y ) by A51, FUNCT_2:def_2; reconsider f = f as Function of X,Y by A53, FUNCT_2:2; assume not x in { f where f is Function of X,Y : f is onto } ; ::_thesis: contradiction then not f is onto by A52; then rng f <> Y by FUNCT_2:def_3; then not Y c= rng f by XBOOLE_0:def_10; then consider y being set such that A54: y in Y and A55: not y in rng f by TARSKI:def_3; y in dom Fy9 by A54, FUNCT_2:def_1; then Fy9 . y in rng Fy9 by FUNCT_1:def_3; then A56: H1(y) in rng Fy9 by A8, A54; f in H1(y) by A55; then f in union (rng Fy) by A56, TARSKI:def_4; hence contradiction by A51, A52, XBOOLE_0:def_5; ::_thesis: verum end; card (Funcs (X,Y)) = (card Y) |^ (card X) by A2, Th4; hence card { f where f is Function of X,Y : f is onto } = ((card Y) |^ (card X)) - (Sum F) by A38, A50, A41, A40, XBOOLE_0:def_10; ::_thesis: for n being Nat st n in dom F holds F . n = (((- 1) |^ n) * ((card Y) choose (n + 1))) * ((((card Y) - n) - 1) |^ (card X)) let n be Nat; ::_thesis: ( n in dom F implies F . n = (((- 1) |^ n) * ((card Y) choose (n + 1))) * ((((card Y) - n) - 1) |^ (card X)) ) assume A57: n in dom F ; ::_thesis: F . n = (((- 1) |^ n) * ((card Y) choose (n + 1))) * ((((card Y) - n) - 1) |^ (card X)) A58: F . n = (((- 1) |^ n) * (XF . n)) * ((card Y) choose (n + 1)) by A39, A57; XF . n = (((card Y) - n) - 1) |^ (card X) by A5, A37, A57; hence F . n = (((- 1) |^ n) * ((card Y) choose (n + 1))) * ((((card Y) - n) - 1) |^ (card X)) by A58; ::_thesis: verum end; theorem Th59: :: CARD_FIN:59 for X, Y being finite set st not X is empty & not Y is empty holds ex F being XFinSequence of st ( dom F = (card Y) + 1 & Sum F = card { f where f is Function of X,Y : f is onto } & ( for n being Nat st n in dom F holds F . n = (((- 1) |^ n) * ((card Y) choose n)) * (((card Y) - n) |^ (card X)) ) ) proof let X, Y be finite set ; ::_thesis: ( not X is empty & not Y is empty implies ex F being XFinSequence of st ( dom F = (card Y) + 1 & Sum F = card { f where f is Function of X,Y : f is onto } & ( for n being Nat st n in dom F holds F . n = (((- 1) |^ n) * ((card Y) choose n)) * (((card Y) - n) |^ (card X)) ) ) ) assume A1: ( not X is empty & not Y is empty ) ; ::_thesis: ex F being XFinSequence of st ( dom F = (card Y) + 1 & Sum F = card { f where f is Function of X,Y : f is onto } & ( for n being Nat st n in dom F holds F . n = (((- 1) |^ n) * ((card Y) choose n)) * (((card Y) - n) |^ (card X)) ) ) reconsider c = (card Y) |^ (card X) as Element of INT by INT_1:def_2; A2: len <%c%> = 1 by AFINSQ_1:33; set Onto = { f where f is Function of X,Y : f is onto } ; consider F being XFinSequence of such that A3: dom F = card Y and A4: ((card Y) |^ (card X)) - (Sum F) = card { f where f is Function of X,Y : f is onto } and A5: for n being Nat st n in dom F holds F . n = (((- 1) |^ n) * ((card Y) choose (n + 1))) * ((((card Y) - n) - 1) |^ (card X)) by A1, Lm3; set F1 = (- 1) (#) F; reconsider F1 = (- 1) (#) F as XFinSequence of ; A6: ( dom F1 = dom F & dom F = card Y ) by A3, VALUED_1:def_5; reconsider GF1 = <%c%> ^ F1 as XFinSequence of ; take GF1 ; ::_thesis: ( dom GF1 = (card Y) + 1 & Sum GF1 = card { f where f is Function of X,Y : f is onto } & ( for n being Nat st n in dom GF1 holds GF1 . n = (((- 1) |^ n) * ((card Y) choose n)) * (((card Y) - n) |^ (card X)) ) ) len F1 = card Y by A3, VALUED_1:def_5; hence A7: dom GF1 = (card Y) + 1 by A2, AFINSQ_1:def_3; ::_thesis: ( Sum GF1 = card { f where f is Function of X,Y : f is onto } & ( for n being Nat st n in dom GF1 holds GF1 . n = (((- 1) |^ n) * ((card Y) choose n)) * (((card Y) - n) |^ (card X)) ) ) (- 1) * (Sum F) = Sum F1 by AFINSQ_2:64; then c - (Sum F) = c + (Sum F1) .= addint . (c,(Sum F1)) by BINOP_2:def_20 .= addint . ((addint "**" <%c%>),(Sum F1)) by AFINSQ_2:37 .= addint . ((addint "**" <%c%>),(addint "**" F1)) by AFINSQ_2:50 .= addint "**" GF1 by AFINSQ_2:42 .= Sum GF1 by AFINSQ_2:50 ; hence Sum GF1 = card { f where f is Function of X,Y : f is onto } by A4; ::_thesis: for n being Nat st n in dom GF1 holds GF1 . n = (((- 1) |^ n) * ((card Y) choose n)) * (((card Y) - n) |^ (card X)) let n be Nat; ::_thesis: ( n in dom GF1 implies GF1 . n = (((- 1) |^ n) * ((card Y) choose n)) * (((card Y) - n) |^ (card X)) ) assume A8: n in dom GF1 ; ::_thesis: GF1 . n = (((- 1) |^ n) * ((card Y) choose n)) * (((card Y) - n) |^ (card X)) now__::_thesis:_GF1_._n_=_(((-_1)_|^_n)_*_((card_Y)_choose_n))_*_(((card_Y)_-_n)_|^_(card_X)) percases ( n = 0 or n > 0 ) ; supposeA9: n = 0 ; ::_thesis: GF1 . n = (((- 1) |^ n) * ((card Y) choose n)) * (((card Y) - n) |^ (card X)) then ( (- 1) |^ n = 1 & (card Y) choose n = 1 ) by NEWTON:4, NEWTON:19; hence GF1 . n = (((- 1) |^ n) * ((card Y) choose n)) * (((card Y) - n) |^ (card X)) by A9, AFINSQ_1:35; ::_thesis: verum end; suppose n > 0 ; ::_thesis: GF1 . n = (((- 1) |^ n) * ((card Y) choose n)) * (((card Y) - n) |^ (card X)) then reconsider n1 = n - 1 as Element of NAT by NAT_1:20; n < (card Y) + 1 by A7, A8, NAT_1:44; then n1 + 1 <= card Y by NAT_1:13; then n1 < card Y by NAT_1:13; then A10: n1 in dom F1 by A6, NAT_1:44; then A11: F . n1 = (((- 1) |^ n1) * ((card Y) choose (n1 + 1))) * ((((card Y) - n1) - 1) |^ (card X)) by A5, A6; len <%c%> = 1 by AFINSQ_1:33; then A12: GF1 . (n1 + 1) = F1 . n1 by A10, AFINSQ_1:def_3; then A13: (- 1) * ((- 1) |^ n1) = (- 1) |^ n by NEWTON:6; GF1 . (n1 + 1) = (- 1) * (F . n1) by A12, VALUED_1:6; hence GF1 . n = (((- 1) |^ n) * ((card Y) choose n)) * (((card Y) - n) |^ (card X)) by A11, A13; ::_thesis: verum end; end; end; hence GF1 . n = (((- 1) |^ n) * ((card Y) choose n)) * (((card Y) - n) |^ (card X)) ; ::_thesis: verum end; theorem :: CARD_FIN:60 for n, k being Nat st k <= n holds ex F being XFinSequence of st ( n block k = (1 / (k !)) * (Sum F) & dom F = k + 1 & ( for m being Nat st m in dom F holds F . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) ) ) proof let n, k be Nat; ::_thesis: ( k <= n implies ex F being XFinSequence of st ( n block k = (1 / (k !)) * (Sum F) & dom F = k + 1 & ( for m being Nat st m in dom F holds F . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) ) ) ) assume A1: k <= n ; ::_thesis: ex F being XFinSequence of st ( n block k = (1 / (k !)) * (Sum F) & dom F = k + 1 & ( for m being Nat st m in dom F holds F . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) ) ) now__::_thesis:_ex_F_being_set_st_ (_n_block_k_=_(1_/_(k_!))_*_(Sum_F)_&_dom_F_=_k_+_1_&_(_for_m_being_Nat_st_m_in_dom_F_holds_ F_._m_=_(((-_1)_|^_m)_*_(k_choose_m))_*_((k_-_m)_|^_n)_)_) percases ( ( n = 0 & k = 0 ) or ( n <> 0 & k = 0 ) or ( n <> 0 & k <> 0 ) or ( n = 0 & k <> 0 ) ) ; supposeA2: ( n = 0 & k = 0 ) ; ::_thesis: ex F being set st ( n block k = (1 / (k !)) * (Sum F) & dom F = k + 1 & ( for m being Nat st m in dom F holds F . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) ) ) reconsider I = 1 as Element of INT by INT_1:def_2; set F = <%I%>; take F = <%I%>; ::_thesis: ( n block k = (1 / (k !)) * (Sum F) & dom F = k + 1 & ( for m being Nat st m in dom F holds F . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) ) ) addint "**" <%I%> = 1 by AFINSQ_2:37; then Sum F = 1 by AFINSQ_2:50; hence n block k = (1 / (k !)) * (Sum F) by A2, NEWTON:12, STIRL2_1:26; ::_thesis: ( dom F = k + 1 & ( for m being Nat st m in dom F holds F . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) ) ) thus dom F = k + 1 by A2, AFINSQ_1:33; ::_thesis: for m being Nat st m in dom F holds F . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) let m be Nat; ::_thesis: ( m in dom F implies F . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) ) assume m in dom F ; ::_thesis: F . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) then A3: m in {0} by AFINSQ_1:33, CARD_1:49; then m = 0 by TARSKI:def_1; then A4: (- 1) |^ m = 1 by NEWTON:4; A5: (k - m) |^ n = 1 by A2, NEWTON:4; A6: 0 choose 0 = 1 by NEWTON:19; m = 0 by A3, TARSKI:def_1; hence F . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) by A2, A4, A5, A6, AFINSQ_1:34; ::_thesis: verum end; supposeA7: ( n <> 0 & k = 0 ) ; ::_thesis: ex Fi being XFinSequence of st ( n block k = (1 / (k !)) * (Sum Fi) & dom Fi = k + 1 & ( for m being Nat st m in dom Fi holds Fi . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) ) ) set F = (k + 1) --> 0; reconsider Fi = (k + 1) --> 0 as XFinSequence of ; reconsider Fn = (k + 1) --> 0 as XFinSequence of ; take Fi = Fi; ::_thesis: ( n block k = (1 / (k !)) * (Sum Fi) & dom Fi = k + 1 & ( for m being Nat st m in dom Fi holds Fi . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) ) ) ( rng ((k + 1) --> 0) c= {0} & {0} c= {0,0} ) by ENUMSET1:29, FUNCOP_1:13; then Sum Fn = 0 * (card (Fn " {0})) by AFINSQ_2:68, XBOOLE_1:1; hence ( n block k = (1 / (k !)) * (Sum Fi) & dom Fi = k + 1 ) by A7, FUNCOP_1:13, STIRL2_1:31; ::_thesis: for m being Nat st m in dom Fi holds Fi . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) let m be Nat; ::_thesis: ( m in dom Fi implies Fi . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) ) assume A8: m in dom Fi ; ::_thesis: Fi . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) now__::_thesis:_(k_choose_m)_*_((k_-_m)_|^_n)_=_0 percases ( m = 0 or m > 0 ) ; suppose m = 0 ; ::_thesis: (k choose m) * ((k - m) |^ n) = 0 then (k - m) |^ n = 0 by A7, NAT_1:14, NEWTON:11; hence (k choose m) * ((k - m) |^ n) = 0 ; ::_thesis: verum end; suppose m > 0 ; ::_thesis: (k choose m) * ((k - m) |^ n) = 0 then k choose m = 0 by A7, NEWTON:def_3; hence (k choose m) * ((k - m) |^ n) = 0 ; ::_thesis: verum end; end; end; then A9: ((- 1) |^ m) * ((k choose m) * ((k - m) |^ n)) = 0 ; m in k + 1 by A8, FUNCOP_1:13; hence Fi . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) by A9, FUNCOP_1:7; ::_thesis: verum end; supposeA10: ( n <> 0 & k <> 0 ) ; ::_thesis: ex F being XFinSequence of st ( n block k = (1 / (k !)) * (Sum F) & dom F = k + 1 & ( for m being Nat st m in dom F holds F . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) ) ) set Perm = { p where p is Function of k,k : p is Permutation of k } ; card { p where p is Function of k,k : p is Permutation of k } = (card k) ! by Th8; then reconsider Perm = { p where p is Function of k,k : p is Permutation of k } as finite set ; reconsider Bloc = { f where f is Function of n,k : ( f is onto & f is "increasing ) } as finite set by STIRL2_1:24; set Onto = { f where f is Function of n,k : f is onto } ; defpred S1[ set , set ] means for p being Function of k,k for f being Function of n,k st $1 = [p,f] holds $2 = p * f; reconsider N = n, K = k as non empty Subset of NAT by A10, STIRL2_1:8; A11: card [:Perm,Bloc:] = (card Perm) * (card Bloc) by CARD_2:46; A12: for x being set st x in [:Perm,Bloc:] holds ex y being set st ( y in { f where f is Function of n,k : f is onto } & S1[x,y] ) proof let x be set ; ::_thesis: ( x in [:Perm,Bloc:] implies ex y being set st ( y in { f where f is Function of n,k : f is onto } & S1[x,y] ) ) assume x in [:Perm,Bloc:] ; ::_thesis: ex y being set st ( y in { f where f is Function of n,k : f is onto } & S1[x,y] ) then consider p9, f9 being set such that A13: p9 in Perm and A14: f9 in Bloc and A15: x = [p9,f9] by ZFMISC_1:def_2; consider f being Function of n,k such that A16: f = f9 and A17: ( f is onto & f is "increasing ) by A14; A18: rng f = k by A17, FUNCT_2:def_3; consider p being Function of k,k such that A19: p = p9 and A20: p is Permutation of k by A13; reconsider pf = p * f as Function of n,k ; take pf ; ::_thesis: ( pf in { f where f is Function of n,k : f is onto } & S1[x,pf] ) A21: dom p = k by A10, FUNCT_2:def_1; rng p = k by A20, FUNCT_2:def_3; then rng (p * f) = k by A18, A21, RELAT_1:28; then pf is onto by FUNCT_2:def_3; hence pf in { f where f is Function of n,k : f is onto } ; ::_thesis: S1[x,pf] let p1 be Function of k,k; ::_thesis: for f being Function of n,k st x = [p1,f] holds pf = p1 * f let f1 be Function of n,k; ::_thesis: ( x = [p1,f1] implies pf = p1 * f1 ) assume A22: x = [p1,f1] ; ::_thesis: pf = p1 * f1 p1 = p by A15, A19, A22, XTUPLE_0:1; hence pf = p1 * f1 by A15, A16, A22, XTUPLE_0:1; ::_thesis: verum end; consider FP being Function of [:Perm,Bloc:], { f where f is Function of n,k : f is onto } such that A23: for x being set st x in [:Perm,Bloc:] holds S1[x,FP . x] from FUNCT_2:sch_1(A12); A24: FP is one-to-one proof let x1 be set ; :: according to FUNCT_1:def_4 ::_thesis: for b1 being set holds ( not x1 in dom FP or not b1 in dom FP or not FP . x1 = FP . b1 or x1 = b1 ) let x2 be set ; ::_thesis: ( not x1 in dom FP or not x2 in dom FP or not FP . x1 = FP . x2 or x1 = x2 ) assume that A25: x1 in dom FP and A26: x2 in dom FP and A27: FP . x1 = FP . x2 ; ::_thesis: x1 = x2 consider p19, f19 being set such that A28: p19 in Perm and A29: f19 in Bloc and A30: x1 = [p19,f19] by A25, ZFMISC_1:def_2; consider p1 being Function of k,k such that A31: p19 = p1 and A32: p1 is Permutation of k by A28; consider p29, f29 being set such that A33: p29 in Perm and A34: f29 in Bloc and A35: x2 = [p29,f29] by A26, ZFMISC_1:def_2; FP . x1 in rng FP by A25, FUNCT_1:def_3; then FP . x1 in { f where f is Function of n,k : f is onto } ; then consider fp being Function of N,K such that A36: FP . x1 = fp and A37: fp is onto ; A38: rng fp = K by A37, FUNCT_2:def_3; consider p2 being Function of k,k such that A39: p29 = p2 and A40: p2 is Permutation of k by A33; consider f2 being Function of n,k such that A41: f29 = f2 and A42: ( f2 is onto & f2 is "increasing ) by A34; rng fp = K by A37, FUNCT_2:def_3; then reconsider p199 = p1, p299 = p2 as Permutation of (rng fp) by A32, A40; consider f1 being Function of n,k such that A43: f19 = f1 and A44: ( f1 is onto & f1 is "increasing ) by A29; reconsider f199 = f1, f299 = f2 as Function of N,K ; A45: rng f2 = K by A42, FUNCT_2:def_3; for l, m being Nat st l in rng f1 & m in rng f1 & l < m holds min* (f1 " {l}) < min* (f1 " {m}) by A44, STIRL2_1:def_1; then A46: f199 is "increasing by STIRL2_1:def_3; for l, m being Nat st l in rng f2 & m in rng f2 & l < m holds min* (f2 " {l}) < min* (f2 " {m}) by A42, STIRL2_1:def_1; then A47: f299 is "increasing by STIRL2_1:def_3; A48: fp = p199 * f199 by A23, A25, A30, A31, A43, A36; A49: rng f1 = K by A44, FUNCT_2:def_3; A50: fp = p299 * f299 by A23, A26, A27, A35, A39, A41, A36; then p199 = p299 by A46, A47, A49, A45, A48, A38, STIRL2_1:65; hence x1 = x2 by A30, A31, A43, A35, A39, A41, A46, A47, A49, A45, A48, A50, A38, STIRL2_1:65; ::_thesis: verum end; consider h being Function of n,k such that A51: ( h is onto & h is "increasing ) by A1, A10, STIRL2_1:23; { f where f is Function of n,k : f is onto } c= rng FP proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { f where f is Function of n,k : f is onto } or x in rng FP ) assume x in { f where f is Function of n,k : f is onto } ; ::_thesis: x in rng FP then consider f being Function of n,k such that A52: f = x and A53: f is onto ; rng f = K by A53, FUNCT_2:def_3; then consider I being Function of N,K, P being Permutation of K such that A54: f = P * I and A55: K = rng I and A56: I is "increasing by STIRL2_1:63; set p = P; reconsider i = I as Function of n,k ; for l, m being Nat st l in rng I & m in rng I & l < m holds min* (I " {l}) < min* (I " {m}) by A56, STIRL2_1:def_3; then A57: i is "increasing by STIRL2_1:def_1; i is onto by A55, FUNCT_2:def_3; then ( P in Perm & i in Bloc ) by A57; then A58: [P,i] in [:Perm,Bloc:] by ZFMISC_1:def_2; h in { f where f is Function of n,k : f is onto } by A51; then A59: [P,i] in dom FP by A58, FUNCT_2:def_1; FP . [P,i] = f by A23, A54, A58; hence x in rng FP by A52, A59, FUNCT_1:def_3; ::_thesis: verum end; then A60: rng FP = { f where f is Function of n,k : f is onto } by XBOOLE_0:def_10; h in { f where f is Function of n,k : f is onto } by A51; then dom FP = [:Perm,Bloc:] by FUNCT_2:def_1; then { f where f is Function of n,k : f is onto } ,[:Perm,Bloc:] are_equipotent by A24, A60, WELLORD2:def_4; then A61: card { f where f is Function of n,k : f is onto } = (card Perm) * (card Bloc) by A11, CARD_1:5; k ! > 0 by NEWTON:17; then A62: ( ((k !) * (card Bloc)) / (k !) = (card Bloc) * ((k !) / (k !)) & (k !) / (k !) = 1 ) by XCMPLX_1:60, XCMPLX_1:74; consider F being XFinSequence of such that A63: dom F = (card k) + 1 and A64: Sum F = card { f where f is Function of n,k : f is onto } and A65: for m being Nat st m in dom F holds F . m = (((- 1) |^ m) * ((card k) choose m)) * (((card k) - m) |^ (card n)) by A10, Th59; take F = F; ::_thesis: ( n block k = (1 / (k !)) * (Sum F) & dom F = k + 1 & ( for m being Nat st m in dom F holds F . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) ) ) card Perm = (card k) ! by Th8; then Sum F = (k !) * (card Bloc) by A64, A61, CARD_1:def_2; then n block k = ((Sum F) * 1) / (k !) by A62, STIRL2_1:def_2; hence n block k = (1 / (k !)) * (Sum F) by XCMPLX_1:74; ::_thesis: ( dom F = k + 1 & ( for m being Nat st m in dom F holds F . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) ) ) thus dom F = k + 1 by A63, CARD_1:def_2; ::_thesis: for m being Nat st m in dom F holds F . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) A66: ( card k = k & card n = n ) by CARD_1:def_2; let m be Nat; ::_thesis: ( m in dom F implies F . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) ) assume m in dom F ; ::_thesis: F . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) hence F . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) by A65, A66; ::_thesis: verum end; suppose ( n = 0 & k <> 0 ) ; ::_thesis: ex F being XFinSequence of st ( n block k = (1 / (k !)) * (Sum F) & dom F = k + 1 & ( for m being Nat st m in dom F holds F . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) ) ) hence ex F being XFinSequence of st ( n block k = (1 / (k !)) * (Sum F) & dom F = k + 1 & ( for m being Nat st m in dom F holds F . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) ) ) by A1; ::_thesis: verum end; end; end; hence ex F being XFinSequence of st ( n block k = (1 / (k !)) * (Sum F) & dom F = k + 1 & ( for m being Nat st m in dom F holds F . m = (((- 1) |^ m) * (k choose m)) * ((k - m) |^ n) ) ) ; ::_thesis: verum end; theorem Th61: :: CARD_FIN:61 for X1, Y1, X being finite set st ( Y1 is empty implies X1 is empty ) & X c= X1 holds for F being Function of X1,Y1 st F is one-to-one & card X1 = card Y1 holds ((card X1) -' (card X)) ! = card { f where f is Function of X1,Y1 : ( f is one-to-one & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X holds f . x = F . x ) ) } proof let X1, Y1, X be finite set ; ::_thesis: ( ( Y1 is empty implies X1 is empty ) & X c= X1 implies for F being Function of X1,Y1 st F is one-to-one & card X1 = card Y1 holds ((card X1) -' (card X)) ! = card { f where f is Function of X1,Y1 : ( f is one-to-one & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X holds f . x = F . x ) ) } ) assume that A1: ( Y1 is empty implies X1 is empty ) and A2: X c= X1 ; ::_thesis: for F being Function of X1,Y1 st F is one-to-one & card X1 = card Y1 holds ((card X1) -' (card X)) ! = card { f where f is Function of X1,Y1 : ( f is one-to-one & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X holds f . x = F . x ) ) } set XX = X1 \ X; let F be Function of X1,Y1; ::_thesis: ( F is one-to-one & card X1 = card Y1 implies ((card X1) -' (card X)) ! = card { f where f is Function of X1,Y1 : ( f is one-to-one & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X holds f . x = F . x ) ) } ) assume that A3: F is one-to-one and A4: card X1 = card Y1 ; ::_thesis: ((card X1) -' (card X)) ! = card { f where f is Function of X1,Y1 : ( f is one-to-one & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X holds f . x = F . x ) ) } deffunc H1( set ) -> set = F . $1; defpred S1[ Function, set , set ] means ( $1 is one-to-one & rng ($1 | (X1 \ X)) = F .: (X1 \ X) ); reconsider FX = F .: (X1 \ X) as finite set ; set F1 = { f where f is Function of (X1 \ X),(F .: (X1 \ X)) : f is one-to-one } ; A5: card (X1 \ X) = (card X1) - (card X) by A2, CARD_2:44; A6: for f being Function of X1,Y1 st ( for x being set st x in X1 \ (X1 \ X) holds H1(x) = f . x ) holds ( S1[f,X1,Y1] iff S1[f | (X1 \ X),X1 \ X,F .: (X1 \ X)] ) proof let f be Function of X1,Y1; ::_thesis: ( ( for x being set st x in X1 \ (X1 \ X) holds H1(x) = f . x ) implies ( S1[f,X1,Y1] iff S1[f | (X1 \ X),X1 \ X,F .: (X1 \ X)] ) ) assume A7: for x being set st x in X1 \ (X1 \ X) holds H1(x) = f . x ; ::_thesis: ( S1[f,X1,Y1] iff S1[f | (X1 \ X),X1 \ X,F .: (X1 \ X)] ) thus ( S1[f,X1,Y1] implies S1[f | (X1 \ X),X1 \ X,F .: (X1 \ X)] ) by FUNCT_1:52; ::_thesis: ( S1[f | (X1 \ X),X1 \ X,F .: (X1 \ X)] implies S1[f,X1,Y1] ) thus ( S1[f | (X1 \ X),X1 \ X,F .: (X1 \ X)] implies S1[f,X1,Y1] ) ::_thesis: verum proof F is onto by A3, A4, STIRL2_1:60; then A8: rng F = Y1 by FUNCT_2:def_3; A9: ( rng (f | (X1 \ X)) = f .: (X1 \ X) & F .: ((X1 \ (X1 \ X)) \/ (X1 \ X)) = (F .: (X1 \ (X1 \ X))) \/ (F .: (X1 \ X)) ) by RELAT_1:115, RELAT_1:120; A10: ( dom (F | (X1 \ (X1 \ X))) = (dom F) /\ (X1 \ (X1 \ X)) & dom F = X1 ) by A1, FUNCT_2:def_1, RELAT_1:61; A11: ( dom (f | (X1 \ (X1 \ X))) = (dom f) /\ (X1 \ (X1 \ X)) & dom f = X1 ) by A1, FUNCT_2:def_1, RELAT_1:61; now__::_thesis:_for_x_being_set_st_x_in_dom_(F_|_(X1_\_(X1_\_X)))_holds_ F_._x_=_(f_|_(X1_\_(X1_\_X)))_._x A12: ( X1 \ (X1 \ X) = X /\ X1 & X /\ X1 = X ) by A2, XBOOLE_1:28, XBOOLE_1:48; let x be set ; ::_thesis: ( x in dom (F | (X1 \ (X1 \ X))) implies F . x = (f | (X1 \ (X1 \ X))) . x ) assume A13: x in dom (F | (X1 \ (X1 \ X))) ; ::_thesis: F . x = (f | (X1 \ (X1 \ X))) . x f . x = (f | (X1 \ (X1 \ X))) . x by A11, A10, A13, FUNCT_1:47; hence F . x = (f | (X1 \ (X1 \ X))) . x by A7, A10, A13, A12; ::_thesis: verum end; then f | (X1 \ (X1 \ X)) = F | (X1 \ (X1 \ X)) by A11, A10, FUNCT_1:46; then A14: rng (f | (X1 \ (X1 \ X))) = F .: (X1 \ (X1 \ X)) by RELAT_1:115; A15: ( (X1 \ (X1 \ X)) \/ (X1 \ X) = X1 & rng (f | (X1 \ (X1 \ X))) = f .: (X1 \ (X1 \ X)) ) by RELAT_1:115, XBOOLE_1:45; A16: ( X1 = dom F & X1 = dom f ) by A1, FUNCT_2:def_1; A17: F .: (dom F) = rng F by RELAT_1:113; assume A18: S1[f | (X1 \ X),X1 \ X,F .: (X1 \ X)] ; ::_thesis: S1[f,X1,Y1] then rng (f | (X1 \ X)) = F .: (X1 \ X) ; then F .: X1 = f .: X1 by A14, A15, A9, RELAT_1:120; then rng F = rng f by A16, A17, RELAT_1:113; then f is onto by A8, FUNCT_2:def_3; hence S1[f,X1,Y1] by A4, A18, STIRL2_1:60; ::_thesis: verum end; end; set F2 = { f where f is Function of X1,Y1 : ( f is one-to-one & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X holds f . x = F . x ) ) } ; set S2 = { f where f is Function of X1,Y1 : ( S1[f,X1,Y1] & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X1 \ (X1 \ X) holds f . x = H1(x) ) ) } ; A19: ( X1 \ (X1 \ X) = X /\ X1 & X /\ X1 = X ) by A2, XBOOLE_1:28, XBOOLE_1:48; A20: { f where f is Function of X1,Y1 : ( S1[f,X1,Y1] & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X1 \ (X1 \ X) holds f . x = H1(x) ) ) } c= { f where f is Function of X1,Y1 : ( f is one-to-one & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X holds f . x = F . x ) ) } proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { f where f is Function of X1,Y1 : ( S1[f,X1,Y1] & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X1 \ (X1 \ X) holds f . x = H1(x) ) ) } or x in { f where f is Function of X1,Y1 : ( f is one-to-one & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X holds f . x = F . x ) ) } ) assume x in { f where f is Function of X1,Y1 : ( S1[f,X1,Y1] & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X1 \ (X1 \ X) holds f . x = H1(x) ) ) } ; ::_thesis: x in { f where f is Function of X1,Y1 : ( f is one-to-one & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X holds f . x = F . x ) ) } then ex f being Function of X1,Y1 st ( x = f & S1[f,X1,Y1] & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X1 \ (X1 \ X) holds f . x = H1(x) ) ) ; hence x in { f where f is Function of X1,Y1 : ( f is one-to-one & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X holds f . x = F . x ) ) } by A19; ::_thesis: verum end; dom F = X1 by A1, FUNCT_2:def_1; then X1 \ X,F .: (X1 \ X) are_equipotent by A3, CARD_1:33; then A21: card (X1 \ X) = card (F .: (X1 \ X)) by CARD_1:5; then ( card { f where f is Function of (X1 \ X),(F .: (X1 \ X)) : f is one-to-one } = ((card (X1 \ X)) !) / (((card FX) -' (card (X1 \ X))) !) & (card FX) -' (card (X1 \ X)) = 0 ) by Th7, XREAL_1:232; then A22: card { f where f is Function of (X1 \ X),(F .: (X1 \ X)) : f is one-to-one } = ((card X1) -' (card X)) ! by A5, NEWTON:12, XREAL_0:def_2; set S1 = { f where f is Function of (X1 \ X),(F .: (X1 \ X)) : S1[f,X1 \ X,F .: (X1 \ X)] } ; A23: for x being set st x in X1 \ (X1 \ X) holds H1(x) in Y1 proof A24: X1 = dom F by A1, FUNCT_2:def_1; let x be set ; ::_thesis: ( x in X1 \ (X1 \ X) implies H1(x) in Y1 ) assume x in X1 \ (X1 \ X) ; ::_thesis: H1(x) in Y1 then F . x in rng F by A24, FUNCT_1:def_3; hence H1(x) in Y1 ; ::_thesis: verum end; A25: { f where f is Function of (X1 \ X),(F .: (X1 \ X)) : f is one-to-one } c= { f where f is Function of (X1 \ X),(F .: (X1 \ X)) : S1[f,X1 \ X,F .: (X1 \ X)] } proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { f where f is Function of (X1 \ X),(F .: (X1 \ X)) : f is one-to-one } or x in { f where f is Function of (X1 \ X),(F .: (X1 \ X)) : S1[f,X1 \ X,F .: (X1 \ X)] } ) assume x in { f where f is Function of (X1 \ X),(F .: (X1 \ X)) : f is one-to-one } ; ::_thesis: x in { f where f is Function of (X1 \ X),(F .: (X1 \ X)) : S1[f,X1 \ X,F .: (X1 \ X)] } then consider f being Function of (X1 \ X),FX such that A26: x = f and A27: f is one-to-one ; A28: f | (X1 \ X) = f ; f is onto by A21, A27, STIRL2_1:60; then rng f = FX by FUNCT_2:def_3; hence x in { f where f is Function of (X1 \ X),(F .: (X1 \ X)) : S1[f,X1 \ X,F .: (X1 \ X)] } by A26, A27, A28; ::_thesis: verum end; { f where f is Function of (X1 \ X),(F .: (X1 \ X)) : S1[f,X1 \ X,F .: (X1 \ X)] } c= { f where f is Function of (X1 \ X),(F .: (X1 \ X)) : f is one-to-one } proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { f where f is Function of (X1 \ X),(F .: (X1 \ X)) : S1[f,X1 \ X,F .: (X1 \ X)] } or x in { f where f is Function of (X1 \ X),(F .: (X1 \ X)) : f is one-to-one } ) assume x in { f where f is Function of (X1 \ X),(F .: (X1 \ X)) : S1[f,X1 \ X,F .: (X1 \ X)] } ; ::_thesis: x in { f where f is Function of (X1 \ X),(F .: (X1 \ X)) : f is one-to-one } then ex f being Function of (X1 \ X),FX st ( f = x & S1[f,X1 \ X,F .: (X1 \ X)] ) ; hence x in { f where f is Function of (X1 \ X),(F .: (X1 \ X)) : f is one-to-one } ; ::_thesis: verum end; then A29: { f where f is Function of (X1 \ X),(F .: (X1 \ X)) : f is one-to-one } = { f where f is Function of (X1 \ X),(F .: (X1 \ X)) : S1[f,X1 \ X,F .: (X1 \ X)] } by A25, XBOOLE_0:def_10; A30: { f where f is Function of X1,Y1 : ( f is one-to-one & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X holds f . x = F . x ) ) } c= { f where f is Function of X1,Y1 : ( S1[f,X1,Y1] & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X1 \ (X1 \ X) holds f . x = H1(x) ) ) } proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { f where f is Function of X1,Y1 : ( f is one-to-one & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X holds f . x = F . x ) ) } or x in { f where f is Function of X1,Y1 : ( S1[f,X1,Y1] & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X1 \ (X1 \ X) holds f . x = H1(x) ) ) } ) assume x in { f where f is Function of X1,Y1 : ( f is one-to-one & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X holds f . x = F . x ) ) } ; ::_thesis: x in { f where f is Function of X1,Y1 : ( S1[f,X1,Y1] & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X1 \ (X1 \ X) holds f . x = H1(x) ) ) } then consider f being Function of X1,Y1 such that A31: x = f and A32: f is one-to-one and A33: rng (f | (X1 \ X)) c= F .: (X1 \ X) and A34: for x being set st x in X holds f . x = F . x ; dom f = X1 by A1, FUNCT_2:def_1; then X1 \ X,f .: (X1 \ X) are_equipotent by A32, CARD_1:33; then card (X1 \ X) = card (f .: (X1 \ X)) by CARD_1:5; then card FX = card (rng (f | (X1 \ X))) by A21, RELAT_1:115; then rng (f | (X1 \ X)) = FX by A33, PRE_POLY:8; hence x in { f where f is Function of X1,Y1 : ( S1[f,X1,Y1] & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X1 \ (X1 \ X) holds f . x = H1(x) ) ) } by A19, A31, A32, A34; ::_thesis: verum end; A35: ( X1 \ X c= X1 & F .: (X1 \ X) c= Y1 ) ; then X1 \ X c= dom F by A1, FUNCT_2:def_1; then A36: ( F .: (X1 \ X) is empty implies X1 \ X is empty ) by RELAT_1:119; card { f where f is Function of (X1 \ X),(F .: (X1 \ X)) : S1[f,X1 \ X,F .: (X1 \ X)] } = card { f where f is Function of X1,Y1 : ( S1[f,X1,Y1] & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X1 \ (X1 \ X) holds f . x = H1(x) ) ) } from STIRL2_1:sch_3(A23, A35, A36, A6); hence ((card X1) -' (card X)) ! = card { f where f is Function of X1,Y1 : ( f is one-to-one & rng (f | (X1 \ X)) c= F .: (X1 \ X) & ( for x being set st x in X holds f . x = F . x ) ) } by A20, A30, A22, A29, XBOOLE_0:def_10; ::_thesis: verum end; Lm4: for X, Y being finite set for F being Function of X,Y st dom F = X & F is one-to-one holds ex XF being XFinSequence of st ( dom XF = card X & ((card X) !) - (Sum XF) = card { h where h is Function of X,(rng F) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F . x ) ) } & ( for n being Nat st n in dom XF holds XF . n = (((- 1) |^ n) * ((card X) !)) / ((n + 1) !) ) ) proof let X, Y be finite set ; ::_thesis: for F being Function of X,Y st dom F = X & F is one-to-one holds ex XF being XFinSequence of st ( dom XF = card X & ((card X) !) - (Sum XF) = card { h where h is Function of X,(rng F) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F . x ) ) } & ( for n being Nat st n in dom XF holds XF . n = (((- 1) |^ n) * ((card X) !)) / ((n + 1) !) ) ) let F be Function of X,Y; ::_thesis: ( dom F = X & F is one-to-one implies ex XF being XFinSequence of st ( dom XF = card X & ((card X) !) - (Sum XF) = card { h where h is Function of X,(rng F) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F . x ) ) } & ( for n being Nat st n in dom XF holds XF . n = (((- 1) |^ n) * ((card X) !)) / ((n + 1) !) ) ) ) assume that A1: dom F = X and A2: F is one-to-one ; ::_thesis: ex XF being XFinSequence of st ( dom XF = card X & ((card X) !) - (Sum XF) = card { h where h is Function of X,(rng F) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F . x ) ) } & ( for n being Nat st n in dom XF holds XF . n = (((- 1) |^ n) * ((card X) !)) / ((n + 1) !) ) ) deffunc H1( set ) -> set = { h where h is Function of X,(rng F) : ( h is one-to-one & h . $1 = F . $1 ) } ; A3: for x being set st x in X holds H1(x) in bool (Funcs (X,(rng F))) proof let x be set ; ::_thesis: ( x in X implies H1(x) in bool (Funcs (X,(rng F))) ) assume A4: x in X ; ::_thesis: H1(x) in bool (Funcs (X,(rng F))) H1(x) c= Funcs (X,(rng F)) proof let y be set ; :: according to TARSKI:def_3 ::_thesis: ( not y in H1(x) or y in Funcs (X,(rng F)) ) assume y in H1(x) ; ::_thesis: y in Funcs (X,(rng F)) then A5: ex h being Function of X,(rng F) st ( y = h & h is one-to-one & h . x = F . x ) ; rng F <> {} by A1, A4, RELAT_1:42; hence y in Funcs (X,(rng F)) by A5, FUNCT_2:8; ::_thesis: verum end; hence H1(x) in bool (Funcs (X,(rng F))) ; ::_thesis: verum end; consider Fy9 being Function of X,(bool (Funcs (X,(rng F)))) such that A6: for x being set st x in X holds Fy9 . x = H1(x) from FUNCT_2:sch_2(A3); defpred S1[ set , set ] means for n, k being Nat st n = $1 & k = (card X) - (n + 1) holds $2 = k ! ; A7: for x being set st x in card X holds ex y being set st ( y in NAT & S1[x,y] ) proof let x be set ; ::_thesis: ( x in card X implies ex y being set st ( y in NAT & S1[x,y] ) ) assume A8: x in card X ; ::_thesis: ex y being set st ( y in NAT & S1[x,y] ) card X is Subset of NAT by STIRL2_1:8; then reconsider n = x as Element of NAT by A8; n < card X by A8, NAT_1:44; then n + 1 <= card X by NAT_1:13; then reconsider k = (card X) - (n + 1) as Element of NAT by NAT_1:21; S1[n,k ! ] ; hence ex y being set st ( y in NAT & S1[x,y] ) ; ::_thesis: verum end; consider XF being Function of (card X),NAT such that A9: for x being set st x in card X holds S1[x,XF . x] from FUNCT_2:sch_1(A7); for y being set st y in dom Fy9 holds Fy9 . y is finite proof let y be set ; ::_thesis: ( y in dom Fy9 implies Fy9 . y is finite ) assume y in dom Fy9 ; ::_thesis: Fy9 . y is finite then Fy9 . y in rng Fy9 by FUNCT_1:def_3; hence Fy9 . y is finite ; ::_thesis: verum end; then reconsider Fy = Fy9 as finite-yielding Function by FINSET_1:def_4; reconsider rngF = rng F as finite set ; A10: dom XF = card X by FUNCT_2:def_1; then reconsider XF = XF as XFinSequence by AFINSQ_1:5; reconsider XF = XF as XFinSequence of ; A11: for n being Nat st n in dom XF holds ex x, y being set st ( x <> y & ( for f being Function st f in Choose (X,(n + 1),x,y) holds card (Intersection (Fy,f,x)) = XF . n ) ) proof let n be Nat; ::_thesis: ( n in dom XF implies ex x, y being set st ( x <> y & ( for f being Function st f in Choose (X,(n + 1),x,y) holds card (Intersection (Fy,f,x)) = XF . n ) ) ) assume A12: n in dom XF ; ::_thesis: ex x, y being set st ( x <> y & ( for f being Function st f in Choose (X,(n + 1),x,y) holds card (Intersection (Fy,f,x)) = XF . n ) ) n < card X by A10, A12, NAT_1:44; then A13: n + 1 <= card X by NAT_1:13; then reconsider c = (card X) - (n + 1) as Element of NAT by NAT_1:21; A14: (card X) -' (n + 1) = c by A13, XREAL_1:233; take 0 ; ::_thesis: ex y being set st ( 0 <> y & ( for f being Function st f in Choose (X,(n + 1),0,y) holds card (Intersection (Fy,f,0)) = XF . n ) ) take 1 ; ::_thesis: ( 0 <> 1 & ( for f being Function st f in Choose (X,(n + 1),0,1) holds card (Intersection (Fy,f,0)) = XF . n ) ) thus 0 <> 1 ; ::_thesis: for f being Function st f in Choose (X,(n + 1),0,1) holds card (Intersection (Fy,f,0)) = XF . n let f9 be Function; ::_thesis: ( f9 in Choose (X,(n + 1),0,1) implies card (Intersection (Fy,f9,0)) = XF . n ) assume f9 in Choose (X,(n + 1),0,1) ; ::_thesis: card (Intersection (Fy,f9,0)) = XF . n then consider f being Function of X,{0,1} such that A15: f = f9 and A16: card (f " {0}) = n + 1 by Def1; reconsider f0 = f " {0} as finite set ; set Xf0 = X \ f0; set S = { h where h is Function of X,rngF : ( h is one-to-one & rng (h | (X \ f0)) c= F .: (X \ f0) & ( for x being set st x in f0 holds h . x = F . x ) ) } ; A17: Intersection (Fy,f,0) c= { h where h is Function of X,rngF : ( h is one-to-one & rng (h | (X \ f0)) c= F .: (X \ f0) & ( for x being set st x in f0 holds h . x = F . x ) ) } proof assume not Intersection (Fy,f,0) c= { h where h is Function of X,rngF : ( h is one-to-one & rng (h | (X \ f0)) c= F .: (X \ f0) & ( for x being set st x in f0 holds h . x = F . x ) ) } ; ::_thesis: contradiction then consider z being set such that A18: z in Intersection (Fy,f,0) and A19: not z in { h where h is Function of X,rngF : ( h is one-to-one & rng (h | (X \ f0)) c= F .: (X \ f0) & ( for x being set st x in f0 holds h . x = F . x ) ) } by TARSKI:def_3; consider x9 being set such that A20: x9 in f " {0} by A16, CARD_1:27, XBOOLE_0:def_1; f . x9 in {0} by A20, FUNCT_1:def_7; then A21: f . x9 = 0 by TARSKI:def_1; x9 in dom f by A20, FUNCT_1:def_7; then 0 in rng f by A21, FUNCT_1:def_3; then consider x being set such that A22: x in dom f and f . x = 0 and A23: z in Fy . x by A18, Th22; z in H1(x) by A6, A22, A23; then consider h being Function of X,(rng F) such that A24: z = h and A25: h is one-to-one and h . x = F . x ; A26: for x1 being set st x1 in f0 holds h . x1 = F . x1 proof let x1 be set ; ::_thesis: ( x1 in f0 implies h . x1 = F . x1 ) assume A27: x1 in f0 ; ::_thesis: h . x1 = F . x1 f . x1 in {0} by A27, FUNCT_1:def_7; then A28: f . x1 = 0 by TARSKI:def_1; ( Fy9 . x1 = H1(x1) & x1 in dom f ) by A6, A27, FUNCT_1:def_7; then h in H1(x1) by A18, A24, A28, Def2; then ex h9 being Function of X,(rng F) st ( h = h9 & h9 is one-to-one & h9 . x1 = F . x1 ) ; hence h . x1 = F . x1 ; ::_thesis: verum end; rng (h | (X \ f0)) c= F .: (X \ f0) proof assume not rng (h | (X \ f0)) c= F .: (X \ f0) ; ::_thesis: contradiction then consider y being set such that A29: y in rng (h | (X \ f0)) and A30: not y in F .: (X \ f0) by TARSKI:def_3; consider x1 being set such that A31: x1 in dom (h | (X \ f0)) and A32: (h | (X \ f0)) . x1 = y by A29, FUNCT_1:def_3; A33: h . x1 = y by A31, A32, FUNCT_1:47; x1 in (dom h) /\ (X \ f0) by A31, RELAT_1:61; then A34: x1 in X \ f0 by XBOOLE_0:def_4; A35: F .: (X \ (X \ f0)) = (F .: X) \ (F .: (X \ f0)) by A2, FUNCT_1:64; rngF = F .: X by A1, RELAT_1:113; then y in (F .: X) \ (F .: (X \ f0)) by A29, A30, XBOOLE_0:def_5; then consider x2 being set such that A36: x2 in dom F and A37: x2 in X \ (X \ f0) and A38: y = F . x2 by A35, FUNCT_1:def_6; y in rng F by A36, A38, FUNCT_1:def_3; then A39: X = dom h by FUNCT_2:def_1; X \ (X \ f0) = X /\ (f " {0}) by XBOOLE_1:48; then x2 in f " {0} by A37, XBOOLE_0:def_4; then A40: h . x2 = y by A26, A38; not x2 in X \ f0 by A37, XBOOLE_0:def_5; hence contradiction by A25, A36, A40, A33, A39, A34, FUNCT_1:def_4; ::_thesis: verum end; hence contradiction by A19, A24, A25, A26; ::_thesis: verum end; A41: X,rngF are_equipotent by A1, A2, WELLORD2:def_4; then A42: card rngF = card X by CARD_1:5; card rngF = card X by A41, CARD_1:5; then A43: ( rngF = {} implies X is empty ) ; A44: F is Function of X,rngF by A1, FUNCT_2:1; { h where h is Function of X,rngF : ( h is one-to-one & rng (h | (X \ f0)) c= F .: (X \ f0) & ( for x being set st x in f0 holds h . x = F . x ) ) } c= Intersection (Fy,f,0) proof assume not { h where h is Function of X,rngF : ( h is one-to-one & rng (h | (X \ f0)) c= F .: (X \ f0) & ( for x being set st x in f0 holds h . x = F . x ) ) } c= Intersection (Fy,f,0) ; ::_thesis: contradiction then consider z being set such that A45: z in { h where h is Function of X,rngF : ( h is one-to-one & rng (h | (X \ f0)) c= F .: (X \ f0) & ( for x being set st x in f0 holds h . x = F . x ) ) } and A46: not z in Intersection (Fy,f,0) by TARSKI:def_3; consider h being Function of X,(rng F) such that A47: h = z and A48: h is one-to-one and rng (h | (X \ f0)) c= F .: (X \ f0) and A49: for x being set st x in f0 holds h . x = F . x by A45; consider x being set such that A50: x in f " {0} by A16, CARD_1:27, XBOOLE_0:def_1; x in X by A50; then x in dom Fy9 by FUNCT_2:def_1; then A51: Fy9 . x in rng Fy9 by FUNCT_1:def_3; A52: Fy9 . x = H1(x) by A6, A50; h . x = F . x by A49, A50; then h in Fy9 . x by A48, A52; then h in union (rng Fy9) by A51, TARSKI:def_4; then consider y being set such that A53: y in dom f and A54: f . y = 0 and A55: not h in Fy . y by A46, A47, Def2; f . y in {0} by A54, TARSKI:def_1; then y in f " {0} by A53, FUNCT_1:def_7; then h . y = F . y by A49; then h in H1(y) by A48; hence contradiction by A6, A53, A55; ::_thesis: verum end; then { h where h is Function of X,rngF : ( h is one-to-one & rng (h | (X \ f0)) c= F .: (X \ f0) & ( for x being set st x in f0 holds h . x = F . x ) ) } = Intersection (Fy,f,0) by A17, XBOOLE_0:def_10; then card (Intersection (Fy,f,0)) = ((card X) -' (n + 1)) ! by A2, A16, A43, A44, A42, Th61; hence card (Intersection (Fy,f9,0)) = XF . n by A9, A10, A12, A15, A14; ::_thesis: verum end; A56: X,rngF are_equipotent by A1, A2, WELLORD2:def_4; then card rngF = card X by CARD_1:5; then A57: ( ((card rngF) -' (card X)) ! = 1 & card { f where f is Function of X,rngF : f is one-to-one } = ((card rngF) !) / (((card rngF) -' (card X)) !) ) by Th7, NEWTON:12, XREAL_1:232; then reconsider One = { f where f is Function of X,(rng F) : f is one-to-one } as finite set ; set S = { h where h is Function of X,(rng F) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F . x ) ) } ; ( dom XF = card X & dom Fy = X ) by FUNCT_2:def_1; then consider F9 being XFinSequence of such that A58: dom F9 = card X and A59: card (union (rng Fy)) = Sum F9 and A60: for n being Nat st n in dom F9 holds F9 . n = (((- 1) |^ n) * (XF . n)) * ((card X) choose (n + 1)) by A11, Th58; A61: union (rng Fy9) c= One proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in union (rng Fy9) or x in One ) assume x in union (rng Fy9) ; ::_thesis: x in One then consider Fyx being set such that A62: x in Fyx and A63: Fyx in rng Fy9 by TARSKI:def_4; consider x1 being set such that A64: ( x1 in dom Fy9 & Fy . x1 = Fyx ) by A63, FUNCT_1:def_3; x in H1(x1) by A6, A62, A64; then ex h being Function of X,(rng F) st ( h = x & h is one-to-one & h . x1 = F . x1 ) ; hence x in One ; ::_thesis: verum end; reconsider u = union (rng Fy) as finite set ; A65: card (One \ u) = (card One) - (card u) by A61, CARD_2:44; take F9 ; ::_thesis: ( dom F9 = card X & ((card X) !) - (Sum F9) = card { h where h is Function of X,(rng F) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F . x ) ) } & ( for n being Nat st n in dom F9 holds F9 . n = (((- 1) |^ n) * ((card X) !)) / ((n + 1) !) ) ) thus dom F9 = card X by A58; ::_thesis: ( ((card X) !) - (Sum F9) = card { h where h is Function of X,(rng F) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F . x ) ) } & ( for n being Nat st n in dom F9 holds F9 . n = (((- 1) |^ n) * ((card X) !)) / ((n + 1) !) ) ) A66: One \ (union (rng Fy)) c= { h where h is Function of X,(rng F) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F . x ) ) } proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in One \ (union (rng Fy)) or x in { h where h is Function of X,(rng F) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F . x ) ) } ) assume A67: x in One \ (union (rng Fy)) ; ::_thesis: x in { h where h is Function of X,(rng F) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F . x ) ) } x in One by A67; then consider f being Function of X,(rng F) such that A68: f = x and A69: f is one-to-one ; assume not x in { h where h is Function of X,(rng F) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F . x ) ) } ; ::_thesis: contradiction then consider x being set such that A70: x in X and A71: f . x = F . x by A68, A69; x in dom Fy by A70, FUNCT_2:def_1; then Fy . x in rng Fy by FUNCT_1:def_3; then A72: H1(x) in rng Fy by A6, A70; f in H1(x) by A69, A71; then f in union (rng Fy) by A72, TARSKI:def_4; hence contradiction by A67, A68, XBOOLE_0:def_5; ::_thesis: verum end; A73: { h where h is Function of X,(rng F) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F . x ) ) } c= One \ (union (rng Fy)) proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { h where h is Function of X,(rng F) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F . x ) ) } or x in One \ (union (rng Fy)) ) assume x in { h where h is Function of X,(rng F) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F . x ) ) } ; ::_thesis: x in One \ (union (rng Fy)) then consider f being Function of X,(rng F) such that A74: x = f and A75: f is one-to-one and A76: for x being set st x in X holds f . x <> F . x ; assume A77: not x in One \ (union (rng Fy)) ; ::_thesis: contradiction f in One by A75; then f in union (rng Fy) by A74, A77, XBOOLE_0:def_5; then consider Fyy being set such that A78: f in Fyy and A79: Fyy in rng Fy by TARSKI:def_4; consider y being set such that A80: y in dom Fy and A81: Fy . y = Fyy by A79, FUNCT_1:def_3; y in X by A80, FUNCT_2:def_1; then f in H1(y) by A6, A78, A81; then A82: ex g being Function of X,(rng F) st ( f = g & g is one-to-one & g . y = F . y ) ; y in X by A80, FUNCT_2:def_1; hence contradiction by A76, A82; ::_thesis: verum end; card One = (card X) ! by A56, A57, CARD_1:5; hence card { h where h is Function of X,(rng F) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F . x ) ) } = ((card X) !) - (Sum F9) by A59, A66, A73, A65, XBOOLE_0:def_10; ::_thesis: for n being Nat st n in dom F9 holds F9 . n = (((- 1) |^ n) * ((card X) !)) / ((n + 1) !) let n be Nat; ::_thesis: ( n in dom F9 implies F9 . n = (((- 1) |^ n) * ((card X) !)) / ((n + 1) !) ) assume A83: n in dom F9 ; ::_thesis: F9 . n = (((- 1) |^ n) * ((card X) !)) / ((n + 1) !) n < card X by A58, A83, NAT_1:44; then A84: n + 1 <= card X by NAT_1:13; then reconsider c = (card X) - (n + 1) as Element of NAT by NAT_1:21; A85: (card X) choose (n + 1) = ((card X) !) / ((c !) * ((n + 1) !)) by A84, NEWTON:def_3; A86: c ! > 0 by NEWTON:17; XF . n = c ! by A9, A58, A83; then A87: (XF . n) * ((card X) choose (n + 1)) = ((c !) * ((card X) !)) / ((c !) * ((n + 1) !)) by A85, XCMPLX_1:74 .= ((card X) !) * ((c !) / ((c !) * ((n + 1) !))) by XCMPLX_1:74 .= ((card X) !) * (((c !) / (c !)) / ((n + 1) !)) by XCMPLX_1:78 .= ((card X) !) * (1 / ((n + 1) !)) by A86, XCMPLX_1:60 .= (((card X) !) * 1) / ((n + 1) !) by XCMPLX_1:74 ; F9 . n = (((- 1) |^ n) * (XF . n)) * ((card X) choose (n + 1)) by A60, A83 .= ((- 1) |^ n) * (((card X) !) / ((n + 1) !)) by A87 ; hence F9 . n = (((- 1) |^ n) * ((card X) !)) / ((n + 1) !) by XCMPLX_1:74; ::_thesis: verum end; theorem Th62: :: CARD_FIN:62 for X being finite set for F being Function st dom F = X & F is one-to-one holds ex XF being XFinSequence of st ( Sum XF = card { h where h is Function of X,(rng F) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F . x ) ) } & dom XF = (card X) + 1 & ( for n being Nat st n in dom XF holds XF . n = (((- 1) |^ n) * ((card X) !)) / (n !) ) ) proof let X be finite set ; ::_thesis: for F being Function st dom F = X & F is one-to-one holds ex XF being XFinSequence of st ( Sum XF = card { h where h is Function of X,(rng F) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F . x ) ) } & dom XF = (card X) + 1 & ( for n being Nat st n in dom XF holds XF . n = (((- 1) |^ n) * ((card X) !)) / (n !) ) ) let F9 be Function; ::_thesis: ( dom F9 = X & F9 is one-to-one implies ex XF being XFinSequence of st ( Sum XF = card { h where h is Function of X,(rng F9) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F9 . x ) ) } & dom XF = (card X) + 1 & ( for n being Nat st n in dom XF holds XF . n = (((- 1) |^ n) * ((card X) !)) / (n !) ) ) ) assume that A1: dom F9 = X and A2: F9 is one-to-one ; ::_thesis: ex XF being XFinSequence of st ( Sum XF = card { h where h is Function of X,(rng F9) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F9 . x ) ) } & dom XF = (card X) + 1 & ( for n being Nat st n in dom XF holds XF . n = (((- 1) |^ n) * ((card X) !)) / (n !) ) ) X, rng F9 are_equipotent by A1, A2, WELLORD2:def_4; then card X = card (rng F9) by CARD_1:5; then reconsider rngF = rng F9 as finite set ; reconsider F = F9 as Function of X,rngF by A1, FUNCT_2:1; set S = { h where h is Function of X,(rng F9) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F9 . x ) ) } ; rng F9 = rng F ; then consider Xf being XFinSequence of such that A3: dom Xf = card X and A4: ((card X) !) - (Sum Xf) = card { h where h is Function of X,(rng F9) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F9 . x ) ) } and A5: for n being Nat st n in dom Xf holds Xf . n = (((- 1) |^ n) * ((card X) !)) / ((n + 1) !) by A1, A2, Lm4; reconsider c = (card X) ! as Element of INT by INT_1:def_2; A6: len <%c%> = 1 by AFINSQ_1:33; set F1 = (- 1) (#) Xf; A7: dom ((- 1) (#) Xf) = card X by A3, VALUED_1:def_5; reconsider F1 = (- 1) (#) Xf as XFinSequence of ; set XF = <%c%> ^ F1; take <%c%> ^ F1 ; ::_thesis: ( Sum (<%c%> ^ F1) = card { h where h is Function of X,(rng F9) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F9 . x ) ) } & dom (<%c%> ^ F1) = (card X) + 1 & ( for n being Nat st n in dom (<%c%> ^ F1) holds (<%c%> ^ F1) . n = (((- 1) |^ n) * ((card X) !)) / (n !) ) ) (- 1) * (Sum Xf) = Sum F1 by AFINSQ_2:64; then c - (Sum Xf) = c + (Sum F1) .= addint . (c,(Sum F1)) by BINOP_2:def_20 .= addint . ((addint "**" <%c%>),(Sum F1)) by AFINSQ_2:37 .= addint . ((addint "**" <%c%>),(addint "**" F1)) by AFINSQ_2:50 .= addint "**" (<%c%> ^ F1) by AFINSQ_2:42 .= Sum (<%c%> ^ F1) by AFINSQ_2:50 ; hence Sum (<%c%> ^ F1) = card { h where h is Function of X,(rng F9) : ( h is one-to-one & ( for x being set st x in X holds h . x <> F9 . x ) ) } by A4; ::_thesis: ( dom (<%c%> ^ F1) = (card X) + 1 & ( for n being Nat st n in dom (<%c%> ^ F1) holds (<%c%> ^ F1) . n = (((- 1) |^ n) * ((card X) !)) / (n !) ) ) len F1 = card X by A3, VALUED_1:def_5; hence A8: dom (<%c%> ^ F1) = (card X) + 1 by A6, AFINSQ_1:def_3; ::_thesis: for n being Nat st n in dom (<%c%> ^ F1) holds (<%c%> ^ F1) . n = (((- 1) |^ n) * ((card X) !)) / (n !) let n be Nat; ::_thesis: ( n in dom (<%c%> ^ F1) implies (<%c%> ^ F1) . n = (((- 1) |^ n) * ((card X) !)) / (n !) ) assume A9: n in dom (<%c%> ^ F1) ; ::_thesis: (<%c%> ^ F1) . n = (((- 1) |^ n) * ((card X) !)) / (n !) percases ( n = 0 or n > 0 ) ; supposeA10: n = 0 ; ::_thesis: (<%c%> ^ F1) . n = (((- 1) |^ n) * ((card X) !)) / (n !) then (- 1) |^ n = 1 by NEWTON:4; hence (<%c%> ^ F1) . n = (((- 1) |^ n) * ((card X) !)) / (n !) by A10, AFINSQ_1:35, NEWTON:12; ::_thesis: verum end; suppose n > 0 ; ::_thesis: (<%c%> ^ F1) . n = (((- 1) |^ n) * ((card X) !)) / (n !) then reconsider n1 = n - 1 as Element of NAT by NAT_1:20; n1 + 1 = n ; then A11: (- 1) * ((- 1) |^ n1) = (- 1) |^ n by NEWTON:6; n < (card X) + 1 by A8, A9, NAT_1:44; then n1 + 1 <= card X by NAT_1:13; then n1 < len F1 by A7, NAT_1:13; then A12: n1 in dom F1 by NAT_1:44; len <%c%> = 1 by AFINSQ_1:33; then (<%c%> ^ F1) . (n1 + 1) = F1 . n1 by A12, AFINSQ_1:def_3; then A13: (<%c%> ^ F1) . (n1 + 1) = (- 1) * (Xf . n1) by VALUED_1:6; Xf . n1 = (((- 1) |^ n1) * ((card X) !)) / ((n1 + 1) !) by A3, A5, A7, A12; then (<%c%> ^ F1) . n = ((- 1) * (((- 1) |^ n1) * ((card X) !))) / (n !) by A13, XCMPLX_1:74; hence (<%c%> ^ F1) . n = (((- 1) |^ n) * ((card X) !)) / (n !) by A11; ::_thesis: verum end; end; end; theorem :: CARD_FIN:63 for X being finite set ex XF being XFinSequence of st ( Sum XF = card { h where h is Function of X,X : ( h is one-to-one & ( for x being set st x in X holds h . x <> x ) ) } & dom XF = (card X) + 1 & ( for n being Nat st n in dom XF holds XF . n = (((- 1) |^ n) * ((card X) !)) / (n !) ) ) proof let X be finite set ; ::_thesis: ex XF being XFinSequence of st ( Sum XF = card { h where h is Function of X,X : ( h is one-to-one & ( for x being set st x in X holds h . x <> x ) ) } & dom XF = (card X) + 1 & ( for n being Nat st n in dom XF holds XF . n = (((- 1) |^ n) * ((card X) !)) / (n !) ) ) set S1 = { h where h is Function of X,X : ( h is one-to-one & ( for x being set st x in X holds h . x <> (id X) . x ) ) } ; set S2 = { h where h is Function of X,X : ( h is one-to-one & ( for x being set st x in X holds h . x <> x ) ) } ; A1: { h where h is Function of X,X : ( h is one-to-one & ( for x being set st x in X holds h . x <> x ) ) } c= { h where h is Function of X,X : ( h is one-to-one & ( for x being set st x in X holds h . x <> (id X) . x ) ) } proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { h where h is Function of X,X : ( h is one-to-one & ( for x being set st x in X holds h . x <> x ) ) } or x in { h where h is Function of X,X : ( h is one-to-one & ( for x being set st x in X holds h . x <> (id X) . x ) ) } ) assume x in { h where h is Function of X,X : ( h is one-to-one & ( for x being set st x in X holds h . x <> x ) ) } ; ::_thesis: x in { h where h is Function of X,X : ( h is one-to-one & ( for x being set st x in X holds h . x <> (id X) . x ) ) } then consider h being Function of X,X such that A2: ( h = x & h is one-to-one ) and A3: for y being set st y in X holds h . y <> y ; now__::_thesis:_for_y_being_set_st_y_in_X_holds_ (id_X)_._y_<>_h_._y let y be set ; ::_thesis: ( y in X implies (id X) . y <> h . y ) assume A4: y in X ; ::_thesis: (id X) . y <> h . y (id X) . y = y by A4, FUNCT_1:17; hence (id X) . y <> h . y by A3, A4; ::_thesis: verum end; hence x in { h where h is Function of X,X : ( h is one-to-one & ( for x being set st x in X holds h . x <> (id X) . x ) ) } by A2; ::_thesis: verum end; A5: ( dom (id X) = X & rng (id X) = X ) ; { h where h is Function of X,X : ( h is one-to-one & ( for x being set st x in X holds h . x <> (id X) . x ) ) } c= { h where h is Function of X,X : ( h is one-to-one & ( for x being set st x in X holds h . x <> x ) ) } proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { h where h is Function of X,X : ( h is one-to-one & ( for x being set st x in X holds h . x <> (id X) . x ) ) } or x in { h where h is Function of X,X : ( h is one-to-one & ( for x being set st x in X holds h . x <> x ) ) } ) assume x in { h where h is Function of X,X : ( h is one-to-one & ( for x being set st x in X holds h . x <> (id X) . x ) ) } ; ::_thesis: x in { h where h is Function of X,X : ( h is one-to-one & ( for x being set st x in X holds h . x <> x ) ) } then consider h being Function of X,X such that A6: ( h = x & h is one-to-one ) and A7: for y being set st y in X holds h . y <> (id X) . y ; now__::_thesis:_for_y_being_set_st_y_in_X_holds_ h_._y_<>_y let y be set ; ::_thesis: ( y in X implies h . y <> y ) assume A8: y in X ; ::_thesis: h . y <> y (id X) . y = y by A8, FUNCT_1:17; hence h . y <> y by A7, A8; ::_thesis: verum end; hence x in { h where h is Function of X,X : ( h is one-to-one & ( for x being set st x in X holds h . x <> x ) ) } by A6; ::_thesis: verum end; then { h where h is Function of X,X : ( h is one-to-one & ( for x being set st x in X holds h . x <> (id X) . x ) ) } = { h where h is Function of X,X : ( h is one-to-one & ( for x being set st x in X holds h . x <> x ) ) } by A1, XBOOLE_0:def_10; hence ex XF being XFinSequence of st ( Sum XF = card { h where h is Function of X,X : ( h is one-to-one & ( for x being set st x in X holds h . x <> x ) ) } & dom XF = (card X) + 1 & ( for n being Nat st n in dom XF holds XF . n = (((- 1) |^ n) * ((card X) !)) / (n !) ) ) by A5, Th62; ::_thesis: verum end;