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

Theorem phicl2 13044
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 13043 . 2  |-  ( N  e.  NN  ->  ( phi `  N )  =  ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } ) )
2 fzfi 11198 . . . . . . 7  |-  ( 1 ... N )  e. 
Fin
3 ssrab2 3344 . . . . . . 7  |-  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  C_  (
1 ... N )
4 ssfi 7226 . . . . . . 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 653 . . . . . 6  |-  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  e.  Fin
6 hashcl 11526 . . . . . 6  |-  ( { x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 }  e.  Fin  ->  ( # `
 { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  e. 
NN0 )
75, 6ax-mp 8 . . . . 5  |-  ( # `  { x  e.  ( 1 ... N )  |  ( x  gcd  N )  =  1 } )  e.  NN0
87nn0zi 10199 . . . 4  |-  ( # `  { x  e.  ( 1 ... N )  |  ( x  gcd  N )  =  1 } )  e.  ZZ
98a1i 10 . . 3  |-  ( N  e.  NN  ->  ( # `
 { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  e.  ZZ )
10 1z 10204 . . . . 5  |-  1  e.  ZZ
11 hashsng 11534 . . . . 5  |-  ( 1  e.  ZZ  ->  ( # `
 { 1 } )  =  1 )
1210, 11ax-mp 8 . . . 4  |-  ( # `  { 1 } )  =  1
13 ovex 6006 . . . . . . 7  |-  ( 1 ... N )  e. 
_V
1413rabex 4267 . . . . . 6  |-  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  e.  _V
15 eluzfz1 10956 . . . . . . . . 9  |-  ( N  e.  ( ZZ>= `  1
)  ->  1  e.  ( 1 ... N
) )
16 nnuz 10414 . . . . . . . . 9  |-  NN  =  ( ZZ>= `  1 )
1715, 16eleq2s 2458 . . . . . . . 8  |-  ( N  e.  NN  ->  1  e.  ( 1 ... N
) )
18 nnz 10196 . . . . . . . . 9  |-  ( N  e.  NN  ->  N  e.  ZZ )
19 1gcd 12924 . . . . . . . . 9  |-  ( N  e.  ZZ  ->  (
1  gcd  N )  =  1 )
2018, 19syl 15 . . . . . . . 8  |-  ( N  e.  NN  ->  (
1  gcd  N )  =  1 )
21 oveq1 5988 . . . . . . . . . 10  |-  ( x  =  1  ->  (
x  gcd  N )  =  ( 1  gcd 
N ) )
2221eqeq1d 2374 . . . . . . . . 9  |-  ( x  =  1  ->  (
( x  gcd  N
)  =  1  <->  (
1  gcd  N )  =  1 ) )
2322elrab 3009 . . . . . . . 8  |-  ( 1  e.  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  <->  ( 1  e.  ( 1 ... N )  /\  (
1  gcd  N )  =  1 ) )
2417, 20, 23sylanbrc 645 . . . . . . 7  |-  ( N  e.  NN  ->  1  e.  { x  e.  ( 1 ... N )  |  ( x  gcd  N )  =  1 } )
2524snssd 3858 . . . . . 6  |-  ( N  e.  NN  ->  { 1 }  C_  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )
26 ssdomg 7050 . . . . . 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 59 . . . . 5  |-  ( N  e.  NN  ->  { 1 }  ~<_  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )
28 snfi 7084 . . . . . 6  |-  { 1 }  e.  Fin
29 hashdom 11540 . . . . . 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 653 . . . . 5  |-  ( (
# `  { 1 } )  <_  ( # `
 { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  <->  { 1 }  ~<_  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )
3127, 30sylibr 203 . . . 4  |-  ( N  e.  NN  ->  ( # `
 { 1 } )  <_  ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } ) )
3212, 31syl5eqbrr 4159 . . 3  |-  ( N  e.  NN  ->  1  <_  ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } ) )
33 ssdomg 7050 . . . . . 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 17 . . . . 5  |-  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  ~<_  ( 1 ... N )
35 hashdom 11540 . . . . . 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 653 . . . . 5  |-  ( (
# `  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  <_ 
( # `  ( 1 ... N ) )  <->  { x  e.  (
1 ... N )  |  ( x  gcd  N
)  =  1 }  ~<_  ( 1 ... N
) )
3734, 36mpbir 200 . . . 4  |-  ( # `  { x  e.  ( 1 ... N )  |  ( x  gcd  N )  =  1 } )  <_  ( # `  (
1 ... N ) )
38 nnnn0 10121 . . . . 5  |-  ( N  e.  NN  ->  N  e.  NN0 )
39 hashfz1 11517 . . . . 5  |-  ( N  e.  NN0  ->  ( # `  ( 1 ... N
) )  =  N )
4038, 39syl 15 . . . 4  |-  ( N  e.  NN  ->  ( # `
 ( 1 ... N ) )  =  N )
4137, 40syl5breq 4160 . . 3  |-  ( N  e.  NN  ->  ( # `
 { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  <_  N )
42 elfz1 10940 . . . 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 644 . . 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 1136 . 2  |-  ( N  e.  NN  ->  ( # `
 { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  e.  ( 1 ... N
) )
451, 44eqeltrd 2440 1  |-  ( N  e.  NN  ->  ( phi `  N )  e.  ( 1 ... N
) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    <-> wb 176    /\ w3a 935    = wceq 1647    e. wcel 1715   {crab 2632   _Vcvv 2873    C_ wss 3238   {csn 3729   class class class wbr 4125   ` cfv 5358  (class class class)co 5981    ~<_ cdom 7004   Fincfn 7006   1c1 8885    <_ cle 9015   NNcn 9893   NN0cn0 10114   ZZcz 10175   ZZ>=cuz 10381   ...cfz 10935   #chash 11505    gcd cgcd 12893   phicphi 13040
This theorem is referenced by:  phicl  13045  phi1  13049
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1551  ax-5 1562  ax-17 1621  ax-9 1659  ax-8 1680  ax-13 1717  ax-14 1719  ax-6 1734  ax-7 1739  ax-11 1751  ax-12 1937  ax-ext 2347  ax-sep 4243  ax-nul 4251  ax-pow 4290  ax-pr 4316  ax-un 4615  ax-cnex 8940  ax-resscn 8941  ax-1cn 8942  ax-icn 8943  ax-addcl 8944  ax-addrcl 8945  ax-mulcl 8946  ax-mulrcl 8947  ax-mulcom 8948  ax-addass 8949  ax-mulass 8950  ax-distr 8951  ax-i2m1 8952  ax-1ne0 8953  ax-1rid 8954  ax-rnegex 8955  ax-rrecex 8956  ax-cnre 8957  ax-pre-lttri 8958  ax-pre-lttrn 8959  ax-pre-ltadd 8960  ax-pre-mulgt0 8961  ax-pre-sup 8962
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 936  df-3an 937  df-tru 1324  df-ex 1547  df-nf 1550  df-sb 1654  df-eu 2221  df-mo 2222  df-clab 2353  df-cleq 2359  df-clel 2362  df-nfc 2491  df-ne 2531  df-nel 2532  df-ral 2633  df-rex 2634  df-reu 2635  df-rmo 2636  df-rab 2637  df-v 2875  df-sbc 3078  df-csb 3168  df-dif 3241  df-un 3243  df-in 3245  df-ss 3252  df-pss 3254  df-nul 3544  df-if 3655  df-pw 3716  df-sn 3735  df-pr 3736  df-tp 3737  df-op 3738  df-uni 3930  df-int 3965  df-iun 4009  df-br 4126  df-opab 4180  df-mpt 4181  df-tr 4216  df-eprel 4408  df-id 4412  df-po 4417  df-so 4418  df-fr 4455  df-we 4457  df-ord 4498  df-on 4499  df-lim 4500  df-suc 4501  df-om 4760  df-xp 4798  df-rel 4799  df-cnv 4800  df-co 4801  df-dm 4802  df-rn 4803  df-res 4804  df-ima 4805  df-iota 5322  df-fun 5360  df-fn 5361  df-f 5362  df-f1 5363  df-fo 5364  df-f1o 5365  df-fv 5366  df-ov 5984  df-oprab 5985  df-mpt2 5986  df-1st 6249  df-2nd 6250  df-riota 6446  df-recs 6530  df-rdg 6565  df-1o 6621  df-oadd 6625  df-er 6802  df-en 7007  df-dom 7008  df-sdom 7009  df-fin 7010  df-sup 7341  df-card 7719  df-pnf 9016  df-mnf 9017  df-xr 9018  df-ltxr 9019  df-le 9020  df-sub 9186  df-neg 9187  df-div 9571  df-nn 9894  df-2 9951  df-3 9952  df-n0 10115  df-z 10176  df-uz 10382  df-rp 10506  df-fz 10936  df-seq 11211  df-exp 11270  df-hash 11506  df-cj 11791  df-re 11792  df-im 11793  df-sqr 11927  df-abs 11928  df-dvds 12740  df-gcd 12894  df-phi 13042
  Copyright terms: Public domain W3C validator