Proof of Theorem modqmulnn
Step | Hyp | Ref
| Expression |
1 | | nnq 9571 |
. . . . . 6
⊢ (𝑁 ∈ ℕ → 𝑁 ∈
ℚ) |
2 | 1 | 3ad2ant1 1008 |
. . . . 5
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝑁 ∈
ℚ) |
3 | | flqcl 10208 |
. . . . . . 7
⊢ (𝐴 ∈ ℚ →
(⌊‘𝐴) ∈
ℤ) |
4 | | zq 9564 |
. . . . . . 7
⊢
((⌊‘𝐴)
∈ ℤ → (⌊‘𝐴) ∈ ℚ) |
5 | 3, 4 | syl 14 |
. . . . . 6
⊢ (𝐴 ∈ ℚ →
(⌊‘𝐴) ∈
ℚ) |
6 | 5 | 3ad2ant2 1009 |
. . . . 5
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘𝐴) ∈
ℚ) |
7 | | qmulcl 9575 |
. . . . 5
⊢ ((𝑁 ∈ ℚ ∧
(⌊‘𝐴) ∈
ℚ) → (𝑁 ·
(⌊‘𝐴)) ∈
ℚ) |
8 | 2, 6, 7 | syl2anc 409 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → (𝑁 · (⌊‘𝐴)) ∈
ℚ) |
9 | | qre 9563 |
. . . 4
⊢ ((𝑁 · (⌊‘𝐴)) ∈ ℚ → (𝑁 · (⌊‘𝐴)) ∈
ℝ) |
10 | 8, 9 | syl 14 |
. . 3
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → (𝑁 · (⌊‘𝐴)) ∈
ℝ) |
11 | | simp2 988 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝐴 ∈
ℚ) |
12 | | qmulcl 9575 |
. . . . . 6
⊢ ((𝑁 ∈ ℚ ∧ 𝐴 ∈ ℚ) → (𝑁 · 𝐴) ∈ ℚ) |
13 | 2, 11, 12 | syl2anc 409 |
. . . . 5
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → (𝑁 · 𝐴) ∈ ℚ) |
14 | 13 | flqcld 10212 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘(𝑁 ·
𝐴)) ∈
ℤ) |
15 | 14 | zred 9313 |
. . 3
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘(𝑁 ·
𝐴)) ∈
ℝ) |
16 | | nnmulcl 8878 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ ∧ 𝑀 ∈ ℕ) → (𝑁 · 𝑀) ∈ ℕ) |
17 | | nnq 9571 |
. . . . . . 7
⊢ ((𝑁 · 𝑀) ∈ ℕ → (𝑁 · 𝑀) ∈ ℚ) |
18 | 16, 17 | syl 14 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ ∧ 𝑀 ∈ ℕ) → (𝑁 · 𝑀) ∈ ℚ) |
19 | 18 | 3adant2 1006 |
. . . . 5
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → (𝑁 · 𝑀) ∈ ℚ) |
20 | | qre 9563 |
. . . . 5
⊢ ((𝑁 · 𝑀) ∈ ℚ → (𝑁 · 𝑀) ∈ ℝ) |
21 | 19, 20 | syl 14 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → (𝑁 · 𝑀) ∈ ℝ) |
22 | | simp1 987 |
. . . . . . . . . 10
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝑁 ∈
ℕ) |
23 | 22 | nncnd 8871 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝑁 ∈
ℂ) |
24 | | simp3 989 |
. . . . . . . . . 10
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝑀 ∈
ℕ) |
25 | 24 | nncnd 8871 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝑀 ∈
ℂ) |
26 | 22 | nnap0d 8903 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝑁 # 0) |
27 | 24 | nnap0d 8903 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝑀 # 0) |
28 | 23, 25, 26, 27 | mulap0d 8555 |
. . . . . . . 8
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → (𝑁 · 𝑀) # 0) |
29 | | 0z 9202 |
. . . . . . . . . 10
⊢ 0 ∈
ℤ |
30 | | zq 9564 |
. . . . . . . . . 10
⊢ (0 ∈
ℤ → 0 ∈ ℚ) |
31 | 29, 30 | ax-mp 5 |
. . . . . . . . 9
⊢ 0 ∈
ℚ |
32 | | qapne 9577 |
. . . . . . . . 9
⊢ (((𝑁 · 𝑀) ∈ ℚ ∧ 0 ∈ ℚ)
→ ((𝑁 · 𝑀) # 0 ↔ (𝑁 · 𝑀) ≠ 0)) |
33 | 19, 31, 32 | sylancl 410 |
. . . . . . . 8
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → ((𝑁 · 𝑀) # 0 ↔ (𝑁 · 𝑀) ≠ 0)) |
34 | 28, 33 | mpbid 146 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → (𝑁 · 𝑀) ≠ 0) |
35 | | qdivcl 9581 |
. . . . . . 7
⊢ (((𝑁 · (⌊‘𝐴)) ∈ ℚ ∧ (𝑁 · 𝑀) ∈ ℚ ∧ (𝑁 · 𝑀) ≠ 0) → ((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)) ∈ ℚ) |
36 | 8, 19, 34, 35 | syl3anc 1228 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → ((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)) ∈ ℚ) |
37 | 36 | flqcld 10212 |
. . . . 5
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘((𝑁 ·
(⌊‘𝐴)) / (𝑁 · 𝑀))) ∈ ℤ) |
38 | 37 | zred 9313 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘((𝑁 ·
(⌊‘𝐴)) / (𝑁 · 𝑀))) ∈ ℝ) |
39 | 21, 38 | remulcld 7929 |
. . 3
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → ((𝑁 · 𝑀) · (⌊‘((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)))) ∈ ℝ) |
40 | | nnnn0 9121 |
. . . . 5
⊢ (𝑁 ∈ ℕ → 𝑁 ∈
ℕ0) |
41 | | flqmulnn0 10234 |
. . . . 5
⊢ ((𝑁 ∈ ℕ0
∧ 𝐴 ∈ ℚ)
→ (𝑁 ·
(⌊‘𝐴)) ≤
(⌊‘(𝑁 ·
𝐴))) |
42 | 40, 41 | sylan 281 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ) → (𝑁 · (⌊‘𝐴)) ≤ (⌊‘(𝑁 · 𝐴))) |
43 | 22, 11, 42 | syl2anc 409 |
. . 3
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → (𝑁 · (⌊‘𝐴)) ≤ (⌊‘(𝑁 · 𝐴))) |
44 | 10, 15, 39, 43 | lesub1dd 8459 |
. 2
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → ((𝑁 · (⌊‘𝐴)) − ((𝑁 · 𝑀) · (⌊‘((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀))))) ≤ ((⌊‘(𝑁 · 𝐴)) − ((𝑁 · 𝑀) · (⌊‘((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)))))) |
45 | 22 | nnred 8870 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝑁 ∈
ℝ) |
46 | 24 | nnred 8870 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝑀 ∈
ℝ) |
47 | 22 | nngt0d 8901 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 0 <
𝑁) |
48 | 24 | nngt0d 8901 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 0 <
𝑀) |
49 | 45, 46, 47, 48 | mulgt0d 8021 |
. . 3
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 0 <
(𝑁 · 𝑀)) |
50 | | modqval 10259 |
. . 3
⊢ (((𝑁 · (⌊‘𝐴)) ∈ ℚ ∧ (𝑁 · 𝑀) ∈ ℚ ∧ 0 < (𝑁 · 𝑀)) → ((𝑁 · (⌊‘𝐴)) mod (𝑁 · 𝑀)) = ((𝑁 · (⌊‘𝐴)) − ((𝑁 · 𝑀) · (⌊‘((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)))))) |
51 | 8, 19, 49, 50 | syl3anc 1228 |
. 2
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → ((𝑁 · (⌊‘𝐴)) mod (𝑁 · 𝑀)) = ((𝑁 · (⌊‘𝐴)) − ((𝑁 · 𝑀) · (⌊‘((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)))))) |
52 | | zq 9564 |
. . . . 5
⊢
((⌊‘(𝑁
· 𝐴)) ∈ ℤ
→ (⌊‘(𝑁
· 𝐴)) ∈
ℚ) |
53 | 14, 52 | syl 14 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘(𝑁 ·
𝐴)) ∈
ℚ) |
54 | | modqval 10259 |
. . . 4
⊢
(((⌊‘(𝑁
· 𝐴)) ∈ ℚ
∧ (𝑁 · 𝑀) ∈ ℚ ∧ 0 <
(𝑁 · 𝑀)) → ((⌊‘(𝑁 · 𝐴)) mod (𝑁 · 𝑀)) = ((⌊‘(𝑁 · 𝐴)) − ((𝑁 · 𝑀) ·
(⌊‘((⌊‘(𝑁 · 𝐴)) / (𝑁 · 𝑀)))))) |
55 | 53, 19, 49, 54 | syl3anc 1228 |
. . 3
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
((⌊‘(𝑁 ·
𝐴)) mod (𝑁 · 𝑀)) = ((⌊‘(𝑁 · 𝐴)) − ((𝑁 · 𝑀) ·
(⌊‘((⌊‘(𝑁 · 𝐴)) / (𝑁 · 𝑀)))))) |
56 | 16 | 3adant2 1006 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → (𝑁 · 𝑀) ∈ ℕ) |
57 | | flqdiv 10256 |
. . . . . . 7
⊢ (((𝑁 · 𝐴) ∈ ℚ ∧ (𝑁 · 𝑀) ∈ ℕ) →
(⌊‘((⌊‘(𝑁 · 𝐴)) / (𝑁 · 𝑀))) = (⌊‘((𝑁 · 𝐴) / (𝑁 · 𝑀)))) |
58 | 13, 56, 57 | syl2anc 409 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘((⌊‘(𝑁 · 𝐴)) / (𝑁 · 𝑀))) = (⌊‘((𝑁 · 𝐴) / (𝑁 · 𝑀)))) |
59 | | flqdiv 10256 |
. . . . . . . 8
⊢ ((𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘((⌊‘𝐴) / 𝑀)) = (⌊‘(𝐴 / 𝑀))) |
60 | 59 | 3adant1 1005 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘((⌊‘𝐴) / 𝑀)) = (⌊‘(𝐴 / 𝑀))) |
61 | 3 | zcnd 9314 |
. . . . . . . . . 10
⊢ (𝐴 ∈ ℚ →
(⌊‘𝐴) ∈
ℂ) |
62 | 11, 61 | syl 14 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘𝐴) ∈
ℂ) |
63 | 62, 25, 23, 27, 26 | divcanap5d 8713 |
. . . . . . . 8
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → ((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)) = ((⌊‘𝐴) / 𝑀)) |
64 | 63 | fveq2d 5490 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘((𝑁 ·
(⌊‘𝐴)) / (𝑁 · 𝑀))) = (⌊‘((⌊‘𝐴) / 𝑀))) |
65 | | qcn 9572 |
. . . . . . . . . 10
⊢ (𝐴 ∈ ℚ → 𝐴 ∈
ℂ) |
66 | 11, 65 | syl 14 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝐴 ∈
ℂ) |
67 | 66, 25, 23, 27, 26 | divcanap5d 8713 |
. . . . . . . 8
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → ((𝑁 · 𝐴) / (𝑁 · 𝑀)) = (𝐴 / 𝑀)) |
68 | 67 | fveq2d 5490 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘((𝑁 ·
𝐴) / (𝑁 · 𝑀))) = (⌊‘(𝐴 / 𝑀))) |
69 | 60, 64, 68 | 3eqtr4rd 2209 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘((𝑁 ·
𝐴) / (𝑁 · 𝑀))) = (⌊‘((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)))) |
70 | 58, 69 | eqtrd 2198 |
. . . . 5
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘((⌊‘(𝑁 · 𝐴)) / (𝑁 · 𝑀))) = (⌊‘((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)))) |
71 | 70 | oveq2d 5858 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → ((𝑁 · 𝑀) ·
(⌊‘((⌊‘(𝑁 · 𝐴)) / (𝑁 · 𝑀)))) = ((𝑁 · 𝑀) · (⌊‘((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀))))) |
72 | 71 | oveq2d 5858 |
. . 3
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
((⌊‘(𝑁 ·
𝐴)) − ((𝑁 · 𝑀) ·
(⌊‘((⌊‘(𝑁 · 𝐴)) / (𝑁 · 𝑀))))) = ((⌊‘(𝑁 · 𝐴)) − ((𝑁 · 𝑀) · (⌊‘((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)))))) |
73 | 55, 72 | eqtrd 2198 |
. 2
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
((⌊‘(𝑁 ·
𝐴)) mod (𝑁 · 𝑀)) = ((⌊‘(𝑁 · 𝐴)) − ((𝑁 · 𝑀) · (⌊‘((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)))))) |
74 | 44, 51, 73 | 3brtr4d 4014 |
1
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → ((𝑁 · (⌊‘𝐴)) mod (𝑁 · 𝑀)) ≤ ((⌊‘(𝑁 · 𝐴)) mod (𝑁 · 𝑀))) |