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

Theorem subfaclefac 27016
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 2550 . . . . 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 11787 . . . . . 6  |-  ( N  e.  NN0  ->  ( 1 ... N )  e. 
Fin )
4 deranglem 27006 . . . . . 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 2523 . . . 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 3419 . . . 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 7347 . . . 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 27006 . . . . 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 12134 . . . 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 27013 . . 3  |-  ( N  e.  NN0  ->  ( S `
 N )  =  ( D `  (
1 ... N ) ) )
1916derangval 27007 . . . 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 2470 . 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 12203 . . . 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 12109 . . . 4  |-  ( N  e.  NN0  ->  ( # `  ( 1 ... N
) )  =  N )
2524fveq2d 5690 . . 3  |-  ( N  e.  NN0  ->  ( ! `
 ( # `  (
1 ... N ) ) )  =  ( ! `
 N ) )
2623, 25eqtr2d 2471 . 2  |-  ( N  e.  NN0  ->  ( ! `
 N )  =  ( # `  {
f  |  f : ( 1 ... N
)
-1-1-onto-> ( 1 ... N
) } ) )
2715, 21, 263brtr4d 4317 1  |-  ( N  e.  NN0  ->  ( S `
 N )  <_ 
( ! `  N
) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    = wceq 1369    e. wcel 1756   {cab 2424    =/= wne 2601   A.wral 2710    C_ wss 3323   class class class wbr 4287    e. cmpt 4345   -1-1-onto->wf1o 5412   ` cfv 5413  (class class class)co 6086    ~<_ cdom 7300   Fincfn 7302   1c1 9275    <_ cle 9411   NN0cn0 10571   ...cfz 11429   !cfa 12043   #chash 12095
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-8 1758  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2419  ax-rep 4398  ax-sep 4408  ax-nul 4416  ax-pow 4465  ax-pr 4526  ax-un 6367  ax-cnex 9330  ax-resscn 9331  ax-1cn 9332  ax-icn 9333  ax-addcl 9334  ax-addrcl 9335  ax-mulcl 9336  ax-mulrcl 9337  ax-mulcom 9338  ax-addass 9339  ax-mulass 9340  ax-distr 9341  ax-i2m1 9342  ax-1ne0 9343  ax-1rid 9344  ax-rnegex 9345  ax-rrecex 9346  ax-cnre 9347  ax-pre-lttri 9348  ax-pre-lttrn 9349  ax-pre-ltadd 9350  ax-pre-mulgt0 9351
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1372  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2256  df-mo 2257  df-clab 2425  df-cleq 2431  df-clel 2434  df-nfc 2563  df-ne 2603  df-nel 2604  df-ral 2715  df-rex 2716  df-reu 2717  df-rmo 2718  df-rab 2719  df-v 2969  df-sbc 3182  df-csb 3284  df-dif 3326  df-un 3328  df-in 3330  df-ss 3337  df-pss 3339  df-nul 3633  df-if 3787  df-pw 3857  df-sn 3873  df-pr 3875  df-tp 3877  df-op 3879  df-uni 4087  df-int 4124  df-iun 4168  df-br 4288  df-opab 4346  df-mpt 4347  df-tr 4381  df-eprel 4627  df-id 4631  df-po 4636  df-so 4637  df-fr 4674  df-we 4676  df-ord 4717  df-on 4718  df-lim 4719  df-suc 4720  df-xp 4841  df-rel 4842  df-cnv 4843  df-co 4844  df-dm 4845  df-rn 4846  df-res 4847  df-ima 4848  df-iota 5376  df-fun 5415  df-fn 5416  df-f 5417  df-f1 5418  df-fo 5419  df-f1o 5420  df-fv 5421  df-riota 6047  df-ov 6089  df-oprab 6090  df-mpt2 6091  df-om 6472  df-1st 6572  df-2nd 6573  df-recs 6824  df-rdg 6858  df-1o 6912  df-2o 6913  df-oadd 6916  df-er 7093  df-map 7208  df-pm 7209  df-en 7303  df-dom 7304  df-sdom 7305  df-fin 7306  df-card 8101  df-cda 8329  df-pnf 9412  df-mnf 9413  df-xr 9414  df-ltxr 9415  df-le 9416  df-sub 9589  df-neg 9590  df-div 9986  df-nn 10315  df-n0 10572  df-z 10639  df-uz 10854  df-fz 11430  df-seq 11799  df-fac 12044  df-bc 12071  df-hash 12096
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator