Users' Mathboxes Mathbox for Mario Carneiro < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  snmlval Unicode version

Theorem snmlval 23914
Description: The property " A is simply normal in base  R". A number is simply normal if each digit  0  <_  b  <  R occurs in the base-  R digit string of  A with frequency  1  /  R (which is consistent with the expectation in an infinite random string of numbers selected from  0 ... R  -  1). (Contributed by Mario Carneiro, 6-Apr-2015.)
Hypothesis
Ref Expression
snml.s  |-  S  =  ( r  e.  (
ZZ>= `  2 )  |->  { x  e.  RR  |  A. b  e.  (
0 ... ( r  - 
1 ) ) ( n  e.  NN  |->  ( ( # `  {
k  e.  ( 1 ... n )  |  ( |_ `  (
( x  x.  (
r ^ k ) )  mod  r ) )  =  b } )  /  n ) )  ~~>  ( 1  / 
r ) } )
Assertion
Ref Expression
snmlval  |-  ( A  e.  ( S `  R )  <->  ( R  e.  ( ZZ>= `  2 )  /\  A  e.  RR  /\ 
A. b  e.  ( 0 ... ( R  -  1 ) ) ( n  e.  NN  |->  ( ( # `  {
k  e.  ( 1 ... n )  |  ( |_ `  (
( A  x.  ( R ^ k ) )  mod  R ) )  =  b } )  /  n ) )  ~~>  ( 1  /  R
) ) )
Distinct variable groups:    k, b, n, x, A    r, b, R, k, n, x
Allowed substitution hints:    A( r)    S( x, k, n, r, b)

Proof of Theorem snmlval
StepHypRef Expression
1 oveq1 5865 . . . . . . . . 9  |-  ( r  =  R  ->  (
r  -  1 )  =  ( R  - 
1 ) )
21oveq2d 5874 . . . . . . . 8  |-  ( r  =  R  ->  (
0 ... ( r  - 
1 ) )  =  ( 0 ... ( R  -  1 ) ) )
3 oveq1 5865 . . . . . . . . . . . . . . . . 17  |-  ( r  =  R  ->  (
r ^ k )  =  ( R ^
k ) )
43oveq2d 5874 . . . . . . . . . . . . . . . 16  |-  ( r  =  R  ->  (
x  x.  ( r ^ k ) )  =  ( x  x.  ( R ^ k
) ) )
5 id 19 . . . . . . . . . . . . . . . 16  |-  ( r  =  R  ->  r  =  R )
64, 5oveq12d 5876 . . . . . . . . . . . . . . 15  |-  ( r  =  R  ->  (
( x  x.  (
r ^ k ) )  mod  r )  =  ( ( x  x.  ( R ^
k ) )  mod 
R ) )
76fveq2d 5529 . . . . . . . . . . . . . 14  |-  ( r  =  R  ->  ( |_ `  ( ( x  x.  ( r ^
k ) )  mod  r ) )  =  ( |_ `  (
( x  x.  ( R ^ k ) )  mod  R ) ) )
87eqeq1d 2291 . . . . . . . . . . . . 13  |-  ( r  =  R  ->  (
( |_ `  (
( x  x.  (
r ^ k ) )  mod  r ) )  =  b  <->  ( |_ `  ( ( x  x.  ( R ^ k
) )  mod  R
) )  =  b ) )
98rabbidv 2780 . . . . . . . . . . . 12  |-  ( r  =  R  ->  { k  e.  ( 1 ... n )  |  ( |_ `  ( ( x  x.  ( r ^ k ) )  mod  r ) )  =  b }  =  { k  e.  ( 1 ... n )  |  ( |_ `  ( ( x  x.  ( R ^ k
) )  mod  R
) )  =  b } )
109fveq2d 5529 . . . . . . . . . . 11  |-  ( r  =  R  ->  ( # `
 { k  e.  ( 1 ... n
)  |  ( |_
`  ( ( x  x.  ( r ^
k ) )  mod  r ) )  =  b } )  =  ( # `  {
k  e.  ( 1 ... n )  |  ( |_ `  (
( x  x.  ( R ^ k ) )  mod  R ) )  =  b } ) )
1110oveq1d 5873 . . . . . . . . . 10  |-  ( r  =  R  ->  (
( # `  { k  e.  ( 1 ... n )  |  ( |_ `  ( ( x  x.  ( r ^ k ) )  mod  r ) )  =  b } )  /  n )  =  ( ( # `  {
k  e.  ( 1 ... n )  |  ( |_ `  (
( x  x.  ( R ^ k ) )  mod  R ) )  =  b } )  /  n ) )
1211mpteq2dv 4107 . . . . . . . . 9  |-  ( r  =  R  ->  (
n  e.  NN  |->  ( ( # `  {
k  e.  ( 1 ... n )  |  ( |_ `  (
( x  x.  (
r ^ k ) )  mod  r ) )  =  b } )  /  n ) )  =  ( n  e.  NN  |->  ( (
# `  { k  e.  ( 1 ... n
)  |  ( |_
`  ( ( x  x.  ( R ^
k ) )  mod 
R ) )  =  b } )  /  n ) ) )
13 oveq2 5866 . . . . . . . . 9  |-  ( r  =  R  ->  (
1  /  r )  =  ( 1  /  R ) )
1412, 13breq12d 4036 . . . . . . . 8  |-  ( r  =  R  ->  (
( n  e.  NN  |->  ( ( # `  {
k  e.  ( 1 ... n )  |  ( |_ `  (
( x  x.  (
r ^ k ) )  mod  r ) )  =  b } )  /  n ) )  ~~>  ( 1  / 
r )  <->  ( n  e.  NN  |->  ( ( # `  { k  e.  ( 1 ... n )  |  ( |_ `  ( ( x  x.  ( R ^ k
) )  mod  R
) )  =  b } )  /  n
) )  ~~>  ( 1  /  R ) ) )
152, 14raleqbidv 2748 . . . . . . 7  |-  ( r  =  R  ->  ( A. b  e.  (
0 ... ( r  - 
1 ) ) ( n  e.  NN  |->  ( ( # `  {
k  e.  ( 1 ... n )  |  ( |_ `  (
( x  x.  (
r ^ k ) )  mod  r ) )  =  b } )  /  n ) )  ~~>  ( 1  / 
r )  <->  A. b  e.  ( 0 ... ( R  -  1 ) ) ( n  e.  NN  |->  ( ( # `  { k  e.  ( 1 ... n )  |  ( |_ `  ( ( x  x.  ( R ^ k
) )  mod  R
) )  =  b } )  /  n
) )  ~~>  ( 1  /  R ) ) )
1615rabbidv 2780 . . . . . 6  |-  ( r  =  R  ->  { x  e.  RR  |  A. b  e.  ( 0 ... (
r  -  1 ) ) ( n  e.  NN  |->  ( ( # `  { k  e.  ( 1 ... n )  |  ( |_ `  ( ( x  x.  ( r ^ k
) )  mod  r
) )  =  b } )  /  n
) )  ~~>  ( 1  /  r ) }  =  { x  e.  RR  |  A. b  e.  ( 0 ... ( R  -  1 ) ) ( n  e.  NN  |->  ( ( # `  { k  e.  ( 1 ... n )  |  ( |_ `  ( ( x  x.  ( R ^ k
) )  mod  R
) )  =  b } )  /  n
) )  ~~>  ( 1  /  R ) } )
17 snml.s . . . . . 6  |-  S  =  ( r  e.  (
ZZ>= `  2 )  |->  { x  e.  RR  |  A. b  e.  (
0 ... ( r  - 
1 ) ) ( n  e.  NN  |->  ( ( # `  {
k  e.  ( 1 ... n )  |  ( |_ `  (
( x  x.  (
r ^ k ) )  mod  r ) )  =  b } )  /  n ) )  ~~>  ( 1  / 
r ) } )
18 reex 8828 . . . . . . 7  |-  RR  e.  _V
1918rabex 4165 . . . . . 6  |-  { x  e.  RR  |  A. b  e.  ( 0 ... ( R  -  1 ) ) ( n  e.  NN  |->  ( ( # `  { k  e.  ( 1 ... n )  |  ( |_ `  ( ( x  x.  ( R ^ k
) )  mod  R
) )  =  b } )  /  n
) )  ~~>  ( 1  /  R ) }  e.  _V
2016, 17, 19fvmpt 5602 . . . . 5  |-  ( R  e.  ( ZZ>= `  2
)  ->  ( S `  R )  =  {
x  e.  RR  |  A. b  e.  (
0 ... ( R  - 
1 ) ) ( n  e.  NN  |->  ( ( # `  {
k  e.  ( 1 ... n )  |  ( |_ `  (
( x  x.  ( R ^ k ) )  mod  R ) )  =  b } )  /  n ) )  ~~>  ( 1  /  R
) } )
2120eleq2d 2350 . . . 4  |-  ( R  e.  ( ZZ>= `  2
)  ->  ( A  e.  ( S `  R
)  <->  A  e.  { x  e.  RR  |  A. b  e.  ( 0 ... ( R  -  1 ) ) ( n  e.  NN  |->  ( ( # `  { k  e.  ( 1 ... n )  |  ( |_ `  ( ( x  x.  ( R ^ k
) )  mod  R
) )  =  b } )  /  n
) )  ~~>  ( 1  /  R ) } ) )
22 oveq1 5865 . . . . . . . . . . . . . 14  |-  ( x  =  A  ->  (
x  x.  ( R ^ k ) )  =  ( A  x.  ( R ^ k ) ) )
2322oveq1d 5873 . . . . . . . . . . . . 13  |-  ( x  =  A  ->  (
( x  x.  ( R ^ k ) )  mod  R )  =  ( ( A  x.  ( R ^ k ) )  mod  R ) )
2423fveq2d 5529 . . . . . . . . . . . 12  |-  ( x  =  A  ->  ( |_ `  ( ( x  x.  ( R ^
k ) )  mod 
R ) )  =  ( |_ `  (
( A  x.  ( R ^ k ) )  mod  R ) ) )
2524eqeq1d 2291 . . . . . . . . . . 11  |-  ( x  =  A  ->  (
( |_ `  (
( x  x.  ( R ^ k ) )  mod  R ) )  =  b  <->  ( |_ `  ( ( A  x.  ( R ^ k ) )  mod  R ) )  =  b ) )
2625rabbidv 2780 . . . . . . . . . 10  |-  ( x  =  A  ->  { k  e.  ( 1 ... n )  |  ( |_ `  ( ( x  x.  ( R ^ k ) )  mod  R ) )  =  b }  =  { k  e.  ( 1 ... n )  |  ( |_ `  ( ( A  x.  ( R ^ k ) )  mod  R ) )  =  b } )
2726fveq2d 5529 . . . . . . . . 9  |-  ( x  =  A  ->  ( # `
 { k  e.  ( 1 ... n
)  |  ( |_
`  ( ( x  x.  ( R ^
k ) )  mod 
R ) )  =  b } )  =  ( # `  {
k  e.  ( 1 ... n )  |  ( |_ `  (
( A  x.  ( R ^ k ) )  mod  R ) )  =  b } ) )
2827oveq1d 5873 . . . . . . . 8  |-  ( x  =  A  ->  (
( # `  { k  e.  ( 1 ... n )  |  ( |_ `  ( ( x  x.  ( R ^ k ) )  mod  R ) )  =  b } )  /  n )  =  ( ( # `  {
k  e.  ( 1 ... n )  |  ( |_ `  (
( A  x.  ( R ^ k ) )  mod  R ) )  =  b } )  /  n ) )
2928mpteq2dv 4107 . . . . . . 7  |-  ( x  =  A  ->  (
n  e.  NN  |->  ( ( # `  {
k  e.  ( 1 ... n )  |  ( |_ `  (
( x  x.  ( R ^ k ) )  mod  R ) )  =  b } )  /  n ) )  =  ( n  e.  NN  |->  ( ( # `  { k  e.  ( 1 ... n )  |  ( |_ `  ( ( A  x.  ( R ^ k ) )  mod  R ) )  =  b } )  /  n ) ) )
3029breq1d 4033 . . . . . 6  |-  ( x  =  A  ->  (
( n  e.  NN  |->  ( ( # `  {
k  e.  ( 1 ... n )  |  ( |_ `  (
( x  x.  ( R ^ k ) )  mod  R ) )  =  b } )  /  n ) )  ~~>  ( 1  /  R
)  <->  ( n  e.  NN  |->  ( ( # `  { k  e.  ( 1 ... n )  |  ( |_ `  ( ( A  x.  ( R ^ k ) )  mod  R ) )  =  b } )  /  n ) )  ~~>  ( 1  /  R ) ) )
3130ralbidv 2563 . . . . 5  |-  ( x  =  A  ->  ( A. b  e.  (
0 ... ( R  - 
1 ) ) ( n  e.  NN  |->  ( ( # `  {
k  e.  ( 1 ... n )  |  ( |_ `  (
( x  x.  ( R ^ k ) )  mod  R ) )  =  b } )  /  n ) )  ~~>  ( 1  /  R
)  <->  A. b  e.  ( 0 ... ( R  -  1 ) ) ( n  e.  NN  |->  ( ( # `  {
k  e.  ( 1 ... n )  |  ( |_ `  (
( A  x.  ( R ^ k ) )  mod  R ) )  =  b } )  /  n ) )  ~~>  ( 1  /  R
) ) )
3231elrab 2923 . . . 4  |-  ( A  e.  { x  e.  RR  |  A. b  e.  ( 0 ... ( R  -  1 ) ) ( n  e.  NN  |->  ( ( # `  { k  e.  ( 1 ... n )  |  ( |_ `  ( ( x  x.  ( R ^ k
) )  mod  R
) )  =  b } )  /  n
) )  ~~>  ( 1  /  R ) }  <-> 
( A  e.  RR  /\ 
A. b  e.  ( 0 ... ( R  -  1 ) ) ( n  e.  NN  |->  ( ( # `  {
k  e.  ( 1 ... n )  |  ( |_ `  (
( A  x.  ( R ^ k ) )  mod  R ) )  =  b } )  /  n ) )  ~~>  ( 1  /  R
) ) )
3321, 32syl6bb 252 . . 3  |-  ( R  e.  ( ZZ>= `  2
)  ->  ( A  e.  ( S `  R
)  <->  ( A  e.  RR  /\  A. b  e.  ( 0 ... ( R  -  1 ) ) ( n  e.  NN  |->  ( ( # `  { k  e.  ( 1 ... n )  |  ( |_ `  ( ( A  x.  ( R ^ k ) )  mod  R ) )  =  b } )  /  n ) )  ~~>  ( 1  /  R ) ) ) )
3433pm5.32i 618 . 2  |-  ( ( R  e.  ( ZZ>= ` 
2 )  /\  A  e.  ( S `  R
) )  <->  ( R  e.  ( ZZ>= `  2 )  /\  ( A  e.  RR  /\ 
A. b  e.  ( 0 ... ( R  -  1 ) ) ( n  e.  NN  |->  ( ( # `  {
k  e.  ( 1 ... n )  |  ( |_ `  (
( A  x.  ( R ^ k ) )  mod  R ) )  =  b } )  /  n ) )  ~~>  ( 1  /  R
) ) ) )
3517dmmptss 5169 . . . 4  |-  dom  S  C_  ( ZZ>= `  2 )
36 elfvdm 5554 . . . 4  |-  ( A  e.  ( S `  R )  ->  R  e.  dom  S )
3735, 36sseldi 3178 . . 3  |-  ( A  e.  ( S `  R )  ->  R  e.  ( ZZ>= `  2 )
)
3837pm4.71ri 614 . 2  |-  ( A  e.  ( S `  R )  <->  ( R  e.  ( ZZ>= `  2 )  /\  A  e.  ( S `  R )
) )
39 3anass 938 . 2  |-  ( ( R  e.  ( ZZ>= ` 
2 )  /\  A  e.  RR  /\  A. b  e.  ( 0 ... ( R  -  1 ) ) ( n  e.  NN  |->  ( ( # `  { k  e.  ( 1 ... n )  |  ( |_ `  ( ( A  x.  ( R ^ k ) )  mod  R ) )  =  b } )  /  n ) )  ~~>  ( 1  /  R ) )  <->  ( R  e.  ( ZZ>= `  2 )  /\  ( A  e.  RR  /\ 
A. b  e.  ( 0 ... ( R  -  1 ) ) ( n  e.  NN  |->  ( ( # `  {
k  e.  ( 1 ... n )  |  ( |_ `  (
( A  x.  ( R ^ k ) )  mod  R ) )  =  b } )  /  n ) )  ~~>  ( 1  /  R
) ) ) )
4034, 38, 393bitr4i 268 1  |-  ( A  e.  ( S `  R )  <->  ( R  e.  ( ZZ>= `  2 )  /\  A  e.  RR  /\ 
A. b  e.  ( 0 ... ( R  -  1 ) ) ( n  e.  NN  |->  ( ( # `  {
k  e.  ( 1 ... n )  |  ( |_ `  (
( A  x.  ( R ^ k ) )  mod  R ) )  =  b } )  /  n ) )  ~~>  ( 1  /  R
) ) )
Colors of variables: wff set class
Syntax hints:    <-> wb 176    /\ wa 358    /\ w3a 934    = wceq 1623    e. wcel 1684   A.wral 2543   {crab 2547   class class class wbr 4023    e. cmpt 4077   dom cdm 4689   ` cfv 5255  (class class class)co 5858   RRcr 8736   0cc0 8737   1c1 8738    x. cmul 8742    - cmin 9037    / cdiv 9423   NNcn 9746   2c2 9795   ZZ>=cuz 10230   ...cfz 10782   |_cfl 10924    mod cmo 10973   ^cexp 11104   #chash 11337    ~~> cli 11958
This theorem is referenced by:  snmlflim  23915
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-cnex 8793  ax-resscn 8794
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  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-ral 2548  df-rex 2549  df-rab 2552  df-v 2790  df-sbc 2992  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-nul 3456  df-if 3566  df-sn 3646  df-pr 3647  df-op 3649  df-uni 3828  df-br 4024  df-opab 4078  df-mpt 4079  df-id 4309  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-fv 5263  df-ov 5861
  Copyright terms: Public domain W3C validator