Proof of Theorem 4sqlem10
Step | Hyp | Ref
| Expression |
1 | | 4sqlem5.3 |
. . . . . 6
⊢ (𝜑 → 𝑀 ∈ ℕ) |
2 | 1 | adantr 274 |
. . . . 5
⊢ ((𝜑 ∧ 𝜓) → 𝑀 ∈ ℕ) |
3 | 2 | nnzd 9308 |
. . . 4
⊢ ((𝜑 ∧ 𝜓) → 𝑀 ∈ ℤ) |
4 | | zsqcl 10521 |
. . . 4
⊢ (𝑀 ∈ ℤ → (𝑀↑2) ∈
ℤ) |
5 | 3, 4 | syl 14 |
. . 3
⊢ ((𝜑 ∧ 𝜓) → (𝑀↑2) ∈ ℤ) |
6 | | 4sqlem5.2 |
. . . . . 6
⊢ (𝜑 → 𝐴 ∈ ℤ) |
7 | 6 | adantr 274 |
. . . . 5
⊢ ((𝜑 ∧ 𝜓) → 𝐴 ∈ ℤ) |
8 | 2 | nnred 8866 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝜓) → 𝑀 ∈ ℝ) |
9 | 8 | rehalfcld 9099 |
. . . . . . . 8
⊢ ((𝜑 ∧ 𝜓) → (𝑀 / 2) ∈ ℝ) |
10 | 9 | recnd 7923 |
. . . . . . 7
⊢ ((𝜑 ∧ 𝜓) → (𝑀 / 2) ∈ ℂ) |
11 | 10 | negnegd 8196 |
. . . . . 6
⊢ ((𝜑 ∧ 𝜓) → --(𝑀 / 2) = (𝑀 / 2)) |
12 | | 4sqlem5.4 |
. . . . . . . . . . . . . . 15
⊢ 𝐵 = (((𝐴 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2)) |
13 | 6, 1, 12 | 4sqlem5 12308 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → (𝐵 ∈ ℤ ∧ ((𝐴 − 𝐵) / 𝑀) ∈ ℤ)) |
14 | 13 | adantr 274 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝜓) → (𝐵 ∈ ℤ ∧ ((𝐴 − 𝐵) / 𝑀) ∈ ℤ)) |
15 | 14 | simpld 111 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝜓) → 𝐵 ∈ ℤ) |
16 | 15 | zred 9309 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ 𝜓) → 𝐵 ∈ ℝ) |
17 | 6, 1, 12 | 4sqlem6 12309 |
. . . . . . . . . . . . 13
⊢ (𝜑 → (-(𝑀 / 2) ≤ 𝐵 ∧ 𝐵 < (𝑀 / 2))) |
18 | 17 | adantr 274 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝜓) → (-(𝑀 / 2) ≤ 𝐵 ∧ 𝐵 < (𝑀 / 2))) |
19 | 18 | simprd 113 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ 𝜓) → 𝐵 < (𝑀 / 2)) |
20 | 16, 19 | ltned 8008 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝜓) → 𝐵 ≠ (𝑀 / 2)) |
21 | 20 | neneqd 2356 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝜓) → ¬ 𝐵 = (𝑀 / 2)) |
22 | | 2cnd 8926 |
. . . . . . . . . . . . . . 15
⊢ ((𝜑 ∧ 𝜓) → 2 ∈ ℂ) |
23 | 22 | sqvald 10581 |
. . . . . . . . . . . . . 14
⊢ ((𝜑 ∧ 𝜓) → (2↑2) = (2 ·
2)) |
24 | 23 | oveq2d 5857 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝜓) → ((𝑀↑2) / (2↑2)) = ((𝑀↑2) / (2 · 2))) |
25 | 2 | nncnd 8867 |
. . . . . . . . . . . . . 14
⊢ ((𝜑 ∧ 𝜓) → 𝑀 ∈ ℂ) |
26 | | 2ap0 8946 |
. . . . . . . . . . . . . . 15
⊢ 2 #
0 |
27 | 26 | a1i 9 |
. . . . . . . . . . . . . 14
⊢ ((𝜑 ∧ 𝜓) → 2 # 0) |
28 | 25, 22, 27 | sqdivapd 10597 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝜓) → ((𝑀 / 2)↑2) = ((𝑀↑2) / (2↑2))) |
29 | 25 | sqcld 10582 |
. . . . . . . . . . . . . 14
⊢ ((𝜑 ∧ 𝜓) → (𝑀↑2) ∈ ℂ) |
30 | 29, 22, 22, 27, 27 | divdivap1d 8714 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝜓) → (((𝑀↑2) / 2) / 2) = ((𝑀↑2) / (2 · 2))) |
31 | 24, 28, 30 | 3eqtr4d 2208 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝜓) → ((𝑀 / 2)↑2) = (((𝑀↑2) / 2) / 2)) |
32 | 29 | halfcld 9097 |
. . . . . . . . . . . . . 14
⊢ ((𝜑 ∧ 𝜓) → ((𝑀↑2) / 2) ∈
ℂ) |
33 | 32 | halfcld 9097 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝜓) → (((𝑀↑2) / 2) / 2) ∈
ℂ) |
34 | 15 | zcnd 9310 |
. . . . . . . . . . . . . 14
⊢ ((𝜑 ∧ 𝜓) → 𝐵 ∈ ℂ) |
35 | 34 | sqcld 10582 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝜓) → (𝐵↑2) ∈ ℂ) |
36 | | 4sqlem10.5 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝜓) → ((((𝑀↑2) / 2) / 2) − (𝐵↑2)) = 0) |
37 | 33, 35, 36 | subeq0d 8213 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝜓) → (((𝑀↑2) / 2) / 2) = (𝐵↑2)) |
38 | 31, 37 | eqtr2d 2199 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ 𝜓) → (𝐵↑2) = ((𝑀 / 2)↑2)) |
39 | | zq 9560 |
. . . . . . . . . . . . 13
⊢ (𝐵 ∈ ℤ → 𝐵 ∈
ℚ) |
40 | 15, 39 | syl 14 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝜓) → 𝐵 ∈ ℚ) |
41 | | 2nn 9014 |
. . . . . . . . . . . . . 14
⊢ 2 ∈
ℕ |
42 | 41 | a1i 9 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝜓) → 2 ∈ ℕ) |
43 | | znq 9558 |
. . . . . . . . . . . . 13
⊢ ((𝑀 ∈ ℤ ∧ 2 ∈
ℕ) → (𝑀 / 2)
∈ ℚ) |
44 | 3, 42, 43 | syl2anc 409 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝜓) → (𝑀 / 2) ∈ ℚ) |
45 | | qsqeqor 10561 |
. . . . . . . . . . . 12
⊢ ((𝐵 ∈ ℚ ∧ (𝑀 / 2) ∈ ℚ) →
((𝐵↑2) = ((𝑀 / 2)↑2) ↔ (𝐵 = (𝑀 / 2) ∨ 𝐵 = -(𝑀 / 2)))) |
46 | 40, 44, 45 | syl2anc 409 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ 𝜓) → ((𝐵↑2) = ((𝑀 / 2)↑2) ↔ (𝐵 = (𝑀 / 2) ∨ 𝐵 = -(𝑀 / 2)))) |
47 | 38, 46 | mpbid 146 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝜓) → (𝐵 = (𝑀 / 2) ∨ 𝐵 = -(𝑀 / 2))) |
48 | 47 | ord 714 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝜓) → (¬ 𝐵 = (𝑀 / 2) → 𝐵 = -(𝑀 / 2))) |
49 | 21, 48 | mpd 13 |
. . . . . . . 8
⊢ ((𝜑 ∧ 𝜓) → 𝐵 = -(𝑀 / 2)) |
50 | 49, 15 | eqeltrrd 2243 |
. . . . . . 7
⊢ ((𝜑 ∧ 𝜓) → -(𝑀 / 2) ∈ ℤ) |
51 | 50 | znegcld 9311 |
. . . . . 6
⊢ ((𝜑 ∧ 𝜓) → --(𝑀 / 2) ∈ ℤ) |
52 | 11, 51 | eqeltrrd 2243 |
. . . . 5
⊢ ((𝜑 ∧ 𝜓) → (𝑀 / 2) ∈ ℤ) |
53 | 7, 52 | zaddcld 9313 |
. . . 4
⊢ ((𝜑 ∧ 𝜓) → (𝐴 + (𝑀 / 2)) ∈ ℤ) |
54 | | zsqcl 10521 |
. . . 4
⊢ ((𝐴 + (𝑀 / 2)) ∈ ℤ → ((𝐴 + (𝑀 / 2))↑2) ∈
ℤ) |
55 | 53, 54 | syl 14 |
. . 3
⊢ ((𝜑 ∧ 𝜓) → ((𝐴 + (𝑀 / 2))↑2) ∈
ℤ) |
56 | 53, 3 | zmulcld 9315 |
. . 3
⊢ ((𝜑 ∧ 𝜓) → ((𝐴 + (𝑀 / 2)) · 𝑀) ∈ ℤ) |
57 | | zq 9560 |
. . . . . . . . . 10
⊢ (𝐴 ∈ ℤ → 𝐴 ∈
ℚ) |
58 | 7, 57 | syl 14 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝜓) → 𝐴 ∈ ℚ) |
59 | | qaddcl 9569 |
. . . . . . . . 9
⊢ ((𝐴 ∈ ℚ ∧ (𝑀 / 2) ∈ ℚ) →
(𝐴 + (𝑀 / 2)) ∈ ℚ) |
60 | 58, 44, 59 | syl2anc 409 |
. . . . . . . 8
⊢ ((𝜑 ∧ 𝜓) → (𝐴 + (𝑀 / 2)) ∈ ℚ) |
61 | | nnq 9567 |
. . . . . . . . 9
⊢ (𝑀 ∈ ℕ → 𝑀 ∈
ℚ) |
62 | 2, 61 | syl 14 |
. . . . . . . 8
⊢ ((𝜑 ∧ 𝜓) → 𝑀 ∈ ℚ) |
63 | 2 | nngt0d 8897 |
. . . . . . . 8
⊢ ((𝜑 ∧ 𝜓) → 0 < 𝑀) |
64 | 60, 62, 63 | modqcld 10259 |
. . . . . . 7
⊢ ((𝜑 ∧ 𝜓) → ((𝐴 + (𝑀 / 2)) mod 𝑀) ∈ ℚ) |
65 | | qcn 9568 |
. . . . . . 7
⊢ (((𝐴 + (𝑀 / 2)) mod 𝑀) ∈ ℚ → ((𝐴 + (𝑀 / 2)) mod 𝑀) ∈ ℂ) |
66 | 64, 65 | syl 14 |
. . . . . 6
⊢ ((𝜑 ∧ 𝜓) → ((𝐴 + (𝑀 / 2)) mod 𝑀) ∈ ℂ) |
67 | | 0cnd 7888 |
. . . . . 6
⊢ ((𝜑 ∧ 𝜓) → 0 ∈ ℂ) |
68 | | df-neg 8068 |
. . . . . . 7
⊢ -(𝑀 / 2) = (0 − (𝑀 / 2)) |
69 | 49, 12, 68 | 3eqtr3g 2221 |
. . . . . 6
⊢ ((𝜑 ∧ 𝜓) → (((𝐴 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2)) = (0 − (𝑀 / 2))) |
70 | 66, 67, 10, 69 | subcan2d 8247 |
. . . . 5
⊢ ((𝜑 ∧ 𝜓) → ((𝐴 + (𝑀 / 2)) mod 𝑀) = 0) |
71 | | dvdsval3 11727 |
. . . . . 6
⊢ ((𝑀 ∈ ℕ ∧ (𝐴 + (𝑀 / 2)) ∈ ℤ) → (𝑀 ∥ (𝐴 + (𝑀 / 2)) ↔ ((𝐴 + (𝑀 / 2)) mod 𝑀) = 0)) |
72 | 2, 53, 71 | syl2anc 409 |
. . . . 5
⊢ ((𝜑 ∧ 𝜓) → (𝑀 ∥ (𝐴 + (𝑀 / 2)) ↔ ((𝐴 + (𝑀 / 2)) mod 𝑀) = 0)) |
73 | 70, 72 | mpbird 166 |
. . . 4
⊢ ((𝜑 ∧ 𝜓) → 𝑀 ∥ (𝐴 + (𝑀 / 2))) |
74 | | dvdssq 11960 |
. . . . 5
⊢ ((𝑀 ∈ ℤ ∧ (𝐴 + (𝑀 / 2)) ∈ ℤ) → (𝑀 ∥ (𝐴 + (𝑀 / 2)) ↔ (𝑀↑2) ∥ ((𝐴 + (𝑀 / 2))↑2))) |
75 | 3, 53, 74 | syl2anc 409 |
. . . 4
⊢ ((𝜑 ∧ 𝜓) → (𝑀 ∥ (𝐴 + (𝑀 / 2)) ↔ (𝑀↑2) ∥ ((𝐴 + (𝑀 / 2))↑2))) |
76 | 73, 75 | mpbid 146 |
. . 3
⊢ ((𝜑 ∧ 𝜓) → (𝑀↑2) ∥ ((𝐴 + (𝑀 / 2))↑2)) |
77 | 25 | sqvald 10581 |
. . . 4
⊢ ((𝜑 ∧ 𝜓) → (𝑀↑2) = (𝑀 · 𝑀)) |
78 | 2 | nnne0d 8898 |
. . . . . 6
⊢ ((𝜑 ∧ 𝜓) → 𝑀 ≠ 0) |
79 | | dvdsmulcr 11757 |
. . . . . 6
⊢ ((𝑀 ∈ ℤ ∧ (𝐴 + (𝑀 / 2)) ∈ ℤ ∧ (𝑀 ∈ ℤ ∧ 𝑀 ≠ 0)) → ((𝑀 · 𝑀) ∥ ((𝐴 + (𝑀 / 2)) · 𝑀) ↔ 𝑀 ∥ (𝐴 + (𝑀 / 2)))) |
80 | 3, 53, 3, 78, 79 | syl112anc 1232 |
. . . . 5
⊢ ((𝜑 ∧ 𝜓) → ((𝑀 · 𝑀) ∥ ((𝐴 + (𝑀 / 2)) · 𝑀) ↔ 𝑀 ∥ (𝐴 + (𝑀 / 2)))) |
81 | 73, 80 | mpbird 166 |
. . . 4
⊢ ((𝜑 ∧ 𝜓) → (𝑀 · 𝑀) ∥ ((𝐴 + (𝑀 / 2)) · 𝑀)) |
82 | 77, 81 | eqbrtrd 4003 |
. . 3
⊢ ((𝜑 ∧ 𝜓) → (𝑀↑2) ∥ ((𝐴 + (𝑀 / 2)) · 𝑀)) |
83 | 5, 55, 56, 76, 82 | dvds2subd 11763 |
. 2
⊢ ((𝜑 ∧ 𝜓) → (𝑀↑2) ∥ (((𝐴 + (𝑀 / 2))↑2) − ((𝐴 + (𝑀 / 2)) · 𝑀))) |
84 | 53 | zcnd 9310 |
. . . . 5
⊢ ((𝜑 ∧ 𝜓) → (𝐴 + (𝑀 / 2)) ∈ ℂ) |
85 | 84 | sqvald 10581 |
. . . 4
⊢ ((𝜑 ∧ 𝜓) → ((𝐴 + (𝑀 / 2))↑2) = ((𝐴 + (𝑀 / 2)) · (𝐴 + (𝑀 / 2)))) |
86 | 85 | oveq1d 5856 |
. . 3
⊢ ((𝜑 ∧ 𝜓) → (((𝐴 + (𝑀 / 2))↑2) − ((𝐴 + (𝑀 / 2)) · 𝑀)) = (((𝐴 + (𝑀 / 2)) · (𝐴 + (𝑀 / 2))) − ((𝐴 + (𝑀 / 2)) · 𝑀))) |
87 | 84, 84, 25 | subdid 8308 |
. . 3
⊢ ((𝜑 ∧ 𝜓) → ((𝐴 + (𝑀 / 2)) · ((𝐴 + (𝑀 / 2)) − 𝑀)) = (((𝐴 + (𝑀 / 2)) · (𝐴 + (𝑀 / 2))) − ((𝐴 + (𝑀 / 2)) · 𝑀))) |
88 | 25 | 2halvesd 9098 |
. . . . . . 7
⊢ ((𝜑 ∧ 𝜓) → ((𝑀 / 2) + (𝑀 / 2)) = 𝑀) |
89 | 88 | oveq2d 5857 |
. . . . . 6
⊢ ((𝜑 ∧ 𝜓) → ((𝐴 + (𝑀 / 2)) − ((𝑀 / 2) + (𝑀 / 2))) = ((𝐴 + (𝑀 / 2)) − 𝑀)) |
90 | 7 | zcnd 9310 |
. . . . . . 7
⊢ ((𝜑 ∧ 𝜓) → 𝐴 ∈ ℂ) |
91 | 90, 10, 10 | pnpcan2d 8243 |
. . . . . 6
⊢ ((𝜑 ∧ 𝜓) → ((𝐴 + (𝑀 / 2)) − ((𝑀 / 2) + (𝑀 / 2))) = (𝐴 − (𝑀 / 2))) |
92 | 89, 91 | eqtr3d 2200 |
. . . . 5
⊢ ((𝜑 ∧ 𝜓) → ((𝐴 + (𝑀 / 2)) − 𝑀) = (𝐴 − (𝑀 / 2))) |
93 | 92 | oveq2d 5857 |
. . . 4
⊢ ((𝜑 ∧ 𝜓) → ((𝐴 + (𝑀 / 2)) · ((𝐴 + (𝑀 / 2)) − 𝑀)) = ((𝐴 + (𝑀 / 2)) · (𝐴 − (𝑀 / 2)))) |
94 | | subsq 10557 |
. . . . 5
⊢ ((𝐴 ∈ ℂ ∧ (𝑀 / 2) ∈ ℂ) →
((𝐴↑2) − ((𝑀 / 2)↑2)) = ((𝐴 + (𝑀 / 2)) · (𝐴 − (𝑀 / 2)))) |
95 | 90, 10, 94 | syl2anc 409 |
. . . 4
⊢ ((𝜑 ∧ 𝜓) → ((𝐴↑2) − ((𝑀 / 2)↑2)) = ((𝐴 + (𝑀 / 2)) · (𝐴 − (𝑀 / 2)))) |
96 | 31 | oveq2d 5857 |
. . . 4
⊢ ((𝜑 ∧ 𝜓) → ((𝐴↑2) − ((𝑀 / 2)↑2)) = ((𝐴↑2) − (((𝑀↑2) / 2) / 2))) |
97 | 93, 95, 96 | 3eqtr2d 2204 |
. . 3
⊢ ((𝜑 ∧ 𝜓) → ((𝐴 + (𝑀 / 2)) · ((𝐴 + (𝑀 / 2)) − 𝑀)) = ((𝐴↑2) − (((𝑀↑2) / 2) / 2))) |
98 | 86, 87, 97 | 3eqtr2d 2204 |
. 2
⊢ ((𝜑 ∧ 𝜓) → (((𝐴 + (𝑀 / 2))↑2) − ((𝐴 + (𝑀 / 2)) · 𝑀)) = ((𝐴↑2) − (((𝑀↑2) / 2) / 2))) |
99 | 83, 98 | breqtrd 4007 |
1
⊢ ((𝜑 ∧ 𝜓) → (𝑀↑2) ∥ ((𝐴↑2) − (((𝑀↑2) / 2) / 2))) |