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

Theorem phicl2 13835
Description: Bounds and closure for the value of the Euler  phi function. (Contributed by Mario Carneiro, 23-Feb-2014.)
Assertion
Ref Expression
phicl2  |-  ( N  e.  NN  ->  ( phi `  N )  e.  ( 1 ... N
) )

Proof of Theorem phicl2
Dummy variable  x is distinct from all other variables.
StepHypRef Expression
1 phival 13834 . 2  |-  ( N  e.  NN  ->  ( phi `  N )  =  ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } ) )
2 fzfi 11786 . . . . . . 7  |-  ( 1 ... N )  e. 
Fin
3 ssrab2 3432 . . . . . . 7  |-  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  C_  (
1 ... N )
4 ssfi 7525 . . . . . . 7  |-  ( ( ( 1 ... N
)  e.  Fin  /\  { x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } 
C_  ( 1 ... N ) )  ->  { x  e.  (
1 ... N )  |  ( x  gcd  N
)  =  1 }  e.  Fin )
52, 3, 4mp2an 672 . . . . . 6  |-  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  e.  Fin
6 hashcl 12118 . . . . . 6  |-  ( { x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 }  e.  Fin  ->  ( # `
 { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  e. 
NN0 )
75, 6ax-mp 5 . . . . 5  |-  ( # `  { x  e.  ( 1 ... N )  |  ( x  gcd  N )  =  1 } )  e.  NN0
87nn0zi 10663 . . . 4  |-  ( # `  { x  e.  ( 1 ... N )  |  ( x  gcd  N )  =  1 } )  e.  ZZ
98a1i 11 . . 3  |-  ( N  e.  NN  ->  ( # `
 { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  e.  ZZ )
10 1z 10668 . . . . 5  |-  1  e.  ZZ
11 hashsng 12128 . . . . 5  |-  ( 1  e.  ZZ  ->  ( # `
 { 1 } )  =  1 )
1210, 11ax-mp 5 . . . 4  |-  ( # `  { 1 } )  =  1
13 ovex 6111 . . . . . . 7  |-  ( 1 ... N )  e. 
_V
1413rabex 4438 . . . . . 6  |-  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  e.  _V
15 eluzfz1 11450 . . . . . . . . 9  |-  ( N  e.  ( ZZ>= `  1
)  ->  1  e.  ( 1 ... N
) )
16 nnuz 10888 . . . . . . . . 9  |-  NN  =  ( ZZ>= `  1 )
1715, 16eleq2s 2530 . . . . . . . 8  |-  ( N  e.  NN  ->  1  e.  ( 1 ... N
) )
18 nnz 10660 . . . . . . . . 9  |-  ( N  e.  NN  ->  N  e.  ZZ )
19 1gcd 13713 . . . . . . . . 9  |-  ( N  e.  ZZ  ->  (
1  gcd  N )  =  1 )
2018, 19syl 16 . . . . . . . 8  |-  ( N  e.  NN  ->  (
1  gcd  N )  =  1 )
21 oveq1 6093 . . . . . . . . . 10  |-  ( x  =  1  ->  (
x  gcd  N )  =  ( 1  gcd 
N ) )
2221eqeq1d 2446 . . . . . . . . 9  |-  ( x  =  1  ->  (
( x  gcd  N
)  =  1  <->  (
1  gcd  N )  =  1 ) )
2322elrab 3112 . . . . . . . 8  |-  ( 1  e.  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  <->  ( 1  e.  ( 1 ... N )  /\  (
1  gcd  N )  =  1 ) )
2417, 20, 23sylanbrc 664 . . . . . . 7  |-  ( N  e.  NN  ->  1  e.  { x  e.  ( 1 ... N )  |  ( x  gcd  N )  =  1 } )
2524snssd 4013 . . . . . 6  |-  ( N  e.  NN  ->  { 1 }  C_  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )
26 ssdomg 7347 . . . . . 6  |-  ( { x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 }  e.  _V  ->  ( { 1 }  C_  { x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 }  ->  { 1 }  ~<_  { x  e.  ( 1 ... N )  |  ( x  gcd  N )  =  1 } ) )
2714, 25, 26mpsyl 63 . . . . 5  |-  ( N  e.  NN  ->  { 1 }  ~<_  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )
28 snfi 7382 . . . . . 6  |-  { 1 }  e.  Fin
29 hashdom 12134 . . . . . 6  |-  ( ( { 1 }  e.  Fin  /\  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  e.  Fin )  ->  ( ( # `  { 1 } )  <_  ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } )  <->  { 1 }  ~<_  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } ) )
3028, 5, 29mp2an 672 . . . . 5  |-  ( (
# `  { 1 } )  <_  ( # `
 { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  <->  { 1 }  ~<_  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )
3127, 30sylibr 212 . . . 4  |-  ( N  e.  NN  ->  ( # `
 { 1 } )  <_  ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } ) )
3212, 31syl5eqbrr 4321 . . 3  |-  ( N  e.  NN  ->  1  <_  ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } ) )
33 ssdomg 7347 . . . . . 6  |-  ( ( 1 ... N )  e.  _V  ->  ( { x  e.  (
1 ... N )  |  ( x  gcd  N
)  =  1 } 
C_  ( 1 ... N )  ->  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  ~<_  ( 1 ... N ) ) )
3413, 3, 33mp2 9 . . . . 5  |-  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  ~<_  ( 1 ... N )
35 hashdom 12134 . . . . . 6  |-  ( ( { x  e.  ( 1 ... N )  |  ( x  gcd  N )  =  1 }  e.  Fin  /\  (
1 ... N )  e. 
Fin )  ->  (
( # `  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  <_ 
( # `  ( 1 ... N ) )  <->  { x  e.  (
1 ... N )  |  ( x  gcd  N
)  =  1 }  ~<_  ( 1 ... N
) ) )
365, 2, 35mp2an 672 . . . . 5  |-  ( (
# `  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  <_ 
( # `  ( 1 ... N ) )  <->  { x  e.  (
1 ... N )  |  ( x  gcd  N
)  =  1 }  ~<_  ( 1 ... N
) )
3734, 36mpbir 209 . . . 4  |-  ( # `  { x  e.  ( 1 ... N )  |  ( x  gcd  N )  =  1 } )  <_  ( # `  (
1 ... N ) )
38 nnnn0 10578 . . . . 5  |-  ( N  e.  NN  ->  N  e.  NN0 )
39 hashfz1 12109 . . . . 5  |-  ( N  e.  NN0  ->  ( # `  ( 1 ... N
) )  =  N )
4038, 39syl 16 . . . 4  |-  ( N  e.  NN  ->  ( # `
 ( 1 ... N ) )  =  N )
4137, 40syl5breq 4322 . . 3  |-  ( N  e.  NN  ->  ( # `
 { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  <_  N )
42 elfz1 11434 . . . 4  |-  ( ( 1  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } )  e.  ( 1 ... N )  <->  ( ( # `
 { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  e.  ZZ  /\  1  <_ 
( # `  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  /\  ( # `  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  <_  N ) ) )
4310, 18, 42sylancr 663 . . 3  |-  ( N  e.  NN  ->  (
( # `  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  e.  ( 1 ... N
)  <->  ( ( # `  { x  e.  ( 1 ... N )  |  ( x  gcd  N )  =  1 } )  e.  ZZ  /\  1  <_  ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } )  /\  ( # `  { x  e.  ( 1 ... N )  |  ( x  gcd  N )  =  1 } )  <_  N )
) )
449, 32, 41, 43mpbir3and 1171 . 2  |-  ( N  e.  NN  ->  ( # `
 { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  e.  ( 1 ... N
) )
451, 44eqeltrd 2512 1  |-  ( N  e.  NN  ->  ( phi `  N )  e.  ( 1 ... N
) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ w3a 965    = wceq 1369    e. wcel 1756   {crab 2714   _Vcvv 2967    C_ wss 3323   {csn 3872   class class class wbr 4287   ` cfv 5413  (class class class)co 6086    ~<_ cdom 7300   Fincfn 7302   1c1 9275    <_ cle 9411   NNcn 10314   NN0cn0 10571   ZZcz 10638   ZZ>=cuz 10853   ...cfz 11429   #chash 12095    gcd cgcd 13682   phicphi 13831
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-8 1758  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2419  ax-sep 4408  ax-nul 4416  ax-pow 4465  ax-pr 4526  ax-un 6367  ax-cnex 9330  ax-resscn 9331  ax-1cn 9332  ax-icn 9333  ax-addcl 9334  ax-addrcl 9335  ax-mulcl 9336  ax-mulrcl 9337  ax-mulcom 9338  ax-addass 9339  ax-mulass 9340  ax-distr 9341  ax-i2m1 9342  ax-1ne0 9343  ax-1rid 9344  ax-rnegex 9345  ax-rrecex 9346  ax-cnre 9347  ax-pre-lttri 9348  ax-pre-lttrn 9349  ax-pre-ltadd 9350  ax-pre-mulgt0 9351  ax-pre-sup 9352
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1372  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2256  df-mo 2257  df-clab 2425  df-cleq 2431  df-clel 2434  df-nfc 2563  df-ne 2603  df-nel 2604  df-ral 2715  df-rex 2716  df-reu 2717  df-rmo 2718  df-rab 2719  df-v 2969  df-sbc 3182  df-csb 3284  df-dif 3326  df-un 3328  df-in 3330  df-ss 3337  df-pss 3339  df-nul 3633  df-if 3787  df-pw 3857  df-sn 3873  df-pr 3875  df-tp 3877  df-op 3879  df-uni 4087  df-int 4124  df-iun 4168  df-br 4288  df-opab 4346  df-mpt 4347  df-tr 4381  df-eprel 4627  df-id 4631  df-po 4636  df-so 4637  df-fr 4674  df-we 4676  df-ord 4717  df-on 4718  df-lim 4719  df-suc 4720  df-xp 4841  df-rel 4842  df-cnv 4843  df-co 4844  df-dm 4845  df-rn 4846  df-res 4847  df-ima 4848  df-iota 5376  df-fun 5415  df-fn 5416  df-f 5417  df-f1 5418  df-fo 5419  df-f1o 5420  df-fv 5421  df-riota 6047  df-ov 6089  df-oprab 6090  df-mpt2 6091  df-om 6472  df-1st 6572  df-2nd 6573  df-recs 6824  df-rdg 6858  df-1o 6912  df-oadd 6916  df-er 7093  df-en 7303  df-dom 7304  df-sdom 7305  df-fin 7306  df-sup 7683  df-card 8101  df-pnf 9412  df-mnf 9413  df-xr 9414  df-ltxr 9415  df-le 9416  df-sub 9589  df-neg 9590  df-div 9986  df-nn 10315  df-2 10372  df-3 10373  df-n0 10572  df-z 10639  df-uz 10854  df-rp 10984  df-fz 11430  df-seq 11799  df-exp 11858  df-hash 12096  df-cj 12580  df-re 12581  df-im 12582  df-sqr 12716  df-abs 12717  df-dvds 13528  df-gcd 13683  df-phi 13833
This theorem is referenced by:  phicl  13836  phi1  13840
  Copyright terms: Public domain W3C validator