Step | Hyp | Ref
| Expression |
1 | | 2sq.1 |
. 2
⊢ 𝑆 = ran (𝑤 ∈ ℤ[i] ↦ ((abs‘𝑤)↑2)) |
2 | | 2sqlem8.m |
. . . 4
⊢ (𝜑 → 𝑀 ∈
(ℤ≥‘2)) |
3 | | eluz2b3 9563 |
. . . 4
⊢ (𝑀 ∈
(ℤ≥‘2) ↔ (𝑀 ∈ ℕ ∧ 𝑀 ≠ 1)) |
4 | 2, 3 | sylib 121 |
. . 3
⊢ (𝜑 → (𝑀 ∈ ℕ ∧ 𝑀 ≠ 1)) |
5 | 4 | simpld 111 |
. 2
⊢ (𝜑 → 𝑀 ∈ ℕ) |
6 | | 2sqlem9.7 |
. . . . . . 7
⊢ (𝜑 → 𝑀 ∥ 𝑁) |
7 | | eluzelz 9496 |
. . . . . . . . 9
⊢ (𝑀 ∈
(ℤ≥‘2) → 𝑀 ∈ ℤ) |
8 | 2, 7 | syl 14 |
. . . . . . . 8
⊢ (𝜑 → 𝑀 ∈ ℤ) |
9 | | 2sqlem8.n |
. . . . . . . . 9
⊢ (𝜑 → 𝑁 ∈ ℕ) |
10 | 9 | nnzd 9333 |
. . . . . . . 8
⊢ (𝜑 → 𝑁 ∈ ℤ) |
11 | | 2sqlem8.1 |
. . . . . . . . . . . 12
⊢ (𝜑 → 𝐴 ∈ ℤ) |
12 | | 2sqlem8.c |
. . . . . . . . . . . 12
⊢ 𝐶 = (((𝐴 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2)) |
13 | 11, 5, 12 | 4sqlem5 12334 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐶 ∈ ℤ ∧ ((𝐴 − 𝐶) / 𝑀) ∈ ℤ)) |
14 | 13 | simpld 111 |
. . . . . . . . . 10
⊢ (𝜑 → 𝐶 ∈ ℤ) |
15 | | zsqcl 10546 |
. . . . . . . . . 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 12334 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐷 ∈ ℤ ∧ ((𝐵 − 𝐷) / 𝑀) ∈ ℤ)) |
20 | 19 | simpld 111 |
. . . . . . . . . 10
⊢ (𝜑 → 𝐷 ∈ ℤ) |
21 | | zsqcl 10546 |
. . . . . . . . . 10
⊢ (𝐷 ∈ ℤ → (𝐷↑2) ∈
ℤ) |
22 | 20, 21 | syl 14 |
. . . . . . . . 9
⊢ (𝜑 → (𝐷↑2) ∈ ℤ) |
23 | 16, 22 | zaddcld 9338 |
. . . . . . . 8
⊢ (𝜑 → ((𝐶↑2) + (𝐷↑2)) ∈ ℤ) |
24 | | zsqcl 10546 |
. . . . . . . . . . . 12
⊢ (𝐴 ∈ ℤ → (𝐴↑2) ∈
ℤ) |
25 | 11, 24 | syl 14 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐴↑2) ∈ ℤ) |
26 | 25, 16 | zsubcld 9339 |
. . . . . . . . . 10
⊢ (𝜑 → ((𝐴↑2) − (𝐶↑2)) ∈ ℤ) |
27 | | zsqcl 10546 |
. . . . . . . . . . . 12
⊢ (𝐵 ∈ ℤ → (𝐵↑2) ∈
ℤ) |
28 | 17, 27 | syl 14 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐵↑2) ∈ ℤ) |
29 | 28, 22 | zsubcld 9339 |
. . . . . . . . . 10
⊢ (𝜑 → ((𝐵↑2) − (𝐷↑2)) ∈ ℤ) |
30 | 11, 5, 12 | 4sqlem8 12337 |
. . . . . . . . . 10
⊢ (𝜑 → 𝑀 ∥ ((𝐴↑2) − (𝐶↑2))) |
31 | 17, 5, 18 | 4sqlem8 12337 |
. . . . . . . . . 10
⊢ (𝜑 → 𝑀 ∥ ((𝐵↑2) − (𝐷↑2))) |
32 | 8, 26, 29, 30, 31 | dvds2addd 11791 |
. . . . . . . . 9
⊢ (𝜑 → 𝑀 ∥ (((𝐴↑2) − (𝐶↑2)) + ((𝐵↑2) − (𝐷↑2)))) |
33 | | 2sqlem8.4 |
. . . . . . . . . . 11
⊢ (𝜑 → 𝑁 = ((𝐴↑2) + (𝐵↑2))) |
34 | 33 | oveq1d 5868 |
. . . . . . . . . 10
⊢ (𝜑 → (𝑁 − ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) − ((𝐶↑2) + (𝐷↑2)))) |
35 | 25 | zcnd 9335 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐴↑2) ∈ ℂ) |
36 | 28 | zcnd 9335 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐵↑2) ∈ ℂ) |
37 | 16 | zcnd 9335 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐶↑2) ∈ ℂ) |
38 | 22 | zcnd 9335 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐷↑2) ∈ ℂ) |
39 | 35, 36, 37, 38 | addsub4d 8277 |
. . . . . . . . . 10
⊢ (𝜑 → (((𝐴↑2) + (𝐵↑2)) − ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) − (𝐶↑2)) + ((𝐵↑2) − (𝐷↑2)))) |
40 | 34, 39 | eqtrd 2203 |
. . . . . . . . 9
⊢ (𝜑 → (𝑁 − ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) − (𝐶↑2)) + ((𝐵↑2) − (𝐷↑2)))) |
41 | 32, 40 | breqtrrd 4017 |
. . . . . . . 8
⊢ (𝜑 → 𝑀 ∥ (𝑁 − ((𝐶↑2) + (𝐷↑2)))) |
42 | | dvdssub2 11797 |
. . . . . . . 8
⊢ (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ ((𝐶↑2) + (𝐷↑2)) ∈ ℤ) ∧ 𝑀 ∥ (𝑁 − ((𝐶↑2) + (𝐷↑2)))) → (𝑀 ∥ 𝑁 ↔ 𝑀 ∥ ((𝐶↑2) + (𝐷↑2)))) |
43 | 8, 10, 23, 41, 42 | syl31anc 1236 |
. . . . . . 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 13752 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐶 gcd 𝐷) ∈ ℕ) |
49 | 48 | nnzd 9333 |
. . . . . . . . . 10
⊢ (𝜑 → (𝐶 gcd 𝐷) ∈ ℤ) |
50 | | zsqcl2 10553 |
. . . . . . . . . 10
⊢ ((𝐶 gcd 𝐷) ∈ ℤ → ((𝐶 gcd 𝐷)↑2) ∈
ℕ0) |
51 | 49, 50 | syl 14 |
. . . . . . . . 9
⊢ (𝜑 → ((𝐶 gcd 𝐷)↑2) ∈
ℕ0) |
52 | 51 | nn0cnd 9190 |
. . . . . . . 8
⊢ (𝜑 → ((𝐶 gcd 𝐷)↑2) ∈ ℂ) |
53 | | 2sqlem8.e |
. . . . . . . . . . 11
⊢ 𝐸 = (𝐶 / (𝐶 gcd 𝐷)) |
54 | | gcddvds 11918 |
. . . . . . . . . . . . . 14
⊢ ((𝐶 ∈ ℤ ∧ 𝐷 ∈ ℤ) → ((𝐶 gcd 𝐷) ∥ 𝐶 ∧ (𝐶 gcd 𝐷) ∥ 𝐷)) |
55 | 14, 20, 54 | syl2anc 409 |
. . . . . . . . . . . . 13
⊢ (𝜑 → ((𝐶 gcd 𝐷) ∥ 𝐶 ∧ (𝐶 gcd 𝐷) ∥ 𝐷)) |
56 | 55 | simpld 111 |
. . . . . . . . . . . 12
⊢ (𝜑 → (𝐶 gcd 𝐷) ∥ 𝐶) |
57 | 48 | nnne0d 8923 |
. . . . . . . . . . . . 13
⊢ (𝜑 → (𝐶 gcd 𝐷) ≠ 0) |
58 | | dvdsval2 11752 |
. . . . . . . . . . . . 13
⊢ (((𝐶 gcd 𝐷) ∈ ℤ ∧ (𝐶 gcd 𝐷) ≠ 0 ∧ 𝐶 ∈ ℤ) → ((𝐶 gcd 𝐷) ∥ 𝐶 ↔ (𝐶 / (𝐶 gcd 𝐷)) ∈ ℤ)) |
59 | 49, 57, 14, 58 | syl3anc 1233 |
. . . . . . . . . . . 12
⊢ (𝜑 → ((𝐶 gcd 𝐷) ∥ 𝐶 ↔ (𝐶 / (𝐶 gcd 𝐷)) ∈ ℤ)) |
60 | 56, 59 | mpbid 146 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐶 / (𝐶 gcd 𝐷)) ∈ ℤ) |
61 | 53, 60 | eqeltrid 2257 |
. . . . . . . . . 10
⊢ (𝜑 → 𝐸 ∈ ℤ) |
62 | | zsqcl2 10553 |
. . . . . . . . . 10
⊢ (𝐸 ∈ ℤ → (𝐸↑2) ∈
ℕ0) |
63 | 61, 62 | syl 14 |
. . . . . . . . 9
⊢ (𝜑 → (𝐸↑2) ∈
ℕ0) |
64 | 63 | nn0cnd 9190 |
. . . . . . . 8
⊢ (𝜑 → (𝐸↑2) ∈ ℂ) |
65 | | 2sqlem8.f |
. . . . . . . . . . 11
⊢ 𝐹 = (𝐷 / (𝐶 gcd 𝐷)) |
66 | 55 | simprd 113 |
. . . . . . . . . . . 12
⊢ (𝜑 → (𝐶 gcd 𝐷) ∥ 𝐷) |
67 | | dvdsval2 11752 |
. . . . . . . . . . . . 13
⊢ (((𝐶 gcd 𝐷) ∈ ℤ ∧ (𝐶 gcd 𝐷) ≠ 0 ∧ 𝐷 ∈ ℤ) → ((𝐶 gcd 𝐷) ∥ 𝐷 ↔ (𝐷 / (𝐶 gcd 𝐷)) ∈ ℤ)) |
68 | 49, 57, 20, 67 | syl3anc 1233 |
. . . . . . . . . . . 12
⊢ (𝜑 → ((𝐶 gcd 𝐷) ∥ 𝐷 ↔ (𝐷 / (𝐶 gcd 𝐷)) ∈ ℤ)) |
69 | 66, 68 | mpbid 146 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐷 / (𝐶 gcd 𝐷)) ∈ ℤ) |
70 | 65, 69 | eqeltrid 2257 |
. . . . . . . . . 10
⊢ (𝜑 → 𝐹 ∈ ℤ) |
71 | | zsqcl2 10553 |
. . . . . . . . . 10
⊢ (𝐹 ∈ ℤ → (𝐹↑2) ∈
ℕ0) |
72 | 70, 71 | syl 14 |
. . . . . . . . 9
⊢ (𝜑 → (𝐹↑2) ∈
ℕ0) |
73 | 72 | nn0cnd 9190 |
. . . . . . . 8
⊢ (𝜑 → (𝐹↑2) ∈ ℂ) |
74 | 52, 64, 73 | adddid 7944 |
. . . . . . 7
⊢ (𝜑 → (((𝐶 gcd 𝐷)↑2) · ((𝐸↑2) + (𝐹↑2))) = ((((𝐶 gcd 𝐷)↑2) · (𝐸↑2)) + (((𝐶 gcd 𝐷)↑2) · (𝐹↑2)))) |
75 | 49 | zcnd 9335 |
. . . . . . . . . 10
⊢ (𝜑 → (𝐶 gcd 𝐷) ∈ ℂ) |
76 | 61 | zcnd 9335 |
. . . . . . . . . 10
⊢ (𝜑 → 𝐸 ∈ ℂ) |
77 | 75, 76 | sqmuld 10621 |
. . . . . . . . 9
⊢ (𝜑 → (((𝐶 gcd 𝐷) · 𝐸)↑2) = (((𝐶 gcd 𝐷)↑2) · (𝐸↑2))) |
78 | 53 | oveq2i 5864 |
. . . . . . . . . . 11
⊢ ((𝐶 gcd 𝐷) · 𝐸) = ((𝐶 gcd 𝐷) · (𝐶 / (𝐶 gcd 𝐷))) |
79 | 14 | zcnd 9335 |
. . . . . . . . . . . 12
⊢ (𝜑 → 𝐶 ∈ ℂ) |
80 | 48 | nnap0d 8924 |
. . . . . . . . . . . 12
⊢ (𝜑 → (𝐶 gcd 𝐷) # 0) |
81 | 79, 75, 80 | divcanap2d 8709 |
. . . . . . . . . . 11
⊢ (𝜑 → ((𝐶 gcd 𝐷) · (𝐶 / (𝐶 gcd 𝐷))) = 𝐶) |
82 | 78, 81 | eqtrid 2215 |
. . . . . . . . . 10
⊢ (𝜑 → ((𝐶 gcd 𝐷) · 𝐸) = 𝐶) |
83 | 82 | oveq1d 5868 |
. . . . . . . . 9
⊢ (𝜑 → (((𝐶 gcd 𝐷) · 𝐸)↑2) = (𝐶↑2)) |
84 | 77, 83 | eqtr3d 2205 |
. . . . . . . 8
⊢ (𝜑 → (((𝐶 gcd 𝐷)↑2) · (𝐸↑2)) = (𝐶↑2)) |
85 | 70 | zcnd 9335 |
. . . . . . . . . 10
⊢ (𝜑 → 𝐹 ∈ ℂ) |
86 | 75, 85 | sqmuld 10621 |
. . . . . . . . 9
⊢ (𝜑 → (((𝐶 gcd 𝐷) · 𝐹)↑2) = (((𝐶 gcd 𝐷)↑2) · (𝐹↑2))) |
87 | 65 | oveq2i 5864 |
. . . . . . . . . . 11
⊢ ((𝐶 gcd 𝐷) · 𝐹) = ((𝐶 gcd 𝐷) · (𝐷 / (𝐶 gcd 𝐷))) |
88 | 20 | zcnd 9335 |
. . . . . . . . . . . 12
⊢ (𝜑 → 𝐷 ∈ ℂ) |
89 | 88, 75, 80 | divcanap2d 8709 |
. . . . . . . . . . 11
⊢ (𝜑 → ((𝐶 gcd 𝐷) · (𝐷 / (𝐶 gcd 𝐷))) = 𝐷) |
90 | 87, 89 | eqtrid 2215 |
. . . . . . . . . 10
⊢ (𝜑 → ((𝐶 gcd 𝐷) · 𝐹) = 𝐷) |
91 | 90 | oveq1d 5868 |
. . . . . . . . 9
⊢ (𝜑 → (((𝐶 gcd 𝐷) · 𝐹)↑2) = (𝐷↑2)) |
92 | 86, 91 | eqtr3d 2205 |
. . . . . . . 8
⊢ (𝜑 → (((𝐶 gcd 𝐷)↑2) · (𝐹↑2)) = (𝐷↑2)) |
93 | 84, 92 | oveq12d 5871 |
. . . . . . 7
⊢ (𝜑 → ((((𝐶 gcd 𝐷)↑2) · (𝐸↑2)) + (((𝐶 gcd 𝐷)↑2) · (𝐹↑2))) = ((𝐶↑2) + (𝐷↑2))) |
94 | 74, 93 | eqtrd 2203 |
. . . . . 6
⊢ (𝜑 → (((𝐶 gcd 𝐷)↑2) · ((𝐸↑2) + (𝐹↑2))) = ((𝐶↑2) + (𝐷↑2))) |
95 | 44, 94 | breqtrrd 4017 |
. . . . 5
⊢ (𝜑 → 𝑀 ∥ (((𝐶 gcd 𝐷)↑2) · ((𝐸↑2) + (𝐹↑2)))) |
96 | | zsqcl 10546 |
. . . . . . . 8
⊢ ((𝐶 gcd 𝐷) ∈ ℤ → ((𝐶 gcd 𝐷)↑2) ∈ ℤ) |
97 | 49, 96 | syl 14 |
. . . . . . 7
⊢ (𝜑 → ((𝐶 gcd 𝐷)↑2) ∈ ℤ) |
98 | 8, 97 | gcdcomd 11929 |
. . . . . 6
⊢ (𝜑 → (𝑀 gcd ((𝐶 gcd 𝐷)↑2)) = (((𝐶 gcd 𝐷)↑2) gcd 𝑀)) |
99 | 49, 8 | gcdcld 11923 |
. . . . . . . . . . . . 13
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ∈
ℕ0) |
100 | 99 | nn0zd 9332 |
. . . . . . . . . . . 12
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ∈ ℤ) |
101 | | gcddvds 11918 |
. . . . . . . . . . . . . 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 11792 |
. . . . . . . . . . 11
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐶) |
105 | 11, 14 | zsubcld 9339 |
. . . . . . . . . . . . 13
⊢ (𝜑 → (𝐴 − 𝐶) ∈ ℤ) |
106 | 102 | simprd 113 |
. . . . . . . . . . . . 13
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝑀) |
107 | 13 | simprd 113 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → ((𝐴 − 𝐶) / 𝑀) ∈ ℤ) |
108 | 5 | nnne0d 8923 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → 𝑀 ≠ 0) |
109 | | dvdsval2 11752 |
. . . . . . . . . . . . . . 15
⊢ ((𝑀 ∈ ℤ ∧ 𝑀 ≠ 0 ∧ (𝐴 − 𝐶) ∈ ℤ) → (𝑀 ∥ (𝐴 − 𝐶) ↔ ((𝐴 − 𝐶) / 𝑀) ∈ ℤ)) |
110 | 8, 108, 105, 109 | syl3anc 1233 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → (𝑀 ∥ (𝐴 − 𝐶) ↔ ((𝐴 − 𝐶) / 𝑀) ∈ ℤ)) |
111 | 107, 110 | mpbird 166 |
. . . . . . . . . . . . 13
⊢ (𝜑 → 𝑀 ∥ (𝐴 − 𝐶)) |
112 | 100, 8, 105, 106, 111 | dvdstrd 11792 |
. . . . . . . . . . . 12
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ∥ (𝐴 − 𝐶)) |
113 | | dvdssub2 11797 |
. . . . . . . . . . . 12
⊢
(((((𝐶 gcd 𝐷) gcd 𝑀) ∈ ℤ ∧ 𝐴 ∈ ℤ ∧ 𝐶 ∈ ℤ) ∧ ((𝐶 gcd 𝐷) gcd 𝑀) ∥ (𝐴 − 𝐶)) → (((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐴 ↔ ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐶)) |
114 | 100, 11, 14, 112, 113 | syl31anc 1236 |
. . . . . . . . . . 11
⊢ (𝜑 → (((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐴 ↔ ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐶)) |
115 | 104, 114 | mpbird 166 |
. . . . . . . . . 10
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐴) |
116 | 100, 49, 20, 103, 66 | dvdstrd 11792 |
. . . . . . . . . . 11
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐷) |
117 | 17, 20 | zsubcld 9339 |
. . . . . . . . . . . . 13
⊢ (𝜑 → (𝐵 − 𝐷) ∈ ℤ) |
118 | 19 | simprd 113 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → ((𝐵 − 𝐷) / 𝑀) ∈ ℤ) |
119 | | dvdsval2 11752 |
. . . . . . . . . . . . . . 15
⊢ ((𝑀 ∈ ℤ ∧ 𝑀 ≠ 0 ∧ (𝐵 − 𝐷) ∈ ℤ) → (𝑀 ∥ (𝐵 − 𝐷) ↔ ((𝐵 − 𝐷) / 𝑀) ∈ ℤ)) |
120 | 8, 108, 117, 119 | syl3anc 1233 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → (𝑀 ∥ (𝐵 − 𝐷) ↔ ((𝐵 − 𝐷) / 𝑀) ∈ ℤ)) |
121 | 118, 120 | mpbird 166 |
. . . . . . . . . . . . 13
⊢ (𝜑 → 𝑀 ∥ (𝐵 − 𝐷)) |
122 | 100, 8, 117, 106, 121 | dvdstrd 11792 |
. . . . . . . . . . . 12
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ∥ (𝐵 − 𝐷)) |
123 | | dvdssub2 11797 |
. . . . . . . . . . . 12
⊢
(((((𝐶 gcd 𝐷) gcd 𝑀) ∈ ℤ ∧ 𝐵 ∈ ℤ ∧ 𝐷 ∈ ℤ) ∧ ((𝐶 gcd 𝐷) gcd 𝑀) ∥ (𝐵 − 𝐷)) → (((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐵 ↔ ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐷)) |
124 | 100, 17, 20, 122, 123 | syl31anc 1236 |
. . . . . . . . . . 11
⊢ (𝜑 → (((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐵 ↔ ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐷)) |
125 | 116, 124 | mpbird 166 |
. . . . . . . . . 10
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐵) |
126 | | 1ne0 8946 |
. . . . . . . . . . . . . . 15
⊢ 1 ≠
0 |
127 | 126 | a1i 9 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → 1 ≠ 0) |
128 | 47, 127 | eqnetrd 2364 |
. . . . . . . . . . . . 13
⊢ (𝜑 → (𝐴 gcd 𝐵) ≠ 0) |
129 | 128 | neneqd 2361 |
. . . . . . . . . . . 12
⊢ (𝜑 → ¬ (𝐴 gcd 𝐵) = 0) |
130 | | gcdeq0 11932 |
. . . . . . . . . . . . 13
⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → ((𝐴 gcd 𝐵) = 0 ↔ (𝐴 = 0 ∧ 𝐵 = 0))) |
131 | 11, 17, 130 | syl2anc 409 |
. . . . . . . . . . . 12
⊢ (𝜑 → ((𝐴 gcd 𝐵) = 0 ↔ (𝐴 = 0 ∧ 𝐵 = 0))) |
132 | 129, 131 | mtbid 667 |
. . . . . . . . . . 11
⊢ (𝜑 → ¬ (𝐴 = 0 ∧ 𝐵 = 0)) |
133 | | dvdslegcd 11919 |
. . . . . . . . . . 11
⊢
(((((𝐶 gcd 𝐷) gcd 𝑀) ∈ ℤ ∧ 𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ¬ (𝐴 = 0 ∧ 𝐵 = 0)) → ((((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐴 ∧ ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐵) → ((𝐶 gcd 𝐷) gcd 𝑀) ≤ (𝐴 gcd 𝐵))) |
134 | 100, 11, 17, 132, 133 | syl31anc 1236 |
. . . . . . . . . 10
⊢ (𝜑 → ((((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐴 ∧ ((𝐶 gcd 𝐷) gcd 𝑀) ∥ 𝐵) → ((𝐶 gcd 𝐷) gcd 𝑀) ≤ (𝐴 gcd 𝐵))) |
135 | 115, 125,
134 | mp2and 431 |
. . . . . . . . 9
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ≤ (𝐴 gcd 𝐵)) |
136 | 135, 47 | breqtrd 4015 |
. . . . . . . 8
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ≤ 1) |
137 | | simpr 109 |
. . . . . . . . . . . 12
⊢ (((𝐶 gcd 𝐷) = 0 ∧ 𝑀 = 0) → 𝑀 = 0) |
138 | 137 | necon3ai 2389 |
. . . . . . . . . . 11
⊢ (𝑀 ≠ 0 → ¬ ((𝐶 gcd 𝐷) = 0 ∧ 𝑀 = 0)) |
139 | 108, 138 | syl 14 |
. . . . . . . . . 10
⊢ (𝜑 → ¬ ((𝐶 gcd 𝐷) = 0 ∧ 𝑀 = 0)) |
140 | | gcdn0cl 11917 |
. . . . . . . . . 10
⊢ ((((𝐶 gcd 𝐷) ∈ ℤ ∧ 𝑀 ∈ ℤ) ∧ ¬ ((𝐶 gcd 𝐷) = 0 ∧ 𝑀 = 0)) → ((𝐶 gcd 𝐷) gcd 𝑀) ∈ ℕ) |
141 | 49, 8, 139, 140 | syl21anc 1232 |
. . . . . . . . 9
⊢ (𝜑 → ((𝐶 gcd 𝐷) gcd 𝑀) ∈ ℕ) |
142 | | nnle1eq1 8902 |
. . . . . . . . 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 9039 |
. . . . . . . . 9
⊢ 2 ∈
ℕ |
146 | 145 | a1i 9 |
. . . . . . . 8
⊢ (𝜑 → 2 ∈
ℕ) |
147 | | rplpwr 11982 |
. . . . . . . 8
⊢ (((𝐶 gcd 𝐷) ∈ ℕ ∧ 𝑀 ∈ ℕ ∧ 2 ∈ ℕ)
→ (((𝐶 gcd 𝐷) gcd 𝑀) = 1 → (((𝐶 gcd 𝐷)↑2) gcd 𝑀) = 1)) |
148 | 48, 5, 146, 147 | syl3anc 1233 |
. . . . . . 7
⊢ (𝜑 → (((𝐶 gcd 𝐷) gcd 𝑀) = 1 → (((𝐶 gcd 𝐷)↑2) gcd 𝑀) = 1)) |
149 | 144, 148 | mpd 13 |
. . . . . 6
⊢ (𝜑 → (((𝐶 gcd 𝐷)↑2) gcd 𝑀) = 1) |
150 | 98, 149 | eqtrd 2203 |
. . . . 5
⊢ (𝜑 → (𝑀 gcd ((𝐶 gcd 𝐷)↑2)) = 1) |
151 | 63, 72 | nn0addcld 9192 |
. . . . . . 7
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) ∈
ℕ0) |
152 | 151 | nn0zd 9332 |
. . . . . 6
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) ∈ ℤ) |
153 | | coprmdvds 12046 |
. . . . . 6
⊢ ((𝑀 ∈ ℤ ∧ ((𝐶 gcd 𝐷)↑2) ∈ ℤ ∧ ((𝐸↑2) + (𝐹↑2)) ∈ ℤ) → ((𝑀 ∥ (((𝐶 gcd 𝐷)↑2) · ((𝐸↑2) + (𝐹↑2))) ∧ (𝑀 gcd ((𝐶 gcd 𝐷)↑2)) = 1) → 𝑀 ∥ ((𝐸↑2) + (𝐹↑2)))) |
154 | 8, 97, 152, 153 | syl3anc 1233 |
. . . . 5
⊢ (𝜑 → ((𝑀 ∥ (((𝐶 gcd 𝐷)↑2) · ((𝐸↑2) + (𝐹↑2))) ∧ (𝑀 gcd ((𝐶 gcd 𝐷)↑2)) = 1) → 𝑀 ∥ ((𝐸↑2) + (𝐹↑2)))) |
155 | 95, 150, 154 | mp2and 431 |
. . . 4
⊢ (𝜑 → 𝑀 ∥ ((𝐸↑2) + (𝐹↑2))) |
156 | | dvdsval2 11752 |
. . . . 5
⊢ ((𝑀 ∈ ℤ ∧ 𝑀 ≠ 0 ∧ ((𝐸↑2) + (𝐹↑2)) ∈ ℤ) → (𝑀 ∥ ((𝐸↑2) + (𝐹↑2)) ↔ (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∈ ℤ)) |
157 | 8, 108, 152, 156 | syl3anc 1233 |
. . . 4
⊢ (𝜑 → (𝑀 ∥ ((𝐸↑2) + (𝐹↑2)) ↔ (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∈ ℤ)) |
158 | 155, 157 | mpbid 146 |
. . 3
⊢ (𝜑 → (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∈ ℤ) |
159 | 63 | nn0red 9189 |
. . . . 5
⊢ (𝜑 → (𝐸↑2) ∈ ℝ) |
160 | 72 | nn0red 9189 |
. . . . 5
⊢ (𝜑 → (𝐹↑2) ∈ ℝ) |
161 | 159, 160 | readdcld 7949 |
. . . 4
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) ∈ ℝ) |
162 | 5 | nnred 8891 |
. . . 4
⊢ (𝜑 → 𝑀 ∈ ℝ) |
163 | 1, 45 | 2sqlem7 13751 |
. . . . . . 7
⊢ 𝑌 ⊆ (𝑆 ∩ ℕ) |
164 | | inss2 3348 |
. . . . . . 7
⊢ (𝑆 ∩ ℕ) ⊆
ℕ |
165 | 163, 164 | sstri 3156 |
. . . . . 6
⊢ 𝑌 ⊆
ℕ |
166 | 61, 70 | gcdcld 11923 |
. . . . . . . . . 10
⊢ (𝜑 → (𝐸 gcd 𝐹) ∈
ℕ0) |
167 | 166 | nn0cnd 9190 |
. . . . . . . . 9
⊢ (𝜑 → (𝐸 gcd 𝐹) ∈ ℂ) |
168 | | 1cnd 7936 |
. . . . . . . . 9
⊢ (𝜑 → 1 ∈
ℂ) |
169 | 75 | mulid1d 7937 |
. . . . . . . . . 10
⊢ (𝜑 → ((𝐶 gcd 𝐷) · 1) = (𝐶 gcd 𝐷)) |
170 | 82, 90 | oveq12d 5871 |
. . . . . . . . . 10
⊢ (𝜑 → (((𝐶 gcd 𝐷) · 𝐸) gcd ((𝐶 gcd 𝐷) · 𝐹)) = (𝐶 gcd 𝐷)) |
171 | 14, 20 | gcdcld 11923 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝐶 gcd 𝐷) ∈
ℕ0) |
172 | | mulgcd 11971 |
. . . . . . . . . . 11
⊢ (((𝐶 gcd 𝐷) ∈ ℕ0 ∧ 𝐸 ∈ ℤ ∧ 𝐹 ∈ ℤ) → (((𝐶 gcd 𝐷) · 𝐸) gcd ((𝐶 gcd 𝐷) · 𝐹)) = ((𝐶 gcd 𝐷) · (𝐸 gcd 𝐹))) |
173 | 171, 61, 70, 172 | syl3anc 1233 |
. . . . . . . . . 10
⊢ (𝜑 → (((𝐶 gcd 𝐷) · 𝐸) gcd ((𝐶 gcd 𝐷) · 𝐹)) = ((𝐶 gcd 𝐷) · (𝐸 gcd 𝐹))) |
174 | 169, 170,
173 | 3eqtr2rd 2210 |
. . . . . . . . 9
⊢ (𝜑 → ((𝐶 gcd 𝐷) · (𝐸 gcd 𝐹)) = ((𝐶 gcd 𝐷) · 1)) |
175 | 167, 168,
75, 80, 174 | mulcanapad 8581 |
. . . . . . . 8
⊢ (𝜑 → (𝐸 gcd 𝐹) = 1) |
176 | | eqidd 2171 |
. . . . . . . 8
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) = ((𝐸↑2) + (𝐹↑2))) |
177 | | oveq1 5860 |
. . . . . . . . . . 11
⊢ (𝑥 = 𝐸 → (𝑥 gcd 𝑦) = (𝐸 gcd 𝑦)) |
178 | 177 | eqeq1d 2179 |
. . . . . . . . . 10
⊢ (𝑥 = 𝐸 → ((𝑥 gcd 𝑦) = 1 ↔ (𝐸 gcd 𝑦) = 1)) |
179 | | oveq1 5860 |
. . . . . . . . . . . 12
⊢ (𝑥 = 𝐸 → (𝑥↑2) = (𝐸↑2)) |
180 | 179 | oveq1d 5868 |
. . . . . . . . . . 11
⊢ (𝑥 = 𝐸 → ((𝑥↑2) + (𝑦↑2)) = ((𝐸↑2) + (𝑦↑2))) |
181 | 180 | eqeq2d 2182 |
. . . . . . . . . 10
⊢ (𝑥 = 𝐸 → (((𝐸↑2) + (𝐹↑2)) = ((𝑥↑2) + (𝑦↑2)) ↔ ((𝐸↑2) + (𝐹↑2)) = ((𝐸↑2) + (𝑦↑2)))) |
182 | 178, 181 | anbi12d 470 |
. . . . . . . . 9
⊢ (𝑥 = 𝐸 → (((𝑥 gcd 𝑦) = 1 ∧ ((𝐸↑2) + (𝐹↑2)) = ((𝑥↑2) + (𝑦↑2))) ↔ ((𝐸 gcd 𝑦) = 1 ∧ ((𝐸↑2) + (𝐹↑2)) = ((𝐸↑2) + (𝑦↑2))))) |
183 | | oveq2 5861 |
. . . . . . . . . . 11
⊢ (𝑦 = 𝐹 → (𝐸 gcd 𝑦) = (𝐸 gcd 𝐹)) |
184 | 183 | eqeq1d 2179 |
. . . . . . . . . 10
⊢ (𝑦 = 𝐹 → ((𝐸 gcd 𝑦) = 1 ↔ (𝐸 gcd 𝐹) = 1)) |
185 | | oveq1 5860 |
. . . . . . . . . . . 12
⊢ (𝑦 = 𝐹 → (𝑦↑2) = (𝐹↑2)) |
186 | 185 | oveq2d 5869 |
. . . . . . . . . . 11
⊢ (𝑦 = 𝐹 → ((𝐸↑2) + (𝑦↑2)) = ((𝐸↑2) + (𝐹↑2))) |
187 | 186 | eqeq2d 2182 |
. . . . . . . . . 10
⊢ (𝑦 = 𝐹 → (((𝐸↑2) + (𝐹↑2)) = ((𝐸↑2) + (𝑦↑2)) ↔ ((𝐸↑2) + (𝐹↑2)) = ((𝐸↑2) + (𝐹↑2)))) |
188 | 184, 187 | anbi12d 470 |
. . . . . . . . 9
⊢ (𝑦 = 𝐹 → (((𝐸 gcd 𝑦) = 1 ∧ ((𝐸↑2) + (𝐹↑2)) = ((𝐸↑2) + (𝑦↑2))) ↔ ((𝐸 gcd 𝐹) = 1 ∧ ((𝐸↑2) + (𝐹↑2)) = ((𝐸↑2) + (𝐹↑2))))) |
189 | 182, 188 | rspc2ev 2849 |
. . . . . . . 8
⊢ ((𝐸 ∈ ℤ ∧ 𝐹 ∈ ℤ ∧ ((𝐸 gcd 𝐹) = 1 ∧ ((𝐸↑2) + (𝐹↑2)) = ((𝐸↑2) + (𝐹↑2)))) → ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ ((𝐸↑2) + (𝐹↑2)) = ((𝑥↑2) + (𝑦↑2)))) |
190 | 61, 70, 175, 176, 189 | syl112anc 1237 |
. . . . . . 7
⊢ (𝜑 → ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ ((𝐸↑2) + (𝐹↑2)) = ((𝑥↑2) + (𝑦↑2)))) |
191 | | eqeq1 2177 |
. . . . . . . . . . 11
⊢ (𝑧 = ((𝐸↑2) + (𝐹↑2)) → (𝑧 = ((𝑥↑2) + (𝑦↑2)) ↔ ((𝐸↑2) + (𝐹↑2)) = ((𝑥↑2) + (𝑦↑2)))) |
192 | 191 | anbi2d 461 |
. . . . . . . . . 10
⊢ (𝑧 = ((𝐸↑2) + (𝐹↑2)) → (((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2))) ↔ ((𝑥 gcd 𝑦) = 1 ∧ ((𝐸↑2) + (𝐹↑2)) = ((𝑥↑2) + (𝑦↑2))))) |
193 | 192 | 2rexbidv 2495 |
. . . . . . . . 9
⊢ (𝑧 = ((𝐸↑2) + (𝐹↑2)) → (∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2))) ↔ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ ((𝐸↑2) + (𝐹↑2)) = ((𝑥↑2) + (𝑦↑2))))) |
194 | 193, 45 | elab2g 2877 |
. . . . . . . 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 3145 |
. . . . 5
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) ∈ ℕ) |
198 | 197 | nngt0d 8922 |
. . . 4
⊢ (𝜑 → 0 < ((𝐸↑2) + (𝐹↑2))) |
199 | 5 | nngt0d 8922 |
. . . 4
⊢ (𝜑 → 0 < 𝑀) |
200 | 161, 162,
198, 199 | divgt0d 8851 |
. . 3
⊢ (𝜑 → 0 < (((𝐸↑2) + (𝐹↑2)) / 𝑀)) |
201 | | elnnz 9222 |
. . 3
⊢ ((((𝐸↑2) + (𝐹↑2)) / 𝑀) ∈ ℕ ↔ ((((𝐸↑2) + (𝐹↑2)) / 𝑀) ∈ ℤ ∧ 0 < (((𝐸↑2) + (𝐹↑2)) / 𝑀))) |
202 | 158, 200,
201 | sylanbrc 415 |
. 2
⊢ (𝜑 → (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∈ ℕ) |
203 | | prmnn 12064 |
. . . . . . . 8
⊢ (𝑝 ∈ ℙ → 𝑝 ∈
ℕ) |
204 | 203 | ad2antrl 487 |
. . . . . . 7
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → 𝑝 ∈ ℕ) |
205 | 204 | nnred 8891 |
. . . . . . . 8
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → 𝑝 ∈ ℝ) |
206 | 158 | adantr 274 |
. . . . . . . . 9
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∈ ℤ) |
207 | 206 | zred 9334 |
. . . . . . . 8
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∈ ℝ) |
208 | | peano2zm 9250 |
. . . . . . . . . . 11
⊢ (𝑀 ∈ ℤ → (𝑀 − 1) ∈
ℤ) |
209 | 8, 208 | syl 14 |
. . . . . . . . . 10
⊢ (𝜑 → (𝑀 − 1) ∈ ℤ) |
210 | 209 | zred 9334 |
. . . . . . . . 9
⊢ (𝜑 → (𝑀 − 1) ∈ ℝ) |
211 | 210 | adantr 274 |
. . . . . . . 8
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → (𝑀 − 1) ∈ ℝ) |
212 | | simprr 527 |
. . . . . . . . 9
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀)) |
213 | | prmz 12065 |
. . . . . . . . . . 11
⊢ (𝑝 ∈ ℙ → 𝑝 ∈
ℤ) |
214 | 213 | ad2antrl 487 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → 𝑝 ∈ ℤ) |
215 | 202 | adantr 274 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∈ ℕ) |
216 | | dvdsle 11804 |
. . . . . . . . . 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 10546 |
. . . . . . . . . . . . . . . 16
⊢ (𝑀 ∈ ℤ → (𝑀↑2) ∈
ℤ) |
220 | 8, 219 | syl 14 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → (𝑀↑2) ∈ ℤ) |
221 | 220 | zred 9334 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → (𝑀↑2) ∈ ℝ) |
222 | 221 | rehalfcld 9124 |
. . . . . . . . . . . . 13
⊢ (𝜑 → ((𝑀↑2) / 2) ∈
ℝ) |
223 | 16 | zred 9334 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → (𝐶↑2) ∈ ℝ) |
224 | 22 | zred 9334 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → (𝐷↑2) ∈ ℝ) |
225 | 223, 224 | readdcld 7949 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → ((𝐶↑2) + (𝐷↑2)) ∈ ℝ) |
226 | | 1red 7935 |
. . . . . . . . . . . . . . . 16
⊢ (𝜑 → 1 ∈
ℝ) |
227 | 48 | nnsqcld 10630 |
. . . . . . . . . . . . . . . . 17
⊢ (𝜑 → ((𝐶 gcd 𝐷)↑2) ∈ ℕ) |
228 | 227 | nnred 8891 |
. . . . . . . . . . . . . . . 16
⊢ (𝜑 → ((𝐶 gcd 𝐷)↑2) ∈ ℝ) |
229 | 151 | nn0ge0d 9191 |
. . . . . . . . . . . . . . . 16
⊢ (𝜑 → 0 ≤ ((𝐸↑2) + (𝐹↑2))) |
230 | 227 | nnge1d 8921 |
. . . . . . . . . . . . . . . 16
⊢ (𝜑 → 1 ≤ ((𝐶 gcd 𝐷)↑2)) |
231 | 226, 228,
161, 229, 230 | lemul1ad 8855 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → (1 · ((𝐸↑2) + (𝐹↑2))) ≤ (((𝐶 gcd 𝐷)↑2) · ((𝐸↑2) + (𝐹↑2)))) |
232 | 151 | nn0cnd 9190 |
. . . . . . . . . . . . . . . 16
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) ∈ ℂ) |
233 | 232 | mulid2d 7938 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → (1 · ((𝐸↑2) + (𝐹↑2))) = ((𝐸↑2) + (𝐹↑2))) |
234 | 231, 233,
94 | 3brtr3d 4020 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) ≤ ((𝐶↑2) + (𝐷↑2))) |
235 | 222 | rehalfcld 9124 |
. . . . . . . . . . . . . . . 16
⊢ (𝜑 → (((𝑀↑2) / 2) / 2) ∈
ℝ) |
236 | 11, 5, 12 | 4sqlem7 12336 |
. . . . . . . . . . . . . . . 16
⊢ (𝜑 → (𝐶↑2) ≤ (((𝑀↑2) / 2) / 2)) |
237 | 17, 5, 18 | 4sqlem7 12336 |
. . . . . . . . . . . . . . . 16
⊢ (𝜑 → (𝐷↑2) ≤ (((𝑀↑2) / 2) / 2)) |
238 | 223, 224,
235, 235, 236, 237 | le2addd 8482 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → ((𝐶↑2) + (𝐷↑2)) ≤ ((((𝑀↑2) / 2) / 2) + (((𝑀↑2) / 2) / 2))) |
239 | 222 | recnd 7948 |
. . . . . . . . . . . . . . . 16
⊢ (𝜑 → ((𝑀↑2) / 2) ∈
ℂ) |
240 | 239 | 2halvesd 9123 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → ((((𝑀↑2) / 2) / 2) + (((𝑀↑2) / 2) / 2)) = ((𝑀↑2) / 2)) |
241 | 238, 240 | breqtrd 4015 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → ((𝐶↑2) + (𝐷↑2)) ≤ ((𝑀↑2) / 2)) |
242 | 161, 225,
222, 234, 241 | letrd 8043 |
. . . . . . . . . . . . 13
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) ≤ ((𝑀↑2) / 2)) |
243 | 5 | nnsqcld 10630 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → (𝑀↑2) ∈ ℕ) |
244 | 243 | nnrpd 9651 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → (𝑀↑2) ∈
ℝ+) |
245 | | rphalflt 9640 |
. . . . . . . . . . . . . 14
⊢ ((𝑀↑2) ∈
ℝ+ → ((𝑀↑2) / 2) < (𝑀↑2)) |
246 | 244, 245 | syl 14 |
. . . . . . . . . . . . 13
⊢ (𝜑 → ((𝑀↑2) / 2) < (𝑀↑2)) |
247 | 161, 222,
221, 242, 246 | lelttrd 8044 |
. . . . . . . . . . . 12
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) < (𝑀↑2)) |
248 | 8 | zcnd 9335 |
. . . . . . . . . . . . 13
⊢ (𝜑 → 𝑀 ∈ ℂ) |
249 | 248 | sqvald 10606 |
. . . . . . . . . . . 12
⊢ (𝜑 → (𝑀↑2) = (𝑀 · 𝑀)) |
250 | 247, 249 | breqtrd 4015 |
. . . . . . . . . . 11
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) < (𝑀 · 𝑀)) |
251 | | ltdivmul 8792 |
. . . . . . . . . . . 12
⊢ ((((𝐸↑2) + (𝐹↑2)) ∈ ℝ ∧ 𝑀 ∈ ℝ ∧ (𝑀 ∈ ℝ ∧ 0 <
𝑀)) → ((((𝐸↑2) + (𝐹↑2)) / 𝑀) < 𝑀 ↔ ((𝐸↑2) + (𝐹↑2)) < (𝑀 · 𝑀))) |
252 | 161, 162,
162, 199, 251 | syl112anc 1237 |
. . . . . . . . . . 11
⊢ (𝜑 → ((((𝐸↑2) + (𝐹↑2)) / 𝑀) < 𝑀 ↔ ((𝐸↑2) + (𝐹↑2)) < (𝑀 · 𝑀))) |
253 | 250, 252 | mpbird 166 |
. . . . . . . . . 10
⊢ (𝜑 → (((𝐸↑2) + (𝐹↑2)) / 𝑀) < 𝑀) |
254 | | zltlem1 9269 |
. . . . . . . . . . 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 8043 |
. . . . . . 7
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → 𝑝 ≤ (𝑀 − 1)) |
259 | 209 | adantr 274 |
. . . . . . . 8
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → (𝑀 − 1) ∈ ℤ) |
260 | | fznn 10045 |
. . . . . . . 8
⊢ ((𝑀 − 1) ∈ ℤ
→ (𝑝 ∈
(1...(𝑀 − 1)) ↔
(𝑝 ∈ ℕ ∧
𝑝 ≤ (𝑀 − 1)))) |
261 | 259, 260 | syl 14 |
. . . . . . 7
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → (𝑝 ∈ (1...(𝑀 − 1)) ↔ (𝑝 ∈ ℕ ∧ 𝑝 ≤ (𝑀 − 1)))) |
262 | 204, 258,
261 | mpbir2and 939 |
. . . . . 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 11776 |
. . . . . . . . 9
⊢ ((𝑀 ∈ ℤ ∧ (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∈ ℤ) → (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∥ (𝑀 · (((𝐸↑2) + (𝐹↑2)) / 𝑀))) |
268 | 8, 158, 267 | syl2anc 409 |
. . . . . . . 8
⊢ (𝜑 → (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∥ (𝑀 · (((𝐸↑2) + (𝐹↑2)) / 𝑀))) |
269 | 5 | nnap0d 8924 |
. . . . . . . . 9
⊢ (𝜑 → 𝑀 # 0) |
270 | 232, 248,
269 | divcanap2d 8709 |
. . . . . . . 8
⊢ (𝜑 → (𝑀 · (((𝐸↑2) + (𝐹↑2)) / 𝑀)) = ((𝐸↑2) + (𝐹↑2))) |
271 | 268, 270 | breqtrd 4015 |
. . . . . . 7
⊢ (𝜑 → (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∥ ((𝐸↑2) + (𝐹↑2))) |
272 | 271 | adantr 274 |
. . . . . 6
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → (((𝐸↑2) + (𝐹↑2)) / 𝑀) ∥ ((𝐸↑2) + (𝐹↑2))) |
273 | 214, 206,
266, 212, 272 | dvdstrd 11792 |
. . . . 5
⊢ ((𝜑 ∧ (𝑝 ∈ ℙ ∧ 𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀))) → 𝑝 ∥ ((𝐸↑2) + (𝐹↑2))) |
274 | | breq1 3992 |
. . . . . . 7
⊢ (𝑏 = 𝑝 → (𝑏 ∥ 𝑎 ↔ 𝑝 ∥ 𝑎)) |
275 | | eleq1w 2231 |
. . . . . . 7
⊢ (𝑏 = 𝑝 → (𝑏 ∈ 𝑆 ↔ 𝑝 ∈ 𝑆)) |
276 | 274, 275 | imbi12d 233 |
. . . . . 6
⊢ (𝑏 = 𝑝 → ((𝑏 ∥ 𝑎 → 𝑏 ∈ 𝑆) ↔ (𝑝 ∥ 𝑎 → 𝑝 ∈ 𝑆))) |
277 | | breq2 3993 |
. . . . . . 7
⊢ (𝑎 = ((𝐸↑2) + (𝐹↑2)) → (𝑝 ∥ 𝑎 ↔ 𝑝 ∥ ((𝐸↑2) + (𝐹↑2)))) |
278 | 277 | imbi1d 230 |
. . . . . 6
⊢ (𝑎 = ((𝐸↑2) + (𝐹↑2)) → ((𝑝 ∥ 𝑎 → 𝑝 ∈ 𝑆) ↔ (𝑝 ∥ ((𝐸↑2) + (𝐹↑2)) → 𝑝 ∈ 𝑆))) |
279 | 276, 278 | rspc2v 2847 |
. . . . 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 2543 |
. 2
⊢ (𝜑 → ∀𝑝 ∈ ℙ (𝑝 ∥ (((𝐸↑2) + (𝐹↑2)) / 𝑀) → 𝑝 ∈ 𝑆)) |
283 | | inss1 3347 |
. . . . 5
⊢ (𝑆 ∩ ℕ) ⊆ 𝑆 |
284 | 163, 283 | sstri 3156 |
. . . 4
⊢ 𝑌 ⊆ 𝑆 |
285 | 284, 196 | sselid 3145 |
. . 3
⊢ (𝜑 → ((𝐸↑2) + (𝐹↑2)) ∈ 𝑆) |
286 | 270, 285 | eqeltrd 2247 |
. 2
⊢ (𝜑 → (𝑀 · (((𝐸↑2) + (𝐹↑2)) / 𝑀)) ∈ 𝑆) |
287 | 1, 5, 202, 282, 286 | 2sqlem6 13750 |
1
⊢ (𝜑 → 𝑀 ∈ 𝑆) |