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

Theorem subfaclefac 28817
Description: The subfactorial is less than the factorial. (Contributed by Mario Carneiro, 19-Jan-2015.)
Hypotheses
Ref Expression
derang.d  |-  D  =  ( x  e.  Fin  |->  ( # `  { f  |  ( f : x -1-1-onto-> x  /\  A. y  e.  x  ( f `  y )  =/=  y
) } ) )
subfac.n  |-  S  =  ( n  e.  NN0  |->  ( D `  ( 1 ... n ) ) )
Assertion
Ref Expression
subfaclefac  |-  ( N  e.  NN0  ->  ( S `
 N )  <_ 
( ! `  N
) )
Distinct variable groups:    f, n, x, y, N    D, n    S, n, x, y
Allowed substitution hints:    D( x, y, f)    S( f)

Proof of Theorem subfaclefac
StepHypRef Expression
1 anidm 644 . . . . . 6  |-  ( ( f : ( 1 ... N ) -1-1-onto-> ( 1 ... N )  /\  f : ( 1 ... N ) -1-1-onto-> ( 1 ... N
) )  <->  f :
( 1 ... N
)
-1-1-onto-> ( 1 ... N
) )
21abbii 2591 . . . . 5  |-  { f  |  ( f : ( 1 ... N
)
-1-1-onto-> ( 1 ... N
)  /\  f :
( 1 ... N
)
-1-1-onto-> ( 1 ... N
) ) }  =  { f  |  f : ( 1 ... N ) -1-1-onto-> ( 1 ... N
) }
3 fzfid 12086 . . . . . 6  |-  ( N  e.  NN0  ->  ( 1 ... N )  e. 
Fin )
4 deranglem 28807 . . . . . 6  |-  ( ( 1 ... N )  e.  Fin  ->  { f  |  ( f : ( 1 ... N
)
-1-1-onto-> ( 1 ... N
)  /\  f :
( 1 ... N
)
-1-1-onto-> ( 1 ... N
) ) }  e.  Fin )
53, 4syl 16 . . . . 5  |-  ( N  e.  NN0  ->  { f  |  ( f : ( 1 ... N
)
-1-1-onto-> ( 1 ... N
)  /\  f :
( 1 ... N
)
-1-1-onto-> ( 1 ... N
) ) }  e.  Fin )
62, 5syl5eqelr 2550 . . . 4  |-  ( N  e.  NN0  ->  { f  |  f : ( 1 ... N ) -1-1-onto-> ( 1 ... N ) }  e.  Fin )
7 simpl 457 . . . . 5  |-  ( ( f : ( 1 ... N ) -1-1-onto-> ( 1 ... N )  /\  A. y  e.  ( 1 ... N ) ( f `  y )  =/=  y )  -> 
f : ( 1 ... N ) -1-1-onto-> ( 1 ... N ) )
87ss2abi 3568 . . . 4  |-  { f  |  ( f : ( 1 ... N
)
-1-1-onto-> ( 1 ... N
)  /\  A. y  e.  ( 1 ... N
) ( f `  y )  =/=  y
) }  C_  { f  |  f : ( 1 ... N ) -1-1-onto-> ( 1 ... N ) }
9 ssdomg 7580 . . . 4  |-  ( { f  |  f : ( 1 ... N
)
-1-1-onto-> ( 1 ... N
) }  e.  Fin  ->  ( { f  |  ( f : ( 1 ... N ) -1-1-onto-> ( 1 ... N )  /\  A. y  e.  ( 1 ... N
) ( f `  y )  =/=  y
) }  C_  { f  |  f : ( 1 ... N ) -1-1-onto-> ( 1 ... N ) }  ->  { f  |  ( f : ( 1 ... N
)
-1-1-onto-> ( 1 ... N
)  /\  A. y  e.  ( 1 ... N
) ( f `  y )  =/=  y
) }  ~<_  { f  |  f : ( 1 ... N ) -1-1-onto-> ( 1 ... N ) } ) )
106, 8, 9mpisyl 18 . . 3  |-  ( N  e.  NN0  ->  { f  |  ( f : ( 1 ... N
)
-1-1-onto-> ( 1 ... N
)  /\  A. y  e.  ( 1 ... N
) ( f `  y )  =/=  y
) }  ~<_  { f  |  f : ( 1 ... N ) -1-1-onto-> ( 1 ... N ) } )
11 deranglem 28807 . . . . 5  |-  ( ( 1 ... N )  e.  Fin  ->  { f  |  ( f : ( 1 ... N
)
-1-1-onto-> ( 1 ... N
)  /\  A. y  e.  ( 1 ... N
) ( f `  y )  =/=  y
) }  e.  Fin )
123, 11syl 16 . . . 4  |-  ( N  e.  NN0  ->  { f  |  ( f : ( 1 ... N
)
-1-1-onto-> ( 1 ... N
)  /\  A. y  e.  ( 1 ... N
) ( f `  y )  =/=  y
) }  e.  Fin )
13 hashdom 12450 . . . 4  |-  ( ( { f  |  ( f : ( 1 ... N ) -1-1-onto-> ( 1 ... N )  /\  A. y  e.  ( 1 ... N ) ( f `  y )  =/=  y ) }  e.  Fin  /\  {
f  |  f : ( 1 ... N
)
-1-1-onto-> ( 1 ... N
) }  e.  Fin )  ->  ( ( # `  { f  |  ( f : ( 1 ... N ) -1-1-onto-> ( 1 ... N )  /\  A. y  e.  ( 1 ... N ) ( f `  y )  =/=  y ) } )  <_  ( # `  {
f  |  f : ( 1 ... N
)
-1-1-onto-> ( 1 ... N
) } )  <->  { f  |  ( f : ( 1 ... N
)
-1-1-onto-> ( 1 ... N
)  /\  A. y  e.  ( 1 ... N
) ( f `  y )  =/=  y
) }  ~<_  { f  |  f : ( 1 ... N ) -1-1-onto-> ( 1 ... N ) } ) )
1412, 6, 13syl2anc 661 . . 3  |-  ( N  e.  NN0  ->  ( (
# `  { f  |  ( f : ( 1 ... N
)
-1-1-onto-> ( 1 ... N
)  /\  A. y  e.  ( 1 ... N
) ( f `  y )  =/=  y
) } )  <_ 
( # `  { f  |  f : ( 1 ... N ) -1-1-onto-> ( 1 ... N ) } )  <->  { f  |  ( f : ( 1 ... N
)
-1-1-onto-> ( 1 ... N
)  /\  A. y  e.  ( 1 ... N
) ( f `  y )  =/=  y
) }  ~<_  { f  |  f : ( 1 ... N ) -1-1-onto-> ( 1 ... N ) } ) )
1510, 14mpbird 232 . 2  |-  ( N  e.  NN0  ->  ( # `  { f  |  ( f : ( 1 ... N ) -1-1-onto-> ( 1 ... N )  /\  A. y  e.  ( 1 ... N ) ( f `  y )  =/=  y ) } )  <_  ( # `  {
f  |  f : ( 1 ... N
)
-1-1-onto-> ( 1 ... N
) } ) )
16 derang.d . . . 4  |-  D  =  ( x  e.  Fin  |->  ( # `  { f  |  ( f : x -1-1-onto-> x  /\  A. y  e.  x  ( f `  y )  =/=  y
) } ) )
17 subfac.n . . . 4  |-  S  =  ( n  e.  NN0  |->  ( D `  ( 1 ... n ) ) )
1816, 17subfacval 28814 . . 3  |-  ( N  e.  NN0  ->  ( S `
 N )  =  ( D `  (
1 ... N ) ) )
1916derangval 28808 . . . 4  |-  ( ( 1 ... N )  e.  Fin  ->  ( D `  ( 1 ... N ) )  =  ( # `  {
f  |  ( f : ( 1 ... N ) -1-1-onto-> ( 1 ... N
)  /\  A. y  e.  ( 1 ... N
) ( f `  y )  =/=  y
) } ) )
203, 19syl 16 . . 3  |-  ( N  e.  NN0  ->  ( D `
 ( 1 ... N ) )  =  ( # `  {
f  |  ( f : ( 1 ... N ) -1-1-onto-> ( 1 ... N
)  /\  A. y  e.  ( 1 ... N
) ( f `  y )  =/=  y
) } ) )
2118, 20eqtrd 2498 . 2  |-  ( N  e.  NN0  ->  ( S `
 N )  =  ( # `  {
f  |  ( f : ( 1 ... N ) -1-1-onto-> ( 1 ... N
)  /\  A. y  e.  ( 1 ... N
) ( f `  y )  =/=  y
) } ) )
22 hashfac 12511 . . . 4  |-  ( ( 1 ... N )  e.  Fin  ->  ( # `
 { f  |  f : ( 1 ... N ) -1-1-onto-> ( 1 ... N ) } )  =  ( ! `
 ( # `  (
1 ... N ) ) ) )
233, 22syl 16 . . 3  |-  ( N  e.  NN0  ->  ( # `  { f  |  f : ( 1 ... N ) -1-1-onto-> ( 1 ... N
) } )  =  ( ! `  ( # `
 ( 1 ... N ) ) ) )
24 hashfz1 12422 . . . 4  |-  ( N  e.  NN0  ->  ( # `  ( 1 ... N
) )  =  N )
2524fveq2d 5876 . . 3  |-  ( N  e.  NN0  ->  ( ! `
 ( # `  (
1 ... N ) ) )  =  ( ! `
 N ) )
2623, 25eqtr2d 2499 . 2  |-  ( N  e.  NN0  ->  ( ! `
 N )  =  ( # `  {
f  |  f : ( 1 ... N
)
-1-1-onto-> ( 1 ... N
) } ) )
2715, 21, 263brtr4d 4486 1  |-  ( N  e.  NN0  ->  ( S `
 N )  <_ 
( ! `  N
) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    = wceq 1395    e. wcel 1819   {cab 2442    =/= wne 2652   A.wral 2807    C_ wss 3471   class class class wbr 4456    |-> cmpt 4515   -1-1-onto->wf1o 5593   ` cfv 5594  (class class class)co 6296    ~<_ cdom 7533   Fincfn 7535   1c1 9510    <_ cle 9646   NN0cn0 10816   ...cfz 11697   !cfa 12356   #chash 12408
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1619  ax-4 1632  ax-5 1705  ax-6 1748  ax-7 1791  ax-8 1821  ax-9 1823  ax-10 1838  ax-11 1843  ax-12 1855  ax-13 2000  ax-ext 2435  ax-rep 4568  ax-sep 4578  ax-nul 4586  ax-pow 4634  ax-pr 4695  ax-un 6591  ax-cnex 9565  ax-resscn 9566  ax-1cn 9567  ax-icn 9568  ax-addcl 9569  ax-addrcl 9570  ax-mulcl 9571  ax-mulrcl 9572  ax-mulcom 9573  ax-addass 9574  ax-mulass 9575  ax-distr 9576  ax-i2m1 9577  ax-1ne0 9578  ax-1rid 9579  ax-rnegex 9580  ax-rrecex 9581  ax-cnre 9582  ax-pre-lttri 9583  ax-pre-lttrn 9584  ax-pre-ltadd 9585  ax-pre-mulgt0 9586
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-tru 1398  df-ex 1614  df-nf 1618  df-sb 1741  df-eu 2287  df-mo 2288  df-clab 2443  df-cleq 2449  df-clel 2452  df-nfc 2607  df-ne 2654  df-nel 2655  df-ral 2812  df-rex 2813  df-reu 2814  df-rmo 2815  df-rab 2816  df-v 3111  df-sbc 3328  df-csb 3431  df-dif 3474  df-un 3476  df-in 3478  df-ss 3485  df-pss 3487  df-nul 3794  df-if 3945  df-pw 4017  df-sn 4033  df-pr 4035  df-tp 4037  df-op 4039  df-uni 4252  df-int 4289  df-iun 4334  df-br 4457  df-opab 4516  df-mpt 4517  df-tr 4551  df-eprel 4800  df-id 4804  df-po 4809  df-so 4810  df-fr 4847  df-we 4849  df-ord 4890  df-on 4891  df-lim 4892  df-suc 4893  df-xp 5014  df-rel 5015  df-cnv 5016  df-co 5017  df-dm 5018  df-rn 5019  df-res 5020  df-ima 5021  df-iota 5557  df-fun 5596  df-fn 5597  df-f 5598  df-f1 5599  df-fo 5600  df-f1o 5601  df-fv 5602  df-riota 6258  df-ov 6299  df-oprab 6300  df-mpt2 6301  df-om 6700  df-1st 6799  df-2nd 6800  df-recs 7060  df-rdg 7094  df-1o 7148  df-2o 7149  df-oadd 7152  df-er 7329  df-map 7440  df-pm 7441  df-en 7536  df-dom 7537  df-sdom 7538  df-fin 7539  df-card 8337  df-cda 8565  df-pnf 9647  df-mnf 9648  df-xr 9649  df-ltxr 9650  df-le 9651  df-sub 9826  df-neg 9827  df-div 10228  df-nn 10557  df-n0 10817  df-z 10886  df-uz 11107  df-fz 11698  df-seq 12111  df-fac 12357  df-bc 12384  df-hash 12409
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator