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

Theorem subfaclefac 31487
Description: The subfactorial is less than the factorial. (Contributed by Mario Carneiro, 19-Jan-2015.)
Hypotheses
Ref Expression
derang.d 𝐷 = (𝑥 ∈ Fin ↦ (♯‘{𝑓 ∣ (𝑓:𝑥1-1-onto𝑥 ∧ ∀𝑦𝑥 (𝑓𝑦) ≠ 𝑦)}))
subfac.n 𝑆 = (𝑛 ∈ ℕ0 ↦ (𝐷‘(1...𝑛)))
Assertion
Ref Expression
subfaclefac (𝑁 ∈ ℕ0 → (𝑆𝑁) ≤ (!‘𝑁))
Distinct variable groups:   𝑓,𝑛,𝑥,𝑦,𝑁   𝐷,𝑛   𝑆,𝑛,𝑥,𝑦
Allowed substitution hints:   𝐷(𝑥,𝑦,𝑓)   𝑆(𝑓)

Proof of Theorem subfaclefac
StepHypRef Expression
1 anidm 679 . . . . . 6 ((𝑓:(1...𝑁)–1-1-onto→(1...𝑁) ∧ 𝑓:(1...𝑁)–1-1-onto→(1...𝑁)) ↔ 𝑓:(1...𝑁)–1-1-onto→(1...𝑁))
21abbii 2878 . . . . 5 {𝑓 ∣ (𝑓:(1...𝑁)–1-1-onto→(1...𝑁) ∧ 𝑓:(1...𝑁)–1-1-onto→(1...𝑁))} = {𝑓𝑓:(1...𝑁)–1-1-onto→(1...𝑁)}
3 fzfid 12987 . . . . . 6 (𝑁 ∈ ℕ0 → (1...𝑁) ∈ Fin)
4 deranglem 31477 . . . . . 6 ((1...𝑁) ∈ Fin → {𝑓 ∣ (𝑓:(1...𝑁)–1-1-onto→(1...𝑁) ∧ 𝑓:(1...𝑁)–1-1-onto→(1...𝑁))} ∈ Fin)
53, 4syl 17 . . . . 5 (𝑁 ∈ ℕ0 → {𝑓 ∣ (𝑓:(1...𝑁)–1-1-onto→(1...𝑁) ∧ 𝑓:(1...𝑁)–1-1-onto→(1...𝑁))} ∈ Fin)
62, 5syl5eqelr 2845 . . . 4 (𝑁 ∈ ℕ0 → {𝑓𝑓:(1...𝑁)–1-1-onto→(1...𝑁)} ∈ Fin)
7 simpl 474 . . . . 5 ((𝑓:(1...𝑁)–1-1-onto→(1...𝑁) ∧ ∀𝑦 ∈ (1...𝑁)(𝑓𝑦) ≠ 𝑦) → 𝑓:(1...𝑁)–1-1-onto→(1...𝑁))
87ss2abi 3816 . . . 4 {𝑓 ∣ (𝑓:(1...𝑁)–1-1-onto→(1...𝑁) ∧ ∀𝑦 ∈ (1...𝑁)(𝑓𝑦) ≠ 𝑦)} ⊆ {𝑓𝑓:(1...𝑁)–1-1-onto→(1...𝑁)}
9 ssdomg 8170 . . . 4 ({𝑓𝑓:(1...𝑁)–1-1-onto→(1...𝑁)} ∈ Fin → ({𝑓 ∣ (𝑓:(1...𝑁)–1-1-onto→(1...𝑁) ∧ ∀𝑦 ∈ (1...𝑁)(𝑓𝑦) ≠ 𝑦)} ⊆ {𝑓𝑓:(1...𝑁)–1-1-onto→(1...𝑁)} → {𝑓 ∣ (𝑓:(1...𝑁)–1-1-onto→(1...𝑁) ∧ ∀𝑦 ∈ (1...𝑁)(𝑓𝑦) ≠ 𝑦)} ≼ {𝑓𝑓:(1...𝑁)–1-1-onto→(1...𝑁)}))
106, 8, 9mpisyl 21 . . 3 (𝑁 ∈ ℕ0 → {𝑓 ∣ (𝑓:(1...𝑁)–1-1-onto→(1...𝑁) ∧ ∀𝑦 ∈ (1...𝑁)(𝑓𝑦) ≠ 𝑦)} ≼ {𝑓𝑓:(1...𝑁)–1-1-onto→(1...𝑁)})
11 deranglem 31477 . . . . 5 ((1...𝑁) ∈ Fin → {𝑓 ∣ (𝑓:(1...𝑁)–1-1-onto→(1...𝑁) ∧ ∀𝑦 ∈ (1...𝑁)(𝑓𝑦) ≠ 𝑦)} ∈ Fin)
123, 11syl 17 . . . 4 (𝑁 ∈ ℕ0 → {𝑓 ∣ (𝑓:(1...𝑁)–1-1-onto→(1...𝑁) ∧ ∀𝑦 ∈ (1...𝑁)(𝑓𝑦) ≠ 𝑦)} ∈ Fin)
13 hashdom 13381 . . . 4 (({𝑓 ∣ (𝑓:(1...𝑁)–1-1-onto→(1...𝑁) ∧ ∀𝑦 ∈ (1...𝑁)(𝑓𝑦) ≠ 𝑦)} ∈ Fin ∧ {𝑓𝑓:(1...𝑁)–1-1-onto→(1...𝑁)} ∈ Fin) → ((♯‘{𝑓 ∣ (𝑓:(1...𝑁)–1-1-onto→(1...𝑁) ∧ ∀𝑦 ∈ (1...𝑁)(𝑓𝑦) ≠ 𝑦)}) ≤ (♯‘{𝑓𝑓:(1...𝑁)–1-1-onto→(1...𝑁)}) ↔ {𝑓 ∣ (𝑓:(1...𝑁)–1-1-onto→(1...𝑁) ∧ ∀𝑦 ∈ (1...𝑁)(𝑓𝑦) ≠ 𝑦)} ≼ {𝑓𝑓:(1...𝑁)–1-1-onto→(1...𝑁)}))
1412, 6, 13syl2anc 696 . . 3 (𝑁 ∈ ℕ0 → ((♯‘{𝑓 ∣ (𝑓:(1...𝑁)–1-1-onto→(1...𝑁) ∧ ∀𝑦 ∈ (1...𝑁)(𝑓𝑦) ≠ 𝑦)}) ≤ (♯‘{𝑓𝑓:(1...𝑁)–1-1-onto→(1...𝑁)}) ↔ {𝑓 ∣ (𝑓:(1...𝑁)–1-1-onto→(1...𝑁) ∧ ∀𝑦 ∈ (1...𝑁)(𝑓𝑦) ≠ 𝑦)} ≼ {𝑓𝑓:(1...𝑁)–1-1-onto→(1...𝑁)}))
1510, 14mpbird 247 . 2 (𝑁 ∈ ℕ0 → (♯‘{𝑓 ∣ (𝑓:(1...𝑁)–1-1-onto→(1...𝑁) ∧ ∀𝑦 ∈ (1...𝑁)(𝑓𝑦) ≠ 𝑦)}) ≤ (♯‘{𝑓𝑓:(1...𝑁)–1-1-onto→(1...𝑁)}))
16 derang.d . . . 4 𝐷 = (𝑥 ∈ Fin ↦ (♯‘{𝑓 ∣ (𝑓:𝑥1-1-onto𝑥 ∧ ∀𝑦𝑥 (𝑓𝑦) ≠ 𝑦)}))
17 subfac.n . . . 4 𝑆 = (𝑛 ∈ ℕ0 ↦ (𝐷‘(1...𝑛)))
1816, 17subfacval 31484 . . 3 (𝑁 ∈ ℕ0 → (𝑆𝑁) = (𝐷‘(1...𝑁)))
1916derangval 31478 . . . 4 ((1...𝑁) ∈ Fin → (𝐷‘(1...𝑁)) = (♯‘{𝑓 ∣ (𝑓:(1...𝑁)–1-1-onto→(1...𝑁) ∧ ∀𝑦 ∈ (1...𝑁)(𝑓𝑦) ≠ 𝑦)}))
203, 19syl 17 . . 3 (𝑁 ∈ ℕ0 → (𝐷‘(1...𝑁)) = (♯‘{𝑓 ∣ (𝑓:(1...𝑁)–1-1-onto→(1...𝑁) ∧ ∀𝑦 ∈ (1...𝑁)(𝑓𝑦) ≠ 𝑦)}))
2118, 20eqtrd 2795 . 2 (𝑁 ∈ ℕ0 → (𝑆𝑁) = (♯‘{𝑓 ∣ (𝑓:(1...𝑁)–1-1-onto→(1...𝑁) ∧ ∀𝑦 ∈ (1...𝑁)(𝑓𝑦) ≠ 𝑦)}))
22 hashfac 13455 . . . 4 ((1...𝑁) ∈ Fin → (♯‘{𝑓𝑓:(1...𝑁)–1-1-onto→(1...𝑁)}) = (!‘(♯‘(1...𝑁))))
233, 22syl 17 . . 3 (𝑁 ∈ ℕ0 → (♯‘{𝑓𝑓:(1...𝑁)–1-1-onto→(1...𝑁)}) = (!‘(♯‘(1...𝑁))))
24 hashfz1 13349 . . . 4 (𝑁 ∈ ℕ0 → (♯‘(1...𝑁)) = 𝑁)
2524fveq2d 6358 . . 3 (𝑁 ∈ ℕ0 → (!‘(♯‘(1...𝑁))) = (!‘𝑁))
2623, 25eqtr2d 2796 . 2 (𝑁 ∈ ℕ0 → (!‘𝑁) = (♯‘{𝑓𝑓:(1...𝑁)–1-1-onto→(1...𝑁)}))
2715, 21, 263brtr4d 4837 1 (𝑁 ∈ ℕ0 → (𝑆𝑁) ≤ (!‘𝑁))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wa 383   = wceq 1632  wcel 2140  {cab 2747  wne 2933  wral 3051  wss 3716   class class class wbr 4805  cmpt 4882  1-1-ontowf1o 6049  cfv 6050  (class class class)co 6815  cdom 8122  Fincfn 8124  1c1 10150  cle 10288  0cn0 11505  ...cfz 12540  !cfa 13275  chash 13332
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1871  ax-4 1886  ax-5 1989  ax-6 2055  ax-7 2091  ax-8 2142  ax-9 2149  ax-10 2169  ax-11 2184  ax-12 2197  ax-13 2392  ax-ext 2741  ax-rep 4924  ax-sep 4934  ax-nul 4942  ax-pow 4993  ax-pr 5056  ax-un 7116  ax-cnex 10205  ax-resscn 10206  ax-1cn 10207  ax-icn 10208  ax-addcl 10209  ax-addrcl 10210  ax-mulcl 10211  ax-mulrcl 10212  ax-mulcom 10213  ax-addass 10214  ax-mulass 10215  ax-distr 10216  ax-i2m1 10217  ax-1ne0 10218  ax-1rid 10219  ax-rnegex 10220  ax-rrecex 10221  ax-cnre 10222  ax-pre-lttri 10223  ax-pre-lttrn 10224  ax-pre-ltadd 10225  ax-pre-mulgt0 10226
This theorem depends on definitions:  df-bi 197  df-or 384  df-an 385  df-3or 1073  df-3an 1074  df-tru 1635  df-ex 1854  df-nf 1859  df-sb 2048  df-eu 2612  df-mo 2613  df-clab 2748  df-cleq 2754  df-clel 2757  df-nfc 2892  df-ne 2934  df-nel 3037  df-ral 3056  df-rex 3057  df-reu 3058  df-rmo 3059  df-rab 3060  df-v 3343  df-sbc 3578  df-csb 3676  df-dif 3719  df-un 3721  df-in 3723  df-ss 3730  df-pss 3732  df-nul 4060  df-if 4232  df-pw 4305  df-sn 4323  df-pr 4325  df-tp 4327  df-op 4329  df-uni 4590  df-int 4629  df-iun 4675  df-br 4806  df-opab 4866  df-mpt 4883  df-tr 4906  df-id 5175  df-eprel 5180  df-po 5188  df-so 5189  df-fr 5226  df-we 5228  df-xp 5273  df-rel 5274  df-cnv 5275  df-co 5276  df-dm 5277  df-rn 5278  df-res 5279  df-ima 5280  df-pred 5842  df-ord 5888  df-on 5889  df-lim 5890  df-suc 5891  df-iota 6013  df-fun 6052  df-fn 6053  df-f 6054  df-f1 6055  df-fo 6056  df-f1o 6057  df-fv 6058  df-riota 6776  df-ov 6818  df-oprab 6819  df-mpt2 6820  df-om 7233  df-1st 7335  df-2nd 7336  df-wrecs 7578  df-recs 7639  df-rdg 7677  df-1o 7731  df-2o 7732  df-oadd 7735  df-er 7914  df-map 8028  df-pm 8029  df-en 8125  df-dom 8126  df-sdom 8127  df-fin 8128  df-card 8976  df-cda 9203  df-pnf 10289  df-mnf 10290  df-xr 10291  df-ltxr 10292  df-le 10293  df-sub 10481  df-neg 10482  df-div 10898  df-nn 11234  df-n0 11506  df-xnn0 11577  df-z 11591  df-uz 11901  df-fz 12541  df-seq 13017  df-fac 13276  df-bc 13305  df-hash 13333
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator