MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  decmac Structured version   Visualization version   GIF version

Theorem decmac 12679
Description: Perform a multiply-add of two numerals 𝑀 and 𝑁 against a fixed multiplicand 𝑃 (with carry). (Contributed by Mario Carneiro, 18-Feb-2014.) (Revised by AV, 6-Sep-2021.)
Hypotheses
Ref Expression
decma.a 𝐴 ∈ ℕ0
decma.b 𝐵 ∈ ℕ0
decma.c 𝐶 ∈ ℕ0
decma.d 𝐷 ∈ ℕ0
decma.m 𝑀 = 𝐴𝐵
decma.n 𝑁 = 𝐶𝐷
decmac.p 𝑃 ∈ ℕ0
decmac.f 𝐹 ∈ ℕ0
decmac.g 𝐺 ∈ ℕ0
decmac.e ((𝐴 · 𝑃) + (𝐶 + 𝐺)) = 𝐸
decmac.2 ((𝐵 · 𝑃) + 𝐷) = 𝐺𝐹
Assertion
Ref Expression
decmac ((𝑀 · 𝑃) + 𝑁) = 𝐸𝐹

Proof of Theorem decmac
StepHypRef Expression
1 10nn0 12645 . . 3 10 ∈ ℕ0
2 decma.a . . 3 𝐴 ∈ ℕ0
3 decma.b . . 3 𝐵 ∈ ℕ0
4 decma.c . . 3 𝐶 ∈ ℕ0
5 decma.d . . 3 𝐷 ∈ ℕ0
6 decma.m . . . 4 𝑀 = 𝐴𝐵
7 dfdec10 12630 . . . 4 𝐴𝐵 = ((10 · 𝐴) + 𝐵)
86, 7eqtri 2759 . . 3 𝑀 = ((10 · 𝐴) + 𝐵)
9 decma.n . . . 4 𝑁 = 𝐶𝐷
10 dfdec10 12630 . . . 4 𝐶𝐷 = ((10 · 𝐶) + 𝐷)
119, 10eqtri 2759 . . 3 𝑁 = ((10 · 𝐶) + 𝐷)
12 decmac.p . . 3 𝑃 ∈ ℕ0
13 decmac.f . . 3 𝐹 ∈ ℕ0
14 decmac.g . . 3 𝐺 ∈ ℕ0
15 decmac.e . . 3 ((𝐴 · 𝑃) + (𝐶 + 𝐺)) = 𝐸
16 decmac.2 . . . 4 ((𝐵 · 𝑃) + 𝐷) = 𝐺𝐹
17 dfdec10 12630 . . . 4 𝐺𝐹 = ((10 · 𝐺) + 𝐹)
1816, 17eqtri 2759 . . 3 ((𝐵 · 𝑃) + 𝐷) = ((10 · 𝐺) + 𝐹)
191, 2, 3, 4, 5, 8, 11, 12, 13, 14, 15, 18nummac 12672 . 2 ((𝑀 · 𝑃) + 𝑁) = ((10 · 𝐸) + 𝐹)
20 dfdec10 12630 . 2 𝐸𝐹 = ((10 · 𝐸) + 𝐹)
2119, 20eqtr4i 2762 1 ((𝑀 · 𝑃) + 𝑁) = 𝐸𝐹
Colors of variables: wff setvar class
Syntax hints:   = wceq 1541  wcel 2106  (class class class)co 7362  0cc0 11060  1c1 11061   + caddc 11063   · cmul 11065  0cn0 12422  cdc 12627
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1913  ax-6 1971  ax-7 2011  ax-8 2108  ax-9 2116  ax-10 2137  ax-11 2154  ax-12 2171  ax-ext 2702  ax-sep 5261  ax-nul 5268  ax-pow 5325  ax-pr 5389  ax-un 7677  ax-resscn 11117  ax-1cn 11118  ax-icn 11119  ax-addcl 11120  ax-addrcl 11121  ax-mulcl 11122  ax-mulrcl 11123  ax-mulcom 11124  ax-addass 11125  ax-mulass 11126  ax-distr 11127  ax-i2m1 11128  ax-1ne0 11129  ax-1rid 11130  ax-rnegex 11131  ax-rrecex 11132  ax-cnre 11133  ax-pre-lttri 11134  ax-pre-lttrn 11135  ax-pre-ltadd 11136
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 846  df-3or 1088  df-3an 1089  df-tru 1544  df-fal 1554  df-ex 1782  df-nf 1786  df-sb 2068  df-mo 2533  df-eu 2562  df-clab 2709  df-cleq 2723  df-clel 2809  df-nfc 2884  df-ne 2940  df-nel 3046  df-ral 3061  df-rex 3070  df-reu 3352  df-rab 3406  df-v 3448  df-sbc 3743  df-csb 3859  df-dif 3916  df-un 3918  df-in 3920  df-ss 3930  df-pss 3932  df-nul 4288  df-if 4492  df-pw 4567  df-sn 4592  df-pr 4594  df-op 4598  df-uni 4871  df-iun 4961  df-br 5111  df-opab 5173  df-mpt 5194  df-tr 5228  df-id 5536  df-eprel 5542  df-po 5550  df-so 5551  df-fr 5593  df-we 5595  df-xp 5644  df-rel 5645  df-cnv 5646  df-co 5647  df-dm 5648  df-rn 5649  df-res 5650  df-ima 5651  df-pred 6258  df-ord 6325  df-on 6326  df-lim 6327  df-suc 6328  df-iota 6453  df-fun 6503  df-fn 6504  df-f 6505  df-f1 6506  df-fo 6507  df-f1o 6508  df-fv 6509  df-riota 7318  df-ov 7365  df-oprab 7366  df-mpo 7367  df-om 7808  df-2nd 7927  df-frecs 8217  df-wrecs 8248  df-recs 8322  df-rdg 8361  df-er 8655  df-en 8891  df-dom 8892  df-sdom 8893  df-pnf 11200  df-mnf 11201  df-ltxr 11203  df-sub 11396  df-nn 12163  df-2 12225  df-3 12226  df-4 12227  df-5 12228  df-6 12229  df-7 12230  df-8 12231  df-9 12232  df-n0 12423  df-dec 12628
This theorem is referenced by:  decrmac  12685  2exp16  16974  37prm  17004  43prm  17005  83prm  17006  139prm  17007  163prm  17008  317prm  17009  631prm  17010  1259lem1  17014  1259lem2  17015  1259lem3  17016  1259lem4  17017  1259lem5  17018  1259prm  17019  2503lem1  17020  2503lem2  17021  2503lem3  17022  2503prm  17023  4001lem1  17024  4001lem2  17025  4001lem3  17026  log2ublem3  26335  log2ub  26336  3exp7  40583  3lexlogpow5ineq1  40584  3lexlogpow5ineq5  40590  aks4d1p1  40606  235t711  40863  257prm  45873  139prmALT  45908  127prm  45911
  Copyright terms: Public domain W3C validator