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

Theorem phicl2 13116
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 13115 . 2  |-  ( N  e.  NN  ->  ( phi `  N )  =  ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } ) )
2 fzfi 11270 . . . . . . 7  |-  ( 1 ... N )  e. 
Fin
3 ssrab2 3392 . . . . . . 7  |-  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  C_  (
1 ... N )
4 ssfi 7292 . . . . . . 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 654 . . . . . 6  |-  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  e.  Fin
6 hashcl 11598 . . . . . 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 10266 . . . 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 10271 . . . . 5  |-  1  e.  ZZ
11 hashsng 11606 . . . . 5  |-  ( 1  e.  ZZ  ->  ( # `
 { 1 } )  =  1 )
1210, 11ax-mp 8 . . . 4  |-  ( # `  { 1 } )  =  1
13 ovex 6069 . . . . . . 7  |-  ( 1 ... N )  e. 
_V
1413rabex 4318 . . . . . 6  |-  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  e.  _V
15 eluzfz1 11024 . . . . . . . . 9  |-  ( N  e.  ( ZZ>= `  1
)  ->  1  e.  ( 1 ... N
) )
16 nnuz 10481 . . . . . . . . 9  |-  NN  =  ( ZZ>= `  1 )
1715, 16eleq2s 2500 . . . . . . . 8  |-  ( N  e.  NN  ->  1  e.  ( 1 ... N
) )
18 nnz 10263 . . . . . . . . 9  |-  ( N  e.  NN  ->  N  e.  ZZ )
19 1gcd 12996 . . . . . . . . 9  |-  ( N  e.  ZZ  ->  (
1  gcd  N )  =  1 )
2018, 19syl 16 . . . . . . . 8  |-  ( N  e.  NN  ->  (
1  gcd  N )  =  1 )
21 oveq1 6051 . . . . . . . . . 10  |-  ( x  =  1  ->  (
x  gcd  N )  =  ( 1  gcd 
N ) )
2221eqeq1d 2416 . . . . . . . . 9  |-  ( x  =  1  ->  (
( x  gcd  N
)  =  1  <->  (
1  gcd  N )  =  1 ) )
2322elrab 3056 . . . . . . . 8  |-  ( 1  e.  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  <->  ( 1  e.  ( 1 ... N )  /\  (
1  gcd  N )  =  1 ) )
2417, 20, 23sylanbrc 646 . . . . . . 7  |-  ( N  e.  NN  ->  1  e.  { x  e.  ( 1 ... N )  |  ( x  gcd  N )  =  1 } )
2524snssd 3907 . . . . . 6  |-  ( N  e.  NN  ->  { 1 }  C_  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )
26 ssdomg 7116 . . . . . 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 61 . . . . 5  |-  ( N  e.  NN  ->  { 1 }  ~<_  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )
28 snfi 7150 . . . . . 6  |-  { 1 }  e.  Fin
29 hashdom 11612 . . . . . 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 654 . . . . 5  |-  ( (
# `  { 1 } )  <_  ( # `
 { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  <->  { 1 }  ~<_  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )
3127, 30sylibr 204 . . . 4  |-  ( N  e.  NN  ->  ( # `
 { 1 } )  <_  ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } ) )
3212, 31syl5eqbrr 4210 . . 3  |-  ( N  e.  NN  ->  1  <_  ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } ) )
33 ssdomg 7116 . . . . . 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 11612 . . . . . 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 654 . . . . 5  |-  ( (
# `  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  <_ 
( # `  ( 1 ... N ) )  <->  { x  e.  (
1 ... N )  |  ( x  gcd  N
)  =  1 }  ~<_  ( 1 ... N
) )
3734, 36mpbir 201 . . . 4  |-  ( # `  { x  e.  ( 1 ... N )  |  ( x  gcd  N )  =  1 } )  <_  ( # `  (
1 ... N ) )
38 nnnn0 10188 . . . . 5  |-  ( N  e.  NN  ->  N  e.  NN0 )
39 hashfz1 11589 . . . . 5  |-  ( N  e.  NN0  ->  ( # `  ( 1 ... N
) )  =  N )
4038, 39syl 16 . . . 4  |-  ( N  e.  NN  ->  ( # `
 ( 1 ... N ) )  =  N )
