let X be finite set ; :: thesis: for n being Nat holds card { Y where Y is Subset of X : card Y = n } = (card X) choose n
let n be Nat; :: thesis: card { Y where Y is Subset of X : card Y = n } = (card X) choose n
reconsider N = n as Element of NAT by ORDINAL1:def 13;
set YY = { Y where Y is Subset of X : card Y = n } ;
set CH = Choose X,N,1,0 ;
deffunc H1( set ) -> set = (X --> 0 ) +* ($1 --> 1);
consider f being Function such that
A1:
( dom f = { Y where Y is Subset of X : card Y = n } & ( for x being set st x in { Y where Y is Subset of X : card Y = n } holds
f . x = H1(x) ) )
from FUNCT_1:sch 3();
A2:
rng f c= Choose X,N,1,0
proof
let y be
set ;
:: according to TARSKI:def 3 :: thesis: ( not y in rng f or y in Choose X,N,1,0 )
assume
y in rng f
;
:: thesis: y in Choose X,N,1,0
then consider x being
set such that A3:
(
x in dom f &
f . x = y )
by FUNCT_1:def 5;
consider Y being
Subset of
X such that A4:
(
x = Y &
card Y = n )
by A1, A3;
Y \/ X = X
by XBOOLE_1:12;
then
H1(
Y)
in Choose X,
N,1,
0
by A4, CARD_FIN:19;
hence
y in Choose X,
N,1,
0
by A1, A3, A4;
:: thesis: verum
end;
A5:
Choose X,N,1,0 c= rng f
proof
let y be
set ;
:: according to TARSKI:def 3 :: thesis: ( not y in Choose X,N,1,0 or y in rng f )
assume
y in Choose X,
N,1,
0
;
:: thesis: y in rng f
then consider g being
Function of
X,
{0 ,1} such that A6:
(
g = y &
card (g " {1}) = n )
by CARD_FIN:def 1;
X = dom g
by FUNCT_2:def 1;
then reconsider Y =
g " {1} as
Subset of
X by RELAT_1:167;
(
dom (Y --> 1) = Y &
dom (X --> 0 ) = X )
by FUNCOP_1:19;
then A7:
dom H1(
Y) =
X \/ Y
by FUNCT_4:def 1
.=
X
by XBOOLE_1:12
;
A8:
dom g = X
by FUNCT_2:def 1;
now let x be
set ;
:: thesis: ( x in dom g implies g . x = H1(Y) . x )assume A9:
x in dom g
;
:: thesis: g . x = H1(Y) . xnow per cases
( x in Y or not x in Y )
;
suppose A10:
not
x in Y
;
:: thesis: g . x = H1(Y) . xthen
( not
g . x in {1} &
g . x in rng g &
rng g c= {0 ,1} )
by A9, FUNCT_1:def 5, FUNCT_1:def 13, RELAT_1:def 19;
then
(
(X --> 0 ) . x = 0 &
dom (Y --> 1) = Y &
g . x <> 1 &
g . x in {0 ,1} )
by A9, FUNCOP_1:13, FUNCOP_1:19, TARSKI:def 1;
then
(
H1(
Y)
. x = 0 &
g . x = 0 )
by A10, FUNCT_4:12, TARSKI:def 2;
hence
g . x = H1(
Y)
. x
;
:: thesis: verum end; end; end; hence
g . x = H1(
Y)
. x
;
:: thesis: verum end;
then
(
H1(
Y)
= g &
Y in { Y where Y is Subset of X : card Y = n } )
by A6, A7, A8, FUNCT_1:9;
then
(
f . Y = g &
f . Y in rng f )
by A1, FUNCT_1:def 5;
hence
y in rng f
by A6;
:: thesis: verum
end;
for x1, x2 being set st x1 in dom f & x2 in dom f & f . x1 = f . x2 holds
x1 = x2
then
( f is without_repeated_line & rng f = Choose X,N,1,0 )
by A2, A5, FUNCT_1:def 8, XBOOLE_0:def 10;
then
{ Y where Y is Subset of X : card Y = n } , Choose X,N,1,0 are_equipotent
by A1, WELLORD2:def 4;
then
card { Y where Y is Subset of X : card Y = n } = card (Choose X,N,1,0 )
by CARD_1:21;
hence
card { Y where Y is Subset of X : card Y = n } = (card X) choose n
by CARD_FIN:18; :: thesis: verum