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

Theorem prmfac1 14664
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 5863 . . . . . 6  |-  ( x  =  0  ->  ( ! `  x )  =  ( ! ` 
0 ) )
21breq2d 4413 . . . . 5  |-  ( x  =  0  ->  ( P  ||  ( ! `  x )  <->  P  ||  ( ! `  0 )
) )
3 breq2 4405 . . . . 5  |-  ( x  =  0  ->  ( P  <_  x  <->  P  <_  0 ) )
42, 3imbi12d 322 . . . 4  |-  ( x  =  0  ->  (
( P  ||  ( ! `  x )  ->  P  <_  x )  <->  ( P  ||  ( ! `
 0 )  ->  P  <_  0 ) ) )
54imbi2d 318 . . 3  |-  ( x  =  0  ->  (
( P  e.  Prime  -> 
( P  ||  ( ! `  x )  ->  P  <_  x )
)  <->  ( P  e. 
Prime  ->  ( P  ||  ( ! `  0 )  ->  P  <_  0
) ) ) )
6 fveq2 5863 . . . . . 6  |-  ( x  =  k  ->  ( ! `  x )  =  ( ! `  k ) )
76breq2d 4413 . . . . 5  |-  ( x  =  k  ->  ( P  ||  ( ! `  x )  <->  P  ||  ( ! `  k )
) )
8 breq2 4405 . . . . 5  |-  ( x  =  k  ->  ( P  <_  x  <->  P  <_  k ) )
97, 8imbi12d 322 . . . 4  |-  ( x  =  k  ->  (
( P  ||  ( ! `  x )  ->  P  <_  x )  <->  ( P  ||  ( ! `
 k )  ->  P  <_  k ) ) )
109imbi2d 318 . . 3  |-  ( x  =  k  ->  (
( P  e.  Prime  -> 
( P  ||  ( ! `  x )  ->  P  <_  x )
)  <->  ( P  e. 
Prime  ->  ( P  ||  ( ! `  k )  ->  P  <_  k
) ) ) )
11 fveq2 5863 . . . . . 6  |-  ( x  =  ( k  +  1 )  ->  ( ! `  x )  =  ( ! `  ( k  +  1 ) ) )
1211breq2d 4413 . . . . 5  |-  ( x  =  ( k  +  1 )  ->  ( P  ||  ( ! `  x )  <->  P  ||  ( ! `  ( k  +  1 ) ) ) )
13 breq2 4405 . . . . 5  |-  ( x  =  ( k  +  1 )  ->  ( P  <_  x  <->  P  <_  ( k  +  1 ) ) )
1412, 13imbi12d 322 . . . 4  |-  ( x  =  ( k  +  1 )  ->  (
( P  ||  ( ! `  x )  ->  P  <_  x )  <->  ( P  ||  ( ! `
 ( k  +  1 ) )  ->  P  <_  ( k  +  1 ) ) ) )
1514imbi2d 318 . . 3  |-  ( x  =  ( k  +  1 )  ->  (
( P  e.  Prime  -> 
( P  ||  ( ! `  x )  ->  P  <_  x )
)  <->  ( P  e. 
Prime  ->  ( P  ||  ( ! `  ( k  +  1 ) )  ->  P  <_  (
k  +  1 ) ) ) ) )
16 fveq2 5863 . . . . . 6  |-  ( x  =  N  ->  ( ! `  x )  =  ( ! `  N ) )
1716breq2d 4413 . . . . 5  |-  ( x  =  N  ->  ( P  ||  ( ! `  x )  <->  P  ||  ( ! `  N )
) )
18 breq2 4405 . . . . 5  |-  ( x  =  N  ->  ( P  <_  x  <->  P  <_  N ) )
1917, 18imbi12d 322 . . . 4  |-  ( x  =  N  ->  (
( P  ||  ( ! `  x )  ->  P  <_  x )  <->  ( P  ||  ( ! `
 N )  ->  P  <_  N ) ) )
