Metamath Proof Explorer


Theorem mogoldbblem

Description: Lemma for mogoldbb . (Contributed by AV, 26-Dec-2021)

Ref Expression
Assertion mogoldbblem P Q R N Even N + 2 = P + Q + R p q N = p + q

Proof

Step Hyp Ref Expression
1 2evenALTV 2 Even
2 epee N Even 2 Even N + 2 Even
3 1 2 mpan2 N Even N + 2 Even
4 3 3ad2ant2 P Q R N Even N + 2 = P + Q + R N + 2 Even
5 simp1 P Q R N Even N + 2 = P + Q + R P Q R
6 simp3 P Q R N Even N + 2 = P + Q + R N + 2 = P + Q + R
7 even3prm2 N + 2 Even P Q R N + 2 = P + Q + R P = 2 Q = 2 R = 2
8 4 5 6 7 syl3anc P Q R N Even N + 2 = P + Q + R P = 2 Q = 2 R = 2
9 oveq1 P = 2 P + Q = 2 + Q
10 9 oveq1d P = 2 P + Q + R = 2 + Q + R
11 10 eqeq2d P = 2 N + 2 = P + Q + R N + 2 = 2 + Q + R
12 2cnd Q R 2
13 prmz Q Q
14 13 zcnd Q Q
15 14 adantr Q R Q
16 prmz R R
17 16 zcnd R R
18 17 adantl Q R R
19 simp1 2 Q R 2
20 addcl Q R Q + R
21 20 3adant1 2 Q R Q + R
22 addass 2 Q R 2 + Q + R = 2 + Q + R
23 19 21 22 comraddd 2 Q R 2 + Q + R = Q + R + 2
24 12 15 18 23 syl3anc Q R 2 + Q + R = Q + R + 2
25 24 eqeq2d Q R N + 2 = 2 + Q + R N + 2 = Q + R + 2
26 25 adantr Q R N Even N + 2 = 2 + Q + R N + 2 = Q + R + 2
27 evenz N Even N
28 27 zcnd N Even N
29 28 adantl Q R N Even N
30 zaddcl Q R Q + R
31 13 16 30 syl2an Q R Q + R
32 31 zcnd Q R Q + R
33 32 adantr Q R N Even Q + R
34 2cnd Q R N Even 2
35 29 33 34 addcan2d Q R N Even N + 2 = Q + R + 2 N = Q + R
36 26 35 bitrd Q R N Even N + 2 = 2 + Q + R N = Q + R
37 simpll Q R N = Q + R Q
38 oveq1 p = Q p + q = Q + q
39 38 eqeq2d p = Q N = p + q N = Q + q
40 39 rexbidv p = Q q N = p + q q N = Q + q
41 40 adantl Q R N = Q + R p = Q q N = p + q q N = Q + q
42 simplr Q R N = Q + R R
43 simpr Q R N = Q + R N = Q + R
44 oveq2 q = R Q + q = Q + R
45 44 eqcomd q = R Q + R = Q + q
46 43 45 sylan9eq Q R N = Q + R q = R N = Q + q
47 42 46 rspcedeq2vd Q R N = Q + R q N = Q + q
48 37 41 47 rspcedvd Q R N = Q + R p q N = p + q
49 48 ex Q R N = Q + R p q N = p + q
50 49 adantr Q R N Even N = Q + R p q N = p + q
51 36 50 sylbid Q R N Even N + 2 = 2 + Q + R p q N = p + q
52 51 com12 N + 2 = 2 + Q + R Q R N Even p q N = p + q
53 11 52 syl6bi P = 2 N + 2 = P + Q + R Q R N Even p q N = p + q
54 53 com13 Q R N Even N + 2 = P + Q + R P = 2 p q N = p + q
55 54 ex Q R N Even N + 2 = P + Q + R P = 2 p q N = p + q
56 55 3adant1 P Q R N Even N + 2 = P + Q + R P = 2 p q N = p + q
57 56 3imp P Q R N Even N + 2 = P + Q + R P = 2 p q N = p + q
58 57 com12 P = 2 P Q R N Even N + 2 = P + Q + R p q N = p + q
59 oveq2 Q = 2 P + Q = P + 2
60 59 oveq1d Q = 2 P + Q + R = P + 2 + R
61 60 eqeq2d Q = 2 N + 2 = P + Q + R N + 2 = P + 2 + R
62 prmz P P
63 62 zcnd P P
64 63 adantr P R P
65 2cnd P R 2
66 17 adantl P R R
67 64 65 66 3jca P R P 2 R
68 67 adantr P R N Even P 2 R
69 add32 P 2 R P + 2 + R = P + R + 2
70 68 69 syl P R N Even P + 2 + R = P + R + 2
71 70 eqeq2d P R N Even N + 2 = P + 2 + R N + 2 = P + R + 2
72 28 adantl P R N Even N
73 zaddcl P R P + R
74 62 16 73 syl2an P R P + R
75 74 zcnd P R P + R
76 75 adantr P R N Even P + R
77 2cnd P R N Even 2
78 72 76 77 addcan2d P R N Even N + 2 = P + R + 2 N = P + R
79 71 78 bitrd P R N Even N + 2 = P + 2 + R N = P + R
80 simpll P R N = P + R P
81 oveq1 p = P p + q = P + q
82 81 eqeq2d p = P N = p + q N = P + q
83 82 rexbidv p = P q N = p + q q N = P + q
84 83 adantl P R N = P + R p = P q N = p + q q N = P + q
85 simplr P R N = P + R R
86 simpr P R N = P + R N = P + R
87 oveq2 q = R P + q = P + R
88 87 eqcomd q = R P + R = P + q
89 86 88 sylan9eq P R N = P + R q = R N = P + q
90 85 89 rspcedeq2vd P R N = P + R q N = P + q
91 80 84 90 rspcedvd P R N = P + R p q N = p + q
92 91 ex P R N = P + R p q N = p + q
93 92 adantr P R N Even N = P + R p q N = p + q
94 79 93 sylbid P R N Even N + 2 = P + 2 + R p q N = p + q
95 94 com12 N + 2 = P + 2 + R P R N Even p q N = p + q
96 61 95 syl6bi Q = 2 N + 2 = P + Q + R P R N Even p q N = p + q
97 96 com13 P R N Even N + 2 = P + Q + R Q = 2 p q N = p + q
98 97 ex P R N Even N + 2 = P + Q + R Q = 2 p q N = p + q
99 98 3adant2 P Q R N Even N + 2 = P + Q + R Q = 2 p q N = p + q
100 99 3imp P Q R N Even N + 2 = P + Q + R Q = 2 p q N = p + q
101 100 com12 Q = 2 P Q R N Even N + 2 = P + Q + R p q N = p + q
102 oveq2 R = 2 P + Q + R = P + Q + 2
103 102 eqeq2d R = 2 N + 2 = P + Q + R N + 2 = P + Q + 2
104 28 adantl P Q N Even N
105 zaddcl P Q P + Q
106 62 13 105 syl2an P Q P + Q
107 106 zcnd P Q P + Q
108 107 adantr P Q N Even P + Q
109 2cnd P Q N Even 2
110 104 108 109 addcan2d P Q N Even N + 2 = P + Q + 2 N = P + Q
111 simpll P Q N = P + Q P
112 83 adantl P Q N = P + Q p = P q N = p + q q N = P + q
113 simplr P Q N = P + Q Q
114 simpr P Q N = P + Q N = P + Q
115 oveq2 q = Q P + q = P + Q
116 115 eqcomd q = Q P + Q = P + q
117 114 116 sylan9eq P Q N = P + Q q = Q N = P + q
118 113 117 rspcedeq2vd P Q N = P + Q q N = P + q
119 111 112 118 rspcedvd P Q N = P + Q p q N = p + q
120 119 ex P Q N = P + Q p q N = p + q
121 120 adantr P Q N Even N = P + Q p q N = p + q
122 110 121 sylbid P Q N Even N + 2 = P + Q + 2 p q N = p + q
123 122 com12 N + 2 = P + Q + 2 P Q N Even p q N = p + q
124 103 123 syl6bi R = 2 N + 2 = P + Q + R P Q N Even p q N = p + q
125 124 com13 P Q N Even N + 2 = P + Q + R R = 2 p q N = p + q
126 125 ex P Q N Even N + 2 = P + Q + R R = 2 p q N = p + q
127 126 3adant3 P Q R N Even N + 2 = P + Q + R R = 2 p q N = p + q
128 127 3imp P Q R N Even N + 2 = P + Q + R R = 2 p q N = p + q
129 128 com12 R = 2 P Q R N Even N + 2 = P + Q + R p q N = p + q
130 58 101 129 3jaoi P = 2 Q = 2 R = 2 P Q R N Even N + 2 = P + Q + R p q N = p + q
131 8 130 mpcom P Q R N Even N + 2 = P + Q + R p q N = p + q