Metamath Proof Explorer


Theorem 4sqlem17

Description: Lemma for 4sq . (Contributed by Mario Carneiro, 16-Jul-2014) (Revised by AV, 14-Sep-2020)

Ref Expression
Hypotheses 4sq.1 S = n | x y z w n = x 2 + y 2 + z 2 + w 2
4sq.2 φ N
4sq.3 φ P = 2 N + 1
4sq.4 φ P
4sq.5 φ 0 2 N S
4sq.6 T = i | i P S
4sq.7 M = sup T <
4sq.m φ M 2
4sq.a φ A
4sq.b φ B
4sq.c φ C
4sq.d φ D
4sq.e E = A + M 2 mod M M 2
4sq.f F = B + M 2 mod M M 2
4sq.g G = C + M 2 mod M M 2
4sq.h H = D + M 2 mod M M 2
4sq.r R = E 2 + F 2 + G 2 + H 2 M
4sq.p φ M P = A 2 + B 2 + C 2 + D 2
Assertion 4sqlem17 ¬ φ

Proof

Step Hyp Ref Expression
1 4sq.1 S = n | x y z w n = x 2 + y 2 + z 2 + w 2
2 4sq.2 φ N
3 4sq.3 φ P = 2 N + 1
4 4sq.4 φ P
5 4sq.5 φ 0 2 N S
6 4sq.6 T = i | i P S
7 4sq.7 M = sup T <
8 4sq.m φ M 2
9 4sq.a φ A
10 4sq.b φ B
11 4sq.c φ C
12 4sq.d φ D
13 4sq.e E = A + M 2 mod M M 2
14 4sq.f F = B + M 2 mod M M 2
15 4sq.g G = C + M 2 mod M M 2
16 4sq.h H = D + M 2 mod M M 2
17 4sq.r R = E 2 + F 2 + G 2 + H 2 M
18 4sq.p φ M P = A 2 + B 2 + C 2 + D 2
19 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4sqlem16 φ R M R = 0 R = M M 2 M P
20 19 simpld φ R M
21 6 ssrab3 T
22 nnuz = 1
23 21 22 sseqtri T 1
24 1 2 3 4 5 6 7 4sqlem13 φ T M < P
25 24 simpld φ T
26 infssuzcl T 1 T sup T < T
27 23 25 26 sylancr φ sup T < T
28 7 27 eqeltrid φ M T
29 21 28 sselid φ M
30 29 nnred φ M
31 24 simprd φ M < P
32 30 31 ltned φ M P
33 29 nncnd φ M
34 33 sqvald φ M 2 = M M
35 34 breq1d φ M 2 M P M M M P
36 29 nnzd φ M
37 prmz P P
38 4 37 syl φ P
39 29 nnne0d φ M 0
40 dvdscmulr M P M M 0 M M M P M P
41 36 38 36 39 40 syl112anc φ M M M P M P
42 dvdsprm M 2 P M P M = P
43 8 4 42 syl2anc φ M P M = P
44 35 41 43 3bitrd φ M 2 M P M = P
45 44 necon3bbid φ ¬ M 2 M P M P
46 32 45 mpbird φ ¬ M 2 M P
47 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4sqlem14 φ R 0
48 elnn0 R 0 R R = 0
49 47 48 sylib φ R R = 0
50 49 ord φ ¬ R R = 0
51 orc R = 0 R = 0 R = M
52 19 simprd φ R = 0 R = M M 2 M P
53 51 52 syl5 φ R = 0 M 2 M P
54 50 53 syld φ ¬ R M 2 M P
55 46 54 mt3d φ R
56 gzreim A B A + i B i
57 9 10 56 syl2anc φ A + i B i
58 gzcn A + i B i A + i B
59 57 58 syl φ A + i B
60 59 absvalsq2d φ A + i B 2 = A + i B 2 + A + i B 2
61 9 zred φ A
62 10 zred φ B
63 61 62 crred φ A + i B = A
64 63 oveq1d φ A + i B 2 = A 2
65 61 62 crimd φ A + i B = B
66 65 oveq1d φ A + i B 2 = B 2
67 64 66 oveq12d φ A + i B 2 + A + i B 2 = A 2 + B 2
68 60 67 eqtrd φ A + i B 2 = A 2 + B 2
69 gzreim C D C + i D i
70 11 12 69 syl2anc φ C + i D i
71 gzcn C + i D i C + i D
72 70 71 syl φ C + i D
73 72 absvalsq2d φ C + i D 2 = C + i D 2 + C + i D 2
74 11 zred φ C
75 12 zred φ D
76 74 75 crred φ C + i D = C
77 76 oveq1d φ C + i D 2 = C 2
78 74 75 crimd φ C + i D = D
79 78 oveq1d φ C + i D 2 = D 2
80 77 79 oveq12d φ C + i D 2 + C + i D 2 = C 2 + D 2
81 73 80 eqtrd φ C + i D 2 = C 2 + D 2
82 68 81 oveq12d φ A + i B 2 + C + i D 2 = A 2 + B 2 + C 2 + D 2
83 18 82 eqtr4d φ M P = A + i B 2 + C + i D 2
84 83 oveq1d φ M P M = A + i B 2 + C + i D 2 M
85 prmnn P P
86 4 85 syl φ P
87 86 nncnd φ P
88 87 33 39 divcan3d φ M P M = P
89 84 88 eqtr3d φ A + i B 2 + C + i D 2 M = P
90 9 29 13 4sqlem5 φ E A E M
91 90 simpld φ E
92 10 29 14 4sqlem5 φ F B F M
93 92 simpld φ F
94 gzreim E F E + i F i
95 91 93 94 syl2anc φ E + i F i
96 gzcn E + i F i E + i F
97 95 96 syl φ E + i F
98 97 absvalsq2d φ E + i F 2 = E + i F 2 + E + i F 2
99 91 zred φ E
100 93 zred φ F
101 99 100 crred φ E + i F = E
102 101 oveq1d φ E + i F 2 = E 2
103 99 100 crimd φ E + i F = F
104 103 oveq1d φ E + i F 2 = F 2
105 102 104 oveq12d φ E + i F 2 + E + i F 2 = E 2 + F 2
106 98 105 eqtrd φ E + i F 2 = E 2 + F 2
107 11 29 15 4sqlem5 φ G C G M
108 107 simpld φ G
109 12 29 16 4sqlem5 φ H D H M
110 109 simpld φ H
111 gzreim G H G + i H i
112 108 110 111 syl2anc φ G + i H i
113 gzcn G + i H i G + i H
114 112 113 syl φ G + i H
115 114 absvalsq2d φ G + i H 2 = G + i H 2 + G + i H 2
116 108 zred φ G
117 110 zred φ H
118 116 117 crred φ G + i H = G
119 118 oveq1d φ G + i H 2 = G 2
120 116 117 crimd φ G + i H = H
121 120 oveq1d φ G + i H 2 = H 2
122 119 121 oveq12d φ G + i H 2 + G + i H 2 = G 2 + H 2
123 115 122 eqtrd φ G + i H 2 = G 2 + H 2
124 106 123 oveq12d φ E + i F 2 + G + i H 2 = E 2 + F 2 + G 2 + H 2
125 124 oveq1d φ E + i F 2 + G + i H 2 M = E 2 + F 2 + G 2 + H 2 M
126 125 17 eqtr4di φ E + i F 2 + G + i H 2 M = R
127 89 126 oveq12d φ A + i B 2 + C + i D 2 M E + i F 2 + G + i H 2 M = P R
128 55 nncnd φ R
129 87 128 mulcomd φ P R = R P
130 127 129 eqtrd φ A + i B 2 + C + i D 2 M E + i F 2 + G + i H 2 M = R P
131 eqid A + i B 2 + C + i D 2 = A + i B 2 + C + i D 2
132 eqid E + i F 2 + G + i H 2 = E + i F 2 + G + i H 2
133 9 zcnd φ A
134 ax-icn i
135 10 zcnd φ B
136 mulcl i B i B
137 134 135 136 sylancr φ i B
138 91 zcnd φ E
139 93 zcnd φ F
140 mulcl i F i F
141 134 139 140 sylancr φ i F
142 133 137 138 141 addsub4d φ A + i B - E + i F = A E + i B - i F
143 134 a1i φ i
144 143 135 139 subdid φ i B F = i B i F
145 144 oveq2d φ A - E + i B F = A E + i B - i F
146 142 145 eqtr4d φ A + i B - E + i F = A - E + i B F
147 146 oveq1d φ A + i B - E + i F M = A - E + i B F M
148 133 138 subcld φ A E
149 135 139 subcld φ B F
150 mulcl i B F i B F
151 134 149 150 sylancr φ i B F
152 148 151 33 39 divdird φ A - E + i B F M = A E M + i B F M
153 143 149 33 39 divassd φ i B F M = i B F M
154 153 oveq2d φ A E M + i B F M = A E M + i B F M
155 147 152 154 3eqtrd φ A + i B - E + i F M = A E M + i B F M
156 90 simprd φ A E M
157 92 simprd φ B F M
158 gzreim A E M B F M A E M + i B F M i
159 156 157 158 syl2anc φ A E M + i B F M i
160 155 159 eqeltrd φ A + i B - E + i F M i
161 11 zcnd φ C
162 12 zcnd φ D
163 mulcl i D i D
164 134 162 163 sylancr φ i D
165 108 zcnd φ G
166 110 zcnd φ H
167 mulcl i H i H
168 134 166 167 sylancr φ i H
169 161 164 165 168 addsub4d φ C + i D - G + i H = C G + i D - i H
170 143 162 166 subdid φ i D H = i D i H
171 170 oveq2d φ C - G + i D H = C G + i D - i H
172 169 171 eqtr4d φ C + i D - G + i H = C - G + i D H
173 172 oveq1d φ C + i D - G + i H M = C - G + i D H M
174 161 165 subcld φ C G
175 162 166 subcld φ D H
176 mulcl i D H i D H
177 134 175 176 sylancr φ i D H
178 174 177 33 39 divdird φ C - G + i D H M = C G M + i D H M
179 143 175 33 39 divassd φ i D H M = i D H M
180 179 oveq2d φ C G M + i D H M = C G M + i D H M
181 173 178 180 3eqtrd φ C + i D - G + i H M = C G M + i D H M
182 107 simprd φ C G M
183 109 simprd φ D H M
184 gzreim C G M D H M C G M + i D H M i
185 182 183 184 syl2anc φ C G M + i D H M i
186 181 185 eqeltrd φ C + i D - G + i H M i
187 86 nnnn0d φ P 0
188 89 187 eqeltrd φ A + i B 2 + C + i D 2 M 0
189 1 57 70 95 112 131 132 29 160 186 188 mul4sqlem φ A + i B 2 + C + i D 2 M E + i F 2 + G + i H 2 M S
190 130 189 eqeltrrd φ R P S
191 oveq1 i = R i P = R P
192 191 eleq1d i = R i P S R P S
193 192 6 elrab2 R T R R P S
194 55 190 193 sylanbrc φ R T
195 infssuzle T 1 R T sup T < R
196 23 194 195 sylancr φ sup T < R
197 7 196 eqbrtrid φ M R
198 55 nnred φ R
199 198 30 letri3d φ R = M R M M R
200 20 197 199 mpbir2and φ R = M
201 200 olcd φ R = 0 R = M
202 201 52 mpd φ M 2 M P
203 202 46 pm2.65i ¬ φ