| Mathbox for Alexander van der Vekens |
< Previous
Next >
Nearby theorems |
||
| Mirrors > Home > MPE Home > Th. List > Mathboxes > deccarry | Structured version Visualization version GIF version | ||
| Description: Add 1 to a 2 digit number with carry. This is a special case of decsucc 12724, but in closed form. As observed by ML, this theorem allows for carrying the 1 down multiple decimal constructors, so we can carry the 1 multiple times down a multi-digit number, e.g., by applying this theorem three times we get (;;999 + 1) = ;;;1000. (Contributed by AV, 4-Aug-2020.) (Revised by ML, 8-Aug-2020.) (Proof shortened by AV, 10-Sep-2021.) |
| Ref | Expression |
|---|---|
| deccarry | ⊢ (𝐴 ∈ ℕ → (;𝐴9 + 1) = ;(𝐴 + 1)0) |
| Step | Hyp | Ref | Expression |
|---|---|---|---|
| 1 | df-dec 12679 | . 2 ⊢ ;(𝐴 + 1)0 = (((9 + 1) · (𝐴 + 1)) + 0) | |
| 2 | 9nn 12306 | . . . . . . . 8 ⊢ 9 ∈ ℕ | |
| 3 | peano2nn 12212 | . . . . . . . 8 ⊢ (9 ∈ ℕ → (9 + 1) ∈ ℕ) | |
| 4 | 2, 3 | ax-mp 5 | . . . . . . 7 ⊢ (9 + 1) ∈ ℕ |
| 5 | 4 | a1i 11 | . . . . . 6 ⊢ (𝐴 ∈ ℕ → (9 + 1) ∈ ℕ) |
| 6 | peano2nn 12212 | . . . . . 6 ⊢ (𝐴 ∈ ℕ → (𝐴 + 1) ∈ ℕ) | |
| 7 | 5, 6 | nnmulcld 12256 | . . . . 5 ⊢ (𝐴 ∈ ℕ → ((9 + 1) · (𝐴 + 1)) ∈ ℕ) |
| 8 | 7 | nncnd 12216 | . . . 4 ⊢ (𝐴 ∈ ℕ → ((9 + 1) · (𝐴 + 1)) ∈ ℂ) |
| 9 | 8 | addridd 11373 | . . 3 ⊢ (𝐴 ∈ ℕ → (((9 + 1) · (𝐴 + 1)) + 0) = ((9 + 1) · (𝐴 + 1))) |
| 10 | 4 | nncni 12210 | . . . . . 6 ⊢ (9 + 1) ∈ ℂ |
| 11 | 10 | a1i 11 | . . . . 5 ⊢ (𝐴 ∈ ℕ → (9 + 1) ∈ ℂ) |
| 12 | nncn 12208 | . . . . 5 ⊢ (𝐴 ∈ ℕ → 𝐴 ∈ ℂ) | |
| 13 | 1cnd 11165 | . . . . 5 ⊢ (𝐴 ∈ ℕ → 1 ∈ ℂ) | |
| 14 | 11, 12, 13 | adddid 11196 | . . . 4 ⊢ (𝐴 ∈ ℕ → ((9 + 1) · (𝐴 + 1)) = (((9 + 1) · 𝐴) + ((9 + 1) · 1))) |
| 15 | 11 | mulridd 11189 | . . . . . 6 ⊢ (𝐴 ∈ ℕ → ((9 + 1) · 1) = (9 + 1)) |
| 16 | 15 | oveq2d 7401 | . . . . 5 ⊢ (𝐴 ∈ ℕ → (((9 + 1) · 𝐴) + ((9 + 1) · 1)) = (((9 + 1) · 𝐴) + (9 + 1))) |
| 17 | df-dec 12679 | . . . . . . 7 ⊢ ;𝐴9 = (((9 + 1) · 𝐴) + 9) | |
| 18 | 17 | oveq1i 7395 | . . . . . 6 ⊢ (;𝐴9 + 1) = ((((9 + 1) · 𝐴) + 9) + 1) |
| 19 | id 22 | . . . . . . . . 9 ⊢ (𝐴 ∈ ℕ → 𝐴 ∈ ℕ) | |
| 20 | 5, 19 | nnmulcld 12256 | . . . . . . . 8 ⊢ (𝐴 ∈ ℕ → ((9 + 1) · 𝐴) ∈ ℕ) |
| 21 | 20 | nncnd 12216 | . . . . . . 7 ⊢ (𝐴 ∈ ℕ → ((9 + 1) · 𝐴) ∈ ℂ) |
| 22 | 2 | nncni 12210 | . . . . . . . 8 ⊢ 9 ∈ ℂ |
| 23 | 22 | a1i 11 | . . . . . . 7 ⊢ (𝐴 ∈ ℕ → 9 ∈ ℂ) |
| 24 | 21, 23, 13 | addassd 11194 | . . . . . 6 ⊢ (𝐴 ∈ ℕ → ((((9 + 1) · 𝐴) + 9) + 1) = (((9 + 1) · 𝐴) + (9 + 1))) |
| 25 | 18, 24 | eqtr2id 2804 | . . . . 5 ⊢ (𝐴 ∈ ℕ → (((9 + 1) · 𝐴) + (9 + 1)) = (;𝐴9 + 1)) |
| 26 | 16, 25 | eqtrd 2791 | . . . 4 ⊢ (𝐴 ∈ ℕ → (((9 + 1) · 𝐴) + ((9 + 1) · 1)) = (;𝐴9 + 1)) |
| 27 | 14, 26 | eqtrd 2791 | . . 3 ⊢ (𝐴 ∈ ℕ → ((9 + 1) · (𝐴 + 1)) = (;𝐴9 + 1)) |
| 28 | 9, 27 | eqtrd 2791 | . 2 ⊢ (𝐴 ∈ ℕ → (((9 + 1) · (𝐴 + 1)) + 0) = (;𝐴9 + 1)) |
| 29 | 1, 28 | eqtr2id 2804 | 1 ⊢ (𝐴 ∈ ℕ → (;𝐴9 + 1) = ;(𝐴 + 1)0) |
| Colors of variables: wff setvar class |
| Syntax hints: → wi 4 = wceq 1554 ∈ wcel 2136 (class class class)co 7385 ℂcc 11061 0cc0 11063 1c1 11064 + caddc 11066 · cmul 11068 ℕcn 12200 9c9 12269 ;cdc 12678 |
| This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1809 ax-4 1823 ax-5 1924 ax-6 1981 ax-7 2022 ax-8 2138 ax-9 2146 ax-10 2169 ax-11 2185 ax-12 2206 ax-ext 2728 ax-sep 5240 ax-nul 5250 ax-pow 5316 ax-pr 5384 ax-un 7707 ax-resscn 11120 ax-1cn 11121 ax-icn 11122 ax-addcl 11123 ax-addrcl 11124 ax-mulcl 11125 ax-mulrcl 11126 ax-mulcom 11127 ax-addass 11128 ax-mulass 11129 ax-distr 11130 ax-i2m1 11131 ax-1ne0 11132 ax-1rid 11133 ax-rnegex 11134 ax-rrecex 11135 ax-cnre 11136 ax-pre-lttri 11137 ax-pre-lttrn 11138 ax-pre-ltadd 11139 |
| This theorem depends on definitions: df-bi 209 df-an 399 df-or 857 df-3or 1096 df-3an 1097 df-tru 1557 df-fal 1567 df-ex 1794 df-nf 1798 df-sb 2085 df-mo 2560 df-eu 2590 df-clab 2735 df-cleq 2748 df-clel 2831 df-nfc 2905 df-ne 2952 df-nel 3056 df-ral 3071 df-rex 3081 df-reu 3362 df-rab 3409 df-v 3450 df-sbc 3740 df-csb 3848 df-dif 3902 df-un 3904 df-in 3906 df-ss 3916 df-pss 3919 df-nul 4281 df-if 4475 df-pw 4551 df-sn 4577 df-pr 4579 df-op 4583 df-uni 4860 df-iun 4945 df-br 5095 df-opab 5157 df-mpt 5176 df-tr 5202 df-id 5535 df-eprel 5540 df-po 5548 df-so 5549 df-fr 5593 df-we 5595 df-xp 5646 df-rel 5647 df-cnv 5648 df-co 5649 df-dm 5650 df-rn 5651 df-res 5652 df-ima 5653 df-pred 6277 df-ord 6338 df-on 6339 df-lim 6340 df-suc 6341 df-iota 6466 df-fun 6512 df-fn 6513 df-f 6514 df-f1 6515 df-fo 6516 df-f1o 6517 df-fv 6518 df-ov 7388 df-om 7836 df-2nd 7960 df-frecs 8250 df-wrecs 8281 df-recs 8330 df-rdg 8369 df-er 8666 df-en 8917 df-dom 8918 df-sdom 8919 df-pnf 11208 df-mnf 11209 df-ltxr 11211 df-nn 12201 df-2 12270 df-3 12271 df-4 12272 df-5 12273 df-6 12274 df-7 12275 df-8 12276 df-9 12277 df-dec 12679 |
| This theorem is referenced by: (None) |
| Copyright terms: Public domain | W3C validator |