Metamath Proof Explorer


Theorem 4sqlem18

Description: Lemma for 4sq . Inductive step, odd prime case. (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 <
Assertion 4sqlem18 φ P S

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 prmnn P P
9 4 8 syl φ P
10 9 nncnd φ P
11 10 mulid2d φ 1 P = P
12 6 ssrab3 T
13 nnuz = 1
14 12 13 sseqtri T 1
15 1 2 3 4 5 6 7 4sqlem13 φ T M < P
16 15 simpld φ T
17 infssuzcl T 1 T sup T < T
18 14 16 17 sylancr φ sup T < T
19 7 18 eqeltrid φ M T
20 oveq1 i = M i P = M P
21 20 eleq1d i = M i P S M P S
22 21 6 elrab2 M T M M P S
23 19 22 sylib φ M M P S
24 23 simprd φ M P S
25 1 4sqlem2 M P S a b c d M P = a 2 + b 2 + c 2 + d 2
26 24 25 sylib φ a b c d M P = a 2 + b 2 + c 2 + d 2
27 26 adantr φ M 2 a b c d M P = a 2 + b 2 + c 2 + d 2
28 simp1l φ M 2 a b c d M P = a 2 + b 2 + c 2 + d 2 φ
29 28 2 syl φ M 2 a b c d M P = a 2 + b 2 + c 2 + d 2 N
30 28 3 syl φ M 2 a b c d M P = a 2 + b 2 + c 2 + d 2 P = 2 N + 1
31 28 4 syl φ M 2 a b c d M P = a 2 + b 2 + c 2 + d 2 P
32 28 5 syl φ M 2 a b c d M P = a 2 + b 2 + c 2 + d 2 0 2 N S
33 simp1r φ M 2 a b c d M P = a 2 + b 2 + c 2 + d 2 M 2
34 simp2ll φ M 2 a b c d M P = a 2 + b 2 + c 2 + d 2 a
35 simp2lr φ M 2 a b c d M P = a 2 + b 2 + c 2 + d 2 b
36 simp2rl φ M 2 a b c d M P = a 2 + b 2 + c 2 + d 2 c
37 simp2rr φ M 2 a b c d M P = a 2 + b 2 + c 2 + d 2 d
38 eqid a + M 2 mod M M 2 = a + M 2 mod M M 2
39 eqid b + M 2 mod M M 2 = b + M 2 mod M M 2
40 eqid c + M 2 mod M M 2 = c + M 2 mod M M 2
41 eqid d + M 2 mod M M 2 = d + M 2 mod M M 2
42 eqid a + M 2 mod M M 2 2 + b + M 2 mod M M 2 2 + c + M 2 mod M M 2 2 + d + M 2 mod M M 2 2 M = a + M 2 mod M M 2 2 + b + M 2 mod M M 2 2 + c + M 2 mod M M 2 2 + d + M 2 mod M M 2 2 M
43 simp3 φ M 2 a b c d M P = a 2 + b 2 + c 2 + d 2 M P = a 2 + b 2 + c 2 + d 2
44 1 29 30 31 32 6 7 33 34 35 36 37 38 39 40 41 42 43 4sqlem17 ¬ φ M 2 a b c d M P = a 2 + b 2 + c 2 + d 2
45 44 pm2.21i φ M 2 a b c d M P = a 2 + b 2 + c 2 + d 2 ¬ M 2
46 45 3expia φ M 2 a b c d M P = a 2 + b 2 + c 2 + d 2 ¬ M 2
47 46 anassrs φ M 2 a b c d M P = a 2 + b 2 + c 2 + d 2 ¬ M 2
48 47 rexlimdvva φ M 2 a b c d M P = a 2 + b 2 + c 2 + d 2 ¬ M 2
49 48 rexlimdvva φ M 2 a b c d M P = a 2 + b 2 + c 2 + d 2 ¬ M 2
50 27 49 mpd φ M 2 ¬ M 2
51 50 pm2.01da φ ¬ M 2
52 23 simpld φ M
53 elnn1uz2 M M = 1 M 2
54 52 53 sylib φ M = 1 M 2
55 54 ord φ ¬ M = 1 M 2
56 51 55 mt3d φ M = 1
57 56 19 eqeltrrd φ 1 T
58 oveq1 i = 1 i P = 1 P
59 58 eleq1d i = 1 i P S 1 P S
60 59 6 elrab2 1 T 1 1 P S
61 60 simprbi 1 T 1 P S
62 57 61 syl φ 1 P S
63 11 62 eqeltrrd φ P S