MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  nummac Unicode version

Theorem nummac 10172
Description: Perform a multiply-add of two decimal integers  M and  N against a fixed multiplicand  P (with carry). (Contributed by Mario Carneiro, 18-Feb-2014.)
Hypotheses
Ref Expression
numma.1  |-  T  e. 
NN0
numma.2  |-  A  e. 
NN0
numma.3  |-  B  e. 
NN0
numma.4  |-  C  e. 
NN0
numma.5  |-  D  e. 
NN0
numma.6  |-  M  =  ( ( T  x.  A )  +  B
)
numma.7  |-  N  =  ( ( T  x.  C )  +  D
)
nummac.8  |-  P  e. 
NN0
nummac.9  |-  F  e. 
NN0
nummac.10  |-  G  e. 
NN0
nummac.11  |-  ( ( A  x.  P )  +  ( C  +  G ) )  =  E
nummac.12  |-  ( ( B  x.  P )  +  D )  =  ( ( T  x.  G )  +  F
)
Assertion
Ref Expression
nummac  |-  ( ( M  x.  P )  +  N )  =  ( ( T  x.  E )  +  F
)

Proof of Theorem nummac
StepHypRef Expression
1 numma.1 . . . . 5  |-  T  e. 
NN0
21nn0cni 9993 . . . 4  |-  T  e.  CC
3 numma.2 . . . . . . . . 9  |-  A  e. 
NN0
43nn0cni 9993 . . . . . . . 8  |-  A  e.  CC
5 nummac.8 . . . . . . . . 9  |-  P  e. 
NN0
65nn0cni 9993 . . . . . . . 8  |-  P  e.  CC
74, 6mulcli 8858 . . . . . . 7  |-  ( A  x.  P )  e.  CC
8 numma.4 . . . . . . . 8  |-  C  e. 
NN0
98nn0cni 9993 . . . . . . 7  |-  C  e.  CC
10 nummac.10 . . . . . . . 8  |-  G  e. 
NN0
1110nn0cni 9993 . . . . . . 7  |-  G  e.  CC
127, 9, 11addassi 8861 . . . . . 6  |-  ( ( ( A  x.  P
)  +  C )  +  G )  =  ( ( A  x.  P )  +  ( C  +  G ) )
13 nummac.11 . . . . . 6  |-  ( ( A  x.  P )  +  ( C  +  G ) )  =  E
1412, 13eqtri 2316 . . . . 5  |-  ( ( ( A  x.  P
)  +  C )  +  G )  =  E
157, 9addcli 8857 . . . . . 6  |-  ( ( A  x.  P )  +  C )  e.  CC
1615, 11addcli 8857 . . . . 5  |-  ( ( ( A  x.  P
)  +  C )  +  G )  e.  CC
1714, 16eqeltrri 2367 . . . 4  |-  E  e.  CC
182, 17, 11subdii 9244 . . 3  |-  ( T  x.  ( E  -  G ) )  =  ( ( T  x.  E )  -  ( T  x.  G )
)
1918oveq1i 5884 . 2  |-  ( ( T  x.  ( E  -  G ) )  +  ( ( T  x.  G )  +  F ) )  =  ( ( ( T  x.  E )  -  ( T  x.  G
) )  +  ( ( T  x.  G
)  +  F ) )
20 numma.3 . . 3  |-  B  e. 
NN0
21 numma.5 . . 3  |-  D  e. 
NN0
22 numma.6 . . 3  |-  M  =  ( ( T  x.  A )  +  B
)
23 numma.7 . . 3  |-  N  =  ( ( T  x.  C )  +  D
)
2417, 11, 15subadd2i 9150 . . . . 5  |-  ( ( E  -  G )  =  ( ( A  x.  P )  +  C )  <->  ( (
( A  x.  P
)  +  C )  +  G )  =  E )
2514, 24mpbir 200 . . . 4  |-  ( E  -  G )  =  ( ( A  x.  P )  +  C
)
2625eqcomi 2300 . . 3  |-  ( ( A  x.  P )  +  C )  =  ( E  -  G
)
27 nummac.12 . . 3  |-  ( ( B  x.  P )  +  D )  =  ( ( T  x.  G )  +  F
)
281, 3, 20, 8, 21, 22, 23, 5, 26, 27numma 10171 . 2  |-  ( ( M  x.  P )  +  N )  =  ( ( T  x.  ( E  -  G
) )  +  ( ( T  x.  G
)  +  F ) )
292, 17mulcli 8858 . . . . 5  |-  ( T  x.  E )  e.  CC
302, 11mulcli 8858 . . . . 5  |-  ( T  x.  G )  e.  CC
31 npcan 9076 . . . . 5  |-  ( ( ( T  x.  E
)  e.  CC  /\  ( T  x.  G
)  e.  CC )  ->  ( ( ( T  x.  E )  -  ( T  x.  G ) )  +  ( T  x.  G
) )  =  ( T  x.  E ) )
3229, 30, 31mp2an 653 . . . 4  |-  ( ( ( T  x.  E
)  -  ( T  x.  G ) )  +  ( T  x.  G ) )  =  ( T  x.  E
)
3332oveq1i 5884 . . 3  |-  ( ( ( ( T  x.  E )  -  ( T  x.  G )
)  +  ( T  x.  G ) )  +  F )  =  ( ( T  x.  E )  +  F
)
3429, 30subcli 9138 . . . 4  |-  ( ( T  x.  E )  -  ( T  x.  G ) )  e.  CC
35 nummac.9 . . . . 5  |-  F  e. 
NN0
3635nn0cni 9993 . . . 4  |-  F  e.  CC
3734, 30, 36addassi 8861 . . 3  |-  ( ( ( ( T  x.  E )  -  ( T  x.  G )
)  +  ( T  x.  G ) )  +  F )  =  ( ( ( T  x.  E )  -  ( T  x.  G
) )  +  ( ( T  x.  G
)  +  F ) )
3833, 37eqtr3i 2318 . 2  |-  ( ( T  x.  E )  +  F )  =  ( ( ( T  x.  E )  -  ( T  x.  G
) )  +  ( ( T  x.  G
)  +  F ) )
3919, 28, 383eqtr4i 2326 1  |-  ( ( M  x.  P )  +  N )  =  ( ( T  x.  E )  +  F
)
Colors of variables: wff set class
Syntax hints:    = wceq 1632    e. wcel 1696  (class class class)co 5874   CCcc 8751    + caddc 8756    x. cmul 8758    - cmin 9053   NN0cn0 9981
This theorem is referenced by:  numma2c  10173  numaddc  10175  nummul1c  10176  decmac  10179
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1536  ax-5 1547  ax-17 1606  ax-9 1644  ax-8 1661  ax-13 1698  ax-14 1700  ax-6 1715  ax-7 1720  ax-11 1727  ax-12 1878  ax-ext 2277  ax-sep 4157  ax-nul 4165  ax-pow 4204  ax-pr 4230  ax-un 4528  ax-resscn 8810  ax-1cn 8811  ax-icn 8812  ax-addcl 8813  ax-addrcl 8814  ax-mulcl 8815  ax-mulrcl 8816  ax-mulcom 8817  ax-addass 8818  ax-mulass 8819  ax-distr 8820  ax-i2m1 8821  ax-1ne0 8822  ax-1rid 8823  ax-rnegex 8824  ax-rrecex 8825  ax-cnre 8826  ax-pre-lttri 8827  ax-pre-lttrn 8828  ax-pre-ltadd 8829
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1532  df-nf 1535  df-sb 1639  df-eu 2160  df-mo 2161  df-clab 2283  df-cleq 2289  df-clel 2292  df-nfc 2421  df-ne 2461  df-nel 2462  df-ral 2561  df-rex 2562  df-reu 2563  df-rab 2565  df-v 2803  df-sbc 3005  df-csb 3095  df-dif 3168  df-un 3170  df-in 3172  df-ss 3179  df-pss 3181  df-nul 3469  df-if 3579  df-pw 3640  df-sn 3659  df-pr 3660  df-tp 3661  df-op 3662  df-uni 3844  df-iun 3923  df-br 4040  df-opab 4094  df-mpt 4095  df-tr 4130  df-eprel 4321  df-id 4325  df-po 4330  df-so 4331  df-fr 4368  df-we 4370  df-ord 4411  df-on 4412  df-lim 4413  df-suc 4414  df-om 4673  df-xp 4711  df-rel 4712  df-cnv 4713  df-co 4714  df-dm 4715  df-rn 4716  df-res 4717  df-ima 4718  df-iota 5235  df-fun 5273  df-fn 5274  df-f 5275  df-f1 5276  df-fo 5277  df-f1o 5278  df-fv 5279  df-ov 5877  df-oprab 5878  df-mpt2 5879  df-riota 6320  df-recs 6404  df-rdg 6439  df-er 6676  df-en 6880  df-dom 6881  df-sdom 6882  df-pnf 8885  df-mnf 8886  df-ltxr 8888  df-sub 9055  df-nn 9763  df-n0 9982
  Copyright terms: Public domain W3C validator