2019imbi2d 318 . . 3  |-  ( x  =  N  ->  (
( P  e.  Prime  -> 
( P  ||  ( ! `  x )  ->  P  <_  x )
)  <->  ( P  e. 
Prime  ->  ( P  ||  ( ! `  N )  ->  P  <_  N
) ) ) )
21 fac0 12459 . . . . 5  |-  ( ! `
 0 )  =  1
2221breq2i 4409 . . . 4  |-  ( P 
||  ( ! ` 
0 )  <->  P  ||  1
)
23 nprmdvds1 14643 . . . . 5  |-  ( P  e.  Prime  ->  -.  P  ||  1 )
2423pm2.21d 110 . . . 4  |-  ( P  e.  Prime  ->  ( P 
||  1  ->  P  <_  0 ) )
2522, 24syl5bi 221 . . 3  |-  ( P  e.  Prime  ->  ( P 
||  ( ! ` 
0 )  ->  P  <_  0 ) )
26 facp1 12461 . . . . . . . . . 10  |-  ( k  e.  NN0  ->  ( ! `
 ( k  +  1 ) )  =  ( ( ! `  k )  x.  (
k  +  1 ) ) )
2726adantr 467 . . . . . . . . 9  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( ! `  (
k  +  1 ) )  =  ( ( ! `  k )  x.  ( k  +  1 ) ) )
2827breq2d 4413 . . . . . . . 8  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( P  ||  ( ! `  ( k  +  1 ) )  <-> 
P  ||  ( ( ! `  k )  x.  ( k  +  1 ) ) ) )
29 simpr 463 . . . . . . . . 9  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  ->  P  e.  Prime )
30 faccl 12466 . . . . . . . . . . 11  |-  ( k  e.  NN0  ->  ( ! `
 k )  e.  NN )
3130adantr 467 . . . . . . . . . 10  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( ! `  k
)  e.  NN )
3231nnzd 11036 . . . . . . . . 9  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( ! `  k
)  e.  ZZ )
33 nn0p1nn 10906 . . . . . . . . . . 11  |-  ( k  e.  NN0  ->  ( k  +  1 )  e.  NN )
3433adantr 467 . . . . . . . . . 10  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( k  +  1 )  e.  NN )
3534nnzd 11036 . . . . . . . . 9  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( k  +  1 )  e.  ZZ )
36 euclemma 14658 . . . . . . . . 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 1267 . . . . . . . 8  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( P  ||  (
( ! `  k
)  x.  ( k  +  1 ) )  <-> 
( P  ||  ( ! `  k )  \/  P  ||  ( k  +  1 ) ) ) )
3828, 37bitrd 257 . . . . . . 7  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( P  ||  ( ! `  ( k  +  1 ) )  <-> 
( P  ||  ( ! `  k )  \/  P  ||  ( k  +  1 ) ) ) )
39 nn0re 10875 . . . . . . . . . . . . 13  |-  ( k  e.  NN0  ->  k  e.  RR )
4039adantr 467 . . . . . . . . . . . 12  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
k  e.  RR )
4140lep1d 10535 . . . . . . . . . . 11  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
k  <_  ( k  +  1 ) )
42 prmz 14619 . . . . . . . . . . . . . 14  |-  ( P  e.  Prime  ->  P  e.  ZZ )
4342adantl 468 . . . . . . . . . . . . 13  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  ->  P  e.  ZZ )
4443zred 11037 . . . . . . . . . . . 12  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  ->  P  e.  RR )
4534nnred 10621 . . . . . . . . . . . 12  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( k  +  1 )  e.  RR )
46 letr 9724 . . . . . . . . . . . 12  |-  ( ( P  e.  RR  /\  k  e.  RR  /\  (
k  +  1 )  e.  RR )  -> 
( ( P  <_ 
k  /\  k  <_  ( k  +  1 ) )  ->  P  <_  ( k  +  1 ) ) )
4744, 40, 45, 46syl3anc 1267 . . . . . . . . . . 11  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( ( P  <_ 
k  /\  k  <_  ( k  +  1 ) )  ->  P  <_  ( k  +  1 ) ) )
4841, 47mpan2d 679 . . . . . . . . . 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 81 . . . . . . . 8  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( P  ||  ( ! `  k )  ->  ( ( P  ||  ( ! `  k )  ->  P  <_  k
)  ->  P  <_  ( k  +  1 ) ) ) )
51 dvdsle 14343 . . . . . . . . . 10  |-  ( ( P  e.  ZZ  /\  ( k  +  1 )  e.  NN )  ->  ( P  ||  ( k  +  1 )  ->  P  <_  ( k  +  1 ) ) )
5243, 34, 51syl2anc 666 . . . . . . . . 9  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( P  ||  (
k  +  1 )  ->  P  <_  (
k  +  1 ) ) )
5352a1dd 47 . . . . . . . 8  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( P  ||  (
k  +  1 )  ->  ( ( P 
||  ( ! `  k )  ->  P  <_  k )  ->  P  <_  ( k  +  1 ) ) ) )
5450, 53jaod 382 . . . . . . 7  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( ( P  ||  ( ! `  k )  \/  P  ||  (
k  +  1 ) )  ->  ( ( P  ||  ( ! `  k )  ->  P  <_  k )  ->  P  <_  ( k  +  1 ) ) ) )
5538, 54sylbid 219 . . . . . 6  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( P  ||  ( ! `  ( k  +  1 ) )  ->  ( ( P 
||  ( ! `  k )  ->  P  <_  k )  ->  P  <_  ( k  +  1 ) ) ) )
5655com23 81 . . . . 5  |-  ( ( k  e.  NN0  /\  P  e.  Prime )  -> 
( ( P  ||  ( ! `  k )  ->  P  <_  k
)  ->  ( P  ||  ( ! `  (
k  +  1 ) )  ->  P  <_  ( k  +  1 ) ) ) )
5756ex 436 . . . 4  |-  ( k  e.  NN0  ->  ( P  e.  Prime  ->  ( ( P  ||  ( ! `
 k )  ->  P  <_  k )  -> 
( P  ||  ( ! `  ( k  +  1 ) )  ->  P  <_  (
k  +  1 ) ) ) ) )
5857a2d 29 . . 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 11027 . 2  |-  ( N  e.  NN0  ->  ( P  e.  Prime  ->  ( P 
||  ( ! `  N )  ->  P  <_  N ) ) )
60593imp 1201 1  |-  ( ( N  e.  NN0  /\  P  e.  Prime  /\  P  ||  ( ! `  N
) )  ->  P  <_  N )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 188    \/ wo 370    /\ wa 371    /\ w3a 984    = wceq 1443    e. wcel 1886   class class class wbr 4401   ` cfv 5581  (class class class)co 6288   RRcr 9535   0cc0 9536   1c1 9537    + caddc 9539    x. cmul 9541    <_ cle 9673   NNcn 10606   NN0cn0 10866   ZZcz 10934   !cfa 12456    || cdvds 14298   Primecprime 14615
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1668  ax-4 1681  ax-5 1757  ax-6 1804  ax-7 1850  ax-8 1888  ax-9 1895  ax-10 1914  ax-11 1919  ax-12 1932  ax-13 2090  ax-ext 2430  ax-sep 4524  ax-nul 4533  ax-pow 4580  ax-pr 4638  ax-un 6580  ax-cnex 9592  ax-resscn 9593  ax-1cn 9594  ax-icn 9595  ax-addcl 9596  ax-addrcl 9597  ax-mulcl 9598  ax-mulrcl 9599  ax-mulcom 9600  ax-addass 9601  ax-mulass 9602  ax-distr 9603  ax-i2m1 9604  ax-1ne0 9605  ax-1rid 9606  ax-rnegex 9607  ax-rrecex 9608  ax-cnre 9609  ax-pre-lttri 9610  ax-pre-lttrn 9611  ax-pre-ltadd 9612  ax-pre-mulgt0 9613  ax-pre-sup 9614
This theorem depends on definitions:  df-bi 189  df-or 372  df-an 373  df-3or 985  df-3an 986  df-tru 1446  df-ex 1663  df-nf 1667  df-sb 1797  df-eu 2302  df-mo 2303  df-clab 2437  df-cleq 2443  df-clel 2446  df-nfc 2580  df-ne 2623  df-nel 2624  df-ral 2741  df-rex 2742  df-reu 2743  df-rmo 2744  df-rab 2745  df-v 3046  df-sbc 3267  df-csb 3363  df-dif 3406  df-un 3408  df-in 3410  df-ss 3417  df-pss 3419  df-nul 3731  df-if 3881  df-pw 3952  df-sn 3968  df-pr 3970  df-tp 3972  df-op 3974  df-uni 4198  df-int 4234  df-iun 4279  df-br 4402  df-opab 4461  df-mpt 4462  df-tr 4497  df-eprel 4744  df-id 4748  df-po 4754  df-so 4755  df-fr 4792  df-we 4794  df-xp 4839  df-rel 4840  df-cnv 4841  df-co 4842  df-dm 4843  df-rn 4844  df-res 4845  df-ima 4846  df-pred 5379  df-ord 5425  df-on 5426  df-lim 5427  df-suc 5428  df-iota 5545  df-fun 5583  df-fn 5584  df-f 5585  df-f1 5586  df-fo 5587  df-f1o 5588  df-fv 5589  df-riota 6250  df-ov 6291  df-oprab 6292  df-mpt2 6293  df-om 6690  df-2nd 6791  df-wrecs 7025  df-recs 7087  df-rdg 7125  df-1o 7179  df-2o 7180  df-oadd 7183  df-er 7360  df-en 7567  df-dom 7568  df-sdom 7569  df-fin 7570  df-sup 7953  df-inf 7954  df-pnf 9674  df-mnf 9675  df-xr 9676  df-ltxr 9677  df-le 9678  df-sub 9859  df-neg 9860  df-div 10267  df-nn 10607  df-2 10665  df-3 10666  df-n0 10867  df-z 10935  df-uz 11157  df-rp 11300  df-fl 12025  df-mod 12094  df-seq 12211  df-exp 12270  df-fac 12457  df-cj 13155  df-re 13156  df-im 13157  df-sqrt 13291  df-abs 13292  df-dvds 14299  df-gcd 14462  df-prm 14616
This theorem is referenced by:  chtublem  24132  bposlem3  24207
  Copyright terms: Public domain W3C validator