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 AOddBOddA+BEven

Proof

Step Hyp Ref Expression
1 oddz AOddA
2 oddz BOddB
3 zaddcl ABA+B
4 1 2 3 syl2an AOddBOddA+B
5 eqeq1 a=Aa=2i+1A=2i+1
6 5 rexbidv a=Aia=2i+1iA=2i+1
7 dfodd6 Odd=a|ia=2i+1
8 6 7 elrab2 AOddAiA=2i+1
9 eqeq1 b=Bb=2j+1B=2j+1
10 9 rexbidv b=Bjb=2j+1jB=2j+1
11 dfodd6 Odd=b|jb=2j+1
12 10 11 elrab2 BOddBjB=2j+1
13 zaddcl iji+j
14 13 ex iji+j
15 14 ad3antlr AiA=2i+1Bji+j
16 15 imp AiA=2i+1Bji+j
17 16 adantr AiA=2i+1BjB=2j+1i+j
18 17 peano2zd AiA=2i+1BjB=2j+1i+j+1
19 oveq2 n=i+j+12n=2i+j+1
20 19 eqeq2d n=i+j+1A+B=2nA+B=2i+j+1
21 20 adantl AiA=2i+1BjB=2j+1n=i+j+1A+B=2nA+B=2i+j+1
22 oveq12 A=2i+1B=2j+1A+B=2i+1+2j+1
23 22 ex A=2i+1B=2j+1A+B=2i+1+2j+1
24 23 ad3antlr AiA=2i+1BjB=2j+1A+B=2i+1+2j+1
25 24 imp AiA=2i+1BjB=2j+1A+B=2i+1+2j+1
26 zcn ii
27 zcn jj
28 2cnd j2
29 28 anim1i ji2i
30 29 ancoms ij2i
31 mulcl 2i2i
32 30 31 syl ij2i
33 1cnd ij1
34 2cnd i2
35 mulcl 2j2j
36 34 35 sylan ij2j
37 32 33 36 33 add4d ij2i+1+2j+1=2i+2j+1+1
38 2cnd ij2
39 simpl iji
40 simpr ijj
41 38 39 40 adddid ij2i+j=2i+2j
42 41 oveq1d ij2i+j+21=2i+2j+21
43 addcl iji+j
44 38 43 33 adddid ij2i+j+1=2i+j+21
45 1p1e2 1+1=2
46 2t1e2 21=2
47 45 46 eqtr4i 1+1=21
48 47 a1i ij1+1=21
49 48 oveq2d ij2i+2j+1+1=2i+2j+21
50 42 44 49 3eqtr4rd ij2i+2j+1+1=2i+j+1
51 37 50 eqtrd ij2i+1+2j+1=2i+j+1
52 26 27 51 syl2an ij2i+1+2j+1=2i+j+1
53 52 ex ij2i+1+2j+1=2i+j+1
54 53 ad3antlr AiA=2i+1Bj2i+1+2j+1=2i+j+1
55 54 imp AiA=2i+1Bj2i+1+2j+1=2i+j+1
56 55 adantr AiA=2i+1BjB=2j+12i+1+2j+1=2i+j+1
57 25 56 eqtrd AiA=2i+1BjB=2j+1A+B=2i+j+1
58 18 21 57 rspcedvd AiA=2i+1BjB=2j+1nA+B=2n
59 58 rexlimdva2 AiA=2i+1BjB=2j+1nA+B=2n
60 59 expimpd AiA=2i+1BjB=2j+1nA+B=2n
61 60 rexlimdva2 AiA=2i+1BjB=2j+1nA+B=2n
62 61 imp AiA=2i+1BjB=2j+1nA+B=2n
63 12 62 biimtrid AiA=2i+1BOddnA+B=2n
64 8 63 sylbi AOddBOddnA+B=2n
65 64 imp AOddBOddnA+B=2n
66 eqeq1 z=A+Bz=2nA+B=2n
67 66 rexbidv z=A+Bnz=2nnA+B=2n
68 dfeven4 Even=z|nz=2n
69 67 68 elrab2 A+BEvenA+BnA+B=2n
70 4 65 69 sylanbrc AOddBOddA+BEven