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

Theorem isprm2 12111
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 12108 . . . . 5 ¬ 1 ∈ ℙ
2 eleq1 2240 . . . . . 6 (𝑃 = 1 → (𝑃 ∈ ℙ ↔ 1 ∈ ℙ))
32biimpcd 159 . . . . 5 (𝑃 ∈ ℙ → (𝑃 = 1 → 1 ∈ ℙ))
41, 3mtoi 664 . . . 4 (𝑃 ∈ ℙ → ¬ 𝑃 = 1)
54neqned 2354 . . 3 (𝑃 ∈ ℙ → 𝑃 ≠ 1)
65pm4.71i 391 . 2 (𝑃 ∈ ℙ ↔ (𝑃 ∈ ℙ ∧ 𝑃 ≠ 1))
7 isprm 12103 . . . 4 (𝑃 ∈ ℙ ↔ (𝑃 ∈ ℕ ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ≈ 2o))
8 isprm2lem 12110 . . . . . . 7 ((𝑃 ∈ ℕ ∧ 𝑃 ≠ 1) → ({𝑛 ∈ ℕ ∣ 𝑛𝑃} ≈ 2o ↔ {𝑛 ∈ ℕ ∣ 𝑛𝑃} = {1, 𝑃}))
9 eqss 3170 . . . . . . . . . . 11 ({𝑛 ∈ ℕ ∣ 𝑛𝑃} = {1, 𝑃} ↔ ({𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃} ∧ {1, 𝑃} ⊆ {𝑛 ∈ ℕ ∣ 𝑛𝑃}))
109imbi2i 226 . . . . . . . . . 10 ((𝑃 ∈ ℕ → {𝑛 ∈ ℕ ∣ 𝑛𝑃} = {1, 𝑃}) ↔ (𝑃 ∈ ℕ → ({𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃} ∧ {1, 𝑃} ⊆ {𝑛 ∈ ℕ ∣ 𝑛𝑃})))
11 1idssfct 12109 . . . . . . . . . . 11 (𝑃 ∈ ℕ → {1, 𝑃} ⊆ {𝑛 ∈ ℕ ∣ 𝑛𝑃})
12 jcab 603 . . . . . . . . . . 11 ((𝑃 ∈ ℕ → ({𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃} ∧ {1, 𝑃} ⊆ {𝑛 ∈ ℕ ∣ 𝑛𝑃})) ↔ ((𝑃 ∈ ℕ → {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}) ∧ (𝑃 ∈ ℕ → {1, 𝑃} ⊆ {𝑛 ∈ ℕ ∣ 𝑛𝑃})))
1311, 12mpbiran2 941 . . . . . . . . . 10 ((𝑃 ∈ ℕ → ({𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃} ∧ {1, 𝑃} ⊆ {𝑛 ∈ ℕ ∣ 𝑛𝑃})) ↔ (𝑃 ∈ ℕ → {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}))
1410, 13bitri 184 . . . . . . . . 9 ((𝑃 ∈ ℕ → {𝑛 ∈ ℕ ∣ 𝑛𝑃} = {1, 𝑃}) ↔ (𝑃 ∈ ℕ → {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}))
1514pm5.74ri 181 . . . . . . . 8 (𝑃 ∈ ℕ → ({𝑛 ∈ ℕ ∣ 𝑛𝑃} = {1, 𝑃} ↔ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}))
1615adantr 276 . . . . . . 7 ((𝑃 ∈ ℕ ∧ 𝑃 ≠ 1) → ({𝑛 ∈ ℕ ∣ 𝑛𝑃} = {1, 𝑃} ↔ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}))
178, 16bitrd 188 . . . . . 6 ((𝑃 ∈ ℕ ∧ 𝑃 ≠ 1) → ({𝑛 ∈ ℕ ∣ 𝑛𝑃} ≈ 2o ↔ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}))
1817expcom 116 . . . . 5 (𝑃 ≠ 1 → (𝑃 ∈ ℕ → ({𝑛 ∈ ℕ ∣ 𝑛𝑃} ≈ 2o ↔ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃})))
1918pm5.32d 450 . . . 4 (𝑃 ≠ 1 → ((𝑃 ∈ ℕ ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ≈ 2o) ↔ (𝑃 ∈ ℕ ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃})))
207, 19bitrid 192 . . 3 (𝑃 ≠ 1 → (𝑃 ∈ ℙ ↔ (𝑃 ∈ ℕ ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃})))
2120pm5.32ri 455 . 2 ((𝑃 ∈ ℙ ∧ 𝑃 ≠ 1) ↔ ((𝑃 ∈ ℕ ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}) ∧ 𝑃 ≠ 1))
22 ancom 266 . . . 4 (((𝑃 ∈ ℕ ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}) ∧ 𝑃 ≠ 1) ↔ (𝑃 ≠ 1 ∧ (𝑃 ∈ ℕ ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃})))
23 anass 401 . . . 4 (((𝑃 ≠ 1 ∧ 𝑃 ∈ ℕ) ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}) ↔ (𝑃 ≠ 1 ∧ (𝑃 ∈ ℕ ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃})))
2422, 23bitr4i 187 . . 3 (((𝑃 ∈ ℕ ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}) ∧ 𝑃 ≠ 1) ↔ ((𝑃 ≠ 1 ∧ 𝑃 ∈ ℕ) ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}))
25 ancom 266 . . . . 5 ((𝑃 ≠ 1 ∧ 𝑃 ∈ ℕ) ↔ (𝑃 ∈ ℕ ∧ 𝑃 ≠ 1))
26 eluz2b3 9602 . . . . 5 (𝑃 ∈ (ℤ‘2) ↔ (𝑃 ∈ ℕ ∧ 𝑃 ≠ 1))
2725, 26bitr4i 187 . . . 4 ((𝑃 ≠ 1 ∧ 𝑃 ∈ ℕ) ↔ 𝑃 ∈ (ℤ‘2))
2827anbi1i 458 . . 3 (((𝑃 ≠ 1 ∧ 𝑃 ∈ ℕ) ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}) ↔ (𝑃 ∈ (ℤ‘2) ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}))
29 dfss2 3144 . . . . 5 ({𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃} ↔ ∀𝑧(𝑧 ∈ {𝑛 ∈ ℕ ∣ 𝑛𝑃} → 𝑧 ∈ {1, 𝑃}))
30 breq1 4006 . . . . . . . . . 10 (𝑛 = 𝑧 → (𝑛𝑃𝑧𝑃))
3130elrab 2893 . . . . . . . . 9 (𝑧 ∈ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ↔ (𝑧 ∈ ℕ ∧ 𝑧𝑃))
32 vex 2740 . . . . . . . . . 10 𝑧 ∈ V
3332elpr 3613 . . . . . . . . 9 (𝑧 ∈ {1, 𝑃} ↔ (𝑧 = 1 ∨ 𝑧 = 𝑃))
3431, 33imbi12i 239 . . . . . . . 8 ((𝑧 ∈ {𝑛 ∈ ℕ ∣ 𝑛𝑃} → 𝑧 ∈ {1, 𝑃}) ↔ ((𝑧 ∈ ℕ ∧ 𝑧𝑃) → (𝑧 = 1 ∨ 𝑧 = 𝑃)))
35 impexp 263 . . . . . . . 8 (((𝑧 ∈ ℕ ∧ 𝑧𝑃) → (𝑧 = 1 ∨ 𝑧 = 𝑃)) ↔ (𝑧 ∈ ℕ → (𝑧𝑃 → (𝑧 = 1 ∨ 𝑧 = 𝑃))))
3634, 35bitri 184 . . . . . . 7 ((𝑧 ∈ {𝑛 ∈ ℕ ∣ 𝑛𝑃} → 𝑧 ∈ {1, 𝑃}) ↔ (𝑧 ∈ ℕ → (𝑧𝑃 → (𝑧 = 1 ∨ 𝑧 = 𝑃))))
3736albii 1470 . . . . . 6 (∀𝑧(𝑧 ∈ {𝑛 ∈ ℕ ∣ 𝑛𝑃} → 𝑧 ∈ {1, 𝑃}) ↔ ∀𝑧(𝑧 ∈ ℕ → (𝑧𝑃 → (𝑧 = 1 ∨ 𝑧 = 𝑃))))
38 df-ral 2460 . . . . . 6 (∀𝑧 ∈ ℕ (𝑧𝑃 → (𝑧 = 1 ∨ 𝑧 = 𝑃)) ↔ ∀𝑧(𝑧 ∈ ℕ → (𝑧𝑃 → (𝑧 = 1 ∨ 𝑧 = 𝑃))))
3937, 38bitr4i 187 . . . . 5 (∀𝑧(𝑧 ∈ {𝑛 ∈ ℕ ∣ 𝑛𝑃} → 𝑧 ∈ {1, 𝑃}) ↔ ∀𝑧 ∈ ℕ (𝑧𝑃 → (𝑧 = 1 ∨ 𝑧 = 𝑃)))
4029, 39bitri 184 . . . 4 ({𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃} ↔ ∀𝑧 ∈ ℕ (𝑧𝑃 → (𝑧 = 1 ∨ 𝑧 = 𝑃)))
4140anbi2i 457 . . 3 ((𝑃 ∈ (ℤ‘2) ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}) ↔ (𝑃 ∈ (ℤ‘2) ∧ ∀𝑧 ∈ ℕ (𝑧𝑃 → (𝑧 = 1 ∨ 𝑧 = 𝑃))))
4224, 28, 413bitri 206 . 2 (((𝑃 ∈ ℕ ∧ {𝑛 ∈ ℕ ∣ 𝑛𝑃} ⊆ {1, 𝑃}) ∧ 𝑃 ≠ 1) ↔ (𝑃 ∈ (ℤ‘2) ∧ ∀𝑧 ∈ ℕ (𝑧𝑃 → (𝑧 = 1 ∨ 𝑧 = 𝑃))))
436, 21, 423bitri 206 1 (𝑃 ∈ ℙ ↔ (𝑃 ∈ (ℤ‘2) ∧ ∀𝑧 ∈ ℕ (𝑧𝑃 → (𝑧 = 1 ∨ 𝑧 = 𝑃))))
Colors of variables: wff set class
Syntax hints:  wi 4  wa 104  wb 105  wo 708  wal 1351   = wceq 1353  wcel 2148  wne 2347  wral 2455  {crab 2459  wss 3129  {cpr 3593   class class class wbr 4003  cfv 5216  2oc2o 6410  cen 6737  1c1 7811  cn 8917  2c2 8968  cuz 9526  cdvds 11789  cprime 12101
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 106  ax-ia2 107  ax-ia3 108  ax-in1 614  ax-in2 615  ax-io 709  ax-5 1447  ax-7 1448  ax-gen 1449  ax-ie1 1493  ax-ie2 1494  ax-8 1504  ax-10 1505  ax-11 1506  ax-i12 1507  ax-bndl 1509  ax-4 1510  ax-17 1526  ax-i9 1530  ax-ial 1534  ax-i5r 1535  ax-13 2150  ax-14 2151  ax-ext 2159  ax-coll 4118  ax-sep 4121  ax-nul 4129  ax-pow 4174  ax-pr 4209  ax-un 4433  ax-setind 4536  ax-iinf 4587  ax-cnex 7901  ax-resscn 7902  ax-1cn 7903  ax-1re 7904  ax-icn 7905  ax-addcl 7906  ax-addrcl 7907  ax-mulcl 7908  ax-mulrcl 7909  ax-addcom 7910  ax-mulcom 7911  ax-addass 7912  ax-mulass 7913  ax-distr 7914  ax-i2m1 7915  ax-0lt1 7916  ax-1rid 7917  ax-0id 7918  ax-rnegex 7919  ax-precex 7920  ax-cnre 7921  ax-pre-ltirr 7922  ax-pre-ltwlin 7923  ax-pre-lttrn 7924  ax-pre-apti 7925  ax-pre-ltadd 7926  ax-pre-mulgt0 7927  ax-pre-mulext 7928  ax-arch 7929  ax-caucvg 7930
This theorem depends on definitions:  df-bi 117  df-dc 835  df-3or 979  df-3an 980  df-tru 1356  df-fal 1359  df-nf 1461  df-sb 1763  df-eu 2029  df-mo 2030  df-clab 2164  df-cleq 2170  df-clel 2173  df-nfc 2308  df-ne 2348  df-nel 2443  df-ral 2460  df-rex 2461  df-reu 2462  df-rmo 2463  df-rab 2464  df-v 2739  df-sbc 2963  df-csb 3058  df-dif 3131  df-un 3133  df-in 3135  df-ss 3142  df-nul 3423  df-if 3535  df-pw 3577  df-sn 3598  df-pr 3599  df-op 3601  df-uni 3810  df-int 3845  df-iun 3888  df-br 4004  df-opab 4065  df-mpt 4066  df-tr 4102  df-id 4293  df-po 4296  df-iso 4297  df-iord 4366  df-on 4368  df-ilim 4369  df-suc 4371  df-iom 4590  df-xp 4632  df-rel 4633  df-cnv 4634  df-co 4635  df-dm 4636  df-rn 4637  df-res 4638  df-ima 4639  df-iota 5178  df-fun 5218  df-fn 5219  df-f 5220  df-f1 5221  df-fo 5222  df-f1o 5223  df-fv 5224  df-riota 5830  df-ov 5877  df-oprab 5878  df-mpo 5879  df-1st 6140  df-2nd 6141  df-recs 6305  df-frec 6391  df-1o 6416  df-2o 6417  df-er 6534  df-en 6740  df-pnf 7992  df-mnf 7993  df-xr 7994  df-ltxr 7995  df-le 7996  df-sub 8128  df-neg 8129  df-reap 8530  df-ap 8537  df-div 8628  df-inn 8918  df-2 8976  df-3 8977  df-4 8978  df-n0 9175  df-z 9252  df-uz 9527  df-q 9618  df-rp 9652  df-seqfrec 10443  df-exp 10517  df-cj 10846  df-re 10847  df-im 10848  df-rsqrt 11002  df-abs 11003  df-dvds 11790  df-prm 12102
This theorem is referenced by:  isprm3  12112  isprm4  12113  dvdsprime  12116  coprm  12138  isprm6  12141  infpn2  12451
  Copyright terms: Public domain W3C validator