Step | Hyp | Ref
| Expression |
1 | | 2sq.1 |
. 2
⊢ 𝑆 = ran (𝑤 ∈ ℤ[i] ↦ ((abs‘𝑤)↑2)) |
2 | | 2sqlem8.m |
. . . 4
⊢ (𝜑 → 𝑀 ∈
(ℤ≥‘2)) |
3 | | eluz2b3 9538 |
. . . 4
⊢ (𝑀 ∈
(ℤ≥‘2) ↔ (𝑀 ∈ ℕ ∧ 𝑀 ≠ 1)) |
4 | 2, 3 | sylib 121 |
. . 3
⊢ (𝜑 → (𝑀 ∈ ℕ ∧ 𝑀 ≠ 1)) |
5 | 4 | simpld 111 |
. 2
⊢ (𝜑 → 𝑀 ∈ ℕ) |
6 | | 2sqlem9.7 |
. . . . . . 7
⊢ (𝜑 → 𝑀 ∥ 𝑁) |
7 | | eluzelz 9471 |
. . . . . . . . 9
⊢ (𝑀 ∈
(ℤ≥‘2) → 𝑀 ∈ ℤ) |
8 | 2, 7 | syl 14 |
. . . . . . . 8
⊢ (𝜑 → 𝑀 ∈ ℤ) |
9 | | 2sqlem8.n |
. . . . . . . . 9
⊢ (𝜑 → 𝑁 ∈ ℕ) |
10 | 9 | nnzd 9308 |
. . . . . . . 8
⊢ (𝜑 → 𝑁 ∈ ℤ) |
11 | | 2sqlem8.1 |
. . . . . . . . . . . 12
⊢ (𝜑 → 𝐴 ∈ ℤ) |
12 | | 2sqlem8.c |
. . . . . . . . . . . 12
⊢ 𝐶 = (((𝐴 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2)) |
13 | 11, 5, 12 | 4sqlem5 12308 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐶 ∈ ℤ ∧ ((𝐴 − 𝐶) / 𝑀) ∈ ℤ)) |
14 | 13 | simpld 111 |
. . . . . . . . . 10
⊢ (𝜑 → 𝐶 ∈ ℤ) |
15 | | zsqcl 10521 |
. . . . . . . . . 10
⊢ (𝐶 ∈ ℤ → (𝐶↑2) ∈
ℤ) |
16 | 14, 15 | syl 14 |
. . . . . . . . 9
⊢ (𝜑 → (𝐶↑2) ∈ ℤ) |
17 | | 2sqlem8.2 |
. . . . . . . . . . . 12
⊢ (𝜑 → 𝐵 ∈ ℤ) |
18 | | 2sqlem8.d |
. . . . . . . . . . . 12
⊢ 𝐷 = (((𝐵 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2)) |
19 | 17, 5, 18 | 4sqlem5 12308 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐷 ∈ ℤ ∧ ((𝐵 − 𝐷) / 𝑀) ∈ ℤ)) |
20 | 19 | simpld 111 |
. . . . . . . . . 10
⊢ (𝜑 → 𝐷 ∈ ℤ) |
21 | | zsqcl 10521 |
. . . . . . . . . 10
⊢ (𝐷 ∈ ℤ → (𝐷↑2) ∈
ℤ) |
22 | 20, 21 | syl 14 |
. . . . . . . . 9
⊢ (𝜑 → (𝐷↑2) ∈ ℤ) |
23 | 16, 22 | zaddcld 9313 |
. . . . . . . 8
⊢ (𝜑 → ((𝐶↑2) + (𝐷↑2)) ∈ ℤ) |
24 | | zsqcl 10521 |
. . . . . . . . . . . 12
⊢ (𝐴 ∈ ℤ → (𝐴↑2) ∈
ℤ) |
25 | 11, 24 | syl 14 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐴↑2) ∈ ℤ) |
26 | 25, 16 | zsubcld 9314 |
. . . . . . . . . 10
⊢ (𝜑 → ((𝐴↑2) − (𝐶↑2)) ∈ ℤ) |
27 | | zsqcl 10521 |
. . . . . . . . . . . 12
⊢ (𝐵 ∈ ℤ → (𝐵↑2) ∈
ℤ) |
28 | 17, 27 | syl 14 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐵↑2) ∈ ℤ) |
29 | 28, 22 | zsubcld 9314 |
. . . . . . . . . 10
⊢ (𝜑 → ((𝐵↑2) − (𝐷↑2)) ∈ ℤ) |
30 | 11, 5, 12 | 4sqlem8 12311 |
. . . . . . . . . 10
⊢ (𝜑 → 𝑀 ∥ ((𝐴↑2) − (𝐶↑2))) |
31 | 17, 5, 18 | 4sqlem8 12311 |
. . . . . . . . . 10
⊢ (𝜑 → 𝑀 ∥ ((𝐵↑2) − (𝐷↑2))) |
32 | 8, 26, 29, 30, 31 | dvds2addd 11765 |
. . . . . . . . 9
⊢ (𝜑 → 𝑀 ∥ (((𝐴↑2) − (𝐶↑2)) + ((𝐵↑2) − (𝐷↑2)))) |
33 | | 2sqlem8.4 |
. . . . . . . . . . 11
⊢ (𝜑 → 𝑁 = ((𝐴↑2) + (𝐵↑2))) |
34 | 33 | oveq1d 5856 |
. . . . . . . . . 10
⊢ (𝜑 → (𝑁 − ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) − ((𝐶↑2) + (𝐷↑2)))) |
35 | 25 | zcnd 9310 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐴↑2) ∈ ℂ) |
36 | 28 | zcnd 9310 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐵↑2) ∈ ℂ) |
37 | 16 | zcnd 9310 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐶↑2) ∈ ℂ) |
38 | 22 | zcnd 9310 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐷↑2) ∈ ℂ) |
39 | 35, 36, 37, 38 | addsub4d 8252 |
. . . . . . . . . 10
⊢ (𝜑 → (((𝐴↑2) + (𝐵↑2)) − ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) − (𝐶↑2)) + ((𝐵↑2) − (𝐷↑2)))) |
40 | 34, 39 | eqtrd 2198 |
. . . . . . . . 9
⊢ (𝜑 → (𝑁 − ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) − (𝐶↑2)) + ((𝐵↑2) − (𝐷↑2)))) |
41 | 32, 40 | breqtrrd 4009 |
. . . . . . . 8
⊢ (𝜑 → 𝑀 ∥ (𝑁 − ((𝐶↑2) + (𝐷↑2)))) |
42 | | dvdssub2 11771 |
. . . . . . . 8
⊢ (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ ((𝐶↑2) + (𝐷↑2)) ∈ ℤ) ∧ 𝑀 ∥ (𝑁 − ((𝐶↑2) + (𝐷↑2)))) → (𝑀 ∥ 𝑁 ↔ 𝑀 ∥ ((𝐶↑2) + (𝐷↑2)))) |
43 | 8, 10, 23, 41, 42 | syl31anc 1231 |
. . . . . . 7
⊢ (𝜑 → (𝑀 ∥ 𝑁 ↔ 𝑀 ∥ ((𝐶↑2) + (𝐷↑2)))) |
44 | 6, 43 | mpbid 146 |
. . . . . 6
⊢ (𝜑 → 𝑀 ∥ ((𝐶↑2) + (𝐷↑2))) |
45 | | 2sqlem7.2 |
. . . . . . . . . . . 12
⊢ 𝑌 = {𝑧 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2)))} |
46 | | 2sqlem9.5 |
. . . . . . . . . . . 12
⊢ (𝜑 → ∀𝑏 ∈ (1...(𝑀 − 1))∀𝑎 ∈ 𝑌 (𝑏 ∥ 𝑎 → 𝑏 ∈ 𝑆)) |
47 | | 2sqlem8.3 |
. . . . . . . . . . . 12
⊢ (𝜑 → (𝐴 gcd 𝐵) = 1) |
48 | 1, 45, 46, 6, 9, 2,
11, 17, 47, 33, 12, 18 | 2sqlem8a 13558 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐶 gcd 𝐷) ∈ ℕ) |
49 | 48 | nnzd 9308 |
. . . . . . . . . 10
⊢ (𝜑 → (𝐶 gcd 𝐷) ∈ ℤ) |
50 | | zsqcl2 10528 |
. . . . . . . . . 10
⊢ ((𝐶 gcd 𝐷) ∈ ℤ → ((𝐶 gcd 𝐷)↑2) ∈
ℕ0) |
51 | 49, 50 | syl 14 |
. . . . . . . . 9
⊢ (𝜑 → ((𝐶 gcd 𝐷)↑2) ∈
ℕ0) |
52 | 51 | nn0cnd 9165 |
. . . . . . . 8
⊢ (𝜑 → ((𝐶 gcd 𝐷)↑2) ∈ ℂ) |
53 | | 2sqlem8.e |
. . . . . . . . . . 11
⊢ 𝐸 = (𝐶 / (𝐶 gcd 𝐷)) |
54 | | gcddvds 11892 |
. . . . . . . . . . . . . 14
⊢ ((𝐶 ∈ ℤ ∧ 𝐷 ∈ ℤ) → ((𝐶 gcd 𝐷) ∥ 𝐶 ∧ (𝐶 gcd 𝐷) ∥ 𝐷)) |
55 | 14, 20, 54 | syl2anc 409 |
. . . . . . . . . . . . 13
⊢ (𝜑 → ((𝐶 gcd 𝐷) ∥ 𝐶 ∧ (𝐶 gcd 𝐷) ∥ 𝐷)) |
56 | 55 | simpld 111 |
. . . . . . . . . . . 12
⊢ (𝜑 → (𝐶 gcd 𝐷) ∥ 𝐶) |
57 | 48 | nnne0d 8898 |
. . . . . . . . . . . . 13
⊢ (𝜑 → (𝐶 gcd 𝐷) ≠ 0) |
58 | | dvdsval2 11726 |
. . . . . . . . . . . . 13
⊢ (((𝐶 gcd 𝐷) ∈ ℤ ∧ (𝐶 gcd 𝐷) ≠ 0 ∧ 𝐶 ∈ ℤ) → ((𝐶 gcd 𝐷) ∥ 𝐶 ↔ (𝐶 / (𝐶 gcd 𝐷)) ∈ ℤ)) |
59 | 49, 57, 14, 58 | syl3anc 1228 |
. . . . . . . . . . . 12
⊢ (𝜑 → ((𝐶 gcd 𝐷) ∥ 𝐶 ↔ (𝐶 / (𝐶 gcd 𝐷)) ∈ ℤ)) |
60 | 56, 59 | mpbid 146 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐶 / (𝐶 gcd 𝐷)) ∈ ℤ) |
61 | 53, 60 | eqeltrid 2252 |
. . . . . . . . . 10
⊢ (𝜑 → 𝐸 ∈ ℤ) |
62 | | zsqcl2 10528 |
. . . . . . . . . 10
⊢ (𝐸 ∈ ℤ → (𝐸↑2) ∈
ℕ0) |
63 | 61, 62 | syl 14 |
. . . . . . . . 9
⊢ (𝜑 → (𝐸↑2) ∈
ℕ0) |
64 | 63 | nn0cnd 9165 |
. . . . . . . 8
⊢ (𝜑 → (𝐸↑2) ∈ ℂ) |
65 | | 2sqlem8.f |
. . . . . . . . . . 11
⊢ 𝐹 = (𝐷 / (𝐶 gcd 𝐷)) |
66 | 55 | simprd 113 |
. . . . . . . . . . . 12
⊢ (𝜑 → (𝐶 gcd 𝐷) ∥ 𝐷) |
67 | | dvdsval2 11726 |
. . . . . . . . . . . . 13
⊢ (((𝐶 gcd 𝐷) ∈ ℤ ∧ (𝐶 gcd 𝐷) ≠ 0 ∧ 𝐷 ∈ ℤ) → ((𝐶 gcd 𝐷) ∥ 𝐷 ↔ (𝐷 / (𝐶 gcd 𝐷)) ∈ ℤ)) |
68 | 49, 57, 20, 67 | syl3anc 1228 |
. . . . . . . . . . . 12
⊢ (𝜑 → ((𝐶 gcd 𝐷) ∥ 𝐷 ↔ (𝐷 / (𝐶 gcd 𝐷)) ∈ ℤ)) |
69 | 66, 68 | mpbid 146 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐷 / (𝐶 gcd 𝐷)) ∈ ℤ) |
70 | 65, 69 | eqeltrid 2252 |
. . . . . . . . . 10
⊢ (𝜑 → 𝐹 ∈ ℤ) |
71 | | zsqcl2 10528 |
. . . . . . . . . 10
⊢ (𝐹 ∈ ℤ → (𝐹↑2) ∈
ℕ0) |
72 | 70, 71 | syl 14 |
. . . . . . . . 9
⊢ (𝜑 → (𝐹↑2) ∈
ℕ0) |
73 | 72 | nn0cnd 9165 |
. . . . . . . 8
⊢ (𝜑 → (𝐹↑2) ∈ ℂ) |
74 | 52, 64, 73 | adddid 7919 |
. . . . . . 7
⊢ (𝜑 → (((𝐶 gcd 𝐷)↑2) · ((𝐸↑2) + (𝐹↑2))) = ((((𝐶 gcd 𝐷)↑2) · (𝐸↑2)) + (((𝐶 gcd 𝐷)↑2) · (𝐹↑2)))) |
75 | 49 | zcnd 9310 |
. . . . . . . . . 10
⊢ (𝜑 → (𝐶 gcd 𝐷) ∈ ℂ) |
76 | 61 | zcnd 9310 |
. . . . . . . . . 10
⊢ (𝜑 → 𝐸 ∈ ℂ) |
77 | 75, 76 | sqmuld 10596 |
. . . . . . . . 9
⊢ (𝜑 → (((𝐶 gcd 𝐷) · 𝐸)↑2) = (((𝐶 gcd 𝐷)↑2) · (𝐸↑2))) |
78 | 53 | oveq2i 5852 |
. . . . . . . . . . 11
⊢ ((𝐶 gcd 𝐷) · 𝐸) = ((𝐶 gcd 𝐷) · (𝐶 / (𝐶 gcd 𝐷))) |
79 | 14 | zcnd 9310 |
. . . . . . . . . . . 12
⊢ (𝜑 → 𝐶 ∈ ℂ) |
80 | 48 | nnap0d 8899 |
. . . . . . . . . . . 12
⊢ (𝜑 → (𝐶 gcd 𝐷) # 0) |
81 | 79, 75, 80 | divcanap2d 8684 |
. . . . . . . . . . 11
⊢ (𝜑 → ((𝐶 gcd 𝐷) · (𝐶 / (𝐶 gcd 𝐷))) = 𝐶) |
82 | 78, 81 | syl5eq 2210 |
. . . . . . . . . 10
⊢ (𝜑 → ((𝐶 gcd 𝐷) · 𝐸) = 𝐶) |
83 | 82 | oveq1d 5856 |
. . . . . . . . 9
⊢ (𝜑 → (((𝐶 gcd 𝐷) · 𝐸)↑2) = (𝐶↑2)) |
84 | 77, 83 | eqtr3d 2200 |
. . . . . . . 8
⊢ (𝜑 → (((𝐶 gcd 𝐷)↑2) · (𝐸↑2)) = (𝐶↑2)) |
85 | 70 | zcnd 9310 |
. . . . . . . . . 10
⊢ (𝜑 → 𝐹 ∈ ℂ) |
86 | 75, 85 | sqmuld 10596 |
. . . . . . . . 9
⊢ (𝜑 → (((𝐶 gcd 𝐷) · 𝐹)↑2) = (((𝐶 gcd 𝐷)↑2) · (𝐹↑2))) |
87 | 65 | oveq2i 5852 |
. . . . . . . . . . 11
⊢ ((𝐶 gcd 𝐷) · 𝐹) = ((𝐶 gcd 𝐷) · (𝐷 / (𝐶 gcd 𝐷))) |
88 | 20 | zcnd 9310 |
. . . . . . . . . . . 12
⊢ (𝜑 → 𝐷 ∈ ℂ) |
89 | 88, 75, 80 | divcanap2d 8684 |
. . . . . . . . . . 11
⊢ (𝜑 → ((𝐶 gcd 𝐷) · (𝐷 / (𝐶 gcd 𝐷))) = 𝐷) |
90 | 87, 89 | syl5eq 2210 |
. . . . . . . . . 10
⊢ (𝜑 → ((𝐶 gcd 𝐷) · 𝐹) = 𝐷) |
91 | 90 | oveq1d 5856 |
. . . . . . . . 9
⊢ (𝜑 → (((𝐶 gcd 𝐷) · 𝐹)↑2) = (𝐷↑2)) |
92 | 86, 91 | eqtr3d 2200 |
. . . . . . . 8
⊢ (𝜑 → (((𝐶 gcd 𝐷)↑2) · (𝐹↑2)) = (𝐷↑2)) |
93 | 84, 92 | oveq12d 5859 |
. . . . . . 7
⊢ (𝜑 → ((((𝐶 gcd 𝐷)↑2) · (𝐸↑2)) + (((𝐶 gcd 𝐷)↑2) · (𝐹↑2))) = ((𝐶↑2) + (𝐷↑2))) |
94 | 74, 93 | eqtrd 2198 |
. . . . . 6
⊢ (𝜑 → (((𝐶 gcd 𝐷)↑2) · ((𝐸↑2) + (𝐹↑2))) = ((𝐶↑2) + (𝐷↑2))) |
95 | 44, 94 | breqtrrd 4009 |
. . . . 5
⊢ (𝜑 → 𝑀 ∥ (((𝐶 gcd 𝐷)↑2) · ((𝐸↑2) + (𝐹↑2)))) |
96 | | zsqcl 10521 |
. . . . . . . 8
⊢ ((𝐶 gcd 𝐷) ∈ ℤ → ((𝐶 gcd 𝐷)↑2) ∈ ℤ) |
97 | 49, 96 | syl 14 |
. . . . . . 7
⊢ (𝜑 → ((𝐶 gcd 𝐷)↑2) ∈ ℤ) |
98 | 8, 97 | gcdcomd 11903 |
. . . . . 6
⊢ (𝜑 → (𝑀 gcd ((𝐶 gcd 𝐷)↑2)) = (((𝐶 gcd 𝐷)↑2) gcd 𝑀)) |
99 | 49, 8 | gcdcld 11897 |
. . . . . . . . . . . . 13
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ∈
ℕ0) |
100 | 99 | nn0zd 9307 |
. . . . . . . . . . . 12
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ∈ ℤ) |
101 | | gcddvds 11892 |
. . . . . . . . . . . . . 14
⊢ (((𝐶 gcd 𝐷) ∈ ℤ ∧ 𝑀 ∈ ℤ) → (((𝐶 gcd 𝐷) gcd 𝑀) ∥ (𝐶 gcd 𝐷) ∧ ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝑀)) |
102 | 49, 8, 101 | syl2anc 409 |
. . . . . . . . . . . . 13
⊢ (𝜑 → (((𝐶 gcd 𝐷) gcd 𝑀) ∥ (𝐶 gcd 𝐷) ∧ ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝑀)) |
103 | 102 | simpld 111 |
. . . . . . . . . . . 12
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ∥ (𝐶 gcd 𝐷)) |
104 | 100, 49, 14, 103, 56 | dvdstrd 11766 |
. . . . . . . . . . 11
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐶) |
105 | 11, 14 | zsubcld 9314 |
. . . . . . . . . . . . 13
⊢ (𝜑 → (𝐴 − 𝐶) ∈ ℤ) |
106 | 102 | simprd 113 |
. . . . . . . . . . . . 13
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝑀) |
107 | 13 | simprd 113 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → ((𝐴 − 𝐶) / 𝑀) ∈ ℤ) |
108 | 5 | nnne0d 8898 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → 𝑀 ≠ 0) |
109 | | dvdsval2 11726 |
. . . . . . . . . . . . . . 15
⊢ ((𝑀 ∈ ℤ ∧ 𝑀 ≠ 0 ∧ (𝐴 − 𝐶) ∈ ℤ) → (𝑀 ∥ (𝐴 − 𝐶) ↔ ((𝐴 − 𝐶) / 𝑀) ∈ ℤ)) |
110 | 8, 108, 105, 109 | syl3anc 1228 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → (𝑀 ∥ (𝐴 − 𝐶) ↔ ((𝐴 − 𝐶) / 𝑀) ∈ ℤ)) |
111 | 107, 110 | mpbird 166 |
. . . . . . . . . . . . 13
⊢ (𝜑 → 𝑀 ∥ (𝐴 − 𝐶)) |
112 | 100, 8, 105, 106, 111 | dvdstrd 11766 |
. . . . . . . . . . . 12
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ∥ (𝐴 − 𝐶)) |
113 | | dvdssub2 11771 |
. . . . . . . . . . . 12
⊢
(((((𝐶 gcd 𝐷) gcd 𝑀) ∈ ℤ ∧ 𝐴 ∈ ℤ ∧ 𝐶 ∈ ℤ) ∧ ((𝐶 gcd 𝐷) gcd 𝑀) ∥ (𝐴 − 𝐶)) → (((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐴 ↔ ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐶)) |
114 | 100, 11, 14, 112, 113 | syl31anc 1231 |
. . . . . . . . . . 11
⊢ (𝜑 → (((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐴 ↔ ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐶)) |
115 | 104, 114 | mpbird 166 |
. . . . . . . . . 10
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐴) |
116 | 100, 49, 20, 103, 66 | dvdstrd 11766 |
. . . . . . . . . . 11
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐷) |
117 | 17, 20 | zsubcld 9314 |
. . . . . . . . . . . . 13
⊢ (𝜑 → (𝐵 − 𝐷) ∈ ℤ) |
118 | 19 | simprd 113 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → ((𝐵 − 𝐷) / 𝑀) ∈ ℤ) |
119 | | dvdsval2 11726 |
. . . . . . . . . . . . . . 15
⊢ ((𝑀 ∈ ℤ ∧ 𝑀 ≠ 0 ∧ (𝐵 − 𝐷) ∈ ℤ) → (𝑀 ∥ (𝐵 − 𝐷) ↔ ((𝐵 − 𝐷) / 𝑀) ∈ ℤ)) |
120 | 8, 108, 117, 119 | syl3anc 1228 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → (𝑀 ∥ (𝐵 − 𝐷) ↔ ((𝐵 − 𝐷) / 𝑀) ∈ ℤ)) |
121 | 118, 120 | mpbird 166 |
. . . . . . . . . . . . 13
⊢ (𝜑 → 𝑀 ∥ (𝐵 − 𝐷)) |
122 | 100, 8, 117, 106, 121 | dvdstrd 11766 |
. . . . . . . . . . . 12
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ∥ (𝐵 − 𝐷)) |
123 | | dvdssub2 11771 |
. . . . . . . . . . . 12
⊢
(((((𝐶 gcd 𝐷) gcd 𝑀) ∈ ℤ ∧ 𝐵 ∈ ℤ ∧ 𝐷 ∈ ℤ) ∧ ((𝐶 gcd 𝐷) gcd 𝑀) ∥ (𝐵 − 𝐷)) → (((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐵 ↔ ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐷)) |
124 | 100, 17, 20, 122, 123 | syl31anc 1231 |
. . . . . . . . . . 11
⊢ (𝜑 → (((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐵 ↔ ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐷)) |
125 | 116, 124 | mpbird 166 |
. . . . . . . . . 10
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐵) |
126 | | 1ne0 8921 |
. . . . . . . . . . . . . . 15
⊢ 1 ≠
0 |
127 | 126 | a1i 9 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → 1 ≠ 0) |
128 | 47, 127 | eqnetrd 2359 |
. . . . . . . . . . . . 13
⊢ (𝜑 → (𝐴 gcd 𝐵) ≠ 0) |
129 | 128 | neneqd 2356 |
. . . . . . . . . . . 12
⊢ (𝜑 → ¬ (𝐴 gcd 𝐵) = 0) |
130 | | gcdeq0 11906 |
. . . . . . . . . . . . 13
⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → ((𝐴 gcd 𝐵) = 0 ↔ (𝐴 = 0 ∧ 𝐵 = 0))) |
131 | 11, 17, 130 | syl2anc 409 |
. . . . . . . . . . . 12
⊢ (𝜑 → ((𝐴 gcd 𝐵) = 0 ↔ (𝐴 = 0 ∧ 𝐵 = 0))) |
132 | 129, 131 | mtbid 662 |
. . . . . . . . . . 11
⊢ (𝜑 → ¬ (𝐴 = 0 ∧ 𝐵 = 0)) |
133 | | dvdslegcd 11893 |
. . . . . . . . . . 11
⊢
(((((𝐶 gcd 𝐷) gcd 𝑀) ∈ ℤ ∧ 𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ¬ (𝐴 = 0 ∧ 𝐵 = 0)) → ((((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐴 ∧ ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐵) → ((𝐶 gcd 𝐷) gcd 𝑀) ≤ (𝐴 gcd 𝐵))) |
134 | 100, 11, 17, 132, 133 | syl31anc 1231 |
. . . . . . . . . 10
⊢ (𝜑 → ((((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐴 ∧ ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐵) → ((𝐶 gcd 𝐷) gcd 𝑀) ≤ (𝐴 gcd 𝐵))) |
135 | 115, 125,
134 | mp2and 430 |
. . . . . . . . 9
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ≤ (𝐴 gcd 𝐵)) |
136 | 135, 47 | breqtrd 4007 |
. . . . . . . 8
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ≤ 1) |
137 | | simpr 109 |
. . . . . . . . . . . 12
⊢ (((𝐶 gcd 𝐷) = 0 ∧ 𝑀 = 0) → 𝑀 = 0) |
138 | 137 | necon3ai 2384 |
. . . . . . . . . . 11
⊢ (𝑀 ≠ 0 → ¬ ((𝐶 gcd 𝐷) = 0 ∧ 𝑀 = 0)) |
139 | 108, 138 | syl 14 |
. . . . . . . . . 10
⊢ (𝜑 → ¬ ((𝐶 gcd 𝐷) = 0 ∧ 𝑀 = 0)) |
140 | | gcdn0cl 11891 |
. . . . . . . . . 10
⊢ ((((𝐶 gcd 𝐷) ∈ ℤ ∧ 𝑀 ∈ ℤ) ∧ ¬ ((𝐶 gcd 𝐷) = 0 ∧ 𝑀 = 0)) → ((𝐶 gcd 𝐷) gcd 𝑀) ∈ ℕ) |
141 | 49, 8, 139, 140 | syl21anc 1227 |
. . . . . . . . 9
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ∈ ℕ) |
142 | | nnle1eq1 8877 |
. . . . . . . . 9
⊢ (((𝐶 gcd 𝐷) gcd 𝑀) ∈ ℕ → (((𝐶 gcd 𝐷) gcd 𝑀) ≤ 1 ↔ ((𝐶 gcd 𝐷) gcd 𝑀) = 1)) |
143 | 141, 142 | syl 14 |
. . . . . . . 8
⊢ (𝜑 → (((𝐶 gcd 𝐷) gcd 𝑀) ≤ 1 ↔ ((𝐶 gcd 𝐷) gcd 𝑀) = 1)) |
144 | 136, 143 | mpbid 146 |
. . . . . . 7
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) = 1) |
145 | | 2nn 9014 |
. . . . . . . . 9
⊢ 2 ∈
ℕ |
146 | 145 | a1i 9 |
. . . . . . . 8
⊢ (𝜑 → 2 ∈
ℕ) |
147 | | rplpwr 11956 |
. . . . . . . 8
⊢ (((𝐶 gcd 𝐷) ∈ ℕ ∧ 𝑀 ∈ ℕ ∧ 2 ∈ ℕ)
→ (((𝐶 gcd 𝐷) gcd 𝑀) = 1 → (((𝐶 gcd 𝐷)↑2) gcd 𝑀) = 1)) |
148 | 48, 5, 146, 147 | syl3anc 1228 |
. . . . . . 7
⊢ (𝜑 → (((𝐶 gcd 𝐷) gcd 𝑀) = 1 → (((𝐶 gcd 𝐷)↑2) gcd 𝑀) = 1)) |
149 | 144, 148 | mpd 13 |
. . . . . 6
⊢ (𝜑 → (((𝐶 gcd 𝐷)↑2) gcd 𝑀) = 1) |
150 | 98, 149 | eqtrd 2198 |
. . . . 5
⊢ (𝜑 → (𝑀 gcd ((𝐶 gcd 𝐷)↑2)) = 1) |
151 | 63, 72 | nn0addcld 9167 |
. . . . . . 7
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) ∈
ℕ0) |
152 | 151 | nn0zd 9307 |
. . . . . 6
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) ∈ ℤ) |
153 | | coprmdvds 12020 |
. . . . . 6
⊢ ((𝑀 ∈ ℤ ∧ ((𝐶 gcd 𝐷)↑2) ∈ ℤ ∧ ((𝐸↑2) + (𝐹↑2)) ∈ ℤ) → ((𝑀 ∥ (((𝐶 gcd 𝐷)↑2) · ((𝐸↑2) + (𝐹↑2))) ∧ (𝑀 gcd ((𝐶 gcd 𝐷)↑2)) = 1) → 𝑀 ∥ ((𝐸↑2) + (𝐹↑2)))) |
154 | 8, 97, 152, 153 | syl3anc 1228 |
. . . . 5
⊢ (𝜑 → ((𝑀 ∥ (((𝐶 gcd 𝐷)↑2) · ((𝐸↑2) + (𝐹↑2))) ∧ (𝑀 gcd ((𝐶 gcd 𝐷)↑2)) = 1) → 𝑀 ∥ ((𝐸↑2) + (𝐹↑2)))) |
155 | 95, 150, 154 | mp2and 430 |
. . . 4
⊢ (𝜑 → 𝑀 ∥ ((𝐸↑2) + (𝐹↑2))) |
156 | | dvdsval2 11726 |
. . . . 5
⊢ ((𝑀 ∈ ℤ ∧ 𝑀 ≠ 0 ∧ ((𝐸↑2) + (𝐹↑2)) ∈ ℤ) → (𝑀 ∥ ((𝐸↑2) + (𝐹↑2)) ↔ (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∈ ℤ)) |
157 | 8, 108, 152, 156 | syl3anc 1228 |
. . . 4
⊢ (𝜑 → (𝑀 ∥ ((𝐸↑2) + (𝐹↑2)) ↔ (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∈ ℤ)) |
158 | 155, 157 | mpbid 146 |
. . 3
⊢ (𝜑 → (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∈ ℤ) |
159 | 63 | nn0red 9164 |
. . . . 5
⊢ (𝜑 → (𝐸↑2) ∈ ℝ) |
160 | 72 | nn0red 9164 |
. . . . 5
⊢ (𝜑 → (𝐹↑2) ∈ ℝ) |
161 | 159, 160 | readdcld 7924 |
. . . 4
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) ∈ ℝ) |
162 | 5 | nnred 8866 |
. . . 4
⊢ (𝜑 → 𝑀 ∈ ℝ) |
163 | 1, 45 | 2sqlem7 13557 |
. . . . . . 7
⊢ 𝑌 ⊆ (𝑆 ∩ ℕ) |
164 | | inss2 3342 |
. . . . . . 7
⊢ (𝑆 ∩ ℕ) ⊆
ℕ |
165 | 163, 164 | sstri 3150 |
. . . . . 6
⊢ 𝑌 ⊆
ℕ |
166 | 61, 70 | gcdcld 11897 |
. . . . . . . . . 10
⊢ (𝜑 → (𝐸 gcd 𝐹) ∈
ℕ0) |
167 | 166 | nn0cnd 9165 |
. . . . . . . . 9
⊢ (𝜑 → (𝐸 gcd 𝐹) ∈ ℂ) |
168 | | 1cnd 7911 |
. . . . . . . . 9
⊢ (𝜑 → 1 ∈
ℂ) |
169 | 75 | mulid1d 7912 |
. . . . . . . . . 10
⊢ (𝜑 → ((𝐶 gcd 𝐷) · 1) = (𝐶 gcd 𝐷)) |
170 | 82, 90 | oveq12d 5859 |
. . . . . . . . . 10
⊢ (𝜑 → (((𝐶 gcd 𝐷) · 𝐸) gcd ((𝐶 gcd 𝐷) · 𝐹)) = (𝐶 gcd 𝐷)) |
171 | 14, 20 | gcdcld 11897 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐶 gcd 𝐷) ∈
ℕ0) |
172 | | mulgcd 11945 |
. . . . . . . . . . 11
⊢ (((𝐶 gcd 𝐷) ∈ ℕ0 ∧ 𝐸 ∈ ℤ ∧ 𝐹 ∈ ℤ) → (((𝐶 gcd 𝐷) · 𝐸) gcd ((𝐶 gcd 𝐷) · 𝐹)) = ((𝐶 gcd 𝐷) · (𝐸 gcd 𝐹))) |
173 | 171, 61, 70, 172 | syl3anc 1228 |
. . . . . . . . . 10
⊢ (𝜑 → (((𝐶 gcd 𝐷) · 𝐸) gcd ((𝐶 gcd 𝐷) · 𝐹)) = ((𝐶 gcd 𝐷) · (𝐸 gcd 𝐹))) |
174 | 169, 170,
173 | 3eqtr2rd 2205 |
. . . . . . . . 9
⊢ (𝜑 → ((𝐶 gcd 𝐷) · (𝐸 gcd 𝐹)) = ((𝐶 gcd 𝐷) · 1)) |
175 | 167, 168,
75, 80, 174 | mulcanapad 8556 |
. . . . . . . 8
⊢ (𝜑 → (𝐸 gcd 𝐹) = 1) |
176 | | eqidd 2166 |
. . . . . . . 8
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) = ((𝐸↑2) + (𝐹↑2))) |
177 | | oveq1 5848 |
. . . . . . . . . . 11
⊢ (𝑥 = 𝐸 → (𝑥 gcd 𝑦) = (𝐸 gcd 𝑦)) |
178 | 177 | eqeq1d 2174 |
. . . . . . . . . 10
⊢ (𝑥 = 𝐸 → ((𝑥 gcd 𝑦) = 1 ↔ (𝐸 gcd 𝑦) = 1)) |
179 | | oveq1 5848 |
. . . . . . . . . . . 12
⊢ (𝑥 = 𝐸 → (𝑥↑2) = (𝐸↑2)) |
180 | 179 | oveq1d 5856 |
. . . . . . . . . . 11
⊢ (𝑥 = 𝐸 → ((𝑥↑2) + (𝑦↑2)) = ((𝐸↑2) + (𝑦↑2))) |
181 | 180 | eqeq2d 2177 |
. . . . . . . . . 10
⊢ (𝑥 = 𝐸 → (((𝐸↑2) + (𝐹↑2)) = ((𝑥↑2) + (𝑦↑2)) ↔ ((𝐸↑2) + (𝐹↑2)) = ((𝐸↑2) + (𝑦↑2)))) |
182 | 178, 181 | anbi12d 465 |
. . . . . . . . 9
⊢ (𝑥 = 𝐸 → (((𝑥 gcd 𝑦) = 1 ∧ ((𝐸↑2) + (𝐹↑2)) = ((𝑥↑2) + (𝑦↑2))) ↔ ((𝐸 gcd 𝑦) = 1 ∧ ((𝐸↑2) + (𝐹↑2)) = ((𝐸↑2) + (𝑦↑2))))) |
183 | | oveq2 5849 |
. . . . . . . . . . 11
⊢ (𝑦 = 𝐹 → (𝐸 gcd 𝑦) = (𝐸 gcd 𝐹)) |
184 | 183 | eqeq1d 2174 |
. . . . . . . . . 10
⊢ (𝑦 = 𝐹 → ((𝐸 gcd 𝑦) = 1 ↔ (𝐸 gcd 𝐹) = 1)) |
185 | | oveq1 5848 |
. . . . . . . . . . . 12
⊢ (𝑦 = 𝐹 → (𝑦↑2) = (𝐹↑2)) |
186 | 185 | oveq2d 5857 |
. . . . . . . . . . 11
⊢ (𝑦 = 𝐹 → ((𝐸↑2) + (𝑦↑2)) = ((𝐸↑2) + (𝐹↑2))) |
187 | 186 | eqeq2d 2177 |
. . . . . . . . . 10
⊢ (𝑦 = 𝐹 → (((𝐸↑2) + (𝐹↑2)) = ((𝐸↑2) + (𝑦↑2)) ↔ ((𝐸↑2) + (𝐹↑2)) = ((𝐸↑2) + (𝐹↑2)))) |
188 | 184, 187 | anbi12d 465 |
. . . . . . . . 9
⊢ (𝑦 = 𝐹 → (((𝐸 gcd 𝑦) = 1 ∧ ((𝐸↑2) + (𝐹↑2)) = ((𝐸↑2) + (𝑦↑2))) ↔ ((𝐸 gcd 𝐹) = 1 ∧ ((𝐸↑2) + (𝐹↑2)) = ((𝐸↑2) + (𝐹↑2))))) |
189 | 182, 188 | rspc2ev 2844 |
. . . . . . . 8
⊢ ((𝐸 ∈ ℤ ∧ 𝐹 ∈ ℤ ∧ ((𝐸 gcd 𝐹) = 1 ∧ ((𝐸↑2) + (𝐹↑2)) = ((𝐸↑2) + (𝐹↑2)))) → ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ ((𝐸↑2) + (𝐹↑2)) = ((𝑥↑2) + (𝑦↑2)))) |
190 | 61, 70, 175, 176, 189 | syl112anc 1232 |
. . . . . . 7
⊢ (𝜑 → ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ ((𝐸↑2) + (𝐹↑2)) = ((𝑥↑2) + (𝑦↑2)))) |
191 | | eqeq1 2172 |
. . . . . . . . . . 11
⊢ (𝑧 = ((𝐸↑2) + (𝐹↑2)) → (𝑧 = ((𝑥↑2) + (𝑦↑2)) ↔ ((𝐸↑2) + (𝐹↑2)) = ((𝑥↑2) + (𝑦↑2)))) |
192 | 191 | anbi2d 460 |
. . . . . . . . . 10
⊢ (𝑧 = ((𝐸↑2) + (𝐹↑2)) → (((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2))) ↔ ((𝑥 gcd 𝑦) = 1 ∧ ((𝐸↑2) + (𝐹↑2)) = ((𝑥↑2) + (𝑦↑2))))) |
193 | 192 | 2rexbidv 2490 |
. . . . . . . . 9
⊢ (𝑧 = ((𝐸↑2) + (𝐹↑2)) → (∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2))) ↔ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ ((𝐸↑2) + (𝐹↑2)) = ((𝑥↑2) + (𝑦↑2))))) |
194 | 193, 45 | elab2g 2872 |
. . . . . . . 8
⊢ (((𝐸↑2) + (𝐹↑2)) ∈ ℕ0 →
(((𝐸↑2) + (𝐹↑2)) ∈ 𝑌 ↔ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ ((𝐸↑2) + (𝐹↑2)) = ((𝑥↑2) + (𝑦↑2))))) |
195 | 151, 194 | syl 14 |
. . . . . . 7
⊢ (𝜑 → (((𝐸↑2) + (𝐹↑2)) ∈ 𝑌 ↔ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ ((𝐸↑2) + (𝐹↑2)) = ((𝑥↑2) + (𝑦↑2))))) |
196 | 190, 195 | mpbird 166 |
. . . . . 6
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) ∈ 𝑌) |
197 | 165, 196 | sselid 3139 |
. . . . 5
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) ∈ ℕ) |
198 | 197 | nngt0d 8897 |
. . . 4
⊢ (𝜑 → 0 < ((𝐸↑2) + (𝐹↑2))) |
199 | 5 | nngt0d 8897 |
. . . 4
⊢ (𝜑 → 0 < 𝑀) |
200 | 161, 162,
198, 199 | divgt0d 8826 |
. . 3
⊢ (𝜑 → 0 < (((𝐸↑2) + (𝐹↑2)) / 𝑀)) |
201 | | elnnz 9197 |
. . 3
⊢ ((((𝐸↑2) + (𝐹↑2)) / 𝑀) ∈ ℕ ↔ ((((𝐸↑2) + (𝐹↑2)) / 𝑀) ∈ ℤ ∧ 0 < (((𝐸↑2) + (𝐹↑2)) / 𝑀))) |
202 | 158, 200,
201 | sylanbrc 414 |
. 2
⊢ (𝜑 → (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∈ ℕ) |
203 | | prmnn 12038 |
. . . . . . . 8
⊢ (𝑝 ∈ ℙ → 𝑝 ∈
ℕ) |
204 | 203 | ad2antrl 482 |
. . . . . . 7
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → 𝑝 ∈ ℕ) |
205 | 204 | nnred 8866 |
. . . . . . . 8
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → 𝑝 ∈ ℝ) |
206 | 158 | adantr 274 |
. . . . . . . . 9
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∈ ℤ) |
207 | 206 | zred 9309 |
. . . . . . . 8
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∈ ℝ) |
208 | | peano2zm 9225 |
. . . . . . . . . . 11
⊢ (𝑀 ∈ ℤ → (𝑀 − 1) ∈
ℤ) |
209 | 8, 208 | syl 14 |
. . . . . . . . . 10
⊢ (𝜑 → (𝑀 − 1) ∈ ℤ) |
210 | 209 | zred 9309 |
. . . . . . . . 9
⊢ (𝜑 → (𝑀 − 1) ∈ ℝ) |
211 | 210 | adantr 274 |
. . . . . . . 8
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → (𝑀 − 1) ∈ ℝ) |
212 | | simprr 522 |
. . . . . . . . 9
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀)) |
213 | | prmz 12039 |
. . . . . . . . . . 11
⊢ (𝑝 ∈ ℙ → 𝑝 ∈
ℤ) |
214 | 213 | ad2antrl 482 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → 𝑝 ∈ ℤ) |
215 | 202 | adantr 274 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∈ ℕ) |
216 | | dvdsle 11778 |
. . . . . . . . . 10
⊢ ((𝑝 ∈ ℤ ∧ (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∈ ℕ) → (𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀) → 𝑝 ≤ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) |
217 | 214, 215,
216 | syl2anc 409 |
. . . . . . . . 9
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → (𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀) → 𝑝 ≤ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) |
218 | 212, 217 | mpd 13 |
. . . . . . . 8
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → 𝑝 ≤ (((𝐸↑2) + (𝐹↑2)) / 𝑀)) |
219 | | zsqcl 10521 |
. . . . . . . . . . . . . . . 16
⊢ (𝑀 ∈ ℤ → (𝑀↑2) ∈
ℤ) |
220 | 8, 219 | syl 14 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → (𝑀↑2) ∈ ℤ) |
221 | 220 | zred 9309 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → (𝑀↑2) ∈ ℝ) |
222 | 221 | rehalfcld 9099 |
. . . . . . . . . . . . 13
⊢ (𝜑 → ((𝑀↑2) / 2) ∈
ℝ) |
223 | 16 | zred 9309 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → (𝐶↑2) ∈ ℝ) |
224 | 22 | zred 9309 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → (𝐷↑2) ∈ ℝ) |
225 | 223, 224 | readdcld 7924 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → ((𝐶↑2) + (𝐷↑2)) ∈ ℝ) |
226 | | 1red 7910 |
. . . . . . . . . . . . . . . 16
⊢ (𝜑 → 1 ∈
ℝ) |
227 | 48 | nnsqcld 10605 |
. . . . . . . . . . . . . . . . 17
⊢ (𝜑 → ((𝐶 gcd 𝐷)↑2) ∈ ℕ) |
228 | 227 | nnred 8866 |
. . . . . . . . . . . . . . . 16
⊢ (𝜑 → ((𝐶 gcd 𝐷)↑2) ∈ ℝ) |
229 | 151 | nn0ge0d 9166 |
. . . . . . . . . . . . . . . 16
⊢ (𝜑 → 0 ≤ ((𝐸↑2) + (𝐹↑2))) |
230 | 227 | nnge1d 8896 |
. . . . . . . . . . . . . . . 16
⊢ (𝜑 → 1 ≤ ((𝐶 gcd 𝐷)↑2)) |
231 | 226, 228,
161, 229, 230 | lemul1ad 8830 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → (1 · ((𝐸↑2) + (𝐹↑2))) ≤ (((𝐶 gcd 𝐷)↑2) · ((𝐸↑2) + (𝐹↑2)))) |
232 | 151 | nn0cnd 9165 |
. . . . . . . . . . . . . . . 16
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) ∈ ℂ) |
233 | 232 | mulid2d 7913 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → (1 · ((𝐸↑2) + (𝐹↑2))) = ((𝐸↑2) + (𝐹↑2))) |
234 | 231, 233,
94 | 3brtr3d 4012 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) ≤ ((𝐶↑2) + (𝐷↑2))) |
235 | 222 | rehalfcld 9099 |
. . . . . . . . . . . . . . . 16
⊢ (𝜑 → (((𝑀↑2) / 2) / 2) ∈
ℝ) |
236 | 11, 5, 12 | 4sqlem7 12310 |
. . . . . . . . . . . . . . . 16
⊢ (𝜑 → (𝐶↑2) ≤ (((𝑀↑2) / 2) / 2)) |
237 | 17, 5, 18 | 4sqlem7 12310 |
. . . . . . . . . . . . . . . 16
⊢ (𝜑 → (𝐷↑2) ≤ (((𝑀↑2) / 2) / 2)) |
238 | 223, 224,
235, 235, 236, 237 | le2addd 8457 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → ((𝐶↑2) + (𝐷↑2)) ≤ ((((𝑀↑2) / 2) / 2) + (((𝑀↑2) / 2) / 2))) |
239 | 222 | recnd 7923 |
. . . . . . . . . . . . . . . 16
⊢ (𝜑 → ((𝑀↑2) / 2) ∈
ℂ) |
240 | 239 | 2halvesd 9098 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → ((((𝑀↑2) / 2) / 2) + (((𝑀↑2) / 2) / 2)) = ((𝑀↑2) / 2)) |
241 | 238, 240 | breqtrd 4007 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → ((𝐶↑2) + (𝐷↑2)) ≤ ((𝑀↑2) / 2)) |
242 | 161, 225,
222, 234, 241 | letrd 8018 |
. . . . . . . . . . . . 13
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) ≤ ((𝑀↑2) / 2)) |
243 | 5 | nnsqcld 10605 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → (𝑀↑2) ∈ ℕ) |
244 | 243 | nnrpd 9626 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → (𝑀↑2) ∈
ℝ+) |
245 | | rphalflt 9615 |
. . . . . . . . . . . . . 14
⊢ ((𝑀↑2) ∈
ℝ+ → ((𝑀↑2) / 2) < (𝑀↑2)) |
246 | 244, 245 | syl 14 |
. . . . . . . . . . . . 13
⊢ (𝜑 → ((𝑀↑2) / 2) < (𝑀↑2)) |
247 | 161, 222,
221, 242, 246 | lelttrd 8019 |
. . . . . . . . . . . 12
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) < (𝑀↑2)) |
248 | 8 | zcnd 9310 |
. . . . . . . . . . . . 13
⊢ (𝜑 → 𝑀 ∈ ℂ) |
249 | 248 | sqvald 10581 |
. . . . . . . . . . . 12
⊢ (𝜑 → (𝑀↑2) = (𝑀 · 𝑀)) |
250 | 247, 249 | breqtrd 4007 |
. . . . . . . . . . 11
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) < (𝑀 · 𝑀)) |
251 | | ltdivmul 8767 |
. . . . . . . . . . . 12
⊢ ((((𝐸↑2) + (𝐹↑2)) ∈ ℝ ∧ 𝑀 ∈ ℝ ∧ (𝑀 ∈ ℝ ∧ 0 <
𝑀)) → ((((𝐸↑2) + (𝐹↑2)) / 𝑀) < 𝑀 ↔ ((𝐸↑2) + (𝐹↑2)) < (𝑀 · 𝑀))) |
252 | 161, 162,
162, 199, 251 | syl112anc 1232 |
. . . . . . . . . . 11
⊢ (𝜑 → ((((𝐸↑2) + (𝐹↑2)) / 𝑀) < 𝑀 ↔ ((𝐸↑2) + (𝐹↑2)) < (𝑀 · 𝑀))) |
253 | 250, 252 | mpbird 166 |
. . . . . . . . . 10
⊢ (𝜑 → (((𝐸↑2) + (𝐹↑2)) / 𝑀) < 𝑀) |
254 | | zltlem1 9244 |
. . . . . . . . . . 11
⊢
(((((𝐸↑2) +
(𝐹↑2)) / 𝑀) ∈ ℤ ∧ 𝑀 ∈ ℤ) →
((((𝐸↑2) + (𝐹↑2)) / 𝑀) < 𝑀 ↔ (((𝐸↑2) + (𝐹↑2)) / 𝑀) ≤ (𝑀 − 1))) |
255 | 158, 8, 254 | syl2anc 409 |
. . . . . . . . . 10
⊢ (𝜑 → ((((𝐸↑2) + (𝐹↑2)) / 𝑀) < 𝑀 ↔ (((𝐸↑2) + (𝐹↑2)) / 𝑀) ≤ (𝑀 − 1))) |
256 | 253, 255 | mpbid 146 |
. . . . . . . . 9
⊢ (𝜑 → (((𝐸↑2) + (𝐹↑2)) / 𝑀) ≤ (𝑀 − 1)) |
257 | 256 | adantr 274 |
. . . . . . . 8
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → (((𝐸↑2) + (𝐹↑2)) / 𝑀) ≤ (𝑀 − 1)) |
258 | 205, 207,
211, 218, 257 | letrd 8018 |
. . . . . . 7
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → 𝑝 ≤ (𝑀 − 1)) |
259 | 209 | adantr 274 |
. . . . . . . 8
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → (𝑀 − 1) ∈ ℤ) |
260 | | fznn 10020 |
. . . . . . . 8
⊢ ((𝑀 − 1) ∈ ℤ
→ (𝑝 ∈
(1...(𝑀 − 1)) ↔
(𝑝 ∈ ℕ ∧
𝑝 ≤ (𝑀 − 1)))) |
261 | 259, 260 | syl 14 |
. . . . . . 7
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → (𝑝 ∈ (1...(𝑀 − 1)) ↔ (𝑝 ∈ ℕ ∧ 𝑝 ≤ (𝑀 − 1)))) |
262 | 204, 258,
261 | mpbir2and 934 |
. . . . . 6
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → 𝑝 ∈ (1...(𝑀 − 1))) |
263 | 196 | adantr 274 |
. . . . . 6
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → ((𝐸↑2) + (𝐹↑2)) ∈ 𝑌) |
264 | 262, 263 | jca 304 |
. . . . 5
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → (𝑝 ∈ (1...(𝑀 − 1)) ∧ ((𝐸↑2) + (𝐹↑2)) ∈ 𝑌)) |
265 | 46 | adantr 274 |
. . . . 5
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → ∀𝑏 ∈ (1...(𝑀 − 1))∀𝑎 ∈ 𝑌 (𝑏 ∥ 𝑎 → 𝑏 ∈ 𝑆)) |
266 | 152 | adantr 274 |
. . . . . 6
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → ((𝐸↑2) + (𝐹↑2)) ∈ ℤ) |
267 | | dvdsmul2 11750 |
. . . . . . . . 9
⊢ ((𝑀 ∈ ℤ ∧ (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∈ ℤ) → (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∥ (𝑀 · (((𝐸↑2) + (𝐹↑2)) / 𝑀))) |
268 | 8, 158, 267 | syl2anc 409 |
. . . . . . . 8
⊢ (𝜑 → (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∥ (𝑀 · (((𝐸↑2) + (𝐹↑2)) / 𝑀))) |
269 | 5 | nnap0d 8899 |
. . . . . . . . 9
⊢ (𝜑 → 𝑀 # 0) |
270 | 232, 248,
269 | divcanap2d 8684 |
. . . . . . . 8
⊢ (𝜑 → (𝑀 · (((𝐸↑2) + (𝐹↑2)) / 𝑀)) = ((𝐸↑2) + (𝐹↑2))) |
271 | 268, 270 | breqtrd 4007 |
. . . . . . 7
⊢ (𝜑 → (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∥ ((𝐸↑2) + (𝐹↑2))) |
272 | 271 | adantr 274 |
. . . . . 6
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∥ ((𝐸↑2) + (𝐹↑2))) |
273 | 214, 206,
266, 212, 272 | dvdstrd 11766 |
. . . . 5
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → 𝑝 ∥ ((𝐸↑2) + (𝐹↑2))) |
274 | | breq1 3984 |
. . . . . . 7
⊢ (𝑏 = 𝑝 → (𝑏 ∥ 𝑎 ↔ 𝑝 ∥ 𝑎)) |
275 | | eleq1w 2226 |
. . . . . . 7
⊢ (𝑏 = 𝑝 → (𝑏 ∈ 𝑆 ↔ 𝑝 ∈ 𝑆)) |
276 | 274, 275 | imbi12d 233 |
. . . . . 6
⊢ (𝑏 = 𝑝 → ((𝑏 ∥ 𝑎 → 𝑏 ∈ 𝑆) ↔ (𝑝 ∥ 𝑎 → 𝑝 ∈ 𝑆))) |
277 | | breq2 3985 |
. . . . . . 7
⊢ (𝑎 = ((𝐸↑2) + (𝐹↑2)) → (𝑝 ∥ 𝑎 ↔ 𝑝 ∥ ((𝐸↑2) + (𝐹↑2)))) |
278 | 277 | imbi1d 230 |
. . . . . 6
⊢ (𝑎 = ((𝐸↑2) + (𝐹↑2)) → ((𝑝 ∥ 𝑎 → 𝑝 ∈ 𝑆) ↔ (𝑝 ∥ ((𝐸↑2) + (𝐹↑2)) → 𝑝 ∈ 𝑆))) |
279 | 276, 278 | rspc2v 2842 |
. . . . 5
⊢ ((𝑝 ∈ (1...(𝑀 − 1)) ∧ ((𝐸↑2) + (𝐹↑2)) ∈ 𝑌) → (∀𝑏 ∈ (1...(𝑀 − 1))∀𝑎 ∈ 𝑌 (𝑏 ∥ 𝑎 → 𝑏 ∈ 𝑆) → (𝑝 ∥ ((𝐸↑2) + (𝐹↑2)) → 𝑝 ∈ 𝑆))) |
280 | 264, 265,
273, 279 | syl3c 63 |
. . . 4
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → 𝑝 ∈ 𝑆) |
281 | 280 | expr 373 |
. . 3
⊢ ((𝜑 ∧ 𝑝 ∈ ℙ) → (𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀) → 𝑝 ∈ 𝑆)) |
282 | 281 | ralrimiva 2538 |
. 2
⊢ (𝜑 → ∀𝑝 ∈ ℙ (𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀) → 𝑝 ∈ 𝑆)) |
283 | | inss1 3341 |
. . . . 5
⊢ (𝑆 ∩ ℕ) ⊆ 𝑆 |
284 | 163, 283 | sstri 3150 |
. . . 4
⊢ 𝑌 ⊆ 𝑆 |
285 | 284, 196 | sselid 3139 |
. . 3
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) ∈ 𝑆) |
286 | 270, 285 | eqeltrd 2242 |
. 2
⊢ (𝜑 → (𝑀 · (((𝐸↑2) + (𝐹↑2)) / 𝑀)) ∈ 𝑆) |
287 | 1, 5, 202, 282, 286 | 2sqlem6 13556 |
1
⊢ (𝜑 → 𝑀 ∈ 𝑆) |