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

Theorem derangval 23713
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 5480 . . . . . 6  |-  ( x  =  A  ->  (
f : x -1-1-onto-> x  <->  f : A
-1-1-onto-> x ) )
2 f1oeq3 5481 . . . . . 6  |-  ( x  =  A  ->  (
f : A -1-1-onto-> x  <->  f : A
-1-1-onto-> A ) )
31, 2bitrd 244 . . . . 5  |-  ( x  =  A  ->  (
f : x -1-1-onto-> x  <->  f : A
-1-1-onto-> A ) )
4 raleq 2749 . . . . 5  |-  ( x  =  A  ->  ( A. y  e.  x  ( f `  y
)  =/=  y  <->  A. y  e.  A  ( f `  y )  =/=  y
) )
53, 4anbi12d 691 . . . 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 2410 . . 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 5545 . 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 5555 . 2  |-  ( # `  { f  |  ( f : A -1-1-onto-> A  /\  A. y  e.  A  ( f `  y )  =/=  y ) } )  e.  _V
107, 8, 9fvmpt 5618 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 358    = wceq 1632    e. wcel 1696   {cab 2282    =/= wne 2459   A.wral 2556    e. cmpt 4093   -1-1-onto->wf1o 5270   ` cfv 5271   Fincfn 6879   #chash 11353
This theorem is referenced by:  derang0  23715  derangsn  23716  derangenlem  23717  subfaclefac  23722  subfacp1lem3  23728  subfacp1lem5  23730  subfacp1lem6  23731
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1536  ax-5 1547  ax-17 1606  ax-9 1644  ax-8 1661  ax-14 1700  ax-6 1715  ax-7 1720  ax-11 1727  ax-12 1878  ax-ext 2277  ax-sep 4157  ax-nul 4165  ax-pr 4230
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3an 936  df-tru 1310  df-ex 1532  df-nf 1535  df-sb 1639  df-eu 2160  df-mo 2161  df-clab 2283  df-cleq 2289  df-clel 2292  df-nfc 2421  df-ne 2461  df-ral 2561  df-rex 2562  df-rab 2565  df-v 2803  df-sbc 3005  df-dif 3168  df-un 3170  df-in 3172  df-ss 3179  df-nul 3469  df-if 3579  df-sn 3659  df-pr 3660  df-op 3662  df-uni 3844  df-br 4040  df-opab 4094  df-mpt 4095  df-id 4325  df-xp 4711  df-rel 4712  df-cnv 4713  df-co 4714  df-dm 4715  df-iota 5235  df-fun 5273  df-fn 5274  df-f 5275  df-f1 5276  df-fo 5277  df-f1o 5278  df-fv 5279
  Copyright terms: Public domain W3C validator