ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  isprm2 GIF version

Theorem isprm2 11637
Description: The predicate "is a prime number". A prime number is an integer greater than or equal to 2 whose only positive divisors are 1 and itself. Definition in [ApostolNT] p. 16. (Contributed by Paul Chapman, 26-Oct-2012.)
Assertion
Ref Expression
isprm2 (𝑃 ∈ ℙ ↔ (𝑃 ∈ (ℤ‘2) ∧ ∀𝑧 ∈ ℕ (𝑧𝑃 → (𝑧 = 1 ∨ 𝑧 = 𝑃))))
Distinct variable group:   𝑧,𝑃

Proof of Theorem isprm2
Dummy variable 𝑛 is distinct from all other variables.
StepHypRef Expression
1 1nprm 11634 . . . . 5 ¬ 1 ∈ ℙ
2 eleq1 2175 . . . . . 6 (𝑃 = 1 → (𝑃 ∈ ℙ ↔ 1 ∈ ℙ))
32biimpcd 158 . . . . 5 (𝑃 ∈ ℙ → (𝑃 = 1 → 1 ∈ ℙ))
41, 3mtoi 636 . . . 4 (𝑃 ∈ ℙ → ¬ 𝑃 = 1)
54neqned 2287 . . 3 (𝑃 ∈ ℙ → 𝑃 ≠ 1)
65pm4.71i 386 . 2 (𝑃 ∈ ℙ ↔ (𝑃 ∈ ℙ ∧ 𝑃 ≠ 1))
7 isprm 11629 . . . 4 (𝑃 ∈ ℙ ↔ (𝑃 ∈ ℕ ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ≈ 2o))
8 isprm2lem 11636 . . . . . . 7 ((𝑃 ∈ ℕ ∧ 𝑃 ≠ 1) → ({𝑛 ∈ ℕ ∣ 𝑛𝑃} ≈ 2o ↔ {𝑛 ∈ ℕ ∣ 𝑛𝑃} = {1, 𝑃}))
9 eqss 3076 . . . . . . . . . . 11 ({𝑛 ∈ ℕ ∣ 𝑛𝑃} = {1, 𝑃} ↔ ({𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃} ∧ {1, 𝑃} ⊆ {𝑛 ∈ ℕ ∣ 𝑛𝑃}))
109imbi2i 225 . . . . . . . . . 10 ((𝑃 ∈ ℕ → {𝑛 ∈ ℕ ∣ 𝑛𝑃} = {1, 𝑃}) ↔ (𝑃 ∈ ℕ → ({𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃} ∧ {1, 𝑃} ⊆ {𝑛 ∈ ℕ ∣ 𝑛𝑃})))
11 1idssfct 11635 . . . . . . . . . . 11 (𝑃 ∈ ℕ → {1, 𝑃} ⊆ {𝑛 ∈ ℕ ∣ 𝑛𝑃})
12 jcab 575 . . . . . . . . . . 11 ((𝑃 ∈ ℕ → ({𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃} ∧ {1, 𝑃} ⊆ {𝑛 ∈ ℕ ∣ 𝑛𝑃})) ↔ ((𝑃 ∈ ℕ → {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}) ∧ (𝑃 ∈ ℕ → {1, 𝑃} ⊆ {𝑛 ∈ ℕ ∣ 𝑛𝑃})))
1311, 12mpbiran2 906 . . . . . . . . . 10 ((𝑃 ∈ ℕ → ({𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃} ∧ {1, 𝑃} ⊆ {𝑛 ∈ ℕ ∣ 𝑛𝑃})) ↔ (𝑃 ∈ ℕ → {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}))
1410, 13bitri 183 . . . . . . . . 9 ((𝑃 ∈ ℕ → {𝑛 ∈ ℕ ∣ 𝑛𝑃} = {1, 𝑃}) ↔ (𝑃 ∈ ℕ → {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}))
1514pm5.74ri 180 . . . . . . . 8 (𝑃 ∈ ℕ → ({𝑛 ∈ ℕ ∣ 𝑛𝑃} = {1, 𝑃} ↔ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}))
1615adantr 272 . . . . . . 7 ((𝑃 ∈ ℕ ∧ 𝑃 ≠ 1) → ({𝑛 ∈ ℕ ∣ 𝑛𝑃} = {1, 𝑃} ↔ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}))
178, 16bitrd 187 . . . . . 6 ((𝑃 ∈ ℕ ∧ 𝑃 ≠ 1) → ({𝑛 ∈ ℕ ∣ 𝑛𝑃} ≈ 2o ↔ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}))
1817expcom 115 . . . . 5 (𝑃 ≠ 1 → (𝑃 ∈ ℕ → ({𝑛 ∈ ℕ ∣ 𝑛𝑃} ≈ 2o ↔ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃})))
1918pm5.32d 443 . . . 4 (𝑃 ≠ 1 → ((𝑃 ∈ ℕ ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ≈ 2o) ↔ (𝑃 ∈ ℕ ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃})))
207, 19syl5bb 191 . . 3 (𝑃 ≠ 1 → (𝑃 ∈ ℙ ↔ (𝑃 ∈ ℕ ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃})))
2120pm5.32ri 448 . 2 ((𝑃 ∈ ℙ ∧ 𝑃 ≠ 1) ↔ ((𝑃 ∈ ℕ ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}) ∧ 𝑃 ≠ 1))
22 ancom 264 . . . 4 (((𝑃 ∈ ℕ ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}) ∧ 𝑃 ≠ 1) ↔ (𝑃 ≠ 1 ∧ (𝑃 ∈ ℕ ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃})))
23 anass 396 . . . 4 (((𝑃 ≠ 1 ∧ 𝑃 ∈ ℕ) ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}) ↔ (𝑃 ≠ 1 ∧ (𝑃 ∈ ℕ ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃})))
2422, 23bitr4i 186 . . 3 (((𝑃 ∈ ℕ ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}) ∧ 𝑃 ≠ 1) ↔ ((𝑃 ≠ 1 ∧ 𝑃 ∈ ℕ) ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}))
25 ancom 264 . . . . 5 ((𝑃 ≠ 1 ∧ 𝑃 ∈ ℕ) ↔ (𝑃 ∈ ℕ ∧ 𝑃 ≠ 1))
26 eluz2b3 9293 . . . . 5 (𝑃 ∈ (ℤ‘2) ↔ (𝑃 ∈ ℕ ∧ 𝑃 ≠ 1))
2725, 26bitr4i 186 . . . 4 ((𝑃 ≠ 1 ∧ 𝑃 ∈ ℕ) ↔ 𝑃 ∈ (ℤ‘2))
2827anbi1i 451 . . 3 (((𝑃 ≠ 1 ∧ 𝑃 ∈ ℕ) ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}) ↔ (𝑃 ∈ (ℤ‘2) ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}))
29 dfss2 3050 . . . . 5 ({𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃} ↔ ∀𝑧(𝑧 ∈ {𝑛 ∈ ℕ ∣ 𝑛𝑃} → 𝑧 ∈ {1, 𝑃}))
30 breq1 3896 . . . . . . . . . 10 (𝑛 = 𝑧 → (𝑛𝑃𝑧𝑃))
3130elrab 2807 . . . . . . . . 9 (𝑧 ∈ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ↔ (𝑧 ∈ ℕ ∧ 𝑧𝑃))
32 vex 2658 . . . . . . . . . 10 𝑧 ∈ V
3332elpr 3512 . . . . . . . . 9 (𝑧 ∈ {1, 𝑃} ↔ (𝑧 = 1 ∨ 𝑧 = 𝑃))
3431, 33imbi12i 238 . . . . . . . 8 ((𝑧 ∈ {𝑛 ∈ ℕ ∣ 𝑛𝑃} → 𝑧 ∈ {1, 𝑃}) ↔ ((𝑧 ∈ ℕ ∧ 𝑧𝑃) → (𝑧 = 1 ∨ 𝑧 = 𝑃)))
35 impexp 261 . . . . . . . 8 (((𝑧 ∈ ℕ ∧ 𝑧𝑃) → (𝑧 = 1 ∨ 𝑧 = 𝑃)) ↔ (𝑧 ∈ ℕ → (𝑧𝑃 → (𝑧 = 1 ∨ 𝑧 = 𝑃))))
3634, 35bitri 183 . . . . . . 7 ((𝑧 ∈ {𝑛 ∈ ℕ ∣ 𝑛𝑃} → 𝑧 ∈ {1, 𝑃}) ↔ (𝑧 ∈ ℕ → (𝑧𝑃 → (𝑧 = 1 ∨ 𝑧 = 𝑃))))
3736albii 1427 . . . . . 6 (∀𝑧(𝑧 ∈ {𝑛 ∈ ℕ ∣ 𝑛𝑃} → 𝑧 ∈ {1, 𝑃}) ↔ ∀𝑧(𝑧 ∈ ℕ → (𝑧𝑃 → (𝑧 = 1 ∨ 𝑧 = 𝑃))))
38 df-ral 2393 . . . . . 6 (∀𝑧 ∈ ℕ (𝑧𝑃 → (𝑧 = 1 ∨ 𝑧 = 𝑃)) ↔ ∀𝑧(𝑧 ∈ ℕ → (𝑧𝑃 → (𝑧 = 1 ∨ 𝑧 = 𝑃))))
3937, 38bitr4i 186 . . . . 5 (∀𝑧(𝑧 ∈ {𝑛 ∈ ℕ ∣ 𝑛𝑃} → 𝑧 ∈ {1, 𝑃}) ↔ ∀𝑧 ∈ ℕ (𝑧𝑃 → (𝑧 = 1 ∨ 𝑧 = 𝑃)))
4029, 39bitri 183 . . . 4 ({𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃} ↔ ∀𝑧 ∈ ℕ (𝑧𝑃 → (𝑧 = 1 ∨ 𝑧 = 𝑃)))
4140anbi2i 450 . . 3 ((𝑃 ∈ (ℤ‘2) ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}) ↔ (𝑃 ∈ (ℤ‘2) ∧ ∀𝑧 ∈ ℕ (𝑧𝑃 → (𝑧 = 1 ∨ 𝑧 = 𝑃))))
4224, 28, 413bitri 205 . 2 (((𝑃 ∈ ℕ ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}) ∧ 𝑃 ≠ 1) ↔ (𝑃 ∈ (ℤ‘2) ∧ ∀𝑧 ∈ ℕ (𝑧𝑃 → (𝑧 = 1 ∨ 𝑧 = 𝑃))))
436, 21, 423bitri 205 1 (𝑃 ∈ ℙ ↔ (𝑃 ∈ (ℤ‘2) ∧ ∀𝑧 ∈ ℕ (𝑧𝑃 → (𝑧 = 1 ∨ 𝑧 = 𝑃))))
Colors of variables: wff set class
Syntax hints:  wi 4  wa 103  wb 104  wo 680  wal 1310   = wceq 1312  wcel 1461  wne 2280  wral 2388  {crab 2392  wss 3035  {cpr 3492   class class class wbr 3893  cfv 5079  2oc2o 6258  cen 6583  1c1 7541  cn 8623  2c2 8674  cuz 9221  cdvds 11334  cprime 11627
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 586  ax-in2 587  ax-io 681  ax-5 1404  ax-7 1405  ax-gen 1406  ax-ie1 1450  ax-ie2 1451  ax-8 1463  ax-10 1464  ax-11 1465  ax-i12 1466  ax-bndl 1467  ax-4 1468  ax-13 1472  ax-14 1473  ax-17 1487  ax-i9 1491  ax-ial 1495  ax-i5r 1496  ax-ext 2095  ax-coll 4001  ax-sep 4004  ax-nul 4012  ax-pow 4056  ax-pr 4089  ax-un 4313  ax-setind 4410  ax-iinf 4460  ax-cnex 7629  ax-resscn 7630  ax-1cn 7631  ax-1re 7632  ax-icn 7633  ax-addcl 7634  ax-addrcl 7635  ax-mulcl 7636  ax-mulrcl 7637  ax-addcom 7638  ax-mulcom 7639  ax-addass 7640  ax-mulass 7641  ax-distr 7642  ax-i2m1 7643  ax-0lt1 7644  ax-1rid 7645  ax-0id 7646  ax-rnegex 7647  ax-precex 7648  ax-cnre 7649  ax-pre-ltirr 7650  ax-pre-ltwlin 7651  ax-pre-lttrn 7652  ax-pre-apti 7653  ax-pre-ltadd 7654  ax-pre-mulgt0 7655  ax-pre-mulext 7656  ax-arch 7657  ax-caucvg 7658
This theorem depends on definitions:  df-bi 116  df-dc 803  df-3or 944  df-3an 945  df-tru 1315  df-fal 1318  df-nf 1418  df-sb 1717  df-eu 1976  df-mo 1977  df-clab 2100  df-cleq 2106  df-clel 2109  df-nfc 2242  df-ne 2281  df-nel 2376  df-ral 2393  df-rex 2394  df-reu 2395  df-rmo 2396  df-rab 2397  df-v 2657  df-sbc 2877  df-csb 2970  df-dif 3037  df-un 3039  df-in 3041  df-ss 3048  df-nul 3328  df-if 3439  df-pw 3476  df-sn 3497  df-pr 3498  df-op 3500  df-uni 3701  df-int 3736  df-iun 3779  df-br 3894  df-opab 3948  df-mpt 3949  df-tr 3985  df-id 4173  df-po 4176  df-iso 4177  df-iord 4246  df-on 4248  df-ilim 4249  df-suc 4251  df-iom 4463  df-xp 4503  df-rel 4504  df-cnv 4505  df-co 4506  df-dm 4507  df-rn 4508  df-res 4509  df-ima 4510  df-iota 5044  df-fun 5081  df-fn 5082  df-f 5083  df-f1 5084  df-fo 5085  df-f1o 5086  df-fv 5087  df-riota 5682  df-ov 5729  df-oprab 5730  df-mpo 5731  df-1st 5989  df-2nd 5990  df-recs 6153  df-frec 6239  df-1o 6264  df-2o 6265  df-er 6380  df-en 6586  df-pnf 7719  df-mnf 7720  df-xr 7721  df-ltxr 7722  df-le 7723  df-sub 7851  df-neg 7852  df-reap 8248  df-ap 8255  df-div 8339  df-inn 8624  df-2 8682  df-3 8683  df-4 8684  df-n0 8875  df-z 8952  df-uz 9222  df-q 9307  df-rp 9337  df-seqfrec 10105  df-exp 10179  df-cj 10500  df-re 10501  df-im 10502  df-rsqrt 10655  df-abs 10656  df-dvds 11335  df-prm 11628
This theorem is referenced by:  isprm3  11638  isprm4  11639  dvdsprime  11642  coprm  11661  isprm6  11664
  Copyright terms: Public domain W3C validator