Step | Hyp | Ref
| Expression |
1 | | ovex 7308 |
. . . . . 6
⊢ (𝑁 mod 𝐷) ∈ V |
2 | 1 | snid 4597 |
. . . . 5
⊢ (𝑁 mod 𝐷) ∈ {(𝑁 mod 𝐷)} |
3 | | eleq1 2826 |
. . . . 5
⊢ (𝑅 = (𝑁 mod 𝐷) → (𝑅 ∈ {(𝑁 mod 𝐷)} ↔ (𝑁 mod 𝐷) ∈ {(𝑁 mod 𝐷)})) |
4 | 2, 3 | mpbiri 257 |
. . . 4
⊢ (𝑅 = (𝑁 mod 𝐷) → 𝑅 ∈ {(𝑁 mod 𝐷)}) |
5 | | elsni 4578 |
. . . 4
⊢ (𝑅 ∈ {(𝑁 mod 𝐷)} → 𝑅 = (𝑁 mod 𝐷)) |
6 | 4, 5 | impbii 208 |
. . 3
⊢ (𝑅 = (𝑁 mod 𝐷) ↔ 𝑅 ∈ {(𝑁 mod 𝐷)}) |
7 | | zre 12323 |
. . . . . . . . 9
⊢ (𝑁 ∈ ℤ → 𝑁 ∈
ℝ) |
8 | | nnrp 12741 |
. . . . . . . . 9
⊢ (𝐷 ∈ ℕ → 𝐷 ∈
ℝ+) |
9 | | modlt 13600 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℝ ∧ 𝐷 ∈ ℝ+)
→ (𝑁 mod 𝐷) < 𝐷) |
10 | 7, 8, 9 | syl2an 596 |
. . . . . . . 8
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 mod 𝐷) < 𝐷) |
11 | | nnre 11980 |
. . . . . . . . . . . 12
⊢ (𝐷 ∈ ℕ → 𝐷 ∈
ℝ) |
12 | | nnne0 12007 |
. . . . . . . . . . . 12
⊢ (𝐷 ∈ ℕ → 𝐷 ≠ 0) |
13 | | redivcl 11694 |
. . . . . . . . . . . 12
⊢ ((𝑁 ∈ ℝ ∧ 𝐷 ∈ ℝ ∧ 𝐷 ≠ 0) → (𝑁 / 𝐷) ∈ ℝ) |
14 | 7, 11, 12, 13 | syl3an 1159 |
. . . . . . . . . . 11
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ ∧ 𝐷 ∈ ℕ) → (𝑁 / 𝐷) ∈ ℝ) |
15 | 14 | 3anidm23 1420 |
. . . . . . . . . 10
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 / 𝐷) ∈ ℝ) |
16 | 15 | flcld 13518 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) →
(⌊‘(𝑁 / 𝐷)) ∈
ℤ) |
17 | | nnz 12342 |
. . . . . . . . . 10
⊢ (𝐷 ∈ ℕ → 𝐷 ∈
ℤ) |
18 | 17 | adantl 482 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝐷 ∈
ℤ) |
19 | | zmodcl 13611 |
. . . . . . . . . . 11
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 mod 𝐷) ∈
ℕ0) |
20 | 19 | nn0zd 12424 |
. . . . . . . . . 10
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 mod 𝐷) ∈ ℤ) |
21 | | zsubcl 12362 |
. . . . . . . . . 10
⊢ ((𝑁 ∈ ℤ ∧ (𝑁 mod 𝐷) ∈ ℤ) → (𝑁 − (𝑁 mod 𝐷)) ∈ ℤ) |
22 | 20, 21 | syldan 591 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 − (𝑁 mod 𝐷)) ∈ ℤ) |
23 | | nncn 11981 |
. . . . . . . . . . . 12
⊢ (𝐷 ∈ ℕ → 𝐷 ∈
ℂ) |
24 | 23 | adantl 482 |
. . . . . . . . . . 11
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝐷 ∈
ℂ) |
25 | 16 | zcnd 12427 |
. . . . . . . . . . 11
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) →
(⌊‘(𝑁 / 𝐷)) ∈
ℂ) |
26 | 24, 25 | mulcomd 10996 |
. . . . . . . . . 10
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝐷 · (⌊‘(𝑁 / 𝐷))) = ((⌊‘(𝑁 / 𝐷)) · 𝐷)) |
27 | | modval 13591 |
. . . . . . . . . . . 12
⊢ ((𝑁 ∈ ℝ ∧ 𝐷 ∈ ℝ+)
→ (𝑁 mod 𝐷) = (𝑁 − (𝐷 · (⌊‘(𝑁 / 𝐷))))) |
28 | 7, 8, 27 | syl2an 596 |
. . . . . . . . . . 11
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 mod 𝐷) = (𝑁 − (𝐷 · (⌊‘(𝑁 / 𝐷))))) |
29 | 19 | nn0cnd 12295 |
. . . . . . . . . . . 12
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 mod 𝐷) ∈ ℂ) |
30 | | zmulcl 12369 |
. . . . . . . . . . . . . 14
⊢ ((𝐷 ∈ ℤ ∧
(⌊‘(𝑁 / 𝐷)) ∈ ℤ) → (𝐷 · (⌊‘(𝑁 / 𝐷))) ∈ ℤ) |
31 | 17, 16, 30 | syl2an2 683 |
. . . . . . . . . . . . 13
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝐷 · (⌊‘(𝑁 / 𝐷))) ∈ ℤ) |
32 | 31 | zcnd 12427 |
. . . . . . . . . . . 12
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝐷 · (⌊‘(𝑁 / 𝐷))) ∈ ℂ) |
33 | | zcn 12324 |
. . . . . . . . . . . . 13
⊢ (𝑁 ∈ ℤ → 𝑁 ∈
ℂ) |
34 | 33 | adantr 481 |
. . . . . . . . . . . 12
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝑁 ∈
ℂ) |
35 | 29, 32, 34 | subexsub 11393 |
. . . . . . . . . . 11
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → ((𝑁 mod 𝐷) = (𝑁 − (𝐷 · (⌊‘(𝑁 / 𝐷)))) ↔ (𝐷 · (⌊‘(𝑁 / 𝐷))) = (𝑁 − (𝑁 mod 𝐷)))) |
36 | 28, 35 | mpbid 231 |
. . . . . . . . . 10
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝐷 · (⌊‘(𝑁 / 𝐷))) = (𝑁 − (𝑁 mod 𝐷))) |
37 | 26, 36 | eqtr3d 2780 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) →
((⌊‘(𝑁 / 𝐷)) · 𝐷) = (𝑁 − (𝑁 mod 𝐷))) |
38 | | dvds0lem 15976 |
. . . . . . . . 9
⊢
((((⌊‘(𝑁
/ 𝐷)) ∈ ℤ ∧
𝐷 ∈ ℤ ∧
(𝑁 − (𝑁 mod 𝐷)) ∈ ℤ) ∧
((⌊‘(𝑁 / 𝐷)) · 𝐷) = (𝑁 − (𝑁 mod 𝐷))) → 𝐷 ∥ (𝑁 − (𝑁 mod 𝐷))) |
39 | 16, 18, 22, 37, 38 | syl31anc 1372 |
. . . . . . . 8
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → 𝐷 ∥ (𝑁 − (𝑁 mod 𝐷))) |
40 | | divalg2 16114 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) →
∃!𝑧 ∈
ℕ0 (𝑧 <
𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑧))) |
41 | | breq1 5077 |
. . . . . . . . . . 11
⊢ (𝑧 = (𝑁 mod 𝐷) → (𝑧 < 𝐷 ↔ (𝑁 mod 𝐷) < 𝐷)) |
42 | | oveq2 7283 |
. . . . . . . . . . . 12
⊢ (𝑧 = (𝑁 mod 𝐷) → (𝑁 − 𝑧) = (𝑁 − (𝑁 mod 𝐷))) |
43 | 42 | breq2d 5086 |
. . . . . . . . . . 11
⊢ (𝑧 = (𝑁 mod 𝐷) → (𝐷 ∥ (𝑁 − 𝑧) ↔ 𝐷 ∥ (𝑁 − (𝑁 mod 𝐷)))) |
44 | 41, 43 | anbi12d 631 |
. . . . . . . . . 10
⊢ (𝑧 = (𝑁 mod 𝐷) → ((𝑧 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑧)) ↔ ((𝑁 mod 𝐷) < 𝐷 ∧ 𝐷 ∥ (𝑁 − (𝑁 mod 𝐷))))) |
45 | 44 | riota2 7258 |
. . . . . . . . 9
⊢ (((𝑁 mod 𝐷) ∈ ℕ0 ∧
∃!𝑧 ∈
ℕ0 (𝑧 <
𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑧))) → (((𝑁 mod 𝐷) < 𝐷 ∧ 𝐷 ∥ (𝑁 − (𝑁 mod 𝐷))) ↔ (℩𝑧 ∈ ℕ0 (𝑧 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑧))) = (𝑁 mod 𝐷))) |
46 | 19, 40, 45 | syl2anc 584 |
. . . . . . . 8
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (((𝑁 mod 𝐷) < 𝐷 ∧ 𝐷 ∥ (𝑁 − (𝑁 mod 𝐷))) ↔ (℩𝑧 ∈ ℕ0 (𝑧 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑧))) = (𝑁 mod 𝐷))) |
47 | 10, 39, 46 | mpbi2and 709 |
. . . . . . 7
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) →
(℩𝑧 ∈
ℕ0 (𝑧 <
𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑧))) = (𝑁 mod 𝐷)) |
48 | 47 | eqcomd 2744 |
. . . . . 6
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑁 mod 𝐷) = (℩𝑧 ∈ ℕ0 (𝑧 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑧)))) |
49 | 48 | sneqd 4573 |
. . . . 5
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → {(𝑁 mod 𝐷)} = {(℩𝑧 ∈ ℕ0 (𝑧 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑧)))}) |
50 | | snriota 7266 |
. . . . . 6
⊢
(∃!𝑧 ∈
ℕ0 (𝑧 <
𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑧)) → {𝑧 ∈ ℕ0 ∣ (𝑧 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑧))} = {(℩𝑧 ∈ ℕ0 (𝑧 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑧)))}) |
51 | 40, 50 | syl 17 |
. . . . 5
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → {𝑧 ∈ ℕ0
∣ (𝑧 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑧))} = {(℩𝑧 ∈ ℕ0 (𝑧 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑧)))}) |
52 | 49, 51 | eqtr4d 2781 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → {(𝑁 mod 𝐷)} = {𝑧 ∈ ℕ0 ∣ (𝑧 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑧))}) |
53 | 52 | eleq2d 2824 |
. . 3
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑅 ∈ {(𝑁 mod 𝐷)} ↔ 𝑅 ∈ {𝑧 ∈ ℕ0 ∣ (𝑧 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑧))})) |
54 | 6, 53 | bitrid 282 |
. 2
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑅 = (𝑁 mod 𝐷) ↔ 𝑅 ∈ {𝑧 ∈ ℕ0 ∣ (𝑧 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑧))})) |
55 | | breq1 5077 |
. . . 4
⊢ (𝑧 = 𝑅 → (𝑧 < 𝐷 ↔ 𝑅 < 𝐷)) |
56 | | oveq2 7283 |
. . . . 5
⊢ (𝑧 = 𝑅 → (𝑁 − 𝑧) = (𝑁 − 𝑅)) |
57 | 56 | breq2d 5086 |
. . . 4
⊢ (𝑧 = 𝑅 → (𝐷 ∥ (𝑁 − 𝑧) ↔ 𝐷 ∥ (𝑁 − 𝑅))) |
58 | 55, 57 | anbi12d 631 |
. . 3
⊢ (𝑧 = 𝑅 → ((𝑧 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑧)) ↔ (𝑅 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑅)))) |
59 | 58 | elrab 3624 |
. 2
⊢ (𝑅 ∈ {𝑧 ∈ ℕ0 ∣ (𝑧 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑧))} ↔ (𝑅 ∈ ℕ0 ∧ (𝑅 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑅)))) |
60 | 54, 59 | bitrdi 287 |
1
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑅 = (𝑁 mod 𝐷) ↔ (𝑅 ∈ ℕ0 ∧ (𝑅 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑅))))) |