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

Theorem prmlem1a 16875
Description: A quick proof skeleton to show that the numbers less than 25 are prime, by trial division. (Contributed by Mario Carneiro, 18-Feb-2014.)
Hypotheses
Ref Expression
prmlem1.n 𝑁 ∈ ℕ
prmlem1.gt 1 < 𝑁
prmlem1.2 ¬ 2 ∥ 𝑁
prmlem1.3 ¬ 3 ∥ 𝑁
prmlem1a.x ((¬ 2 ∥ 5 ∧ 𝑥 ∈ (ℤ‘5)) → ((𝑥 ∈ (ℙ ∖ {2}) ∧ (𝑥↑2) ≤ 𝑁) → ¬ 𝑥𝑁))
Assertion
Ref Expression
prmlem1a 𝑁 ∈ ℙ
Distinct variable group:   𝑥,𝑁

Proof of Theorem prmlem1a
StepHypRef Expression
1 prmlem1.n . . 3 𝑁 ∈ ℕ
2 prmlem1.gt . . 3 1 < 𝑁
3 eluz2b2 12731 . . 3 (𝑁 ∈ (ℤ‘2) ↔ (𝑁 ∈ ℕ ∧ 1 < 𝑁))
41, 2, 3mpbir2an 708 . 2 𝑁 ∈ (ℤ‘2)
5 breq1 5088 . . . . . 6 (𝑥 = 2 → (𝑥𝑁 ↔ 2 ∥ 𝑁))
65notbid 317 . . . . 5 (𝑥 = 2 → (¬ 𝑥𝑁 ↔ ¬ 2 ∥ 𝑁))
76imbi2d 340 . . . 4 (𝑥 = 2 → (((𝑥↑2) ≤ 𝑁 → ¬ 𝑥𝑁) ↔ ((𝑥↑2) ≤ 𝑁 → ¬ 2 ∥ 𝑁)))
8 prmnn 16446 . . . . . 6 (𝑥 ∈ ℙ → 𝑥 ∈ ℕ)
98adantr 481 . . . . 5 ((𝑥 ∈ ℙ ∧ 𝑥 ≠ 2) → 𝑥 ∈ ℕ)
10 eldifsn 4730 . . . . . 6 (𝑥 ∈ (ℙ ∖ {2}) ↔ (𝑥 ∈ ℙ ∧ 𝑥 ≠ 2))
11 n2dvds1 16146 . . . . . . . . 9 ¬ 2 ∥ 1
12 prmlem1a.x . . . . . . . . . . 11 ((¬ 2 ∥ 5 ∧ 𝑥 ∈ (ℤ‘5)) → ((𝑥 ∈ (ℙ ∖ {2}) ∧ (𝑥↑2) ≤ 𝑁) → ¬ 𝑥𝑁))
13 prmlem1.3 . . . . . . . . . . . 12 ¬ 3 ∥ 𝑁
1413a1i 11 . . . . . . . . . . 11 (3 ∈ ℙ → ¬ 3 ∥ 𝑁)
15 3p2e5 12194 . . . . . . . . . . 11 (3 + 2) = 5
1612, 14, 15prmlem0 16874 . . . . . . . . . 10 ((¬ 2 ∥ 3 ∧ 𝑥 ∈ (ℤ‘3)) → ((𝑥 ∈ (ℙ ∖ {2}) ∧ (𝑥↑2) ≤ 𝑁) → ¬ 𝑥𝑁))
17 1nprm 16451 . . . . . . . . . . 11 ¬ 1 ∈ ℙ
1817pm2.21i 119 . . . . . . . . . 10 (1 ∈ ℙ → ¬ 1 ∥ 𝑁)
19 1p2e3 12186 . . . . . . . . . 10 (1 + 2) = 3
2016, 18, 19prmlem0 16874 . . . . . . . . 9 ((¬ 2 ∥ 1 ∧ 𝑥 ∈ (ℤ‘1)) → ((𝑥 ∈ (ℙ ∖ {2}) ∧ (𝑥↑2) ≤ 𝑁) → ¬ 𝑥𝑁))
2111, 20mpan 687 . . . . . . . 8 (𝑥 ∈ (ℤ‘1) → ((𝑥 ∈ (ℙ ∖ {2}) ∧ (𝑥↑2) ≤ 𝑁) → ¬ 𝑥𝑁))
22 nnuz 12691 . . . . . . . 8 ℕ = (ℤ‘1)
2321, 22eleq2s 2856 . . . . . . 7 (𝑥 ∈ ℕ → ((𝑥 ∈ (ℙ ∖ {2}) ∧ (𝑥↑2) ≤ 𝑁) → ¬ 𝑥𝑁))
2423expd 416 . . . . . 6 (𝑥 ∈ ℕ → (𝑥 ∈ (ℙ ∖ {2}) → ((𝑥↑2) ≤ 𝑁 → ¬ 𝑥𝑁)))
2510, 24syl5bir 242 . . . . 5 (𝑥 ∈ ℕ → ((𝑥 ∈ ℙ ∧ 𝑥 ≠ 2) → ((𝑥↑2) ≤ 𝑁 → ¬ 𝑥𝑁)))
269, 25mpcom 38 . . . 4 ((𝑥 ∈ ℙ ∧ 𝑥 ≠ 2) → ((𝑥↑2) ≤ 𝑁 → ¬ 𝑥𝑁))
27 prmlem1.2 . . . . 5 ¬ 2 ∥ 𝑁
28272a1i 12 . . . 4 (𝑥 ∈ ℙ → ((𝑥↑2) ≤ 𝑁 → ¬ 2 ∥ 𝑁))
297, 26, 28pm2.61ne 3028 . . 3 (𝑥 ∈ ℙ → ((𝑥↑2) ≤ 𝑁 → ¬ 𝑥𝑁))
3029rgen 3064 . 2 𝑥 ∈ ℙ ((𝑥↑2) ≤ 𝑁 → ¬ 𝑥𝑁)
31 isprm5 16479 . 2 (𝑁 ∈ ℙ ↔ (𝑁 ∈ (ℤ‘2) ∧ ∀𝑥 ∈ ℙ ((𝑥↑2) ≤ 𝑁 → ¬ 𝑥𝑁)))
324, 30, 31mpbir2an 708 1 𝑁 ∈ ℙ
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wa 396   = wceq 1540  wcel 2105  wne 2941  wral 3062  cdif 3893  {csn 4569   class class class wbr 5085  cfv 6463  (class class class)co 7313  1c1 10942   < clt 11079  cle 11080  cn 12043  2c2 12098  3c3 12099  5c5 12101  cuz 12652  cexp 13852  cdvds 16032  cprime 16443
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 2708  ax-sep 5236  ax-nul 5243  ax-pow 5301  ax-pr 5365  ax-un 7626  ax-cnex 10997  ax-resscn 10998  ax-1cn 10999  ax-icn 11000  ax-addcl 11001  ax-addrcl 11002  ax-mulcl 11003  ax-mulrcl 11004  ax-mulcom 11005  ax-addass 11006  ax-mulass 11007  ax-distr 11008  ax-i2m1 11009  ax-1ne0 11010  ax-1rid 11011  ax-rnegex 11012  ax-rrecex 11013  ax-cnre 11014  ax-pre-lttri 11015  ax-pre-lttrn 11016  ax-pre-ltadd 11017  ax-pre-mulgt0 11018  ax-pre-sup 11019
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 2539  df-eu 2568  df-clab 2715  df-cleq 2729  df-clel 2815  df-nfc 2887  df-ne 2942  df-nel 3048  df-ral 3063  df-rex 3072  df-rmo 3350  df-reu 3351  df-rab 3405  df-v 3443  df-sbc 3726  df-csb 3842  df-dif 3899  df-un 3901  df-in 3903  df-ss 3913  df-pss 3915  df-nul 4267  df-if 4470  df-pw 4545  df-sn 4570  df-pr 4572  df-op 4576  df-uni 4849  df-iun 4937  df-br 5086  df-opab 5148  df-mpt 5169  df-tr 5203  df-id 5505  df-eprel 5511  df-po 5519  df-so 5520  df-fr 5560  df-we 5562  df-xp 5611  df-rel 5612  df-cnv 5613  df-co 5614  df-dm 5615  df-rn 5616  df-res 5617  df-ima 5618  df-pred 6222  df-ord 6289  df-on 6290  df-lim 6291  df-suc 6292  df-iota 6415  df-fun 6465  df-fn 6466  df-f 6467  df-f1 6468  df-fo 6469  df-f1o 6470  df-fv 6471  df-riota 7270  df-ov 7316  df-oprab 7317  df-mpo 7318  df-om 7756  df-1st 7874  df-2nd 7875  df-frecs 8142  df-wrecs 8173  df-recs 8247  df-rdg 8286  df-1o 8342  df-2o 8343  df-er 8544  df-en 8780  df-dom 8781  df-sdom 8782  df-fin 8783  df-sup 9269  df-pnf 11081  df-mnf 11082  df-xr 11083  df-ltxr 11084  df-le 11085  df-sub 11277  df-neg 11278  df-div 11703  df-nn 12044  df-2 12106  df-3 12107  df-4 12108  df-5 12109  df-n0 12304  df-z 12390  df-uz 12653  df-rp 12801  df-fz 13310  df-seq 13792  df-exp 13853  df-cj 14879  df-re 14880  df-im 14881  df-sqrt 15015  df-abs 15016  df-dvds 16033  df-prm 16444
This theorem is referenced by:  prmlem1  16876  prmlem2  16888
  Copyright terms: Public domain W3C validator