Metamath Proof Explorer


Theorem digvalnn0

Description: The K th digit of a nonnegative real number R in the positional system with base B is a nonnegative integer. (Contributed by AV, 28-May-2020)

Ref Expression
Assertion digvalnn0 B K R 0 +∞ K digit B R 0

Proof

Step Hyp Ref Expression
1 digval B K R 0 +∞ K digit B R = B K R mod B
2 nnre B B
3 2 3ad2ant1 B K R 0 +∞ B
4 nnne0 B B 0
5 4 3ad2ant1 B K R 0 +∞ B 0
6 znegcl K K
7 6 3ad2ant2 B K R 0 +∞ K
8 3 5 7 reexpclzd B K R 0 +∞ B K
9 elrege0 R 0 +∞ R 0 R
10 9 simplbi R 0 +∞ R
11 10 3ad2ant3 B K R 0 +∞ R
12 8 11 remulcld B K R 0 +∞ B K R
13 12 flcld B K R 0 +∞ B K R
14 simp1 B K R 0 +∞ B
15 13 14 zmodcld B K R 0 +∞ B K R mod B 0
16 1 15 eqeltrd B K R 0 +∞ K digit B R 0