Metamath Proof Explorer


Theorem 0dig2nn0o

Description: The last bit of an odd integer is 1. (Contributed by AV, 3-Jun-2010)

Ref Expression
Assertion 0dig2nn0o N 0 N + 1 2 0 0 digit 2 N = 1

Proof

Step Hyp Ref Expression
1 2nn 2
2 1 a1i N 0 N + 1 2 0 2
3 0nn0 0 0
4 3 a1i N 0 N + 1 2 0 0 0
5 nn0rp0 N 0 N 0 +∞
6 5 adantr N 0 N + 1 2 0 N 0 +∞
7 nn0digval 2 0 0 N 0 +∞ 0 digit 2 N = N 2 0 mod 2
8 2 4 6 7 syl3anc N 0 N + 1 2 0 0 digit 2 N = N 2 0 mod 2
9 2cn 2
10 exp0 2 2 0 = 1
11 9 10 mp1i N 0 N + 1 2 0 2 0 = 1
12 11 oveq2d N 0 N + 1 2 0 N 2 0 = N 1
13 nn0cn N 0 N
14 13 div1d N 0 N 1 = N
15 14 adantr N 0 N + 1 2 0 N 1 = N
16 12 15 eqtrd N 0 N + 1 2 0 N 2 0 = N
17 16 fveq2d N 0 N + 1 2 0 N 2 0 = N
18 17 oveq1d N 0 N + 1 2 0 N 2 0 mod 2 = N mod 2
19 nn0z N 0 N
20 flid N N = N
21 19 20 syl N 0 N = N
22 21 oveq1d N 0 N mod 2 = N mod 2
23 22 adantr N 0 N + 1 2 0 N mod 2 = N mod 2
24 nn0z N + 1 2 0 N + 1 2
25 24 adantl N 0 N + 1 2 0 N + 1 2
26 2z 2
27 26 a1i N 0 N + 1 2 0 2
28 2ne0 2 0
29 28 a1i N 0 N + 1 2 0 2 0
30 peano2nn0 N 0 N + 1 0
31 30 nn0zd N 0 N + 1
32 31 adantr N 0 N + 1 2 0 N + 1
33 dvdsval2 2 2 0 N + 1 2 N + 1 N + 1 2
34 27 29 32 33 syl3anc N 0 N + 1 2 0 2 N + 1 N + 1 2
35 25 34 mpbird N 0 N + 1 2 0 2 N + 1
36 oddp1even N ¬ 2 N 2 N + 1
37 19 36 syl N 0 ¬ 2 N 2 N + 1
38 37 adantr N 0 N + 1 2 0 ¬ 2 N 2 N + 1
39 35 38 mpbird N 0 N + 1 2 0 ¬ 2 N
40 19 adantr N 0 N + 1 2 0 N
41 mod2eq1n2dvds N N mod 2 = 1 ¬ 2 N
42 40 41 syl N 0 N + 1 2 0 N mod 2 = 1 ¬ 2 N
43 39 42 mpbird N 0 N + 1 2 0 N mod 2 = 1
44 23 43 eqtrd N 0 N + 1 2 0 N mod 2 = 1
45 18 44 eqtrd N 0 N + 1 2 0 N 2 0 mod 2 = 1
46 8 45 eqtrd N 0 N + 1 2 0 0 digit 2 N = 1