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

Theorem snmlval 25018
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 6088 . . . . . . . . 9  |-  ( r  =  R  ->  (
r  -  1 )  =  ( R  - 
1 ) )
21oveq2d 6097 . . . . . . . 8  |-  ( r  =  R  ->  (
0 ... ( r  - 
1 ) )  =  ( 0 ... ( R  -  1 ) ) )
3 oveq1 6088 . . . . . . . . . . . . . . . . 17  |-  ( r  =  R  ->  (
r ^ k )  =  ( R ^
k ) )
43oveq2d 6097 . . . . . . . . . . . . . . . 16  |-  ( r  =  R  ->  (
x  x.  ( r ^ k ) )  =  ( x  x.  ( R ^ k
) ) )
5 id 20 . . . . . . . . . . . . . . . 16  |-  ( r  =  R  ->  r  =  R )
64, 5oveq12d 6099 . . . . . . . . . . . . . . 15  |-  ( r  =  R  ->  (
( x  x.  (
r ^ k ) )  mod  r )  =  ( ( x  x.  ( R ^
k ) )  mod 
R ) )
76fveq2d 5732 . . . . . . . . . . . . . 14  |-  ( r  =  R  ->  ( |_ `  ( ( x  x.  ( r ^
k ) )  mod  r ) )  =  ( |_ `  (
( x  x.  ( R ^ k ) )  mod  R ) ) )
87eqeq1d 2444 . . . . . . . . . . . . 13  |-  ( r  =  R  ->  (
( |_ `  (
( x  x.  (
r ^ k ) )  mod  r ) )  =  b  <->  ( |_ `  ( ( x  x.  ( R ^ k
) )  mod  R
) )  =  b ) )
98rabbidv 2948 . . . . . . . . . . . 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 5732 . . . . . . . . . . 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 6096 . . . . . . . . . 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 4296 . . . . . . . . 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 6089 . . . . . . . . 9  |-  ( r  =  R  ->  (
1  /  r )  =  ( 1  /  R ) )
1412, 13breq12d 4225 . . . . . . . 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 2916 . . . . . . 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 2948 . . . . . 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 9081 . . . . . . 7  |-  RR  e.  _V
1918rabex 4354 . . . . . 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 5806 . . . . 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 2503 . . . 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 6088 . . . . . . . . . . . . . 14  |-  ( x  =  A  ->  (
x  x.  ( R ^ k ) )  =  ( A  x.  ( R ^ k ) ) )
2322oveq1d 6096 . . . . . . . . . . . . 13  |-  ( x  =  A  ->  (
( x  x.  ( R ^ k ) )  mod  R )  =  ( ( A  x.  ( R ^ k ) )  mod  R ) )
2423fveq2d 5732 . . . . . . . . . . . 12  |-  ( x  =  A  ->  ( |_ `  ( ( x  x.  ( R ^
k ) )  mod 
R ) )  =  ( |_ `  (
( A  x.  ( R ^ k ) )  mod  R ) ) )
2524eqeq1d 2444 . . . . . . . . . . 11  |-  ( x  =  A  ->  (
( |_ `  (
( x  x.  ( R ^ k ) )  mod  R ) )  =  b  <->  ( |_ `  ( ( A  x.  ( R ^ k ) )  mod  R ) )  =  b ) )
2625rabbidv 2948 . . . . . . . . . 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 5732 . . . . . . . . 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 6096 . . . . . . . 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 4296 . . . . . . 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 4222 . . . . . 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 2725 . . . . 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 3092 . . . 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 253 . . 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 619 . 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 5366 . . . 4  |-  dom  S  C_  ( ZZ>= `  2 )
36 elfvdm 5757 . . . 4  |-  ( A  e.  ( S `  R )  ->  R  e.  dom  S )
3735, 36sseldi 3346 . . 3  |-  ( A  e.  ( S `  R )  ->  R  e.  ( ZZ>= `  2 )
)
3837pm4.71ri 615 . 2  |-  ( A  e.  ( S `  R )  <->  ( R  e.  ( ZZ>= `  2 )  /\  A  e.  ( S `  R )
) )
39 3anass 940 . 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 269 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 177    /\ wa 359    /\ w3a 936    = wceq 1652    e. wcel 1725   A.wral 2705   {crab 2709   class class class wbr 4212    e. cmpt 4266   dom cdm 4878   ` cfv 5454  (class class class)co 6081   RRcr 8989   0cc0 8990   1c1 8991    x. cmul 8995    - cmin 9291    / cdiv 9677   NNcn 10000   2c2 10049   ZZ>=cuz 10488   ...cfz 11043   |_cfl 11201    mod cmo 11250   ^cexp 11382   #chash 11618    ~~> cli 12278
This theorem is referenced by:  snmlflim  25019
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1555  ax-5 1566  ax-17 1626  ax-9 1666  ax-8 1687  ax-13 1727  ax-14 1729  ax-6 1744  ax-7 1749  ax-11 1761  ax-12 1950  ax-ext 2417  ax-sep 4330  ax-nul 4338  ax-pow 4377  ax-pr 4403  ax-cnex 9046  ax-resscn 9047
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3an 938  df-tru 1328  df-ex 1551  df-nf 1554  df-sb 1659  df-eu 2285  df-mo 2286  df-clab 2423  df-cleq 2429  df-clel 2432  df-nfc 2561  df-ne 2601  df-ral 2710  df-rex 2711  df-rab 2714  df-v 2958  df-sbc 3162  df-dif 3323  df-un 3325  df-in 3327  df-ss 3334  df-nul 3629  df-if 3740  df-sn 3820  df-pr 3821  df-op 3823  df-uni 4016  df-br 4213  df-opab 4267  df-mpt 4268  df-id 4498  df-xp 4884  df-rel 4885  df-cnv 4886  df-co 4887  df-dm 4888  df-rn 4889  df-res 4890  df-ima 4891  df-iota 5418  df-fun 5456  df-fv 5462  df-ov 6084
  Copyright terms: Public domain W3C validator