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 Element of 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 Element of NAT st n in dom F holds
F . n = (((- 1) |^ n) * ((card Y) choose n)) * (((card Y) - n) |^ (card X)) ) )
set Onto = { f where f is Function of X,Y : f is onto } ;
consider F being XFinSequence of such that
A2:
dom F = card Y
and
A3:
((card Y) |^ (card X)) - (Sum F) = card { f where f is Function of X,Y : f is onto }
and
A4:
for n being Element of NAT st n in dom F holds
F . n = (((- 1) |^ n) * ((card Y) choose (n + 1))) * ((((card Y) - n) - 1) |^ (card X))
by A1, Lm4;
defpred S1[ set , set ] means for n being Element of NAT st n = $1 holds
$2 = (- 1) * (F . n);
A5:
for k being Element of NAT st k in card Y holds
ex x being Element of INT st S1[k,x]
consider F1 being XFinSequence of such that
A6:
dom F1 = card Y
and
A7:
for k being Element of NAT st k in card Y holds
S1[k,F1 . k]
from STIRL2_1:sch 6(A5);
reconsider c = (card Y) |^ (card X) as Element of INT by INT_1:def 2;
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 Element of NAT st n in dom GF1 holds
GF1 . n = (((- 1) |^ n) * ((card Y) choose n)) * (((card Y) - n) |^ (card X)) ) )
( len F1 = card Y & len <%c%> = 1 )
by A6, AFINSQ_1:36;
hence A8:
dom GF1 = (card Y) + 1
by AFINSQ_1:def 4; :: thesis: ( Sum GF1 = card { f where f is Function of X,Y : f is onto } & ( for n being Element of NAT st n in dom GF1 holds
GF1 . n = (((- 1) |^ n) * ((card Y) choose n)) * (((card Y) - n) |^ (card X)) ) )
for n being Element of NAT st n in dom F holds
(- 1) * (F . n) = F1 . n
by A2, A7;
then
( (- 1) * (Sum F) = Sum F1 & (- 1) * (Sum F) = - (Sum F) )
by A2, A6, Th64;
then c - (Sum F) =
c + (Sum F1)
.=
addint . c,(Sum F1)
by GR_CY_1:14
.=
addint . (addint "**" <%c%>),(addint "**" F1)
by STIRL2_1:44
.=
Sum GF1
by STIRL2_1:47
;
hence
Sum GF1 = card { f where f is Function of X,Y : f is onto }
by A3; :: thesis: for n being Element of NAT st n in dom GF1 holds
GF1 . n = (((- 1) |^ n) * ((card Y) choose n)) * (((card Y) - n) |^ (card X))
let n be Element of NAT ; :: thesis: ( n in dom GF1 implies GF1 . n = (((- 1) |^ n) * ((card Y) choose n)) * (((card Y) - n) |^ (card X)) )
assume A9:
n in dom GF1
; :: thesis: GF1 . n = (((- 1) |^ n) * ((card Y) choose n)) * (((card Y) - n) |^ (card X))
hence
GF1 . n = (((- 1) |^ n) * ((card Y) choose n)) * (((card Y) - n) |^ (card X))
; :: thesis: verum