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

Theorem phicl2 13162
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 13161 . 2  |-  ( N  e.  NN  ->  ( phi `  N )  =  ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } ) )
2 fzfi 11316 . . . . . . 7  |-  ( 1 ... N )  e. 
Fin
3 ssrab2 3430 . . . . . . 7  |-  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  C_  (
1 ... N )
4 ssfi 7332 . . . . . . 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 655 . . . . . 6  |-  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  e.  Fin
6 hashcl 11644 . . . . . 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 10311 . . . 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 10316 . . . . 5  |-  1  e.  ZZ
11 hashsng 11652 . . . . 5  |-  ( 1  e.  ZZ  ->  ( # `
 { 1 } )  =  1 )
1210, 11ax-mp 5 . . . 4  |-  ( # `  { 1 } )  =  1
13 ovex 6109 . . . . . . 7  |-  ( 1 ... N )  e. 
_V
1413rabex 4357 . . . . . 6  |-  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  e.  _V
15 eluzfz1 11069 . . . . . . . . 9  |-  ( N  e.  ( ZZ>= `  1
)  ->  1  e.  ( 1 ... N
) )
16 nnuz 10526 . . . . . . . . 9  |-  NN  =  ( ZZ>= `  1 )
1715, 16eleq2s 2530 . . . . . . . 8  |-  ( N  e.  NN  ->  1  e.  ( 1 ... N
) )
18 nnz 10308 . . . . . . . . 9  |-  ( N  e.  NN  ->  N  e.  ZZ )
19 1gcd 13042 . . . . . . . . 9  |-  ( N  e.  ZZ  ->  (
1  gcd  N )  =  1 )
2018, 19syl 16 . . . . . . . 8  |-  ( N  e.  NN  ->  (
1  gcd  N )  =  1 )
21 oveq1 6091 . . . . . . . . . 10  |-  ( x  =  1  ->  (
x  gcd  N )  =  ( 1  gcd 
N ) )
2221eqeq1d 2446 . . . . . . . . 9  |-  ( x  =  1  ->  (
( x  gcd  N
)  =  1  <->  (
1  gcd  N )  =  1 ) )
2322elrab 3094 . . . . . . . 8  |-  ( 1  e.  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  <->  ( 1  e.  ( 1 ... N )  /\  (
1  gcd  N )  =  1 ) )
2417, 20, 23sylanbrc 647 . . . . . . 7  |-  ( N  e.  NN  ->  1  e.  { x  e.  ( 1 ... N )  |  ( x  gcd  N )  =  1 } )
2524snssd 3945 . . . . . 6  |-  ( N  e.  NN  ->  { 1 }  C_  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )
26 ssdomg 7156 . . . . . 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 62 . . . . 5  |-  ( N  e.  NN  ->  { 1 }  ~<_  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )
28 snfi 7190 . . . . . 6  |-  { 1 }  e.  Fin
29 hashdom 11658 . . . . . 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 655 . . . . 5  |-  ( (
# `  { 1 } )  <_  ( # `
 { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  <->  { 1 }  ~<_  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )
3127, 30sylibr 205 . . . 4  |-  ( N  e.  NN  ->  ( # `
 { 1 } )  <_  ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } ) )
3212, 31syl5eqbrr 4249 . . 3  |-  ( N  e.  NN  ->  1  <_  ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } ) )
33 ssdomg 7156 . . . . . 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 11658 . . . . . 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 655 . . . . 5  |-  ( (
# `  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  <_ 
( # `  ( 1 ... N ) )  <->  { x  e.  (
1 ... N )  |  ( x  gcd  N
)  =  1 }  ~<_  ( 1 ... N
) )
3734, 36mpbir 202 . . . 4  |-  ( # `  { x  e.  ( 1 ... N )  |  ( x  gcd  N )  =  1 } )  <_  ( # `  (
1 ... N ) )
38 nnnn0 10233 . . . . 5  |-  ( N  e.  NN  ->  N  e.  NN0 )
39 hashfz1 11635 . . . . 5  |-  ( N  e.  NN0  ->  ( # `  ( 1 ... N
) )  =  N )
4038, 39syl 16 . . . 4  |-  ( N  e.  NN  ->  ( # `
 ( 1 ... N ) )  =  N )
