Proof of Theorem divalglemnn
Step | Hyp | Ref
| Expression |
1 | | zmodcl 10300 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 mod 𝐷) ∈
ℕ0) |
2 | 1 | nn0zd 9332 |
. 2
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 mod 𝐷) ∈ ℤ) |
3 | | znq 9583 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 / 𝐷) ∈ ℚ) |
4 | 3 | flqcld 10233 |
. 2
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) →
(⌊‘(𝑁 / 𝐷)) ∈
ℤ) |
5 | 1 | nn0ge0d 9191 |
. 2
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 0 ≤
(𝑁 mod 𝐷)) |
6 | | zq 9585 |
. . . . 5
⊢ (𝑁 ∈ ℤ → 𝑁 ∈
ℚ) |
7 | 6 | adantr 274 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝑁 ∈
ℚ) |
8 | | nnq 9592 |
. . . . 5
⊢ (𝐷 ∈ ℕ → 𝐷 ∈
ℚ) |
9 | 8 | adantl 275 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝐷 ∈
ℚ) |
10 | | nngt0 8903 |
. . . . 5
⊢ (𝐷 ∈ ℕ → 0 <
𝐷) |
11 | 10 | adantl 275 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 0 <
𝐷) |
12 | | modqlt 10289 |
. . . 4
⊢ ((𝑁 ∈ ℚ ∧ 𝐷 ∈ ℚ ∧ 0 <
𝐷) → (𝑁 mod 𝐷) < 𝐷) |
13 | 7, 9, 11, 12 | syl3anc 1233 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 mod 𝐷) < 𝐷) |
14 | | nnre 8885 |
. . . . 5
⊢ (𝐷 ∈ ℕ → 𝐷 ∈
ℝ) |
15 | 14 | adantl 275 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝐷 ∈
ℝ) |
16 | | 0red 7921 |
. . . . 5
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 0 ∈
ℝ) |
17 | 16, 15, 11 | ltled 8038 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 0 ≤
𝐷) |
18 | 15, 17 | absidd 11131 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) →
(abs‘𝐷) = 𝐷) |
19 | 13, 18 | breqtrrd 4017 |
. 2
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 mod 𝐷) < (abs‘𝐷)) |
20 | 1 | nn0cnd 9190 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 mod 𝐷) ∈ ℂ) |
21 | 4 | zcnd 9335 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) →
(⌊‘(𝑁 / 𝐷)) ∈
ℂ) |
22 | | simpr 109 |
. . . . 5
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝐷 ∈
ℕ) |
23 | 22 | nncnd 8892 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝐷 ∈
ℂ) |
24 | 21, 23 | mulcld 7940 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) →
((⌊‘(𝑁 / 𝐷)) · 𝐷) ∈ ℂ) |
25 | | modqvalr 10281 |
. . . . . 6
⊢ ((𝑁 ∈ ℚ ∧ 𝐷 ∈ ℚ ∧ 0 <
𝐷) → (𝑁 mod 𝐷) = (𝑁 − ((⌊‘(𝑁 / 𝐷)) · 𝐷))) |
26 | 7, 9, 11, 25 | syl3anc 1233 |
. . . . 5
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 mod 𝐷) = (𝑁 − ((⌊‘(𝑁 / 𝐷)) · 𝐷))) |
27 | 26 | oveq1d 5868 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → ((𝑁 mod 𝐷) + ((⌊‘(𝑁 / 𝐷)) · 𝐷)) = ((𝑁 − ((⌊‘(𝑁 / 𝐷)) · 𝐷)) + ((⌊‘(𝑁 / 𝐷)) · 𝐷))) |
28 | | simpl 108 |
. . . . . 6
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝑁 ∈
ℤ) |
29 | 28 | zcnd 9335 |
. . . . 5
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝑁 ∈
ℂ) |
30 | 29, 24 | npcand 8234 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → ((𝑁 − ((⌊‘(𝑁 / 𝐷)) · 𝐷)) + ((⌊‘(𝑁 / 𝐷)) · 𝐷)) = 𝑁) |
31 | 27, 30 | eqtr2d 2204 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝑁 = ((𝑁 mod 𝐷) + ((⌊‘(𝑁 / 𝐷)) · 𝐷))) |
32 | 20, 24, 31 | comraddd 8076 |
. 2
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝑁 = (((⌊‘(𝑁 / 𝐷)) · 𝐷) + (𝑁 mod 𝐷))) |
33 | | breq2 3993 |
. . . 4
⊢ (𝑟 = (𝑁 mod 𝐷) → (0 ≤ 𝑟 ↔ 0 ≤ (𝑁 mod 𝐷))) |
34 | | breq1 3992 |
. . . 4
⊢ (𝑟 = (𝑁 mod 𝐷) → (𝑟 < (abs‘𝐷) ↔ (𝑁 mod 𝐷) < (abs‘𝐷))) |
35 | | oveq2 5861 |
. . . . 5
⊢ (𝑟 = (𝑁 mod 𝐷) → ((𝑞 · 𝐷) + 𝑟) = ((𝑞 · 𝐷) + (𝑁 mod 𝐷))) |
36 | 35 | eqeq2d 2182 |
. . . 4
⊢ (𝑟 = (𝑁 mod 𝐷) → (𝑁 = ((𝑞 · 𝐷) + 𝑟) ↔ 𝑁 = ((𝑞 · 𝐷) + (𝑁 mod 𝐷)))) |
37 | 33, 34, 36 | 3anbi123d 1307 |
. . 3
⊢ (𝑟 = (𝑁 mod 𝐷) → ((0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟)) ↔ (0 ≤ (𝑁 mod 𝐷) ∧ (𝑁 mod 𝐷) < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + (𝑁 mod 𝐷))))) |
38 | | oveq1 5860 |
. . . . . 6
⊢ (𝑞 = (⌊‘(𝑁 / 𝐷)) → (𝑞 · 𝐷) = ((⌊‘(𝑁 / 𝐷)) · 𝐷)) |
39 | 38 | oveq1d 5868 |
. . . . 5
⊢ (𝑞 = (⌊‘(𝑁 / 𝐷)) → ((𝑞 · 𝐷) + (𝑁 mod 𝐷)) = (((⌊‘(𝑁 / 𝐷)) · 𝐷) + (𝑁 mod 𝐷))) |
40 | 39 | eqeq2d 2182 |
. . . 4
⊢ (𝑞 = (⌊‘(𝑁 / 𝐷)) → (𝑁 = ((𝑞 · 𝐷) + (𝑁 mod 𝐷)) ↔ 𝑁 = (((⌊‘(𝑁 / 𝐷)) · 𝐷) + (𝑁 mod 𝐷)))) |
41 | 40 | 3anbi3d 1313 |
. . 3
⊢ (𝑞 = (⌊‘(𝑁 / 𝐷)) → ((0 ≤ (𝑁 mod 𝐷) ∧ (𝑁 mod 𝐷) < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + (𝑁 mod 𝐷))) ↔ (0 ≤ (𝑁 mod 𝐷) ∧ (𝑁 mod 𝐷) < (abs‘𝐷) ∧ 𝑁 = (((⌊‘(𝑁 / 𝐷)) · 𝐷) + (𝑁 mod 𝐷))))) |
42 | 37, 41 | rspc2ev 2849 |
. 2
⊢ (((𝑁 mod 𝐷) ∈ ℤ ∧ (⌊‘(𝑁 / 𝐷)) ∈ ℤ ∧ (0 ≤ (𝑁 mod 𝐷) ∧ (𝑁 mod 𝐷) < (abs‘𝐷) ∧ 𝑁 = (((⌊‘(𝑁 / 𝐷)) · 𝐷) + (𝑁 mod 𝐷)))) → ∃𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟))) |
43 | 2, 4, 5, 19, 32, 42 | syl113anc 1245 |
1
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) →
∃𝑟 ∈ ℤ
∃𝑞 ∈ ℤ (0
≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟))) |