let m be Element of NAT ; :: thesis: for X being finite set st card X = m holds
ex fp being FinSequence st
( len fp = m & ( for a being Element of NAT st a in dom fp holds
fp . a in X ) & fp is one-to-one )

defpred S1[ Nat] means for X being finite set st card X = $1 holds
ex fp being FinSequence st
( len fp = $1 & ( for a being Element of NAT st a in dom fp holds
fp . a in X ) & fp is one-to-one );
let X be finite set ; :: thesis: ( card X = m implies ex fp being FinSequence st
( len fp = m & ( for a being Element of NAT st a in dom fp holds
fp . a in X ) & fp is one-to-one ) )

A1: for m being Element of NAT st S1[m] holds
S1[m + 1]
proof
let m be Element of NAT ; :: thesis: ( S1[m] implies S1[m + 1] )
assume A2: S1[m] ; :: thesis: S1[m + 1]
let X be finite set ; :: thesis: ( card X = m + 1 implies ex fp being FinSequence st
( len fp = m + 1 & ( for a being Element of NAT st a in dom fp holds
fp . a in X ) & fp is one-to-one ) )

assume A3: card X = m + 1 ; :: thesis: ex fp being FinSequence st
( len fp = m + 1 & ( for a being Element of NAT st a in dom fp holds
fp . a in X ) & fp is one-to-one )

then consider x being set such that
A4: x in X by CARD_1:47, XBOOLE_0:def 1;
set Y = X \ {x};
card (X \ {x}) = (card X) - (card {x}) by A4, EULER_1:5
.= (m + 1) - 1 by A3, CARD_1:50
.= m ;
then consider fp1 being FinSequence such that
A5: len fp1 = m and
A6: for a being Element of NAT st a in dom fp1 holds
fp1 . a in X \ {x} and
A7: fp1 is one-to-one by A2;
set fp = fp1 ^ <*x*>;
A8: len (fp1 ^ <*x*>) = m + 1 by A5, FINSEQ_2:19;
for a, b being set st a in dom (fp1 ^ <*x*>) & b in dom (fp1 ^ <*x*>) & a <> b holds
(fp1 ^ <*x*>) . a <> (fp1 ^ <*x*>) . b
proof
let a, b be set ; :: thesis: ( a in dom (fp1 ^ <*x*>) & b in dom (fp1 ^ <*x*>) & a <> b implies (fp1 ^ <*x*>) . a <> (fp1 ^ <*x*>) . b )
assume that
A9: a in dom (fp1 ^ <*x*>) and
A10: b in dom (fp1 ^ <*x*>) and
A11: a <> b ; :: thesis: (fp1 ^ <*x*>) . a <> (fp1 ^ <*x*>) . b
A12: a in Seg (m + 1) by A8, A9, FINSEQ_1:def 3;
A13: b in Seg (m + 1) by A8, A10, FINSEQ_1:def 3;
reconsider a = a, b = b as Element of NAT by A9, A10;
per cases ( a in Seg m or a = m + 1 ) by A12, FINSEQ_2:8;
end;
end;
then A21: for a, b being set st a in dom (fp1 ^ <*x*>) & b in dom (fp1 ^ <*x*>) & (fp1 ^ <*x*>) . a = (fp1 ^ <*x*>) . b holds
a = b ;
take fp1 ^ <*x*> ; :: thesis: ( len (fp1 ^ <*x*>) = m + 1 & ( for a being Element of NAT st a in dom (fp1 ^ <*x*>) holds
(fp1 ^ <*x*>) . a in X ) & fp1 ^ <*x*> is one-to-one )

for a being Element of NAT st a in dom (fp1 ^ <*x*>) holds
(fp1 ^ <*x*>) . a in X
proof
let a be Element of NAT ; :: thesis: ( a in dom (fp1 ^ <*x*>) implies (fp1 ^ <*x*>) . a in X )
assume a in dom (fp1 ^ <*x*>) ; :: thesis: (fp1 ^ <*x*>) . a in X
then A22: a in Seg (m + 1) by A8, FINSEQ_1:def 3;
per cases ( a in Seg m or a = m + 1 ) by A22, FINSEQ_2:8;
suppose a = m + 1 ; :: thesis: (fp1 ^ <*x*>) . a in X
hence (fp1 ^ <*x*>) . a in X by A4, A5, FINSEQ_1:59; :: thesis: verum
end;
end;
end;
hence ( len (fp1 ^ <*x*>) = m + 1 & ( for a being Element of NAT st a in dom (fp1 ^ <*x*>) holds
(fp1 ^ <*x*>) . a in X ) & fp1 ^ <*x*> is one-to-one ) by A5, A21, FINSEQ_2:19, FUNCT_1:def 8; :: thesis: verum
end;
A24: S1[ 0 ]
proof
set fp = <*> NAT ;
let X be finite set ; :: thesis: ( card X = 0 implies ex fp being FinSequence st
( len fp = 0 & ( for a being Element of NAT st a in dom fp holds
fp . a in X ) & fp is one-to-one ) )

assume card X = 0 ; :: thesis: ex fp being FinSequence st
( len fp = 0 & ( for a being Element of NAT st a in dom fp holds
fp . a in X ) & fp is one-to-one )

take <*> NAT ; :: thesis: ( len (<*> NAT ) = 0 & ( for a being Element of NAT st a in dom (<*> NAT ) holds
(<*> NAT ) . a in X ) & <*> NAT is one-to-one )

thus len (<*> NAT ) = 0 ; :: thesis: ( ( for a being Element of NAT st a in dom (<*> NAT ) holds
(<*> NAT ) . a in X ) & <*> NAT is one-to-one )

thus ( ( for a being Element of NAT st a in dom (<*> NAT ) holds
(<*> NAT ) . a in X ) & <*> NAT is one-to-one ) ; :: thesis: verum
end;
for m being Element of NAT holds S1[m] from NAT_1:sch 1(A24, A1);
hence ( card X = m implies ex fp being FinSequence st
( len fp = m & ( for a being Element of NAT st a in dom fp holds
fp . a in X ) & fp is one-to-one ) ) ; :: thesis: verum