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

Theorem isprm4 10881
Description: The predicate "is a prime number". A prime number is an integer greater than or equal to 2 whose only divisor greater than or equal to 2 is itself. (Contributed by Paul Chapman, 26-Oct-2012.)
Assertion
Ref Expression
isprm4  |-  ( P  e.  Prime  <->  ( P  e.  ( ZZ>= `  2 )  /\  A. z  e.  (
ZZ>= `  2 ) ( z  ||  P  -> 
z  =  P ) ) )
Distinct variable group:    z, P

Proof of Theorem isprm4
StepHypRef Expression
1 isprm2 10879 . 2  |-  ( P  e.  Prime  <->  ( P  e.  ( ZZ>= `  2 )  /\  A. z  e.  NN  ( z  ||  P  ->  ( z  =  1  \/  z  =  P ) ) ) )
2 eluz2nn 8952 . . . . . . . 8  |-  ( z  e.  ( ZZ>= `  2
)  ->  z  e.  NN )
32pm4.71ri 384 . . . . . . 7  |-  ( z  e.  ( ZZ>= `  2
)  <->  ( z  e.  NN  /\  z  e.  ( ZZ>= `  2 )
) )
43imbi1i 236 . . . . . 6  |-  ( ( z  e.  ( ZZ>= ` 
2 )  ->  (
z  ||  P  ->  z  =  P ) )  <-> 
( ( z  e.  NN  /\  z  e.  ( ZZ>= `  2 )
)  ->  ( z  ||  P  ->  z  =  P ) ) )
5 impexp 259 . . . . . 6  |-  ( ( ( z  e.  NN  /\  z  e.  ( ZZ>= ` 
2 ) )  -> 
( z  ||  P  ->  z  =  P ) )  <->  ( z  e.  NN  ->  ( z  e.  ( ZZ>= `  2 )  ->  ( z  ||  P  ->  z  =  P ) ) ) )
64, 5bitri 182 . . . . 5  |-  ( ( z  e.  ( ZZ>= ` 
2 )  ->  (
z  ||  P  ->  z  =  P ) )  <-> 
( z  e.  NN  ->  ( z  e.  (
ZZ>= `  2 )  -> 
( z  ||  P  ->  z  =  P ) ) ) )
7 eluz2b3 8986 . . . . . . . 8  |-  ( z  e.  ( ZZ>= `  2
)  <->  ( z  e.  NN  /\  z  =/=  1 ) )
87imbi1i 236 . . . . . . 7  |-  ( ( z  e.  ( ZZ>= ` 
2 )  ->  (
z  ||  P  ->  z  =  P ) )  <-> 
( ( z  e.  NN  /\  z  =/=  1 )  ->  (
z  ||  P  ->  z  =  P ) ) )
9 impexp 259 . . . . . . . 8  |-  ( ( ( z  e.  NN  /\  z  =/=  1 )  ->  ( z  ||  P  ->  z  =  P ) )  <->  ( z  e.  NN  ->  ( z  =/=  1  ->  ( z 
||  P  ->  z  =  P ) ) ) )
10 bi2.04 246 . . . . . . . . . 10  |-  ( ( z  =/=  1  -> 
( z  ||  P  ->  z  =  P ) )  <->  ( z  ||  P  ->  ( z  =/=  1  ->  z  =  P ) ) )
11 nnz 8665 . . . . . . . . . . . . . 14  |-  ( z  e.  NN  ->  z  e.  ZZ )
12 1zzd 8673 . . . . . . . . . . . . . 14  |-  ( z  e.  NN  ->  1  e.  ZZ )
13 zdceq 8718 . . . . . . . . . . . . . 14  |-  ( ( z  e.  ZZ  /\  1  e.  ZZ )  -> DECID  z  =  1 )
1411, 12, 13syl2anc 403 . . . . . . . . . . . . 13  |-  ( z  e.  NN  -> DECID  z  =  1
)
15 dfordc 825 . . . . . . . . . . . . 13  |-  (DECID  z  =  1  ->  ( (
z  =  1  \/  z  =  P )  <-> 
( -.  z  =  1  ->  z  =  P ) ) )
1614, 15syl 14 . . . . . . . . . . . 12  |-  ( z  e.  NN  ->  (
( z  =  1  \/  z  =  P )  <->  ( -.  z  =  1  ->  z  =  P ) ) )
17 df-ne 2250 . . . . . . . . . . . . 13  |-  ( z  =/=  1  <->  -.  z  =  1 )
1817imbi1i 236 . . . . . . . . . . . 12  |-  ( ( z  =/=  1  -> 
z  =  P )  <-> 
( -.  z  =  1  ->  z  =  P ) )
1916, 18syl6rbbr 197 . . . . . . . . . . 11  |-  ( z  e.  NN  ->  (
( z  =/=  1  ->  z  =  P )  <-> 
( z  =  1  \/  z  =  P ) ) )
2019imbi2d 228 . . . . . . . . . 10  |-  ( z  e.  NN  ->  (
( z  ||  P  ->  ( z  =/=  1  ->  z  =  P ) )  <->  ( z  ||  P  ->  ( z  =  1  \/  z  =  P ) ) ) )
2110, 20syl5bb 190 . . . . . . . . 9  |-  ( z  e.  NN  ->  (
( z  =/=  1  ->  ( z  ||  P  ->  z  =  P ) )  <->  ( z  ||  P  ->  ( z  =  1  \/  z  =  P ) ) ) )
2221imbi2d 228 . . . . . . . 8  |-  ( z  e.  NN  ->  (
( z  e.  NN  ->  ( z  =/=  1  ->  ( z  ||  P  ->  z  =  P ) ) )  <->  ( z  e.  NN  ->  ( z  ||  P  ->  ( z  =  1  \/  z  =  P ) ) ) ) )
239, 22syl5bb 190 . . . . . . 7  |-  ( z  e.  NN  ->  (
( ( z  e.  NN  /\  z  =/=  1 )  ->  (
z  ||  P  ->  z  =  P ) )  <-> 
( z  e.  NN  ->  ( z  ||  P  ->  ( z  =  1  \/  z  =  P ) ) ) ) )
248, 23syl5bb 190 . . . . . 6  |-  ( z  e.  NN  ->  (
( z  e.  (
ZZ>= `  2 )  -> 
( z  ||  P  ->  z  =  P ) )  <->  ( z  e.  NN  ->  ( z  ||  P  ->  ( z  =  1  \/  z  =  P ) ) ) ) )
2524pm5.74i 178 . . . . 5  |-  ( ( z  e.  NN  ->  ( z  e.  ( ZZ>= ` 
2 )  ->  (
z  ||  P  ->  z  =  P ) ) )  <->  ( z  e.  NN  ->  ( z  e.  NN  ->  ( z  ||  P  ->  ( z  =  1  \/  z  =  P ) ) ) ) )
26 pm5.4 247 . . . . 5  |-  ( ( z  e.  NN  ->  ( z  e.  NN  ->  ( z  ||  P  -> 
( z  =  1  \/  z  =  P ) ) ) )  <-> 
( z  e.  NN  ->  ( z  ||  P  ->  ( z  =  1  \/  z  =  P ) ) ) )
276, 25, 263bitri 204 . . . 4  |-  ( ( z  e.  ( ZZ>= ` 
2 )  ->  (
z  ||  P  ->  z  =  P ) )  <-> 
( z  e.  NN  ->  ( z  ||  P  ->  ( z  =  1  \/  z  =  P ) ) ) )
2827ralbii2 2382 . . 3  |-  ( A. z  e.  ( ZZ>= ` 
2 ) ( z 
||  P  ->  z  =  P )  <->  A. z  e.  NN  ( z  ||  P  ->  ( z  =  1  \/  z  =  P ) ) )
2928anbi2i 445 . 2  |-  ( ( P  e.  ( ZZ>= ` 
2 )  /\  A. z  e.  ( ZZ>= ` 
2 ) ( z 
||  P  ->  z  =  P ) )  <->  ( P  e.  ( ZZ>= `  2 )  /\  A. z  e.  NN  ( z  ||  P  ->  ( z  =  1  \/  z  =  P ) ) ) )
301, 29bitr4i 185 1  |-  ( P  e.  Prime  <->  ( P  e.  ( ZZ>= `  2 )  /\  A. z  e.  (
ZZ>= `  2 ) ( z  ||  P  -> 
z  =  P ) ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 102    <-> wb 103    \/ wo 662  DECID wdc 776    = wceq 1285    e. wcel 1434    =/= wne 2249   A.wral 2353   class class class wbr 3811   ` cfv 4969   1c1 7254   NNcn 8316   2c2 8366   ZZcz 8646   ZZ>=cuz 8914    || cdvds 10576   Primecprime 10869
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 104  ax-ia2 105  ax-ia3 106  ax-in1 577  ax-in2 578  ax-io 663  ax-5 1377  ax-7 1378  ax-gen 1379  ax-ie1 1423  ax-ie2 1424  ax-8 1436  ax-10 1437  ax-11 1438  ax-i12 1439  ax-bndl 1440  ax-4 1441  ax-13 1445  ax-14 1446  ax-17 1460  ax-i9 1464  ax-ial 1468  ax-i5r 1469  ax-ext 2065  ax-coll 3919  ax-sep 3922  ax-nul 3930  ax-pow 3974  ax-pr 4000  ax-un 4224  ax-setind 4316  ax-iinf 4366  ax-cnex 7339  ax-resscn 7340  ax-1cn 7341  ax-1re 7342  ax-icn 7343  ax-addcl 7344  ax-addrcl 7345  ax-mulcl 7346  ax-mulrcl 7347  ax-addcom 7348  ax-mulcom 7349  ax-addass 7350  ax-mulass 7351  ax-distr 7352  ax-i2m1 7353  ax-0lt1 7354  ax-1rid 7355  ax-0id 7356  ax-rnegex 7357  ax-precex 7358  ax-cnre 7359  ax-pre-ltirr 7360  ax-pre-ltwlin 7361  ax-pre-lttrn 7362  ax-pre-apti 7363  ax-pre-ltadd 7364  ax-pre-mulgt0 7365  ax-pre-mulext 7366  ax-arch 7367  ax-caucvg 7368
This theorem depends on definitions:  df-bi 115  df-dc 777  df-3or 921  df-3an 922  df-tru 1288  df-fal 1291  df-nf 1391  df-sb 1688  df-eu 1946  df-mo 1947  df-clab 2070  df-cleq 2076  df-clel 2079  df-nfc 2212  df-ne 2250  df-nel 2345  df-ral 2358  df-rex 2359  df-reu 2360  df-rmo 2361  df-rab 2362  df-v 2614  df-sbc 2827  df-csb 2920  df-dif 2986  df-un 2988  df-in 2990  df-ss 2997  df-nul 3270  df-if 3374  df-pw 3408  df-sn 3428  df-pr 3429  df-op 3431  df-uni 3628  df-int 3663  df-iun 3706  df-br 3812  df-opab 3866  df-mpt 3867  df-tr 3902  df-id 4084  df-po 4087  df-iso 4088  df-iord 4157  df-on 4159  df-ilim 4160  df-suc 4162  df-iom 4369  df-xp 4407  df-rel 4408  df-cnv 4409  df-co 4410  df-dm 4411  df-rn 4412  df-res 4413  df-ima 4414  df-iota 4934  df-fun 4971  df-fn 4972  df-f 4973  df-f1 4974  df-fo 4975  df-f1o 4976  df-fv 4977  df-riota 5547  df-ov 5594  df-oprab 5595  df-mpt2 5596  df-1st 5846  df-2nd 5847  df-recs 6002  df-frec 6088  df-1o 6113  df-2o 6114  df-er 6222  df-en 6388  df-pnf 7427  df-mnf 7428  df-xr 7429  df-ltxr 7430  df-le 7431  df-sub 7558  df-neg 7559  df-reap 7952  df-ap 7959  df-div 8038  df-inn 8317  df-2 8375  df-3 8376  df-4 8377  df-n0 8566  df-z 8647  df-uz 8915  df-q 9000  df-rp 9030  df-iseq 9741  df-iexp 9792  df-cj 10103  df-re 10104  df-im 10105  df-rsqrt 10258  df-abs 10259  df-dvds 10577  df-prm 10870
This theorem is referenced by:  nprm  10885  prmuz2  10892  dvdsprm  10898
  Copyright terms: Public domain W3C validator