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

Theorem phicl2 12836
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 12835 . 2  |-  ( N  e.  NN  ->  ( phi `  N )  =  ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } ) )
2 fzfi 11034 . . . . . . 7  |-  ( 1 ... N )  e. 
Fin
3 ssrab2 3258 . . . . . . 7  |-  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  C_  (
1 ... N )
4 ssfi 7083 . . . . . . 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 11350 . . . . . 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 10048 . . . 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 10053 . . . . 5  |-  1  e.  ZZ
11 hashsng 11356 . . . . 5  |-  ( 1  e.  ZZ  ->  ( # `
 { 1 } )  =  1 )
1210, 11ax-mp 8 . . . 4  |-  ( # `  { 1 } )  =  1
13 ovex 5883 . . . . . . 7  |-  ( 1 ... N )  e. 
_V
1413rabex 4165 . . . . . 6  |-  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 }  e.  _V
15 eluzfz1 10803 . . . . . . . . 9  |-  ( N  e.  ( ZZ>= `  1
)  ->  1  e.  ( 1 ... N
) )
16 nnuz 10263 . . . . . . . . 9  |-  NN  =  ( ZZ>= `  1 )
1715, 16eleq2s 2375 . . . . . . . 8  |-  ( N  e.  NN  ->  1  e.  ( 1 ... N
) )
18 nnz 10045 . . . . . . . . 9  |-  ( N  e.  NN  ->  N  e.  ZZ )
19 1gcd 12716 . . . . . . . . 9  |-  ( N  e.  ZZ  ->  (
1  gcd  N )  =  1 )
2018, 19syl 15 . . . . . . . 8  |-  ( N  e.  NN  ->  (
1  gcd  N )  =  1 )
21 oveq1 5865 . . . . . . . . . 10  |-  ( x  =  1  ->  (
x  gcd  N )  =  ( 1  gcd 
N ) )
2221eqeq1d 2291 . . . . . . . . 9  |-  ( x  =  1  ->  (
( x  gcd  N
)  =  1  <->  (
1  gcd  N )  =  1 ) )
2322elrab 2923 . . . . . . . 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 3760 . . . . . 6  |-  ( N  e.  NN  ->  { 1 }  C_  { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )
26 ssdomg 6907 . . . . . 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 6941 . . . . . 6  |-  { 1 }  e.  Fin
29 hashdom 11361 . . . . . 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 4057 . . 3  |-  ( N  e.  NN  ->  1  <_  ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } ) )
33 ssdomg 6907 . . . . . 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 11361 . . . . . 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 9972 . . . . 5  |-  ( N  e.  NN  ->  N  e.  NN0 )
39 hashfz1 11345 . . . . 5  |-  ( N  e.  NN0  ->  ( # `  ( 1 ... N
) )  =  N )
4038, 39syl 15 . . . 4  |-  ( N  e.  NN  ->  ( # `
 ( 1 ... N ) )  =  N )
4137, 40syl5breq 4058 . . 3  |-  ( N  e.  NN  ->  ( # `
 { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  <_  N )
42 elfz1 10787 . . . 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 1135 . 2  |-  ( N  e.  NN  ->  ( # `
 { x  e.  ( 1 ... N
)  |  ( x  gcd  N )  =  1 } )  e.  ( 1 ... N
) )
451, 44eqeltrd 2357 1  |-  ( N  e.  NN  ->  ( phi `  N )  e.  ( 1 ... N
) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    <-> wb 176    /\ w3a 934    = wceq 1623    e. wcel 1684   {crab 2547   _Vcvv 2788    C_ wss 3152   {csn 3640   class class class wbr 4023   ` cfv 5255  (class class class)co 5858    ~<_ cdom 6861   Fincfn 6863   1c1 8738    <_ cle 8868   NNcn 9746   NN0cn0 9965   ZZcz 10024   ZZ>=cuz 10230   ...cfz 10782   #chash 11337    gcd cgcd 12685   phicphi 12832
This theorem is referenced by:  phicl  12837  phi1  12841
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1533  ax-5 1544  ax-17 1603  ax-9 1635  ax-8 1643  ax-13 1686  ax-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512  ax-cnex 8793  ax-resscn 8794  ax-1cn 8795  ax-icn 8796  ax-addcl 8797  ax-addrcl 8798  ax-mulcl 8799  ax-mulrcl 8800  ax-mulcom 8801  ax-addass 8802  ax-mulass 8803  ax-distr 8804  ax-i2m1 8805  ax-1ne0 8806  ax-1rid 8807  ax-rnegex 8808  ax-rrecex 8809  ax-cnre 8810  ax-pre-lttri 8811  ax-pre-lttrn 8812  ax-pre-ltadd 8813  ax-pre-mulgt0 8814  ax-pre-sup 8815
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1529  df-nf 1532  df-sb 1630  df-eu 2147  df-mo 2148  df-clab 2270  df-cleq 2276  df-clel 2279  df-nfc 2408  df-ne 2448  df-nel 2449  df-ral 2548  df-rex 2549  df-reu 2550  df-rmo 2551  df-rab 2552  df-v 2790  df-sbc 2992  df-csb 3082  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-pss 3168  df-nul 3456  df-if 3566  df-pw 3627  df-sn 3646  df-pr 3647  df-tp 3648  df-op 3649  df-uni 3828  df-int 3863  df-iun 3907  df-br 4024  df-opab 4078  df-mpt 4079  df-tr 4114  df-eprel 4305  df-id 4309  df-po 4314  df-so 4315  df-fr 4352  df-we 4354  df-ord 4395  df-on 4396  df-lim 4397  df-suc 4398  df-om 4657  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-rn 4700  df-res 4701  df-ima 4702  df-iota 5219  df-fun 5257  df-fn 5258  df-f 5259  df-f1 5260  df-fo 5261  df-f1o 5262  df-fv 5263  df-ov 5861  df-oprab 5862  df-mpt2 5863  df-1st 6122  df-2nd 6123  df-riota 6304  df-recs 6388  df-rdg 6423  df-1o 6479  df-oadd 6483  df-er 6660  df-en 6864  df-dom 6865  df-sdom 6866  df-fin 6867  df-sup 7194  df-card 7572  df-pnf 8869  df-mnf 8870  df-xr 8871  df-ltxr 8872  df-le 8873  df-sub 9039  df-neg 9040  df-div 9424  df-nn 9747  df-2 9804  df-3 9805  df-n0 9966  df-z 10025  df-uz 10231  df-rp 10355  df-fz 10783  df-seq 11047  df-exp 11105  df-hash 11338  df-cj 11584  df-re 11585  df-im 11586  df-sqr 11720  df-abs 11721  df-dvds 12532  df-gcd 12686  df-phi 12834
  Copyright terms: Public domain W3C validator