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

Theorem snmlval 23929
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 5881 . . . . . . . . 9  |-  ( r  =  R  ->  (
r  -  1 )  =  ( R  - 
1 ) )
21oveq2d 5890 . . . . . . . 8  |-  ( r  =  R  ->  (
0 ... ( r  - 
1 ) )  =  ( 0 ... ( R  -  1 ) ) )
3 oveq1 5881 . . . . . . . . . . . . . . . . 17  |-  ( r  =  R  ->  (
r ^ k )  =  ( R ^
k ) )
43oveq2d 5890 . . . . . . . . . . . . . . . 16  |-  ( r  =  R  ->  (
x  x.  ( r ^ k ) )  =  ( x  x.  ( R ^ k
) ) )
5 id 19 . . . . . . . . . . . . . . . 16  |-  ( r  =  R  ->  r  =  R )
64, 5oveq12d 5892 . . . . . . . . . . . . . . 15  |-  ( r  =  R  ->  (
( x  x.  (
r ^ k ) )  mod  r )  =  ( ( x  x.  ( R ^
k ) )  mod 
R ) )
76fveq2d 5545 . . . . . . . . . . . . . 14  |-  ( r  =  R  ->  ( |_ `  ( ( x  x.  ( r ^
k ) )  mod  r ) )  =  ( |_ `  (
( x  x.  ( R ^ k ) )  mod  R ) ) )
87eqeq1d 2304 . . . . . . . . . . . . 13  |-  ( r  =  R  ->  (
( |_ `  (
( x  x.  (
r ^ k ) )  mod  r ) )  =  b  <->  ( |_ `  ( ( x  x.  ( R ^ k
) )  mod  R
) )  =  b ) )
98rabbidv 2793 . . . . . . . . . . . 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 5545 . . . . . . . . . . 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 5889 . . . . . . . . . 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 4123 . . . . . . . . 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 5882 . . . . . . . . 9  |-  ( r  =  R  ->  (
1  /  r )  =  ( 1  /  R ) )
1412, 13breq12d 4052 . . . . . . . 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 2761 . . . . . . 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 2793 . . . . . 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 8844 . . . . . . 7  |-  RR  e.  _V
1918rabex 4181 . . . . . 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 5618 . . . . 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 2363 . . . 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 5881 . . . . . . . . . . . . . 14  |-  ( x  =  A  ->  (
x  x.  ( R ^ k ) )  =  ( A  x.  ( R ^ k ) ) )
2322oveq1d 5889 . . . . . . . . . . . . 13  |-  ( x  =  A  ->  (
( x  x.  ( R ^ k ) )  mod  R )  =  ( ( A  x.  ( R ^ k ) )  mod  R ) )
2423fveq2d 5545 . . . . . . . . . . . 12  |-  ( x  =  A  ->  ( |_ `  ( ( x  x.  ( R ^
k ) )  mod 
R ) )  =  ( |_ `  (
( A  x.  ( R ^ k ) )  mod  R ) ) )
2524eqeq1d 2304 . . . . . . . . . . 11  |-  ( x  =  A  ->  (
( |_ `  (
( x  x.  ( R ^ k ) )  mod  R ) )  =  b  <->  ( |_ `  ( ( A  x.  ( R ^ k ) )  mod  R ) )  =  b ) )
2625rabbidv 2793 . . . . . . . . . 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 5545 . . . . . . . . 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 5889 . . . . . . . 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 4123 . . . . . . 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 4049 . . . . . 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 2576 . . . . 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 2936 . . . 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 5185 . . . 4  |-  dom  S  C_  ( ZZ>= `  2 )
36 elfvdm 5570 . . . 4  |-  ( A  e.  ( S `  R )  ->  R  e.  dom  S )
3735, 36sseldi 3191 . . 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 1632    e. wcel 1696   A.wral 2556   {crab 2560   class class class wbr 4039    e. cmpt 4093   dom cdm 4705   ` cfv 5271  (class class class)co 5874   RRcr 8752   0cc0 8753   1c1 8754    x. cmul 8758    - cmin 9053    / cdiv 9439   NNcn 9762   2c2 9811   ZZ>=cuz 10246   ...cfz 10798   |_cfl 10940    mod cmo 10989   ^cexp 11120   #chash 11353    ~~> cli 11974
This theorem is referenced by:  snmlflim  23930
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1536  ax-5 1547  ax-17 1606  ax-9 1644  ax-8 1661  ax-13 1698  ax-14 1700  ax-6 1715  ax-7 1720  ax-11 1727  ax-12 1878  ax-ext 2277  ax-sep 4157  ax-nul 4165  ax-pow 4204  ax-pr 4230  ax-cnex 8809  ax-resscn 8810
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3an 936  df-tru 1310  df-ex 1532  df-nf 1535  df-sb 1639  df-eu 2160  df-mo 2161  df-clab 2283  df-cleq 2289  df-clel 2292  df-nfc 2421  df-ne 2461  df-ral 2561  df-rex 2562  df-rab 2565  df-v 2803  df-sbc 3005  df-dif 3168  df-un 3170  df-in 3172  df-ss 3179  df-nul 3469  df-if 3579  df-sn 3659  df-pr 3660  df-op 3662  df-uni 3844  df-br 4040  df-opab 4094  df-mpt 4095  df-id 4325  df-xp 4711  df-rel 4712  df-cnv 4713  df-co 4714  df-dm 4715  df-rn 4716  df-res 4717  df-ima 4718  df-iota 5235  df-fun 5273  df-fv 5279  df-ov 5877
  Copyright terms: Public domain W3C validator