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

Theorem snmlff 30410
Description: The function 𝐹 from snmlval 30412 is a mapping from positive integers to real numbers in the range [0, 1]. (Contributed by Mario Carneiro, 6-Apr-2015.)
Hypothesis
Ref Expression
snmlff.f 𝐹 = (𝑛 ∈ ℕ ↦ ((#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) / 𝑛))
Assertion
Ref Expression
snmlff 𝐹:ℕ⟶(0[,]1)
Distinct variable groups:   𝐴,𝑛   𝐵,𝑛   𝑘,𝑛   𝑅,𝑛
Allowed substitution hints:   𝐴(𝑘)   𝐵(𝑘)   𝑅(𝑘)   𝐹(𝑘,𝑛)

Proof of Theorem snmlff
StepHypRef Expression
1 snmlff.f . 2 𝐹 = (𝑛 ∈ ℕ ↦ ((#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) / 𝑛))
2 fzfid 12502 . . . . . . 7 (𝑛 ∈ ℕ → (1...𝑛) ∈ Fin)
3 ssrab2 3554 . . . . . . 7 {𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵} ⊆ (1...𝑛)
4 ssfi 7941 . . . . . . 7 (((1...𝑛) ∈ Fin ∧ {𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵} ⊆ (1...𝑛)) → {𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵} ∈ Fin)
52, 3, 4sylancl 692 . . . . . 6 (𝑛 ∈ ℕ → {𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵} ∈ Fin)
6 hashcl 12874 . . . . . 6 ({𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵} ∈ Fin → (#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) ∈ ℕ0)
75, 6syl 17 . . . . 5 (𝑛 ∈ ℕ → (#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) ∈ ℕ0)
87nn0red 11107 . . . 4 (𝑛 ∈ ℕ → (#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) ∈ ℝ)
9 nndivre 10811 . . . 4 (((#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) ∈ ℝ ∧ 𝑛 ∈ ℕ) → ((#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) / 𝑛) ∈ ℝ)
108, 9mpancom 699 . . 3 (𝑛 ∈ ℕ → ((#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) / 𝑛) ∈ ℝ)
117nn0ge0d 11109 . . . 4 (𝑛 ∈ ℕ → 0 ≤ (#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}))
12 nnre 10782 . . . 4 (𝑛 ∈ ℕ → 𝑛 ∈ ℝ)
13 nngt0 10804 . . . 4 (𝑛 ∈ ℕ → 0 < 𝑛)
14 divge0 10641 . . . 4 ((((#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) ∈ ℝ ∧ 0 ≤ (#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵})) ∧ (𝑛 ∈ ℝ ∧ 0 < 𝑛)) → 0 ≤ ((#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) / 𝑛))
158, 11, 12, 13, 14syl22anc 1318 . . 3 (𝑛 ∈ ℕ → 0 ≤ ((#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) / 𝑛))
16 ssdomg 7763 . . . . . . . 8 ((1...𝑛) ∈ Fin → ({𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵} ⊆ (1...𝑛) → {𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵} ≼ (1...𝑛)))
172, 3, 16mpisyl 21 . . . . . . 7 (𝑛 ∈ ℕ → {𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵} ≼ (1...𝑛))
18 hashdom 12894 . . . . . . . 8 (({𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵} ∈ Fin ∧ (1...𝑛) ∈ Fin) → ((#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) ≤ (#‘(1...𝑛)) ↔ {𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵} ≼ (1...𝑛)))
195, 2, 18syl2anc 690 . . . . . . 7 (𝑛 ∈ ℕ → ((#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) ≤ (#‘(1...𝑛)) ↔ {𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵} ≼ (1...𝑛)))
2017, 19mpbird 245 . . . . . 6 (𝑛 ∈ ℕ → (#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) ≤ (#‘(1...𝑛)))
21 nnnn0 11054 . . . . . . 7 (𝑛 ∈ ℕ → 𝑛 ∈ ℕ0)
22 hashfz1 12861 . . . . . . 7 (𝑛 ∈ ℕ0 → (#‘(1...𝑛)) = 𝑛)
2321, 22syl 17 . . . . . 6 (𝑛 ∈ ℕ → (#‘(1...𝑛)) = 𝑛)
2420, 23breqtrd 4507 . . . . 5 (𝑛 ∈ ℕ → (#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) ≤ 𝑛)
25 nncn 10783 . . . . . 6 (𝑛 ∈ ℕ → 𝑛 ∈ ℂ)
2625mulid1d 9812 . . . . 5 (𝑛 ∈ ℕ → (𝑛 · 1) = 𝑛)
2724, 26breqtrrd 4509 . . . 4 (𝑛 ∈ ℕ → (#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) ≤ (𝑛 · 1))
28 1red 9810 . . . . 5 (𝑛 ∈ ℕ → 1 ∈ ℝ)
29 ledivmul 10648 . . . . 5 (((#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) ∈ ℝ ∧ 1 ∈ ℝ ∧ (𝑛 ∈ ℝ ∧ 0 < 𝑛)) → (((#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) / 𝑛) ≤ 1 ↔ (#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) ≤ (𝑛 · 1)))
308, 28, 12, 13, 29syl112anc 1321 . . . 4 (𝑛 ∈ ℕ → (((#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) / 𝑛) ≤ 1 ↔ (#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) ≤ (𝑛 · 1)))
3127, 30mpbird 245 . . 3 (𝑛 ∈ ℕ → ((#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) / 𝑛) ≤ 1)
32 0re 9795 . . . 4 0 ∈ ℝ
33 1re 9794 . . . 4 1 ∈ ℝ
3432, 33elicc2i 11979 . . 3 (((#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) / 𝑛) ∈ (0[,]1) ↔ (((#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) / 𝑛) ∈ ℝ ∧ 0 ≤ ((#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) / 𝑛) ∧ ((#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) / 𝑛) ≤ 1))
3510, 15, 31, 34syl3anbrc 1238 . 2 (𝑛 ∈ ℕ → ((#‘{𝑘 ∈ (1...𝑛) ∣ (⌊‘((𝐴 · (𝑅𝑘)) mod 𝑅)) = 𝐵}) / 𝑛) ∈ (0[,]1))
361, 35fmpti 6175 1 𝐹:ℕ⟶(0[,]1)
Colors of variables: wff setvar class
Syntax hints:  wb 194   = wceq 1474  wcel 1938  {crab 2804  wss 3444   class class class wbr 4481  cmpt 4541  wf 5685  cfv 5689  (class class class)co 6426  cdom 7715  Fincfn 7717  cr 9690  0cc0 9691  1c1 9692   · cmul 9696   < clt 9829  cle 9830   / cdiv 10433  cn 10775  0cn0 11047  [,]cicc 11918  ...cfz 12065  cfl 12321   mod cmo 12398  cexp 12590  #chash 12847
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1700  ax-4 1713  ax-5 1793  ax-6 1838  ax-7 1885  ax-8 1940  ax-9 1947  ax-10 1966  ax-11 1971  ax-12 1983  ax-13 2137  ax-ext 2494  ax-sep 4607  ax-nul 4616  ax-pow 4668  ax-pr 4732  ax-un 6723  ax-cnex 9747  ax-resscn 9748  ax-1cn 9749  ax-icn 9750  ax-addcl 9751  ax-addrcl 9752  ax-mulcl 9753  ax-mulrcl 9754  ax-mulcom 9755  ax-addass 9756  ax-mulass 9757  ax-distr 9758  ax-i2m1 9759  ax-1ne0 9760  ax-1rid 9761  ax-rnegex 9762  ax-rrecex 9763  ax-cnre 9764  ax-pre-lttri 9765  ax-pre-lttrn 9766  ax-pre-ltadd 9767  ax-pre-mulgt0 9768
This theorem depends on definitions:  df-bi 195  df-or 383  df-an 384  df-3or 1031  df-3an 1032  df-tru 1477  df-ex 1695  df-nf 1699  df-sb 1831  df-eu 2366  df-mo 2367  df-clab 2501  df-cleq 2507  df-clel 2510  df-nfc 2644  df-ne 2686  df-nel 2687  df-ral 2805  df-rex 2806  df-reu 2807  df-rmo 2808  df-rab 2809  df-v 3079  df-sbc 3307  df-csb 3404  df-dif 3447  df-un 3449  df-in 3451  df-ss 3458  df-pss 3460  df-nul 3778  df-if 3940  df-pw 4013  df-sn 4029  df-pr 4031  df-tp 4033  df-op 4035  df-uni 4271  df-int 4309  df-iun 4355  df-br 4482  df-opab 4542  df-mpt 4543  df-tr 4579  df-eprel 4843  df-id 4847  df-po 4853  df-so 4854  df-fr 4891  df-we 4893  df-xp 4938  df-rel 4939  df-cnv 4940  df-co 4941  df-dm 4942  df-rn 4943  df-res 4944  df-ima 4945  df-pred 5487  df-ord 5533  df-on 5534  df-lim 5535  df-suc 5536  df-iota 5653  df-fun 5691  df-fn 5692  df-f 5693  df-f1 5694  df-fo 5695  df-f1o 5696  df-fv 5697  df-riota 6388  df-ov 6429  df-oprab 6430  df-mpt2 6431  df-om 6834  df-1st 6934  df-2nd 6935  df-wrecs 7169  df-recs 7231  df-rdg 7269  df-1o 7323  df-oadd 7327  df-er 7505  df-en 7718  df-dom 7719  df-sdom 7720  df-fin 7721  df-card 8524  df-pnf 9831  df-mnf 9832  df-xr 9833  df-ltxr 9834  df-le 9835  df-sub 10019  df-neg 10020  df-div 10434  df-nn 10776  df-n0 11048  df-z 11119  df-uz 11428  df-icc 11922  df-fz 12066  df-hash 12848
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator