Metamath Proof Explorer


Theorem snmlval

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)

Ref Expression
Hypothesis snml.s S = r 2 x | b 0 r 1 n k 1 n | x r k mod r = b n 1 r
Assertion snmlval A S R R 2 A b 0 R 1 n k 1 n | A R k mod R = b n 1 R

Proof

Step Hyp Ref Expression
1 snml.s S = r 2 x | b 0 r 1 n k 1 n | x r k mod r = b n 1 r
2 oveq1 r = R r 1 = R 1
3 2 oveq2d r = R 0 r 1 = 0 R 1
4 oveq1 r = R r k = R k
5 4 oveq2d r = R x r k = x R k
6 id r = R r = R
7 5 6 oveq12d r = R x r k mod r = x R k mod R
8 7 fveqeq2d r = R x r k mod r = b x R k mod R = b
9 8 rabbidv r = R k 1 n | x r k mod r = b = k 1 n | x R k mod R = b
10 9 fveq2d r = R k 1 n | x r k mod r = b = k 1 n | x R k mod R = b
11 10 oveq1d r = R k 1 n | x r k mod r = b n = k 1 n | x R k mod R = b n
12 11 mpteq2dv r = R n k 1 n | x r k mod r = b n = n k 1 n | x R k mod R = b n
13 oveq2 r = R 1 r = 1 R
14 12 13 breq12d r = R n k 1 n | x r k mod r = b n 1 r n k 1 n | x R k mod R = b n 1 R
15 3 14 raleqbidv r = R b 0 r 1 n k 1 n | x r k mod r = b n 1 r b 0 R 1 n k 1 n | x R k mod R = b n 1 R
16 15 rabbidv r = R x | b 0 r 1 n k 1 n | x r k mod r = b n 1 r = x | b 0 R 1 n k 1 n | x R k mod R = b n 1 R
17 reex V
18 17 rabex x | b 0 R 1 n k 1 n | x R k mod R = b n 1 R V
19 16 1 18 fvmpt R 2 S R = x | b 0 R 1 n k 1 n | x R k mod R = b n 1 R
20 19 eleq2d R 2 A S R A x | b 0 R 1 n k 1 n | x R k mod R = b n 1 R
21 oveq1 x = A x R k = A R k
22 21 fvoveq1d x = A x R k mod R = A R k mod R
23 22 eqeq1d x = A x R k mod R = b A R k mod R = b
24 23 rabbidv x = A k 1 n | x R k mod R = b = k 1 n | A R k mod R = b
25 24 fveq2d x = A k 1 n | x R k mod R = b = k 1 n | A R k mod R = b
26 25 oveq1d x = A k 1 n | x R k mod R = b n = k 1 n | A R k mod R = b n
27 26 mpteq2dv x = A n k 1 n | x R k mod R = b n = n k 1 n | A R k mod R = b n
28 27 breq1d x = A n k 1 n | x R k mod R = b n 1 R n k 1 n | A R k mod R = b n 1 R
29 28 ralbidv x = A b 0 R 1 n k 1 n | x R k mod R = b n 1 R b 0 R 1 n k 1 n | A R k mod R = b n 1 R
30 29 elrab A x | b 0 R 1 n k 1 n | x R k mod R = b n 1 R A b 0 R 1 n k 1 n | A R k mod R = b n 1 R
31 20 30 bitrdi R 2 A S R A b 0 R 1 n k 1 n | A R k mod R = b n 1 R
32 31 pm5.32i R 2 A S R R 2 A b 0 R 1 n k 1 n | A R k mod R = b n 1 R
33 1 dmmptss dom S 2
34 elfvdm A S R R dom S
35 33 34 sseldi A S R R 2
36 35 pm4.71ri A S R R 2 A S R
37 3anass R 2 A b 0 R 1 n k 1 n | A R k mod R = b n 1 R R 2 A b 0 R 1 n k 1 n | A R k mod R = b n 1 R
38 32 36 37 3bitr4i A S R R 2 A b 0 R 1 n k 1 n | A R k mod R = b n 1 R