4137, 40syl5breq 4211 . . 3  |-  ( N  e.  NN  ->  ( # `
 { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  <_  N )
42 elfz1 11008 . . . 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 645 . . 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 1137 . 2  |-  ( N  e.  NN  ->  ( # `
 { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  e.  ( 1 ... N
) )
451, 44eqeltrd 2482 1  |-  ( N  e.  NN  ->  ( phi `  N )  e.  ( 1 ... N
) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    <-> wb 177    /\ w3a 936    = wceq 1649    e. wcel 1721   {crab 2674   _Vcvv 2920    C_ wss 3284   {csn 3778   class class class wbr 4176   ` cfv 5417  (class class class)co 6044    ~<_ cdom 7070   Fincfn 7072   1c1 8951    <_ cle 9081   NNcn 9960   NN0cn0 10181   ZZcz 10242   ZZ>=cuz 10448   ...cfz 11003   #chash 11577    gcd cgcd 12965   phicphi 13112
This theorem is referenced by:  phicl  13117  phi1  13121
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1552  ax-5 1563  ax-17 1623  ax-9 1662  ax-8 1683  ax-13 1723  ax-14 1725  ax-6 1740  ax-7 1745  ax-11 1757  ax-12 1946  ax-ext 2389  ax-sep 4294  ax-nul 4302  ax-pow 4341  ax-pr 4367  ax-un 4664  ax-cnex 9006  ax-resscn 9007  ax-1cn 9008  ax-icn 9009  ax-addcl 9010  ax-addrcl 9011  ax-mulcl 9012  ax-mulrcl 9013  ax-mulcom 9014  ax-addass 9015  ax-mulass 9016  ax-distr 9017  ax-i2m1 9018  ax-1ne0 9019  ax-1rid 9020  ax-rnegex 9021  ax-rrecex 9022  ax-cnre 9023  ax-pre-lttri 9024  ax-pre-lttrn 9025  ax-pre-ltadd 9026  ax-pre-mulgt0 9027  ax-pre-sup 9028
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1325  df-ex 1548  df-nf 1551  df-sb 1656  df-eu 2262  df-mo 2263  df-clab 2395  df-cleq 2401  df-clel 2404  df-nfc 2533  df-ne 2573  df-nel 2574  df-ral 2675  df-rex 2676  df-reu 2677  df-rmo 2678  df-rab 2679  df-v 2922  df-sbc 3126  df-csb 3216  df-dif 3287  df-un 3289  df-in 3291  df-ss 3298  df-pss 3300  df-nul 3593  df-if 3704  df-pw 3765  df-sn 3784  df-pr 3785  df-tp 3786  df-op 3787  df-uni 3980  df-int 4015  df-iun 4059  df-br 4177  df-opab 4231  df-mpt 4232  df-tr 4267  df-eprel 4458  df-id 4462  df-po 4467  df-so 4468  df-fr 4505  df-we 4507  df-ord 4548  df-on 4549  df-lim 4550  df-suc 4551  df-om 4809  df-xp 4847  df-rel 4848  df-cnv 4849  df-co 4850  df-dm 4851  df-rn 4852  df-res 4853  df-ima 4854  df-iota 5381  df-fun 5419  df-fn 5420  df-f 5421  df-f1 5422  df-fo 5423  df-f1o 5424  df-fv 5425  df-ov 6047  df-oprab 6048  df-mpt2 6049  df-1st 6312  df-2nd 6313  df-riota 6512  df-recs 6596  df-rdg 6631  df-1o 6687  df-oadd 6691  df-er 6868  df-en 7073  df-dom 7074  df-sdom 7075  df-fin 7076  df-sup 7408  df-card 7786  df-pnf 9082  df-mnf 9083  df-xr 9084  df-ltxr 9085  df-le 9086  df-sub 9253  df-neg 9254  df-div 9638  df-nn 9961  df-2 10018  df-3 10019  df-n0 10182  df-z 10243  df-uz 10449  df-rp 10573  df-fz 11004  df-seq 11283  df-exp 11342  df-hash 11578  df-cj 11863  df-re 11864  df-im 11865  df-sqr 11999  df-abs 12000  df-dvds 12812  df-gcd 12966  df-phi 13114
  Copyright terms: Public domain W3C validator