![]() |
Metamath Proof Explorer |
< Previous
Next >
Nearby theorems |
|
Mirrors > Home > MPE Home > Th. List > divalg2 | Structured version Visualization version GIF version |
Description: The division algorithm (theorem) for a positive divisor. (Contributed by Paul Chapman, 21-Mar-2011.) |
Ref | Expression |
---|---|
divalg2 | ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → ∃!𝑟 ∈ ℕ0 (𝑟 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑟))) |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | nnz 11587 | . . . 4 ⊢ (𝐷 ∈ ℕ → 𝐷 ∈ ℤ) | |
2 | nnne0 11241 | . . . 4 ⊢ (𝐷 ∈ ℕ → 𝐷 ≠ 0) | |
3 | 1, 2 | jca 555 | . . 3 ⊢ (𝐷 ∈ ℕ → (𝐷 ∈ ℤ ∧ 𝐷 ≠ 0)) |
4 | divalg 15324 | . . . . 5 ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℤ ∧ 𝐷 ≠ 0) → ∃!𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟))) | |
5 | divalgb 15325 | . . . . 5 ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℤ ∧ 𝐷 ≠ 0) → (∃!𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟)) ↔ ∃!𝑟 ∈ ℕ0 (𝑟 < (abs‘𝐷) ∧ 𝐷 ∥ (𝑁 − 𝑟)))) | |
6 | 4, 5 | mpbid 222 | . . . 4 ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℤ ∧ 𝐷 ≠ 0) → ∃!𝑟 ∈ ℕ0 (𝑟 < (abs‘𝐷) ∧ 𝐷 ∥ (𝑁 − 𝑟))) |
7 | 6 | 3expb 1114 | . . 3 ⊢ ((𝑁 ∈ ℤ ∧ (𝐷 ∈ ℤ ∧ 𝐷 ≠ 0)) → ∃!𝑟 ∈ ℕ0 (𝑟 < (abs‘𝐷) ∧ 𝐷 ∥ (𝑁 − 𝑟))) |
8 | 3, 7 | sylan2 492 | . 2 ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → ∃!𝑟 ∈ ℕ0 (𝑟 < (abs‘𝐷) ∧ 𝐷 ∥ (𝑁 − 𝑟))) |
9 | nnre 11215 | . . . . . . 7 ⊢ (𝐷 ∈ ℕ → 𝐷 ∈ ℝ) | |
10 | nnnn0 11487 | . . . . . . . 8 ⊢ (𝐷 ∈ ℕ → 𝐷 ∈ ℕ0) | |
11 | 10 | nn0ge0d 11542 | . . . . . . 7 ⊢ (𝐷 ∈ ℕ → 0 ≤ 𝐷) |
12 | 9, 11 | absidd 14356 | . . . . . 6 ⊢ (𝐷 ∈ ℕ → (abs‘𝐷) = 𝐷) |
13 | 12 | breq2d 4812 | . . . . 5 ⊢ (𝐷 ∈ ℕ → (𝑟 < (abs‘𝐷) ↔ 𝑟 < 𝐷)) |
14 | 13 | anbi1d 743 | . . . 4 ⊢ (𝐷 ∈ ℕ → ((𝑟 < (abs‘𝐷) ∧ 𝐷 ∥ (𝑁 − 𝑟)) ↔ (𝑟 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑟)))) |
15 | 14 | reubidv 3261 | . . 3 ⊢ (𝐷 ∈ ℕ → (∃!𝑟 ∈ ℕ0 (𝑟 < (abs‘𝐷) ∧ 𝐷 ∥ (𝑁 − 𝑟)) ↔ ∃!𝑟 ∈ ℕ0 (𝑟 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑟)))) |
16 | 15 | adantl 473 | . 2 ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (∃!𝑟 ∈ ℕ0 (𝑟 < (abs‘𝐷) ∧ 𝐷 ∥ (𝑁 − 𝑟)) ↔ ∃!𝑟 ∈ ℕ0 (𝑟 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑟)))) |
17 | 8, 16 | mpbid 222 | 1 ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → ∃!𝑟 ∈ ℕ0 (𝑟 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑟))) |
Colors of variables: wff setvar class |
Syntax hints: → wi 4 ↔ wb 196 ∧ wa 383 ∧ w3a 1072 = wceq 1628 ∈ wcel 2135 ≠ wne 2928 ∃wrex 3047 ∃!wreu 3048 class class class wbr 4800 ‘cfv 6045 (class class class)co 6809 0cc0 10124 + caddc 10127 · cmul 10129 < clt 10262 ≤ cle 10263 − cmin 10454 ℕcn 11208 ℕ0cn0 11480 ℤcz 11565 abscabs 14169 ∥ cdvds 15178 |
This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1867 ax-4 1882 ax-5 1984 ax-6 2050 ax-7 2086 ax-8 2137 ax-9 2144 ax-10 2164 ax-11 2179 ax-12 2192 ax-13 2387 ax-ext 2736 ax-sep 4929 ax-nul 4937 ax-pow 4988 ax-pr 5051 ax-un 7110 ax-cnex 10180 ax-resscn 10181 ax-1cn 10182 ax-icn 10183 ax-addcl 10184 ax-addrcl 10185 ax-mulcl 10186 ax-mulrcl 10187 ax-mulcom 10188 ax-addass 10189 ax-mulass 10190 ax-distr 10191 ax-i2m1 10192 ax-1ne0 10193 ax-1rid 10194 ax-rnegex 10195 ax-rrecex 10196 ax-cnre 10197 ax-pre-lttri 10198 ax-pre-lttrn 10199 ax-pre-ltadd 10200 ax-pre-mulgt0 10201 ax-pre-sup 10202 |
This theorem depends on definitions: df-bi 197 df-or 384 df-an 385 df-3or 1073 df-3an 1074 df-tru 1631 df-ex 1850 df-nf 1855 df-sb 2043 df-eu 2607 df-mo 2608 df-clab 2743 df-cleq 2749 df-clel 2752 df-nfc 2887 df-ne 2929 df-nel 3032 df-ral 3051 df-rex 3052 df-reu 3053 df-rmo 3054 df-rab 3055 df-v 3338 df-sbc 3573 df-csb 3671 df-dif 3714 df-un 3716 df-in 3718 df-ss 3725 df-pss 3727 df-nul 4055 df-if 4227 df-pw 4300 df-sn 4318 df-pr 4320 df-tp 4322 df-op 4324 df-uni 4585 df-iun 4670 df-br 4801 df-opab 4861 df-mpt 4878 df-tr 4901 df-id 5170 df-eprel 5175 df-po 5183 df-so 5184 df-fr 5221 df-we 5223 df-xp 5268 df-rel 5269 df-cnv 5270 df-co 5271 df-dm 5272 df-rn 5273 df-res 5274 df-ima 5275 df-pred 5837 df-ord 5883 df-on 5884 df-lim 5885 df-suc 5886 df-iota 6008 df-fun 6047 df-fn 6048 df-f 6049 df-f1 6050 df-fo 6051 df-f1o 6052 df-fv 6053 df-riota 6770 df-ov 6812 df-oprab 6813 df-mpt2 6814 df-om 7227 df-1st 7329 df-2nd 7330 df-wrecs 7572 df-recs 7633 df-rdg 7671 df-er 7907 df-en 8118 df-dom 8119 df-sdom 8120 df-sup 8509 df-inf 8510 df-pnf 10264 df-mnf 10265 df-xr 10266 df-ltxr 10267 df-le 10268 df-sub 10456 df-neg 10457 df-div 10873 df-nn 11209 df-2 11267 df-3 11268 df-n0 11481 df-z 11566 df-uz 11876 df-rp 12022 df-fz 12516 df-seq 12992 df-exp 13051 df-cj 14034 df-re 14035 df-im 14036 df-sqrt 14170 df-abs 14171 df-dvds 15179 |
This theorem is referenced by: divalgmod 15327 divalgmodOLD 15328 ndvdssub 15331 |
Copyright terms: Public domain | W3C validator |