Users' Mathboxes Mathbox for Mario Carneiro < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  derangval Structured version   Unicode version

Theorem derangval 24855
Description: Define the derangement function, which counts the number of bijections from a set to itself such that no element is mapped to itself. (Contributed by Mario Carneiro, 19-Jan-2015.)
Hypothesis
Ref Expression
derang.d  |-  D  =  ( x  e.  Fin  |->  ( # `  { f  |  ( f : x -1-1-onto-> x  /\  A. y  e.  x  ( f `  y )  =/=  y
) } ) )
Assertion
Ref Expression
derangval  |-  ( A  e.  Fin  ->  ( D `  A )  =  ( # `  {
f  |  ( f : A -1-1-onto-> A  /\  A. y  e.  A  ( f `  y )  =/=  y
) } ) )
Distinct variable group:    x, f, y, A
Allowed substitution hints:    D( x, y, f)

Proof of Theorem derangval
StepHypRef Expression
1 f1oeq2 5668 . . . . . 6  |-  ( x  =  A  ->  (
f : x -1-1-onto-> x  <->  f : A
-1-1-onto-> x ) )
2 f1oeq3 5669 . . . . . 6  |-  ( x  =  A  ->  (
f : A -1-1-onto-> x  <->  f : A
-1-1-onto-> A ) )
31, 2bitrd 246 . . . . 5  |-  ( x  =  A  ->  (
f : x -1-1-onto-> x  <->  f : A
-1-1-onto-> A ) )
4 raleq 2906 . . . . 5  |-  ( x  =  A  ->  ( A. y  e.  x  ( f `  y
)  =/=  y  <->  A. y  e.  A  ( f `  y )  =/=  y
) )
53, 4anbi12d 693 . . . 4  |-  ( x  =  A  ->  (
( f : x -1-1-onto-> x  /\  A. y  e.  x  ( f `  y )  =/=  y
)  <->  ( f : A -1-1-onto-> A  /\  A. y  e.  A  ( f `  y )  =/=  y
) ) )
65abbidv 2552 . . 3  |-  ( x  =  A  ->  { f  |  ( f : x -1-1-onto-> x  /\  A. y  e.  x  ( f `  y )  =/=  y
) }  =  {
f  |  ( f : A -1-1-onto-> A  /\  A. y  e.  A  ( f `  y )  =/=  y
) } )
76fveq2d 5734 . 2  |-  ( x  =  A  ->  ( # `
 { f  |  ( f : x -1-1-onto-> x  /\  A. y  e.  x  ( f `  y )  =/=  y
) } )  =  ( # `  {
f  |  ( f : A -1-1-onto-> A  /\  A. y  e.  A  ( f `  y )  =/=  y
) } ) )
8 derang.d . 2  |-  D  =  ( x  e.  Fin  |->  ( # `  { f  |  ( f : x -1-1-onto-> x  /\  A. y  e.  x  ( f `  y )  =/=  y
) } ) )
9 fvex 5744 . 2  |-  ( # `  { f  |  ( f : A -1-1-onto-> A  /\  A. y  e.  A  ( f `  y )  =/=  y ) } )  e.  _V
107, 8, 9fvmpt 5808 1  |-  ( A  e.  Fin  ->  ( D `  A )  =  ( # `  {
f  |  ( f : A -1-1-onto-> A  /\  A. y  e.  A  ( f `  y )  =/=  y
) } ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 360    = wceq 1653    e. wcel 1726   {cab 2424    =/= wne 2601   A.wral 2707    e. cmpt 4268   -1-1-onto->wf1o 5455   ` cfv 5456   Fincfn 7111   #chash 11620
This theorem is referenced by:  derang0  24857  derangsn  24858  derangenlem  24859  subfaclefac  24864  subfacp1lem3  24870  subfacp1lem5  24872  subfacp1lem6  24873
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1556  ax-5 1567  ax-17 1627  ax-9 1667  ax-8 1688  ax-14 1730  ax-6 1745  ax-7 1750  ax-11 1762  ax-12 1951  ax-ext 2419  ax-sep 4332  ax-nul 4340  ax-pr 4405
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-3an 939  df-tru 1329  df-ex 1552  df-nf 1555  df-sb 1660  df-eu 2287  df-mo 2288  df-clab 2425  df-cleq 2431  df-clel 2434  df-nfc 2563  df-ne 2603  df-ral 2712  df-rex 2713  df-rab 2716  df-v 2960  df-sbc 3164  df-dif 3325  df-un 3327  df-in 3329  df-ss 3336  df-nul 3631  df-if 3742  df-sn 3822  df-pr 3823  df-op 3825  df-uni 4018  df-br 4215  df-opab 4269  df-mpt 4270  df-id 4500  df-xp 4886  df-rel 4887  df-cnv 4888  df-co 4889  df-dm 4890  df-iota 5420  df-fun 5458  df-fn 5459  df-f 5460  df-f1 5461  df-fo 5462  df-f1o 5463  df-fv 5464
  Copyright terms: Public domain W3C validator