Metamath Proof Explorer


Theorem opoeALTV

Description: The sum of two odds is even. (Contributed by Scott Fenton, 7-Apr-2014) (Revised by AV, 20-Jun-2020)

Ref Expression
Assertion opoeALTV A Odd B Odd A + B Even

Proof

Step Hyp Ref Expression
1 oddz A Odd A
2 oddz B Odd B
3 zaddcl A B A + B
4 1 2 3 syl2an A Odd B Odd A + B
5 eqeq1 a = A a = 2 i + 1 A = 2 i + 1
6 5 rexbidv a = A i a = 2 i + 1 i A = 2 i + 1
7 dfodd6 Odd = a | i a = 2 i + 1
8 6 7 elrab2 A Odd A i A = 2 i + 1
9 eqeq1 b = B b = 2 j + 1 B = 2 j + 1
10 9 rexbidv b = B j b = 2 j + 1 j B = 2 j + 1
11 dfodd6 Odd = b | j b = 2 j + 1
12 10 11 elrab2 B Odd B j B = 2 j + 1
13 zaddcl i j i + j
14 13 ex i j i + j
15 14 ad3antlr A i A = 2 i + 1 B j i + j
16 15 imp A i A = 2 i + 1 B j i + j
17 16 adantr A i A = 2 i + 1 B j B = 2 j + 1 i + j
18 17 peano2zd A i A = 2 i + 1 B j B = 2 j + 1 i + j + 1
19 oveq2 n = i + j + 1 2 n = 2 i + j + 1
20 19 eqeq2d n = i + j + 1 A + B = 2 n A + B = 2 i + j + 1
21 20 adantl A i A = 2 i + 1 B j B = 2 j + 1 n = i + j + 1 A + B = 2 n A + B = 2 i + j + 1
22 oveq12 A = 2 i + 1 B = 2 j + 1 A + B = 2 i + 1 + 2 j + 1
23 22 ex A = 2 i + 1 B = 2 j + 1 A + B = 2 i + 1 + 2 j + 1
24 23 ad3antlr A i A = 2 i + 1 B j B = 2 j + 1 A + B = 2 i + 1 + 2 j + 1
25 24 imp A i A = 2 i + 1 B j B = 2 j + 1 A + B = 2 i + 1 + 2 j + 1
26 zcn i i
27 zcn j j
28 2cnd j 2
29 28 anim1i j i 2 i
30 29 ancoms i j 2 i
31 mulcl 2 i 2 i
32 30 31 syl i j 2 i
33 1cnd i j 1
34 2cnd i 2
35 mulcl 2 j 2 j
36 34 35 sylan i j 2 j
37 32 33 36 33 add4d i j 2 i + 1 + 2 j + 1 = 2 i + 2 j + 1 + 1
38 2cnd i j 2
39 simpl i j i
40 simpr i j j
41 38 39 40 adddid i j 2 i + j = 2 i + 2 j
42 41 oveq1d i j 2 i + j + 2 1 = 2 i + 2 j + 2 1
43 addcl i j i + j
44 38 43 33 adddid i j 2 i + j + 1 = 2 i + j + 2 1
45 1p1e2 1 + 1 = 2
46 2t1e2 2 1 = 2
47 45 46 eqtr4i 1 + 1 = 2 1
48 47 a1i i j 1 + 1 = 2 1
49 48 oveq2d i j 2 i + 2 j + 1 + 1 = 2 i + 2 j + 2 1
50 42 44 49 3eqtr4rd i j 2 i + 2 j + 1 + 1 = 2 i + j + 1
51 37 50 eqtrd i j 2 i + 1 + 2 j + 1 = 2 i + j + 1
52 26 27 51 syl2an i j 2 i + 1 + 2 j + 1 = 2 i + j + 1
53 52 ex i j 2 i + 1 + 2 j + 1 = 2 i + j + 1
54 53 ad3antlr A i A = 2 i + 1 B j 2 i + 1 + 2 j + 1 = 2 i + j + 1
55 54 imp A i A = 2 i + 1 B j 2 i + 1 + 2 j + 1 = 2 i + j + 1
56 55 adantr A i A = 2 i + 1 B j B = 2 j + 1 2 i + 1 + 2 j + 1 = 2 i + j + 1
57 25 56 eqtrd A i A = 2 i + 1 B j B = 2 j + 1 A + B = 2 i + j + 1
58 18 21 57 rspcedvd A i A = 2 i + 1 B j B = 2 j + 1 n A + B = 2 n
59 58 rexlimdva2 A i A = 2 i + 1 B j B = 2 j + 1 n A + B = 2 n
60 59 expimpd A i A = 2 i + 1 B j B = 2 j + 1 n A + B = 2 n
61 60 rexlimdva2 A i A = 2 i + 1 B j B = 2 j + 1 n A + B = 2 n
62 61 imp A i A = 2 i + 1 B j B = 2 j + 1 n A + B = 2 n
63 12 62 syl5bi A i A = 2 i + 1 B Odd n A + B = 2 n
64 8 63 sylbi A Odd B Odd n A + B = 2 n
65 64 imp A Odd B Odd n A + B = 2 n
66 eqeq1 z = A + B z = 2 n A + B = 2 n
67 66 rexbidv z = A + B n z = 2 n n A + B = 2 n
68 dfeven4 Even = z | n z = 2 n
69 67 68 elrab2 A + B Even A + B n A + B = 2 n
70 4 65 69 sylanbrc A Odd B Odd A + B Even