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

Theorem prmfac1 12026
Description: The factorial of a number only contains primes less than the base. (Contributed by Mario Carneiro, 6-Mar-2014.)
Assertion
Ref Expression
prmfac1  |-  ( ( N  e.  NN0  /\  P  e.  Prime  /\  P  ||  ( ! `  N
) )  ->  P  <_  N )

Proof of Theorem prmfac1
Dummy variables  x  k are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 fveq2 5468 . . . . . 6  |-  ( x  =  0  ->  ( ! `  x )  =  ( ! ` 
0 ) )
21breq2d 3977 . . . . 5  |-  ( x  =  0  ->  ( P  ||  ( ! `  x )  <->  P  ||  ( ! `  0 )
) )
3 breq2 3969 . . . . 5  |-  ( x  =  0  ->  ( P  <_  x  <->  P  <_  0 ) )
42, 3imbi12d 233 . . . 4  |-  ( x  =  0  ->  (
( P  ||  ( ! `  x )  ->  P  <_  x )  <->  ( P  ||  ( ! `
 0 )  ->  P  <_  0 ) ) )
54imbi2d 229 . . 3  |-  ( x  =  0  ->  (
( P  e.  Prime  -> 
( P  ||  ( ! `  x )  ->  P  <_  x )
)  <->  ( P  e. 
Prime  ->  ( P  ||  ( ! `  0 )  ->  P  <_  0
) ) ) )
6 fveq2 5468 . . . . . 6  |-  ( x  =  k  ->  ( ! `  x )  =  ( ! `  k ) )
76breq2d 3977 . . . . 5  |-  ( x  =  k  ->  ( P  ||  ( ! `  x )  <->  P  ||  ( ! `  k )
) )
8 breq2 3969 . . . . 5  |-  ( x  =  k  ->  ( P  <_  x  <->  P  <_  k ) )
97, 8imbi12d 233 . . . 4  |-  ( x  =  k  ->  (
( P  ||  ( ! `  x )  ->  P  <_  x )  <->  ( P  ||  ( ! `
 k )  ->  P  <_  k ) ) )
109imbi2d 229 . . 3  |-  ( x  =  k  ->  (
( P  e.  Prime  -> 
( P  ||  ( ! `  x )  ->  P  <_  x )
)  <->  ( P  e. 
Prime  ->  ( P  ||  ( ! `  k )  ->  P  <_  k
) ) ) )
11 fveq2 5468 . . . . . 6  |-  ( x  =  ( k  +  1 )  ->  ( ! `  x )  =  ( ! `  ( k  +  1 ) ) )
1211breq2d 3977 . . . . 5  |-  ( x  =  ( k  +  1 )  ->  ( P  ||  ( ! `  x )  <->  P  ||  ( ! `  ( k  +  1 ) ) ) )
13 breq2 3969 . . . . 5  |-  ( x  =  ( k  +  1 )  ->  ( P  <_  x  <->  P  <_  ( k  +  1 ) ) )
1412, 13imbi12d 233 . . . 4  |-  ( x  =  ( k  +  1 )  ->  (
( P  ||  ( ! `  x )  ->  P  <_  x )  <->  ( P  ||  ( ! `
 ( k  +  1 ) )  ->  P  <_  ( k  +  1 ) ) ) )
1514imbi2d 229 . . 3  |-  ( x  =  ( k  +  1 )  ->  (
( P  e.  Prime  -> 
( P  ||  ( ! `  x )  ->  P  <_  x )
)  <->  ( P  e. 
Prime  ->  ( P  ||  ( ! `  ( k  +  1 ) )  ->  P  <_  (
k  +  1 ) ) ) ) )
16 fveq2 5468 . . . . . 6  |-  ( x  =  N  ->  ( ! `  x )  =  ( ! `  N ) )
1716breq2d 3977 . . . . 5  |-  ( x  =  N  ->  ( P  ||  ( ! `  x )  <->  P  ||  ( ! `  N )
) )
18 breq2 3969 . . . . 5  |-  ( x  =  N  ->  ( P  <_  x  <->  P  <_  N ) )
1917, 18imbi12d 233 . . . 4  |-  ( x  =  N  ->  (
( P  ||  ( ! `  x )  ->  P  <_  x )  <->  ( P  ||  ( ! `
 N )  ->  P  <_  N ) ) )
2019imbi2d 229 . . 3  |-  ( x  =  N  ->  (
( P  e.  Prime  -> 
( P  ||  ( ! `  x )  ->  P  <_  x )
)  <->  ( P  e. 
Prime  ->  ( P  ||  ( ! `  N )  ->  P  <_  N
) ) ) )
21 fac0 10602 . . . . 5  |-  ( ! `
 0 )  =  1
2221breq2i 3973 . . . 4  |-  ( P 
||  ( ! ` 
0 )  <->  P  ||  1
)
23 nprmdvds1 12016 . . . . 5  |-  ( P  e.  Prime  ->  -.  P  ||  1 )
2423pm2.21d 609 . . . 4  |-  ( P  e.  Prime  ->  ( P 
||  1  ->  P  <_  0 ) )
2522, 24syl5bi 151 . . 3  |-  ( P  e.  Prime  ->  ( P 
||  ( ! ` 
0 )  ->  P  <_  0 ) )
26 facp1 10604 . . . . . . . . . 10  |-  ( k  e.  NN0  ->  ( ! `
 ( k  +  1 ) )  =  ( ( ! `  k )  x.  (
k  +  1 ) ) )
2726adantr 274 . . . . . . . . 9  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( ! `  (
k  +  1 ) )  =  ( ( ! `  k )  x.  ( k  +  1 ) ) )
2827breq2d 3977 . . . . . . . 8  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( P  ||  ( ! `  ( k  +  1 ) )  <-> 
P  ||  ( ( ! `  k )  x.  ( k  +  1 ) ) ) )
29 simpr 109 . . . . . . . . 9  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  ->  P  e.  Prime )
30 faccl 10609 . . . . . . . . . . 11  |-  ( k  e.  NN0  ->  ( ! `
 k )  e.  NN )
3130adantr 274 . . . . . . . . . 10  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( ! `  k
)  e.  NN )
3231nnzd 9285 . . . . . . . . 9  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( ! `  k
)  e.  ZZ )
33 nn0p1nn 9129 . . . . . . . . . . 11  |-  ( k  e.  NN0  ->  ( k  +  1 )  e.  NN )
3433adantr 274 . . . . . . . . . 10  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( k  +  1 )  e.  NN )
3534nnzd 9285 . . . . . . . . 9  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( k  +  1 )  e.  ZZ )
36 euclemma 12020 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  ( ! `  k )  e.  ZZ  /\  ( k  +  1 )  e.  ZZ )  ->  ( P  ||  ( ( ! `
 k )  x.  ( k  +  1 ) )  <->  ( P  ||  ( ! `  k
)  \/  P  ||  ( k  +  1 ) ) ) )
3729, 32, 35, 36syl3anc 1220 . . . . . . . 8  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( P  ||  (
( ! `  k
)  x.  ( k  +  1 ) )  <-> 
( P  ||  ( ! `  k )  \/  P  ||  ( k  +  1 ) ) ) )
3828, 37bitrd 187 . . . . . . 7  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( P  ||  ( ! `  ( k  +  1 ) )  <-> 
( P  ||  ( ! `  k )  \/  P  ||  ( k  +  1 ) ) ) )
39 nn0re 9099 . . . . . . . . . . . . 13  |-  ( k  e.  NN0  ->  k  e.  RR )
4039adantr 274 . . . . . . . . . . . 12  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
k  e.  RR )
4140lep1d 8802 . . . . . . . . . . 11  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
k  <_  ( k  +  1 ) )
42 prmz 11987 . . . . . . . . . . . . . 14  |-  ( P  e.  Prime  ->  P  e.  ZZ )
4342adantl 275 . . . . . . . . . . . . 13  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  ->  P  e.  ZZ )
4443zred 9286 . . . . . . . . . . . 12  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  ->  P  e.  RR )
4534nnred 8846 . . . . . . . . . . . 12  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( k  +  1 )  e.  RR )
46 letr 7960 . . . . . . . . . . . 12  |-  ( ( P  e.  RR  /\  k  e.  RR  /\  (
k  +  1 )  e.  RR )  -> 
( ( P  <_ 
k  /\  k  <_  ( k  +  1 ) )  ->  P  <_  ( k  +  1 ) ) )
4744, 40, 45, 46syl3anc 1220 . . . . . . . . . . 11  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( ( P  <_ 
k  /\  k  <_  ( k  +  1 ) )  ->  P  <_  ( k  +  1 ) ) )
4841, 47mpan2d 425 . . . . . . . . . 10  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( P  <_  k  ->  P  <_  ( k  +  1 ) ) )
4948imim2d 54 . . . . . . . . 9  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( ( P  ||  ( ! `  k )  ->  P  <_  k
)  ->  ( P  ||  ( ! `  k
)  ->  P  <_  ( k  +  1 ) ) ) )
5049com23 78 . . . . . . . 8  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( P  ||  ( ! `  k )  ->  ( ( P  ||  ( ! `  k )  ->  P  <_  k
)  ->  P  <_  ( k  +  1 ) ) ) )
51 dvdsle 11735 . . . . . . . . . 10  |-  ( ( P  e.  ZZ  /\  ( k  +  1 )  e.  NN )  ->  ( P  ||  ( k  +  1 )  ->  P  <_  ( k  +  1 ) ) )
5243, 34, 51syl2anc 409 . . . . . . . . 9  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( P  ||  (
k  +  1 )  ->  P  <_  (
k  +  1 ) ) )
5352a1dd 48 . . . . . . . 8  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( P  ||  (
k  +  1 )  ->  ( ( P 
||  ( ! `  k )  ->  P  <_  k )  ->  P  <_  ( k  +  1 ) ) ) )
5450, 53jaod 707 . . . . . . 7  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( ( P  ||  ( ! `  k )  \/  P  ||  (
k  +  1 ) )  ->  ( ( P  ||  ( ! `  k )  ->  P  <_  k )  ->  P  <_  ( k  +  1 ) ) ) )
5538, 54sylbid 149 . . . . . 6  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( P  ||  ( ! `  ( k  +  1 ) )  ->  ( ( P 
||  ( ! `  k )  ->  P  <_  k )  ->  P  <_  ( k  +  1 ) ) ) )
5655com23 78 . . . . 5  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( ( P  ||  ( ! `  k )  ->  P  <_  k
)  ->  ( P  ||  ( ! `  (
k  +  1 ) )  ->  P  <_  ( k  +  1 ) ) ) )
5756ex 114 . . . 4  |-  ( k  e.  NN0  ->  ( P  e.  Prime  ->  ( ( P  ||  ( ! `
 k )  ->  P  <_  k )  -> 
( P  ||  ( ! `  ( k  +  1 ) )  ->  P  <_  (
k  +  1 ) ) ) ) )
5857a2d 26 . . 3  |-  ( k  e.  NN0  ->  ( ( P  e.  Prime  ->  ( P  ||  ( ! `
 k )  ->  P  <_  k ) )  ->  ( P  e. 
Prime  ->  ( P  ||  ( ! `  ( k  +  1 ) )  ->  P  <_  (
k  +  1 ) ) ) ) )
595, 10, 15, 20, 25, 58nn0ind 9278 . 2  |-  ( N  e.  NN0  ->  ( P  e.  Prime  ->  ( P 
||  ( ! `  N )  ->  P  <_  N ) ) )
60593imp 1176 1  |-  ( ( N  e.  NN0  /\  P  e.  Prime  /\  P  ||  ( ! `  N
) )  ->  P  <_  N )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 103    <-> wb 104    \/ wo 698    /\ w3a 963    = wceq 1335    e. wcel 2128   class class class wbr 3965   ` cfv 5170  (class class class)co 5824   RRcr 7731   0cc0 7732   1c1 7733    + caddc 7735    x. cmul 7737    <_ cle 7913   NNcn 8833   NN0cn0 9090   ZZcz 9167   !cfa 10599    || cdvds 11683   Primecprime 11983
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 604  ax-in2 605  ax-io 699  ax-5 1427  ax-7 1428  ax-gen 1429  ax-ie1 1473  ax-ie2 1474  ax-8 1484  ax-10 1485  ax-11 1486  ax-i12 1487  ax-bndl 1489  ax-4 1490  ax-17 1506  ax-i9 1510  ax-ial 1514  ax-i5r 1515  ax-13 2130  ax-14 2131  ax-ext 2139  ax-coll 4079  ax-sep 4082  ax-nul 4090  ax-pow 4135  ax-pr 4169  ax-un 4393  ax-setind 4496  ax-iinf 4547  ax-cnex 7823  ax-resscn 7824  ax-1cn 7825  ax-1re 7826  ax-icn 7827  ax-addcl 7828  ax-addrcl 7829  ax-mulcl 7830  ax-mulrcl 7831  ax-addcom 7832  ax-mulcom 7833  ax-addass 7834  ax-mulass 7835  ax-distr 7836  ax-i2m1 7837  ax-0lt1 7838  ax-1rid 7839  ax-0id 7840  ax-rnegex 7841  ax-precex 7842  ax-cnre 7843  ax-pre-ltirr 7844  ax-pre-ltwlin 7845  ax-pre-lttrn 7846  ax-pre-apti 7847  ax-pre-ltadd 7848  ax-pre-mulgt0 7849  ax-pre-mulext 7850  ax-arch 7851  ax-caucvg 7852
This theorem depends on definitions:  df-bi 116  df-dc 821  df-3or 964  df-3an 965  df-tru 1338  df-fal 1341  df-nf 1441  df-sb 1743  df-eu 2009  df-mo 2010  df-clab 2144  df-cleq 2150  df-clel 2153  df-nfc 2288  df-ne 2328  df-nel 2423  df-ral 2440  df-rex 2441  df-reu 2442  df-rmo 2443  df-rab 2444  df-v 2714  df-sbc 2938  df-csb 3032  df-dif 3104  df-un 3106  df-in 3108  df-ss 3115  df-nul 3395  df-if 3506  df-pw 3545  df-sn 3566  df-pr 3567  df-op 3569  df-uni 3773  df-int 3808  df-iun 3851  df-br 3966  df-opab 4026  df-mpt 4027  df-tr 4063  df-id 4253  df-po 4256  df-iso 4257  df-iord 4326  df-on 4328  df-ilim 4329  df-suc 4331  df-iom 4550  df-xp 4592  df-rel 4593  df-cnv 4594  df-co 4595  df-dm 4596  df-rn 4597  df-res 4598  df-ima 4599  df-iota 5135  df-fun 5172  df-fn 5173  df-f 5174  df-f1 5175  df-fo 5176  df-f1o 5177  df-fv 5178  df-riota 5780  df-ov 5827  df-oprab 5828  df-mpo 5829  df-1st 6088  df-2nd 6089  df-recs 6252  df-frec 6338  df-1o 6363  df-2o 6364  df-er 6480  df-en 6686  df-sup 6928  df-pnf 7914  df-mnf 7915  df-xr 7916  df-ltxr 7917  df-le 7918  df-sub 8048  df-neg 8049  df-reap 8450  df-ap 8457  df-div 8546  df-inn 8834  df-2 8892  df-3 8893  df-4 8894  df-n0 9091  df-z 9168  df-uz 9440  df-q 9529  df-rp 9561  df-fz 9913  df-fzo 10042  df-fl 10169  df-mod 10222  df-seqfrec 10345  df-exp 10419  df-fac 10600  df-cj 10742  df-re 10743  df-im 10744  df-rsqrt 10898  df-abs 10899  df-dvds 11684  df-gcd 11829  df-prm 11984
This theorem is referenced by:  prmndvdsfaclt  12030
  Copyright terms: Public domain W3C validator