Proof of Theorem modqmulnn
Step | Hyp | Ref
| Expression |
1 | | nnq 9592 |
. . . . . 6
⊢ (𝑁 ∈ ℕ → 𝑁 ∈
ℚ) |
2 | 1 | 3ad2ant1 1013 |
. . . . 5
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝑁 ∈
ℚ) |
3 | | flqcl 10229 |
. . . . . . 7
⊢ (𝐴 ∈ ℚ →
(⌊‘𝐴) ∈
ℤ) |
4 | | zq 9585 |
. . . . . . 7
⊢
((⌊‘𝐴)
∈ ℤ → (⌊‘𝐴) ∈ ℚ) |
5 | 3, 4 | syl 14 |
. . . . . 6
⊢ (𝐴 ∈ ℚ →
(⌊‘𝐴) ∈
ℚ) |
6 | 5 | 3ad2ant2 1014 |
. . . . 5
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘𝐴) ∈
ℚ) |
7 | | qmulcl 9596 |
. . . . 5
⊢ ((𝑁 ∈ ℚ ∧
(⌊‘𝐴) ∈
ℚ) → (𝑁 ·
(⌊‘𝐴)) ∈
ℚ) |
8 | 2, 6, 7 | syl2anc 409 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → (𝑁 · (⌊‘𝐴)) ∈
ℚ) |
9 | | qre 9584 |
. . . 4
⊢ ((𝑁 · (⌊‘𝐴)) ∈ ℚ → (𝑁 · (⌊‘𝐴)) ∈
ℝ) |
10 | 8, 9 | syl 14 |
. . 3
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → (𝑁 · (⌊‘𝐴)) ∈
ℝ) |
11 | | simp2 993 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝐴 ∈
ℚ) |
12 | | qmulcl 9596 |
. . . . . 6
⊢ ((𝑁 ∈ ℚ ∧ 𝐴 ∈ ℚ) → (𝑁 · 𝐴) ∈ ℚ) |
13 | 2, 11, 12 | syl2anc 409 |
. . . . 5
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → (𝑁 · 𝐴) ∈ ℚ) |
14 | 13 | flqcld 10233 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘(𝑁 ·
𝐴)) ∈
ℤ) |
15 | 14 | zred 9334 |
. . 3
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘(𝑁 ·
𝐴)) ∈
ℝ) |
16 | | nnmulcl 8899 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ ∧ 𝑀 ∈ ℕ) → (𝑁 · 𝑀) ∈ ℕ) |
17 | | nnq 9592 |
. . . . . . 7
⊢ ((𝑁 · 𝑀) ∈ ℕ → (𝑁 · 𝑀) ∈ ℚ) |
18 | 16, 17 | syl 14 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ ∧ 𝑀 ∈ ℕ) → (𝑁 · 𝑀) ∈ ℚ) |
19 | 18 | 3adant2 1011 |
. . . . 5
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → (𝑁 · 𝑀) ∈ ℚ) |
20 | | qre 9584 |
. . . . 5
⊢ ((𝑁 · 𝑀) ∈ ℚ → (𝑁 · 𝑀) ∈ ℝ) |
21 | 19, 20 | syl 14 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → (𝑁 · 𝑀) ∈ ℝ) |
22 | | simp1 992 |
. . . . . . . . . 10
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝑁 ∈
ℕ) |
23 | 22 | nncnd 8892 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝑁 ∈
ℂ) |
24 | | simp3 994 |
. . . . . . . . . 10
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝑀 ∈
ℕ) |
25 | 24 | nncnd 8892 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝑀 ∈
ℂ) |
26 | 22 | nnap0d 8924 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝑁 # 0) |
27 | 24 | nnap0d 8924 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝑀 # 0) |
28 | 23, 25, 26, 27 | mulap0d 8576 |
. . . . . . . 8
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → (𝑁 · 𝑀) # 0) |
29 | | 0z 9223 |
. . . . . . . . . 10
⊢ 0 ∈
ℤ |
30 | | zq 9585 |
. . . . . . . . . 10
⊢ (0 ∈
ℤ → 0 ∈ ℚ) |
31 | 29, 30 | ax-mp 5 |
. . . . . . . . 9
⊢ 0 ∈
ℚ |
32 | | qapne 9598 |
. . . . . . . . 9
⊢ (((𝑁 · 𝑀) ∈ ℚ ∧ 0 ∈ ℚ)
→ ((𝑁 · 𝑀) # 0 ↔ (𝑁 · 𝑀) ≠ 0)) |
33 | 19, 31, 32 | sylancl 411 |
. . . . . . . 8
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → ((𝑁 · 𝑀) # 0 ↔ (𝑁 · 𝑀) ≠ 0)) |
34 | 28, 33 | mpbid 146 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → (𝑁 · 𝑀) ≠ 0) |
35 | | qdivcl 9602 |
. . . . . . 7
⊢ (((𝑁 · (⌊‘𝐴)) ∈ ℚ ∧ (𝑁 · 𝑀) ∈ ℚ ∧ (𝑁 · 𝑀) ≠ 0) → ((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)) ∈ ℚ) |
36 | 8, 19, 34, 35 | syl3anc 1233 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → ((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)) ∈ ℚ) |
37 | 36 | flqcld 10233 |
. . . . 5
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘((𝑁 ·
(⌊‘𝐴)) / (𝑁 · 𝑀))) ∈ ℤ) |
38 | 37 | zred 9334 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘((𝑁 ·
(⌊‘𝐴)) / (𝑁 · 𝑀))) ∈ ℝ) |
39 | 21, 38 | remulcld 7950 |
. . 3
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → ((𝑁 · 𝑀) · (⌊‘((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)))) ∈ ℝ) |
40 | | nnnn0 9142 |
. . . . 5
⊢ (𝑁 ∈ ℕ → 𝑁 ∈
ℕ0) |
41 | | flqmulnn0 10255 |
. . . . 5
⊢ ((𝑁 ∈ ℕ0
∧ 𝐴 ∈ ℚ)
→ (𝑁 ·
(⌊‘𝐴)) ≤
(⌊‘(𝑁 ·
𝐴))) |
42 | 40, 41 | sylan 281 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ) → (𝑁 · (⌊‘𝐴)) ≤ (⌊‘(𝑁 · 𝐴))) |
43 | 22, 11, 42 | syl2anc 409 |
. . 3
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → (𝑁 · (⌊‘𝐴)) ≤ (⌊‘(𝑁 · 𝐴))) |
44 | 10, 15, 39, 43 | lesub1dd 8480 |
. 2
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → ((𝑁 · (⌊‘𝐴)) − ((𝑁 · 𝑀) · (⌊‘((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀))))) ≤ ((⌊‘(𝑁 · 𝐴)) − ((𝑁 · 𝑀) · (⌊‘((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)))))) |
45 | 22 | nnred 8891 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝑁 ∈
ℝ) |
46 | 24 | nnred 8891 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝑀 ∈
ℝ) |
47 | 22 | nngt0d 8922 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 0 <
𝑁) |
48 | 24 | nngt0d 8922 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 0 <
𝑀) |
49 | 45, 46, 47, 48 | mulgt0d 8042 |
. . 3
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 0 <
(𝑁 · 𝑀)) |
50 | | modqval 10280 |
. . 3
⊢ (((𝑁 · (⌊‘𝐴)) ∈ ℚ ∧ (𝑁 · 𝑀) ∈ ℚ ∧ 0 < (𝑁 · 𝑀)) → ((𝑁 · (⌊‘𝐴)) mod (𝑁 · 𝑀)) = ((𝑁 · (⌊‘𝐴)) − ((𝑁 · 𝑀) · (⌊‘((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)))))) |
51 | 8, 19, 49, 50 | syl3anc 1233 |
. 2
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → ((𝑁 · (⌊‘𝐴)) mod (𝑁 · 𝑀)) = ((𝑁 · (⌊‘𝐴)) − ((𝑁 · 𝑀) · (⌊‘((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)))))) |
52 | | zq 9585 |
. . . . 5
⊢
((⌊‘(𝑁
· 𝐴)) ∈ ℤ
→ (⌊‘(𝑁
· 𝐴)) ∈
ℚ) |
53 | 14, 52 | syl 14 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘(𝑁 ·
𝐴)) ∈
ℚ) |
54 | | modqval 10280 |
. . . 4
⊢
(((⌊‘(𝑁
· 𝐴)) ∈ ℚ
∧ (𝑁 · 𝑀) ∈ ℚ ∧ 0 <
(𝑁 · 𝑀)) → ((⌊‘(𝑁 · 𝐴)) mod (𝑁 · 𝑀)) = ((⌊‘(𝑁 · 𝐴)) − ((𝑁 · 𝑀) ·
(⌊‘((⌊‘(𝑁 · 𝐴)) / (𝑁 · 𝑀)))))) |
55 | 53, 19, 49, 54 | syl3anc 1233 |
. . 3
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
((⌊‘(𝑁 ·
𝐴)) mod (𝑁 · 𝑀)) = ((⌊‘(𝑁 · 𝐴)) − ((𝑁 · 𝑀) ·
(⌊‘((⌊‘(𝑁 · 𝐴)) / (𝑁 · 𝑀)))))) |
56 | 16 | 3adant2 1011 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → (𝑁 · 𝑀) ∈ ℕ) |
57 | | flqdiv 10277 |
. . . . . . 7
⊢ (((𝑁 · 𝐴) ∈ ℚ ∧ (𝑁 · 𝑀) ∈ ℕ) →
(⌊‘((⌊‘(𝑁 · 𝐴)) / (𝑁 · 𝑀))) = (⌊‘((𝑁 · 𝐴) / (𝑁 · 𝑀)))) |
58 | 13, 56, 57 | syl2anc 409 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘((⌊‘(𝑁 · 𝐴)) / (𝑁 · 𝑀))) = (⌊‘((𝑁 · 𝐴) / (𝑁 · 𝑀)))) |
59 | | flqdiv 10277 |
. . . . . . . 8
⊢ ((𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘((⌊‘𝐴) / 𝑀)) = (⌊‘(𝐴 / 𝑀))) |
60 | 59 | 3adant1 1010 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘((⌊‘𝐴) / 𝑀)) = (⌊‘(𝐴 / 𝑀))) |
61 | 3 | zcnd 9335 |
. . . . . . . . . 10
⊢ (𝐴 ∈ ℚ →
(⌊‘𝐴) ∈
ℂ) |
62 | 11, 61 | syl 14 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘𝐴) ∈
ℂ) |
63 | 62, 25, 23, 27, 26 | divcanap5d 8734 |
. . . . . . . 8
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → ((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)) = ((⌊‘𝐴) / 𝑀)) |
64 | 63 | fveq2d 5500 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘((𝑁 ·
(⌊‘𝐴)) / (𝑁 · 𝑀))) = (⌊‘((⌊‘𝐴) / 𝑀))) |
65 | | qcn 9593 |
. . . . . . . . . 10
⊢ (𝐴 ∈ ℚ → 𝐴 ∈
ℂ) |
66 | 11, 65 | syl 14 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → 𝐴 ∈
ℂ) |
67 | 66, 25, 23, 27, 26 | divcanap5d 8734 |
. . . . . . . 8
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → ((𝑁 · 𝐴) / (𝑁 · 𝑀)) = (𝐴 / 𝑀)) |
68 | 67 | fveq2d 5500 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘((𝑁 ·
𝐴) / (𝑁 · 𝑀))) = (⌊‘(𝐴 / 𝑀))) |
69 | 60, 64, 68 | 3eqtr4rd 2214 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘((𝑁 ·
𝐴) / (𝑁 · 𝑀))) = (⌊‘((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)))) |
70 | 58, 69 | eqtrd 2203 |
. . . . 5
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
(⌊‘((⌊‘(𝑁 · 𝐴)) / (𝑁 · 𝑀))) = (⌊‘((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)))) |
71 | 70 | oveq2d 5869 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → ((𝑁 · 𝑀) ·
(⌊‘((⌊‘(𝑁 · 𝐴)) / (𝑁 · 𝑀)))) = ((𝑁 · 𝑀) · (⌊‘((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀))))) |
72 | 71 | oveq2d 5869 |
. . 3
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
((⌊‘(𝑁 ·
𝐴)) − ((𝑁 · 𝑀) ·
(⌊‘((⌊‘(𝑁 · 𝐴)) / (𝑁 · 𝑀))))) = ((⌊‘(𝑁 · 𝐴)) − ((𝑁 · 𝑀) · (⌊‘((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)))))) |
73 | 55, 72 | eqtrd 2203 |
. 2
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) →
((⌊‘(𝑁 ·
𝐴)) mod (𝑁 · 𝑀)) = ((⌊‘(𝑁 · 𝐴)) − ((𝑁 · 𝑀) · (⌊‘((𝑁 · (⌊‘𝐴)) / (𝑁 · 𝑀)))))) |
74 | 44, 51, 73 | 3brtr4d 4021 |
1
⊢ ((𝑁 ∈ ℕ ∧ 𝐴 ∈ ℚ ∧ 𝑀 ∈ ℕ) → ((𝑁 · (⌊‘𝐴)) mod (𝑁 · 𝑀)) ≤ ((⌊‘(𝑁 · 𝐴)) mod (𝑁 · 𝑀))) |