Proof of Theorem divalg
Step | Hyp | Ref
| Expression |
1 | | eqeq1 2742 |
. . . . . 6
⊢ (𝑁 = if(𝑁 ∈ ℤ, 𝑁, 1) → (𝑁 = ((𝑞 · 𝐷) + 𝑟) ↔ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · 𝐷) + 𝑟))) |
2 | 1 | 3anbi3d 1441 |
. . . . 5
⊢ (𝑁 = if(𝑁 ∈ ℤ, 𝑁, 1) → ((0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟)) ↔ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · 𝐷) + 𝑟)))) |
3 | 2 | rexbidv 3226 |
. . . 4
⊢ (𝑁 = if(𝑁 ∈ ℤ, 𝑁, 1) → (∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟)) ↔ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · 𝐷) + 𝑟)))) |
4 | 3 | reubidv 3323 |
. . 3
⊢ (𝑁 = if(𝑁 ∈ ℤ, 𝑁, 1) → (∃!𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟)) ↔ ∃!𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · 𝐷) + 𝑟)))) |
5 | | fveq2 6774 |
. . . . . . 7
⊢ (𝐷 = if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) → (abs‘𝐷) = (abs‘if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1))) |
6 | 5 | breq2d 5086 |
. . . . . 6
⊢ (𝐷 = if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) → (𝑟 < (abs‘𝐷) ↔ 𝑟 < (abs‘if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1)))) |
7 | | oveq2 7283 |
. . . . . . . 8
⊢ (𝐷 = if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) → (𝑞 · 𝐷) = (𝑞 · if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1))) |
8 | 7 | oveq1d 7290 |
. . . . . . 7
⊢ (𝐷 = if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) → ((𝑞 · 𝐷) + 𝑟) = ((𝑞 · if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1)) + 𝑟)) |
9 | 8 | eqeq2d 2749 |
. . . . . 6
⊢ (𝐷 = if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) → (if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · 𝐷) + 𝑟) ↔ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1)) + 𝑟))) |
10 | 6, 9 | 3anbi23d 1438 |
. . . . 5
⊢ (𝐷 = if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) → ((0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · 𝐷) + 𝑟)) ↔ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1)) ∧ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1)) + 𝑟)))) |
11 | 10 | rexbidv 3226 |
. . . 4
⊢ (𝐷 = if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) → (∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · 𝐷) + 𝑟)) ↔ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1)) ∧ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1)) + 𝑟)))) |
12 | 11 | reubidv 3323 |
. . 3
⊢ (𝐷 = if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) → (∃!𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · 𝐷) + 𝑟)) ↔ ∃!𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1)) ∧ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1)) + 𝑟)))) |
13 | | 1z 12350 |
. . . . 5
⊢ 1 ∈
ℤ |
14 | 13 | elimel 4528 |
. . . 4
⊢ if(𝑁 ∈ ℤ, 𝑁, 1) ∈
ℤ |
15 | | simpl 483 |
. . . . 5
⊢ ((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0) → 𝐷 ∈
ℤ) |
16 | | eleq1 2826 |
. . . . 5
⊢ (𝐷 = if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) → (𝐷 ∈ ℤ ↔ if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) ∈ ℤ)) |
17 | | eleq1 2826 |
. . . . 5
⊢ (1 =
if((𝐷 ∈ ℤ ∧
𝐷 ≠ 0), 𝐷, 1) → (1 ∈ ℤ
↔ if((𝐷 ∈ ℤ
∧ 𝐷 ≠ 0), 𝐷, 1) ∈
ℤ)) |
18 | 15, 16, 17, 13 | elimdhyp 4529 |
. . . 4
⊢ if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) ∈ ℤ |
19 | | simpr 485 |
. . . . 5
⊢ ((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0) → 𝐷 ≠ 0) |
20 | | neeq1 3006 |
. . . . 5
⊢ (𝐷 = if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) → (𝐷 ≠ 0 ↔ if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) ≠ 0)) |
21 | | neeq1 3006 |
. . . . 5
⊢ (1 =
if((𝐷 ∈ ℤ ∧
𝐷 ≠ 0), 𝐷, 1) → (1 ≠ 0 ↔
if((𝐷 ∈ ℤ ∧
𝐷 ≠ 0), 𝐷, 1) ≠ 0)) |
22 | | ax-1ne0 10940 |
. . . . 5
⊢ 1 ≠
0 |
23 | 19, 20, 21, 22 | elimdhyp 4529 |
. . . 4
⊢ if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) ≠ 0 |
24 | | eqid 2738 |
. . . 4
⊢ {𝑟 ∈ ℕ0
∣ if((𝐷 ∈
ℤ ∧ 𝐷 ≠ 0),
𝐷, 1) ∥ (if(𝑁 ∈ ℤ, 𝑁, 1) − 𝑟)} = {𝑟 ∈ ℕ0 ∣ if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) ∥ (if(𝑁 ∈ ℤ, 𝑁, 1) − 𝑟)} |
25 | 14, 18, 23, 24 | divalglem10 16111 |
. . 3
⊢
∃!𝑟 ∈
ℤ ∃𝑞 ∈
ℤ (0 ≤ 𝑟 ∧
𝑟 < (abs‘if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1)) ∧ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1)) + 𝑟)) |
26 | 4, 12, 25 | dedth2h 4518 |
. 2
⊢ ((𝑁 ∈ ℤ ∧ (𝐷 ∈ ℤ ∧ 𝐷 ≠ 0)) → ∃!𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟))) |
27 | 26 | 3impb 1114 |
1
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℤ ∧ 𝐷 ≠ 0) → ∃!𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟))) |