Proof of Theorem modid
Step | Hyp | Ref
| Expression |
1 | | modval 13591 |
. . 3
⊢ ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
→ (𝐴 mod 𝐵) = (𝐴 − (𝐵 · (⌊‘(𝐴 / 𝐵))))) |
2 | 1 | adantr 481 |
. 2
⊢ (((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
∧ (0 ≤ 𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 mod 𝐵) = (𝐴 − (𝐵 · (⌊‘(𝐴 / 𝐵))))) |
3 | | rerpdivcl 12760 |
. . . . . . . . . 10
⊢ ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
→ (𝐴 / 𝐵) ∈
ℝ) |
4 | 3 | adantr 481 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
∧ (0 ≤ 𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 / 𝐵) ∈ ℝ) |
5 | 4 | recnd 11003 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
∧ (0 ≤ 𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 / 𝐵) ∈ ℂ) |
6 | | addid2 11158 |
. . . . . . . . 9
⊢ ((𝐴 / 𝐵) ∈ ℂ → (0 + (𝐴 / 𝐵)) = (𝐴 / 𝐵)) |
7 | 6 | fveq2d 6778 |
. . . . . . . 8
⊢ ((𝐴 / 𝐵) ∈ ℂ → (⌊‘(0 +
(𝐴 / 𝐵))) = (⌊‘(𝐴 / 𝐵))) |
8 | 5, 7 | syl 17 |
. . . . . . 7
⊢ (((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
∧ (0 ≤ 𝐴 ∧ 𝐴 < 𝐵)) → (⌊‘(0 + (𝐴 / 𝐵))) = (⌊‘(𝐴 / 𝐵))) |
9 | | rpregt0 12744 |
. . . . . . . . . . 11
⊢ (𝐵 ∈ ℝ+
→ (𝐵 ∈ ℝ
∧ 0 < 𝐵)) |
10 | | divge0 11844 |
. . . . . . . . . . 11
⊢ (((𝐴 ∈ ℝ ∧ 0 ≤
𝐴) ∧ (𝐵 ∈ ℝ ∧ 0 < 𝐵)) → 0 ≤ (𝐴 / 𝐵)) |
11 | 9, 10 | sylan2 593 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℝ ∧ 0 ≤
𝐴) ∧ 𝐵 ∈ ℝ+) → 0 ≤
(𝐴 / 𝐵)) |
12 | 11 | an32s 649 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
∧ 0 ≤ 𝐴) → 0
≤ (𝐴 / 𝐵)) |
13 | 12 | adantrr 714 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
∧ (0 ≤ 𝐴 ∧ 𝐴 < 𝐵)) → 0 ≤ (𝐴 / 𝐵)) |
14 | | simpr 485 |
. . . . . . . . . . 11
⊢ ((𝐵 ∈ ℝ+
∧ 𝐴 < 𝐵) → 𝐴 < 𝐵) |
15 | | rpcn 12740 |
. . . . . . . . . . . . 13
⊢ (𝐵 ∈ ℝ+
→ 𝐵 ∈
ℂ) |
16 | 15 | mulid1d 10992 |
. . . . . . . . . . . 12
⊢ (𝐵 ∈ ℝ+
→ (𝐵 · 1) =
𝐵) |
17 | 16 | adantr 481 |
. . . . . . . . . . 11
⊢ ((𝐵 ∈ ℝ+
∧ 𝐴 < 𝐵) → (𝐵 · 1) = 𝐵) |
18 | 14, 17 | breqtrrd 5102 |
. . . . . . . . . 10
⊢ ((𝐵 ∈ ℝ+
∧ 𝐴 < 𝐵) → 𝐴 < (𝐵 · 1)) |
19 | 18 | ad2ant2l 743 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
∧ (0 ≤ 𝐴 ∧ 𝐴 < 𝐵)) → 𝐴 < (𝐵 · 1)) |
20 | | simpll 764 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
∧ (0 ≤ 𝐴 ∧ 𝐴 < 𝐵)) → 𝐴 ∈ ℝ) |
21 | 9 | ad2antlr 724 |
. . . . . . . . . 10
⊢ (((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
∧ (0 ≤ 𝐴 ∧ 𝐴 < 𝐵)) → (𝐵 ∈ ℝ ∧ 0 < 𝐵)) |
22 | | 1re 10975 |
. . . . . . . . . . 11
⊢ 1 ∈
ℝ |
23 | | ltdivmul 11850 |
. . . . . . . . . . 11
⊢ ((𝐴 ∈ ℝ ∧ 1 ∈
ℝ ∧ (𝐵 ∈
ℝ ∧ 0 < 𝐵))
→ ((𝐴 / 𝐵) < 1 ↔ 𝐴 < (𝐵 · 1))) |
24 | 22, 23 | mp3an2 1448 |
. . . . . . . . . 10
⊢ ((𝐴 ∈ ℝ ∧ (𝐵 ∈ ℝ ∧ 0 <
𝐵)) → ((𝐴 / 𝐵) < 1 ↔ 𝐴 < (𝐵 · 1))) |
25 | 20, 21, 24 | syl2anc 584 |
. . . . . . . . 9
⊢ (((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
∧ (0 ≤ 𝐴 ∧ 𝐴 < 𝐵)) → ((𝐴 / 𝐵) < 1 ↔ 𝐴 < (𝐵 · 1))) |
26 | 19, 25 | mpbird 256 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
∧ (0 ≤ 𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 / 𝐵) < 1) |
27 | | 0z 12330 |
. . . . . . . . 9
⊢ 0 ∈
ℤ |
28 | | flbi2 13537 |
. . . . . . . . 9
⊢ ((0
∈ ℤ ∧ (𝐴 /
𝐵) ∈ ℝ) →
((⌊‘(0 + (𝐴 /
𝐵))) = 0 ↔ (0 ≤
(𝐴 / 𝐵) ∧ (𝐴 / 𝐵) < 1))) |
29 | 27, 4, 28 | sylancr 587 |
. . . . . . . 8
⊢ (((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
∧ (0 ≤ 𝐴 ∧ 𝐴 < 𝐵)) → ((⌊‘(0 + (𝐴 / 𝐵))) = 0 ↔ (0 ≤ (𝐴 / 𝐵) ∧ (𝐴 / 𝐵) < 1))) |
30 | 13, 26, 29 | mpbir2and 710 |
. . . . . . 7
⊢ (((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
∧ (0 ≤ 𝐴 ∧ 𝐴 < 𝐵)) → (⌊‘(0 + (𝐴 / 𝐵))) = 0) |
31 | 8, 30 | eqtr3d 2780 |
. . . . . 6
⊢ (((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
∧ (0 ≤ 𝐴 ∧ 𝐴 < 𝐵)) → (⌊‘(𝐴 / 𝐵)) = 0) |
32 | 31 | oveq2d 7291 |
. . . . 5
⊢ (((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
∧ (0 ≤ 𝐴 ∧ 𝐴 < 𝐵)) → (𝐵 · (⌊‘(𝐴 / 𝐵))) = (𝐵 · 0)) |
33 | 15 | mul01d 11174 |
. . . . . 6
⊢ (𝐵 ∈ ℝ+
→ (𝐵 · 0) =
0) |
34 | 33 | ad2antlr 724 |
. . . . 5
⊢ (((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
∧ (0 ≤ 𝐴 ∧ 𝐴 < 𝐵)) → (𝐵 · 0) = 0) |
35 | 32, 34 | eqtrd 2778 |
. . . 4
⊢ (((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
∧ (0 ≤ 𝐴 ∧ 𝐴 < 𝐵)) → (𝐵 · (⌊‘(𝐴 / 𝐵))) = 0) |
36 | 35 | oveq2d 7291 |
. . 3
⊢ (((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
∧ (0 ≤ 𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 − (𝐵 · (⌊‘(𝐴 / 𝐵)))) = (𝐴 − 0)) |
37 | | recn 10961 |
. . . . 5
⊢ (𝐴 ∈ ℝ → 𝐴 ∈
ℂ) |
38 | 37 | subid1d 11321 |
. . . 4
⊢ (𝐴 ∈ ℝ → (𝐴 − 0) = 𝐴) |
39 | 38 | ad2antrr 723 |
. . 3
⊢ (((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
∧ (0 ≤ 𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 − 0) = 𝐴) |
40 | 36, 39 | eqtrd 2778 |
. 2
⊢ (((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
∧ (0 ≤ 𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 − (𝐵 · (⌊‘(𝐴 / 𝐵)))) = 𝐴) |
41 | 2, 40 | eqtrd 2778 |
1
⊢ (((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+)
∧ (0 ≤ 𝐴 ∧ 𝐴 < 𝐵)) → (𝐴 mod 𝐵) = 𝐴) |