MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  prmgaplcm Structured version   Visualization version   GIF version

Theorem prmgaplcm 16859
Description: Alternate proof of prmgap 16858: in contrast to prmgap 16858, where the gap starts at n! , the factorial of n, the gap starts at the least common multiple of all positive integers less than or equal to n. (Contributed by AV, 13-Aug-2020.) (Revised by AV, 27-Aug-2020.) (Proof modification is discouraged.) (New usage is discouraged.)
Assertion
Ref Expression
prmgaplcm 𝑛 ∈ ℕ ∃𝑝 ∈ ℙ ∃𝑞 ∈ ℙ (𝑛 ≤ (𝑞𝑝) ∧ ∀𝑧 ∈ ((𝑝 + 1)..^𝑞)𝑧 ∉ ℙ)
Distinct variable group:   𝑛,𝑝,𝑞,𝑧

Proof of Theorem prmgaplcm
Dummy variables 𝑖 𝑥 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 id 22 . . 3 (𝑛 ∈ ℕ → 𝑛 ∈ ℕ)
2 fzssz 13360 . . . . . . . 8 (1...𝑥) ⊆ ℤ
32a1i 11 . . . . . . 7 (𝑥 ∈ ℕ → (1...𝑥) ⊆ ℤ)
4 fzfi 13794 . . . . . . . 8 (1...𝑥) ∈ Fin
54a1i 11 . . . . . . 7 (𝑥 ∈ ℕ → (1...𝑥) ∈ Fin)
6 0nelfz1 13377 . . . . . . . 8 0 ∉ (1...𝑥)
76a1i 11 . . . . . . 7 (𝑥 ∈ ℕ → 0 ∉ (1...𝑥))
8 lcmfn0cl 16429 . . . . . . 7 (((1...𝑥) ⊆ ℤ ∧ (1...𝑥) ∈ Fin ∧ 0 ∉ (1...𝑥)) → (lcm‘(1...𝑥)) ∈ ℕ)
93, 5, 7, 8syl3anc 1370 . . . . . 6 (𝑥 ∈ ℕ → (lcm‘(1...𝑥)) ∈ ℕ)
109adantl 482 . . . . 5 ((𝑛 ∈ ℕ ∧ 𝑥 ∈ ℕ) → (lcm‘(1...𝑥)) ∈ ℕ)
11 eqid 2736 . . . . 5 (𝑥 ∈ ℕ ↦ (lcm‘(1...𝑥))) = (𝑥 ∈ ℕ ↦ (lcm‘(1...𝑥)))
1210, 11fmptd 7045 . . . 4 (𝑛 ∈ ℕ → (𝑥 ∈ ℕ ↦ (lcm‘(1...𝑥))):ℕ⟶ℕ)
13 nnex 12081 . . . . . 6 ℕ ∈ V
1413, 13pm3.2i 471 . . . . 5 (ℕ ∈ V ∧ ℕ ∈ V)
15 elmapg 8700 . . . . 5 ((ℕ ∈ V ∧ ℕ ∈ V) → ((𝑥 ∈ ℕ ↦ (lcm‘(1...𝑥))) ∈ (ℕ ↑m ℕ) ↔ (𝑥 ∈ ℕ ↦ (lcm‘(1...𝑥))):ℕ⟶ℕ))
1614, 15mp1i 13 . . . 4 (𝑛 ∈ ℕ → ((𝑥 ∈ ℕ ↦ (lcm‘(1...𝑥))) ∈ (ℕ ↑m ℕ) ↔ (𝑥 ∈ ℕ ↦ (lcm‘(1...𝑥))):ℕ⟶ℕ))
1712, 16mpbird 256 . . 3 (𝑛 ∈ ℕ → (𝑥 ∈ ℕ ↦ (lcm‘(1...𝑥))) ∈ (ℕ ↑m ℕ))
18 prmgaplcmlem2 16851 . . . . 5 ((𝑛 ∈ ℕ ∧ 𝑖 ∈ (2...𝑛)) → 1 < (((lcm‘(1...𝑛)) + 𝑖) gcd 𝑖))
19 eqidd 2737 . . . . . . . 8 ((𝑛 ∈ ℕ ∧ 𝑖 ∈ (2...𝑛)) → (𝑥 ∈ ℕ ↦ (lcm‘(1...𝑥))) = (𝑥 ∈ ℕ ↦ (lcm‘(1...𝑥))))
20 oveq2 7346 . . . . . . . . . 10 (𝑥 = 𝑛 → (1...𝑥) = (1...𝑛))
2120fveq2d 6830 . . . . . . . . 9 (𝑥 = 𝑛 → (lcm‘(1...𝑥)) = (lcm‘(1...𝑛)))
2221adantl 482 . . . . . . . 8 (((𝑛 ∈ ℕ ∧ 𝑖 ∈ (2...𝑛)) ∧ 𝑥 = 𝑛) → (lcm‘(1...𝑥)) = (lcm‘(1...𝑛)))
23 simpl 483 . . . . . . . 8 ((𝑛 ∈ ℕ ∧ 𝑖 ∈ (2...𝑛)) → 𝑛 ∈ ℕ)
24 fzssz 13360 . . . . . . . . . 10 (1...𝑛) ⊆ ℤ
25 fzfi 13794 . . . . . . . . . 10 (1...𝑛) ∈ Fin
2624, 25pm3.2i 471 . . . . . . . . 9 ((1...𝑛) ⊆ ℤ ∧ (1...𝑛) ∈ Fin)
27 lcmfcl 16431 . . . . . . . . 9 (((1...𝑛) ⊆ ℤ ∧ (1...𝑛) ∈ Fin) → (lcm‘(1...𝑛)) ∈ ℕ0)
2826, 27mp1i 13 . . . . . . . 8 ((𝑛 ∈ ℕ ∧ 𝑖 ∈ (2...𝑛)) → (lcm‘(1...𝑛)) ∈ ℕ0)
2919, 22, 23, 28fvmptd 6939 . . . . . . 7 ((𝑛 ∈ ℕ ∧ 𝑖 ∈ (2...𝑛)) → ((𝑥 ∈ ℕ ↦ (lcm‘(1...𝑥)))‘𝑛) = (lcm‘(1...𝑛)))
3029oveq1d 7353 . . . . . 6 ((𝑛 ∈ ℕ ∧ 𝑖 ∈ (2...𝑛)) → (((𝑥 ∈ ℕ ↦ (lcm‘(1...𝑥)))‘𝑛) + 𝑖) = ((lcm‘(1...𝑛)) + 𝑖))
3130oveq1d 7353 . . . . 5 ((𝑛 ∈ ℕ ∧ 𝑖 ∈ (2...𝑛)) → ((((𝑥 ∈ ℕ ↦ (lcm‘(1...𝑥)))‘𝑛) + 𝑖) gcd 𝑖) = (((lcm‘(1...𝑛)) + 𝑖) gcd 𝑖))
3218, 31breqtrrd 5121 . . . 4 ((𝑛 ∈ ℕ ∧ 𝑖 ∈ (2...𝑛)) → 1 < ((((𝑥 ∈ ℕ ↦ (lcm‘(1...𝑥)))‘𝑛) + 𝑖) gcd 𝑖))
3332ralrimiva 3139 . . 3 (𝑛 ∈ ℕ → ∀𝑖 ∈ (2...𝑛)1 < ((((𝑥 ∈ ℕ ↦ (lcm‘(1...𝑥)))‘𝑛) + 𝑖) gcd 𝑖))
341, 17, 33prmgaplem8 16857 . 2 (𝑛 ∈ ℕ → ∃𝑝 ∈ ℙ ∃𝑞 ∈ ℙ (𝑛 ≤ (𝑞𝑝) ∧ ∀𝑧 ∈ ((𝑝 + 1)..^𝑞)𝑧 ∉ ℙ))
3534rgen 3063 1 𝑛 ∈ ℕ ∃𝑝 ∈ ℙ ∃𝑞 ∈ ℙ (𝑛 ≤ (𝑞𝑝) ∧ ∀𝑧 ∈ ((𝑝 + 1)..^𝑞)𝑧 ∉ ℙ)
Colors of variables: wff setvar class
Syntax hints:  wb 205  wa 396   = wceq 1540  wcel 2105  wnel 3046  wral 3061  wrex 3070  Vcvv 3441  wss 3898   class class class wbr 5093  cmpt 5176  wf 6476  cfv 6480  (class class class)co 7338  m cmap 8687  Fincfn 8805  0cc0 10973  1c1 10974   + caddc 10976   < clt 11111  cle 11112  cmin 11307  cn 12075  2c2 12130  0cn0 12335  cz 12421  ...cfz 13341  ..^cfzo 13484   gcd cgcd 16301  lcmclcmf 16392  cprime 16474
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1796  ax-4 1810  ax-5 1912  ax-6 1970  ax-7 2010  ax-8 2107  ax-9 2115  ax-10 2136  ax-11 2153  ax-12 2170  ax-ext 2707  ax-rep 5230  ax-sep 5244  ax-nul 5251  ax-pow 5309  ax-pr 5373  ax-un 7651  ax-inf2 9499  ax-cnex 11029  ax-resscn 11030  ax-1cn 11031  ax-icn 11032  ax-addcl 11033  ax-addrcl 11034  ax-mulcl 11035  ax-mulrcl 11036  ax-mulcom 11037  ax-addass 11038  ax-mulass 11039  ax-distr 11040  ax-i2m1 11041  ax-1ne0 11042  ax-1rid 11043  ax-rnegex 11044  ax-rrecex 11045  ax-cnre 11046  ax-pre-lttri 11047  ax-pre-lttrn 11048  ax-pre-ltadd 11049  ax-pre-mulgt0 11050  ax-pre-sup 11051
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 845  df-3or 1087  df-3an 1088  df-tru 1543  df-fal 1553  df-ex 1781  df-nf 1785  df-sb 2067  df-mo 2538  df-eu 2567  df-clab 2714  df-cleq 2728  df-clel 2814  df-nfc 2886  df-ne 2941  df-nel 3047  df-ral 3062  df-rex 3071  df-rmo 3349  df-reu 3350  df-rab 3404  df-v 3443  df-sbc 3728  df-csb 3844  df-dif 3901  df-un 3903  df-in 3905  df-ss 3915  df-pss 3917  df-nul 4271  df-if 4475  df-pw 4550  df-sn 4575  df-pr 4577  df-op 4581  df-uni 4854  df-int 4896  df-iun 4944  df-br 5094  df-opab 5156  df-mpt 5177  df-tr 5211  df-id 5519  df-eprel 5525  df-po 5533  df-so 5534  df-fr 5576  df-se 5577  df-we 5578  df-xp 5627  df-rel 5628  df-cnv 5629  df-co 5630  df-dm 5631  df-rn 5632  df-res 5633  df-ima 5634  df-pred 6239  df-ord 6306  df-on 6307  df-lim 6308  df-suc 6309  df-iota 6432  df-fun 6482  df-fn 6483  df-f 6484  df-f1 6485  df-fo 6486  df-f1o 6487  df-fv 6488  df-isom 6489  df-riota 7294  df-ov 7341  df-oprab 7342  df-mpo 7343  df-om 7782  df-1st 7900  df-2nd 7901  df-frecs 8168  df-wrecs 8199  df-recs 8273  df-rdg 8312  df-1o 8368  df-2o 8369  df-er 8570  df-map 8689  df-en 8806  df-dom 8807  df-sdom 8808  df-fin 8809  df-sup 9300  df-inf 9301  df-oi 9368  df-card 9797  df-pnf 11113  df-mnf 11114  df-xr 11115  df-ltxr 11116  df-le 11117  df-sub 11309  df-neg 11310  df-div 11735  df-nn 12076  df-2 12138  df-3 12139  df-n0 12336  df-z 12422  df-uz 12685  df-rp 12833  df-fz 13342  df-fzo 13485  df-seq 13824  df-exp 13885  df-fac 14090  df-hash 14147  df-cj 14910  df-re 14911  df-im 14912  df-sqrt 15046  df-abs 15047  df-clim 15297  df-prod 15716  df-dvds 16064  df-gcd 16302  df-lcmf 16394  df-prm 16475
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator