Proof of Theorem modqid
Step | Hyp | Ref
| Expression |
1 | | simpll 519 |
. . 3
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 𝐴 ∈ ℚ) |
2 | | simplr 520 |
. . 3
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 𝐵 ∈ ℚ) |
3 | | 0red 7900 |
. . . 4
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 0 ∈ ℝ) |
4 | | qre 9563 |
. . . . 5
⊢ (𝐴 ∈ ℚ → 𝐴 ∈
ℝ) |
5 | 4 | ad2antrr 480 |
. . . 4
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 𝐴 ∈ ℝ) |
6 | | qre 9563 |
. . . . 5
⊢ (𝐵 ∈ ℚ → 𝐵 ∈
ℝ) |
7 | 6 | ad2antlr 481 |
. . . 4
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 𝐵 ∈ ℝ) |
8 | | simprl 521 |
. . . 4
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 0 ≤ 𝐴) |
9 | | simprr 522 |
. . . 4
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 𝐴 < 𝐵) |
10 | 3, 5, 7, 8, 9 | lelttrd 8023 |
. . 3
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 0 < 𝐵) |
11 | | modqval 10259 |
. . 3
⊢ ((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ ∧ 0 <
𝐵) → (𝐴 mod 𝐵) = (𝐴 − (𝐵 · (⌊‘(𝐴 / 𝐵))))) |
12 | 1, 2, 10, 11 | syl3anc 1228 |
. 2
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 mod 𝐵) = (𝐴 − (𝐵 · (⌊‘(𝐴 / 𝐵))))) |
13 | 10 | gt0ne0d 8410 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 𝐵 ≠ 0) |
14 | | qdivcl 9581 |
. . . . . . . . 9
⊢ ((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ ∧ 𝐵 ≠ 0) → (𝐴 / 𝐵) ∈ ℚ) |
15 | 1, 2, 13, 14 | syl3anc 1228 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 / 𝐵) ∈ ℚ) |
16 | | qcn 9572 |
. . . . . . . 8
⊢ ((𝐴 / 𝐵) ∈ ℚ → (𝐴 / 𝐵) ∈ ℂ) |
17 | | addid2 8037 |
. . . . . . . . 9
⊢ ((𝐴 / 𝐵) ∈ ℂ → (0 + (𝐴 / 𝐵)) = (𝐴 / 𝐵)) |
18 | 17 | fveq2d 5490 |
. . . . . . . 8
⊢ ((𝐴 / 𝐵) ∈ ℂ → (⌊‘(0 +
(𝐴 / 𝐵))) = (⌊‘(𝐴 / 𝐵))) |
19 | 15, 16, 18 | 3syl 17 |
. . . . . . 7
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (⌊‘(0 + (𝐴 / 𝐵))) = (⌊‘(𝐴 / 𝐵))) |
20 | | divge0 8768 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℝ ∧ 0 ≤
𝐴) ∧ (𝐵 ∈ ℝ ∧ 0 < 𝐵)) → 0 ≤ (𝐴 / 𝐵)) |
21 | 5, 8, 7, 10, 20 | syl22anc 1229 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 0 ≤ (𝐴 / 𝐵)) |
22 | 7 | recnd 7927 |
. . . . . . . . . . 11
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 𝐵 ∈ ℂ) |
23 | 22 | mulid1d 7916 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐵 · 1) = 𝐵) |
24 | 9, 23 | breqtrrd 4010 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 𝐴 < (𝐵 · 1)) |
25 | | 1red 7914 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 1 ∈ ℝ) |
26 | | ltdivmul 8771 |
. . . . . . . . . 10
⊢ ((𝐴 ∈ ℝ ∧ 1 ∈
ℝ ∧ (𝐵 ∈
ℝ ∧ 0 < 𝐵))
→ ((𝐴 / 𝐵) < 1 ↔ 𝐴 < (𝐵 · 1))) |
27 | 5, 25, 7, 10, 26 | syl112anc 1232 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → ((𝐴 / 𝐵) < 1 ↔ 𝐴 < (𝐵 · 1))) |
28 | 24, 27 | mpbird 166 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 / 𝐵) < 1) |
29 | | 0z 9202 |
. . . . . . . . 9
⊢ 0 ∈
ℤ |
30 | | flqbi2 10226 |
. . . . . . . . 9
⊢ ((0
∈ ℤ ∧ (𝐴 /
𝐵) ∈ ℚ) →
((⌊‘(0 + (𝐴 /
𝐵))) = 0 ↔ (0 ≤
(𝐴 / 𝐵) ∧ (𝐴 / 𝐵) < 1))) |
31 | 29, 15, 30 | sylancr 411 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → ((⌊‘(0 + (𝐴 / 𝐵))) = 0 ↔ (0 ≤ (𝐴 / 𝐵) ∧ (𝐴 / 𝐵) < 1))) |
32 | 21, 28, 31 | mpbir2and 934 |
. . . . . . 7
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (⌊‘(0 + (𝐴 / 𝐵))) = 0) |
33 | 19, 32 | eqtr3d 2200 |
. . . . . 6
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (⌊‘(𝐴 / 𝐵)) = 0) |
34 | 33 | oveq2d 5858 |
. . . . 5
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐵 · (⌊‘(𝐴 / 𝐵))) = (𝐵 · 0)) |
35 | 22 | mul01d 8291 |
. . . . 5
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐵 · 0) = 0) |
36 | 34, 35 | eqtrd 2198 |
. . . 4
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐵 · (⌊‘(𝐴 / 𝐵))) = 0) |
37 | 36 | oveq2d 5858 |
. . 3
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 − (𝐵 · (⌊‘(𝐴 / 𝐵)))) = (𝐴 − 0)) |
38 | 5 | recnd 7927 |
. . . 4
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 𝐴 ∈ ℂ) |
39 | 38 | subid1d 8198 |
. . 3
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 − 0) = 𝐴) |
40 | 37, 39 | eqtrd 2198 |
. 2
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 − (𝐵 · (⌊‘(𝐴 / 𝐵)))) = 𝐴) |
41 | 12, 40 | eqtrd 2198 |
1
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 mod 𝐵) = 𝐴) |