Proof of Theorem divalglemnn
Step | Hyp | Ref
| Expression |
1 | | zmodcl 10279 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 mod 𝐷) ∈
ℕ0) |
2 | 1 | nn0zd 9311 |
. 2
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 mod 𝐷) ∈ ℤ) |
3 | | znq 9562 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 / 𝐷) ∈ ℚ) |
4 | 3 | flqcld 10212 |
. 2
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) →
(⌊‘(𝑁 / 𝐷)) ∈
ℤ) |
5 | 1 | nn0ge0d 9170 |
. 2
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 0 ≤
(𝑁 mod 𝐷)) |
6 | | zq 9564 |
. . . . 5
⊢ (𝑁 ∈ ℤ → 𝑁 ∈
ℚ) |
7 | 6 | adantr 274 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝑁 ∈
ℚ) |
8 | | nnq 9571 |
. . . . 5
⊢ (𝐷 ∈ ℕ → 𝐷 ∈
ℚ) |
9 | 8 | adantl 275 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝐷 ∈
ℚ) |
10 | | nngt0 8882 |
. . . . 5
⊢ (𝐷 ∈ ℕ → 0 <
𝐷) |
11 | 10 | adantl 275 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 0 <
𝐷) |
12 | | modqlt 10268 |
. . . 4
⊢ ((𝑁 ∈ ℚ ∧ 𝐷 ∈ ℚ ∧ 0 <
𝐷) → (𝑁 mod 𝐷) < 𝐷) |
13 | 7, 9, 11, 12 | syl3anc 1228 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 mod 𝐷) < 𝐷) |
14 | | nnre 8864 |
. . . . 5
⊢ (𝐷 ∈ ℕ → 𝐷 ∈
ℝ) |
15 | 14 | adantl 275 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝐷 ∈
ℝ) |
16 | | 0red 7900 |
. . . . 5
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 0 ∈
ℝ) |
17 | 16, 15, 11 | ltled 8017 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 0 ≤
𝐷) |
18 | 15, 17 | absidd 11109 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) →
(abs‘𝐷) = 𝐷) |
19 | 13, 18 | breqtrrd 4010 |
. 2
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 mod 𝐷) < (abs‘𝐷)) |
20 | 1 | nn0cnd 9169 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 mod 𝐷) ∈ ℂ) |
21 | 4 | zcnd 9314 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) →
(⌊‘(𝑁 / 𝐷)) ∈
ℂ) |
22 | | simpr 109 |
. . . . 5
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝐷 ∈
ℕ) |
23 | 22 | nncnd 8871 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝐷 ∈
ℂ) |
24 | 21, 23 | mulcld 7919 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) →
((⌊‘(𝑁 / 𝐷)) · 𝐷) ∈ ℂ) |
25 | | modqvalr 10260 |
. . . . . 6
⊢ ((𝑁 ∈ ℚ ∧ 𝐷 ∈ ℚ ∧ 0 <
𝐷) → (𝑁 mod 𝐷) = (𝑁 − ((⌊‘(𝑁 / 𝐷)) · 𝐷))) |
26 | 7, 9, 11, 25 | syl3anc 1228 |
. . . . 5
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 mod 𝐷) = (𝑁 − ((⌊‘(𝑁 / 𝐷)) · 𝐷))) |
27 | 26 | oveq1d 5857 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → ((𝑁 mod 𝐷) + ((⌊‘(𝑁 / 𝐷)) · 𝐷)) = ((𝑁 − ((⌊‘(𝑁 / 𝐷)) · 𝐷)) + ((⌊‘(𝑁 / 𝐷)) · 𝐷))) |
28 | | simpl 108 |
. . . . . 6
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝑁 ∈
ℤ) |
29 | 28 | zcnd 9314 |
. . . . 5
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝑁 ∈
ℂ) |
30 | 29, 24 | npcand 8213 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → ((𝑁 − ((⌊‘(𝑁 / 𝐷)) · 𝐷)) + ((⌊‘(𝑁 / 𝐷)) · 𝐷)) = 𝑁) |
31 | 27, 30 | eqtr2d 2199 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝑁 = ((𝑁 mod 𝐷) + ((⌊‘(𝑁 / 𝐷)) · 𝐷))) |
32 | 20, 24, 31 | comraddd 8055 |
. 2
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝑁 = (((⌊‘(𝑁 / 𝐷)) · 𝐷) + (𝑁 mod 𝐷))) |
33 | | breq2 3986 |
. . . 4
⊢ (𝑟 = (𝑁 mod 𝐷) → (0 ≤ 𝑟 ↔ 0 ≤ (𝑁 mod 𝐷))) |
34 | | breq1 3985 |
. . . 4
⊢ (𝑟 = (𝑁 mod 𝐷) → (𝑟 < (abs‘𝐷) ↔ (𝑁 mod 𝐷) < (abs‘𝐷))) |
35 | | oveq2 5850 |
. . . . 5
⊢ (𝑟 = (𝑁 mod 𝐷) → ((𝑞 · 𝐷) + 𝑟) = ((𝑞 · 𝐷) + (𝑁 mod 𝐷))) |
36 | 35 | eqeq2d 2177 |
. . . 4
⊢ (𝑟 = (𝑁 mod 𝐷) → (𝑁 = ((𝑞 · 𝐷) + 𝑟) ↔ 𝑁 = ((𝑞 · 𝐷) + (𝑁 mod 𝐷)))) |
37 | 33, 34, 36 | 3anbi123d 1302 |
. . 3
⊢ (𝑟 = (𝑁 mod 𝐷) → ((0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟)) ↔ (0 ≤ (𝑁 mod 𝐷) ∧ (𝑁 mod 𝐷) < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + (𝑁 mod 𝐷))))) |
38 | | oveq1 5849 |
. . . . . 6
⊢ (𝑞 = (⌊‘(𝑁 / 𝐷)) → (𝑞 · 𝐷) = ((⌊‘(𝑁 / 𝐷)) · 𝐷)) |
39 | 38 | oveq1d 5857 |
. . . . 5
⊢ (𝑞 = (⌊‘(𝑁 / 𝐷)) → ((𝑞 · 𝐷) + (𝑁 mod 𝐷)) = (((⌊‘(𝑁 / 𝐷)) · 𝐷) + (𝑁 mod 𝐷))) |
40 | 39 | eqeq2d 2177 |
. . . 4
⊢ (𝑞 = (⌊‘(𝑁 / 𝐷)) → (𝑁 = ((𝑞 · 𝐷) + (𝑁 mod 𝐷)) ↔ 𝑁 = (((⌊‘(𝑁 / 𝐷)) · 𝐷) + (𝑁 mod 𝐷)))) |
41 | 40 | 3anbi3d 1308 |
. . 3
⊢ (𝑞 = (⌊‘(𝑁 / 𝐷)) → ((0 ≤ (𝑁 mod 𝐷) ∧ (𝑁 mod 𝐷) < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + (𝑁 mod 𝐷))) ↔ (0 ≤ (𝑁 mod 𝐷) ∧ (𝑁 mod 𝐷) < (abs‘𝐷) ∧ 𝑁 = (((⌊‘(𝑁 / 𝐷)) · 𝐷) + (𝑁 mod 𝐷))))) |
42 | 37, 41 | rspc2ev 2845 |
. 2
⊢ (((𝑁 mod 𝐷) ∈ ℤ ∧ (⌊‘(𝑁 / 𝐷)) ∈ ℤ ∧ (0 ≤ (𝑁 mod 𝐷) ∧ (𝑁 mod 𝐷) < (abs‘𝐷) ∧ 𝑁 = (((⌊‘(𝑁 / 𝐷)) · 𝐷) + (𝑁 mod 𝐷)))) → ∃𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟))) |
43 | 2, 4, 5, 19, 32, 42 | syl113anc 1240 |
1
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) →
∃𝑟 ∈ ℤ
∃𝑞 ∈ ℤ (0
≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟))) |