Proof of Theorem modqid
Step | Hyp | Ref
| Expression |
1 | | simpll 524 |
. . 3
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 𝐴 ∈ ℚ) |
2 | | simplr 525 |
. . 3
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 𝐵 ∈ ℚ) |
3 | | 0red 7921 |
. . . 4
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 0 ∈ ℝ) |
4 | | qre 9584 |
. . . . 5
⊢ (𝐴 ∈ ℚ → 𝐴 ∈
ℝ) |
5 | 4 | ad2antrr 485 |
. . . 4
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 𝐴 ∈ ℝ) |
6 | | qre 9584 |
. . . . 5
⊢ (𝐵 ∈ ℚ → 𝐵 ∈
ℝ) |
7 | 6 | ad2antlr 486 |
. . . 4
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 𝐵 ∈ ℝ) |
8 | | simprl 526 |
. . . 4
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 0 ≤ 𝐴) |
9 | | simprr 527 |
. . . 4
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 𝐴 < 𝐵) |
10 | 3, 5, 7, 8, 9 | lelttrd 8044 |
. . 3
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 0 < 𝐵) |
11 | | modqval 10280 |
. . 3
⊢ ((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ ∧ 0 <
𝐵) → (𝐴 mod 𝐵) = (𝐴 − (𝐵 · (⌊‘(𝐴 / 𝐵))))) |
12 | 1, 2, 10, 11 | syl3anc 1233 |
. 2
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 mod 𝐵) = (𝐴 − (𝐵 · (⌊‘(𝐴 / 𝐵))))) |
13 | 10 | gt0ne0d 8431 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 𝐵 ≠ 0) |
14 | | qdivcl 9602 |
. . . . . . . . 9
⊢ ((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ ∧ 𝐵 ≠ 0) → (𝐴 / 𝐵) ∈ ℚ) |
15 | 1, 2, 13, 14 | syl3anc 1233 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 / 𝐵) ∈ ℚ) |
16 | | qcn 9593 |
. . . . . . . 8
⊢ ((𝐴 / 𝐵) ∈ ℚ → (𝐴 / 𝐵) ∈ ℂ) |
17 | | addid2 8058 |
. . . . . . . . 9
⊢ ((𝐴 / 𝐵) ∈ ℂ → (0 + (𝐴 / 𝐵)) = (𝐴 / 𝐵)) |
18 | 17 | fveq2d 5500 |
. . . . . . . 8
⊢ ((𝐴 / 𝐵) ∈ ℂ → (⌊‘(0 +
(𝐴 / 𝐵))) = (⌊‘(𝐴 / 𝐵))) |
19 | 15, 16, 18 | 3syl 17 |
. . . . . . 7
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (⌊‘(0 + (𝐴 / 𝐵))) = (⌊‘(𝐴 / 𝐵))) |
20 | | divge0 8789 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℝ ∧ 0 ≤
𝐴) ∧ (𝐵 ∈ ℝ ∧ 0 < 𝐵)) → 0 ≤ (𝐴 / 𝐵)) |
21 | 5, 8, 7, 10, 20 | syl22anc 1234 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 0 ≤ (𝐴 / 𝐵)) |
22 | 7 | recnd 7948 |
. . . . . . . . . . 11
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 𝐵 ∈ ℂ) |
23 | 22 | mulid1d 7937 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐵 · 1) = 𝐵) |
24 | 9, 23 | breqtrrd 4017 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 𝐴 < (𝐵 · 1)) |
25 | | 1red 7935 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 1 ∈ ℝ) |
26 | | ltdivmul 8792 |
. . . . . . . . . 10
⊢ ((𝐴 ∈ ℝ ∧ 1 ∈
ℝ ∧ (𝐵 ∈
ℝ ∧ 0 < 𝐵))
→ ((𝐴 / 𝐵) < 1 ↔ 𝐴 < (𝐵 · 1))) |
27 | 5, 25, 7, 10, 26 | syl112anc 1237 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → ((𝐴 / 𝐵) < 1 ↔ 𝐴 < (𝐵 · 1))) |
28 | 24, 27 | mpbird 166 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 / 𝐵) < 1) |
29 | | 0z 9223 |
. . . . . . . . 9
⊢ 0 ∈
ℤ |
30 | | flqbi2 10247 |
. . . . . . . . 9
⊢ ((0
∈ ℤ ∧ (𝐴 /
𝐵) ∈ ℚ) →
((⌊‘(0 + (𝐴 /
𝐵))) = 0 ↔ (0 ≤
(𝐴 / 𝐵) ∧ (𝐴 / 𝐵) < 1))) |
31 | 29, 15, 30 | sylancr 412 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → ((⌊‘(0 + (𝐴 / 𝐵))) = 0 ↔ (0 ≤ (𝐴 / 𝐵) ∧ (𝐴 / 𝐵) < 1))) |
32 | 21, 28, 31 | mpbir2and 939 |
. . . . . . 7
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (⌊‘(0 + (𝐴 / 𝐵))) = 0) |
33 | 19, 32 | eqtr3d 2205 |
. . . . . 6
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (⌊‘(𝐴 / 𝐵)) = 0) |
34 | 33 | oveq2d 5869 |
. . . . 5
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐵 · (⌊‘(𝐴 / 𝐵))) = (𝐵 · 0)) |
35 | 22 | mul01d 8312 |
. . . . 5
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐵 · 0) = 0) |
36 | 34, 35 | eqtrd 2203 |
. . . 4
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐵 · (⌊‘(𝐴 / 𝐵))) = 0) |
37 | 36 | oveq2d 5869 |
. . 3
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 − (𝐵 · (⌊‘(𝐴 / 𝐵)))) = (𝐴 − 0)) |
38 | 5 | recnd 7948 |
. . . 4
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → 𝐴 ∈ ℂ) |
39 | 38 | subid1d 8219 |
. . 3
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 − 0) = 𝐴) |
40 | 37, 39 | eqtrd 2203 |
. 2
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 − (𝐵 · (⌊‘(𝐴 / 𝐵)))) = 𝐴) |
41 | 12, 40 | eqtrd 2203 |
1
⊢ (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (0 ≤
𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 mod 𝐵) = 𝐴) |