Proof of Theorem divalg
Step | Hyp | Ref
| Expression |
1 | | eqeq1 2742 |
. . . . . 6
⊢ (𝑁 = if(𝑁 ∈ ℤ, 𝑁, 1) → (𝑁 = ((𝑞 · 𝐷) + 𝑟) ↔ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · 𝐷) + 𝑟))) |
2 | 1 | 3anbi3d 1440 |
. . . . 5
⊢ (𝑁 = if(𝑁 ∈ ℤ, 𝑁, 1) → ((0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟)) ↔ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · 𝐷) + 𝑟)))) |
3 | 2 | rexbidv 3225 |
. . . 4
⊢ (𝑁 = if(𝑁 ∈ ℤ, 𝑁, 1) → (∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟)) ↔ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · 𝐷) + 𝑟)))) |
4 | 3 | reubidv 3315 |
. . 3
⊢ (𝑁 = if(𝑁 ∈ ℤ, 𝑁, 1) → (∃!𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟)) ↔ ∃!𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · 𝐷) + 𝑟)))) |
5 | | fveq2 6756 |
. . . . . . 7
⊢ (𝐷 = if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) → (abs‘𝐷) = (abs‘if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1))) |
6 | 5 | breq2d 5082 |
. . . . . 6
⊢ (𝐷 = if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) → (𝑟 < (abs‘𝐷) ↔ 𝑟 < (abs‘if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1)))) |
7 | | oveq2 7263 |
. . . . . . . 8
⊢ (𝐷 = if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) → (𝑞 · 𝐷) = (𝑞 · if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1))) |
8 | 7 | oveq1d 7270 |
. . . . . . 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 1437 |
. . . . 5
⊢ (𝐷 = if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) → ((0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · 𝐷) + 𝑟)) ↔ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1)) ∧ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1)) + 𝑟)))) |
11 | 10 | rexbidv 3225 |
. . . 4
⊢ (𝐷 = if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) → (∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · 𝐷) + 𝑟)) ↔ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1)) ∧ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1)) + 𝑟)))) |
12 | 11 | reubidv 3315 |
. . 3
⊢ (𝐷 = if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) → (∃!𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · 𝐷) + 𝑟)) ↔ ∃!𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1)) ∧ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1)) + 𝑟)))) |
13 | | 1z 12280 |
. . . . 5
⊢ 1 ∈
ℤ |
14 | 13 | elimel 4525 |
. . . 4
⊢ if(𝑁 ∈ ℤ, 𝑁, 1) ∈
ℤ |
15 | | simpl 482 |
. . . . 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 4526 |
. . . 4
⊢ if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) ∈ ℤ |
19 | | simpr 484 |
. . . . 5
⊢ ((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0) → 𝐷 ≠ 0) |
20 | | neeq1 3005 |
. . . . 5
⊢ (𝐷 = if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) → (𝐷 ≠ 0 ↔ if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1) ≠ 0)) |
21 | | neeq1 3005 |
. . . . 5
⊢ (1 =
if((𝐷 ∈ ℤ ∧
𝐷 ≠ 0), 𝐷, 1) → (1 ≠ 0 ↔
if((𝐷 ∈ ℤ ∧
𝐷 ≠ 0), 𝐷, 1) ≠ 0)) |
22 | | ax-1ne0 10871 |
. . . . 5
⊢ 1 ≠
0 |
23 | 19, 20, 21, 22 | elimdhyp 4526 |
. . . 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 16039 |
. . 3
⊢
∃!𝑟 ∈
ℤ ∃𝑞 ∈
ℤ (0 ≤ 𝑟 ∧
𝑟 < (abs‘if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1)) ∧ if(𝑁 ∈ ℤ, 𝑁, 1) = ((𝑞 · if((𝐷 ∈ ℤ ∧ 𝐷 ≠ 0), 𝐷, 1)) + 𝑟)) |
26 | 4, 12, 25 | dedth2h 4515 |
. 2
⊢ ((𝑁 ∈ ℤ ∧ (𝐷 ∈ ℤ ∧ 𝐷 ≠ 0)) → ∃!𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟))) |
27 | 26 | 3impb 1113 |
1
⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℤ ∧ 𝐷 ≠ 0) → ∃!𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟))) |