4137, 40syl5breq 4250 . . 3  |-  ( N  e.  NN  ->  ( # `
 { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  <_  N )
42 elfz1 11053 . . . 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 646 . . 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 1138 . 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 set class
Syntax hints:    -> wi 4    <-> wb 178    /\ w3a 937    = wceq 1653    e. wcel 1726   {crab 2711   _Vcvv 2958    C_ wss 3322   {csn 3816   class class class wbr 4215   ` cfv 5457  (class class class)co 6084    ~<_ cdom 7110   Fincfn 7112   1c1 8996    <_ cle 9126   NNcn 10005   NN0cn0 10226   ZZcz 10287   ZZ>=cuz 10493   ...cfz 11048   #chash 11623    gcd cgcd 13011   phicphi 13158
This theorem is referenced by:  phicl  13163  phi1  13167
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1556  ax-5 1567  ax-17 1627  ax-9 1667  ax-8 1688  ax-13 1728  ax-14 1730  ax-6 1745  ax-7 1750  ax-11 1762  ax-12 1951  ax-ext 2419  ax-sep 4333  ax-nul 4341  ax-pow 4380  ax-pr 4406  ax-un 4704  ax-cnex 9051  ax-resscn 9052  ax-1cn 9053  ax-icn 9054  ax-addcl 9055  ax-addrcl 9056  ax-mulcl 9057  ax-mulrcl 9058  ax-mulcom 9059  ax-addass 9060  ax-mulass 9061  ax-distr 9062  ax-i2m1 9063  ax-1ne0 9064  ax-1rid 9065  ax-rnegex 9066  ax-rrecex 9067  ax-cnre 9068  ax-pre-lttri 9069  ax-pre-lttrn 9070  ax-pre-ltadd 9071  ax-pre-mulgt0 9072  ax-pre-sup 9073
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-3or 938  df-3an 939  df-tru 1329  df-ex 1552  df-nf 1555  df-sb 1660  df-eu 2287  df-mo 2288  df-clab 2425  df-cleq 2431  df-clel 2434  df-nfc 2563  df-ne 2603  df-nel 2604  df-ral 2712  df-rex 2713  df-reu 2714  df-rmo 2715  df-rab 2716  df-v 2960  df-sbc 3164  df-csb 3254  df-dif 3325  df-un 3327  df-in 3329  df-ss 3336  df-pss 3338  df-nul 3631  df-if 3742  df-pw 3803  df-sn 3822  df-pr 3823  df-tp 3824  df-op 3825  df-uni 4018  df-int 4053  df-iun 4097  df-br 4216  df-opab 4270  df-mpt 4271  df-tr 4306  df-eprel 4497  df-id 4501  df-po 4506  df-so 4507  df-fr 4544  df-we 4546  df-ord 4587  df-on 4588  df-lim 4589  df-suc 4590  df-om 4849  df-xp 4887  df-rel 4888  df-cnv 4889  df-co 4890  df-dm 4891  df-rn 4892  df-res 4893  df-ima 4894  df-iota 5421  df-fun 5459  df-fn 5460  df-f 5461  df-f1 5462  df-fo 5463  df-f1o 5464  df-fv 5465  df-ov 6087  df-oprab 6088  df-mpt2 6089  df-1st 6352  df-2nd 6353  df-riota 6552  df-recs 6636  df-rdg 6671  df-1o 6727  df-oadd 6731  df-er 6908  df-en 7113  df-dom 7114  df-sdom 7115  df-fin 7116  df-sup 7449  df-card 7831  df-pnf 9127  df-mnf 9128  df-xr 9129  df-ltxr 9130  df-le 9131  df-sub 9298  df-neg 9299  df-div 9683  df-nn 10006  df-2 10063  df-3 10064  df-n0 10227  df-z 10288  df-uz 10494  df-rp 10618  df-fz 11049  df-seq 11329  df-exp 11388  df-hash 11624  df-cj 11909  df-re 11910  df-im 11911  df-sqr 12045  df-abs 12046  df-dvds 12858  df-gcd 13012  df-phi 13160
  Copyright terms: Public domain W3C validator