Metamath Proof Explorer


Theorem dig2nn0

Description: A digit of a nonnegative integer N in a binary system is either 0 or 1. (Contributed by AV, 24-May-2020)

Ref Expression
Assertion dig2nn0 N0KKdigit2N01

Proof

Step Hyp Ref Expression
1 2nn 2
2 1 a1i N0K2
3 simpr N0KK
4 nn0rp0 N0N0+∞
5 4 adantr N0KN0+∞
6 digval 2KN0+∞Kdigit2N=2K Nmod2
7 2 3 5 6 syl3anc N0KKdigit2N=2K Nmod2
8 2re 2
9 8 a1i N0K2
10 2ne0 20
11 10 a1i N0K20
12 znegcl KK
13 12 adantl N0KK
14 9 11 13 reexpclzd N0K2K
15 nn0re N0N
16 15 adantr N0KN
17 14 16 remulcld N0K2K N
18 17 flcld N0K2K N
19 elmod2 2K N2K Nmod201
20 18 19 syl N0K2K Nmod201
21 7 20 eqeltrd N0KKdigit2N01