ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  nummac Unicode version

Theorem nummac 9344
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 9107 . . . 4  |-  T  e.  CC
3 numma.2 . . . . . . . . 9  |-  A  e. 
NN0
43nn0cni 9107 . . . . . . . 8  |-  A  e.  CC
5 nummac.8 . . . . . . . . 9  |-  P  e. 
NN0
65nn0cni 9107 . . . . . . . 8  |-  P  e.  CC
74, 6mulcli 7885 . . . . . . 7  |-  ( A  x.  P )  e.  CC
8 numma.4 . . . . . . . 8  |-  C  e. 
NN0
98nn0cni 9107 . . . . . . 7  |-  C  e.  CC
10 nummac.10 . . . . . . . 8  |-  G  e. 
NN0
1110nn0cni 9107 . . . . . . 7  |-  G  e.  CC
127, 9, 11addassi 7888 . . . . . 6  |-  ( ( ( A  x.  P
)  +  C )  +  G )  =  ( ( A  x.  P )  +  ( C  +  G ) )
13 nummac.11 . . . . . 6  |-  ( ( A  x.  P )  +  ( C  +  G ) )  =  E
1412, 13eqtri 2178 . . . . 5  |-  ( ( ( A  x.  P
)  +  C )  +  G )  =  E
157, 9addcli 7884 . . . . . 6  |-  ( ( A  x.  P )  +  C )  e.  CC
1615, 11addcli 7884 . . . . 5  |-  ( ( ( A  x.  P
)  +  C )  +  G )  e.  CC
1714, 16eqeltrri 2231 . . . 4  |-  E  e.  CC
182, 17, 11subdii 8286 . . 3  |-  ( T  x.  ( E  -  G ) )  =  ( ( T  x.  E )  -  ( T  x.  G )
)
1918oveq1i 5836 . 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 8167 . . . . 5  |-  ( ( E  -  G )  =  ( ( A  x.  P )  +  C )  <->  ( (
( A  x.  P
)  +  C )  +  G )  =  E )
2514, 24mpbir 145 . . . 4  |-  ( E  -  G )  =  ( ( A  x.  P )  +  C
)
2625eqcomi 2161 . . 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 9343 . 2  |-  ( ( M  x.  P )  +  N )  =  ( ( T  x.  ( E  -  G
) )  +  ( ( T  x.  G
)  +  F ) )
292, 17mulcli 7885 . . . . 5  |-  ( T  x.  E )  e.  CC
302, 11mulcli 7885 . . . . 5  |-  ( T  x.  G )  e.  CC
31 npcan 8088 . . . . 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 423 . . . 4  |-  ( ( ( T  x.  E
)  -  ( T  x.  G ) )  +  ( T  x.  G ) )  =  ( T  x.  E
)
3332oveq1i 5836 . . 3  |-  ( ( ( ( T  x.  E )  -  ( T  x.  G )
)  +  ( T  x.  G ) )  +  F )  =  ( ( T  x.  E )  +  F
)
3429, 30subcli 8155 . . . 4  |-  ( ( T  x.  E )  -  ( T  x.  G ) )  e.  CC
35 nummac.9 . . . . 5  |-  F  e. 
NN0
3635nn0cni 9107 . . . 4  |-  F  e.  CC
3734, 30, 36addassi 7888 . . 3  |-  ( ( ( ( T  x.  E )  -  ( T  x.  G )
)  +  ( T  x.  G ) )  +  F )  =  ( ( ( T  x.  E )  -  ( T  x.  G
) )  +  ( ( T  x.  G
)  +  F ) )
3833, 37eqtr3i 2180 . 2  |-  ( ( T  x.  E )  +  F )  =  ( ( ( T  x.  E )  -  ( T  x.  G
) )  +  ( ( T  x.  G
)  +  F ) )
3919, 28, 383eqtr4i 2188 1  |-  ( ( M  x.  P )  +  N )  =  ( ( T  x.  E )  +  F
)
Colors of variables: wff set class
Syntax hints:    = wceq 1335    e. wcel 2128  (class class class)co 5826   CCcc 7732    + caddc 7737    x. cmul 7739    - cmin 8050   NN0cn0 9095
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 604  ax-in2 605  ax-io 699  ax-5 1427  ax-7 1428  ax-gen 1429  ax-ie1 1473  ax-ie2 1474  ax-8 1484  ax-10 1485  ax-11 1486  ax-i12 1487  ax-bndl 1489  ax-4 1490  ax-17 1506  ax-i9 1510  ax-ial 1514  ax-i5r 1515  ax-14 2131  ax-ext 2139  ax-sep 4084  ax-pow 4137  ax-pr 4171  ax-setind 4498  ax-cnex 7825  ax-resscn 7826  ax-1cn 7827  ax-1re 7828  ax-icn 7829  ax-addcl 7830  ax-addrcl 7831  ax-mulcl 7832  ax-addcom 7834  ax-mulcom 7835  ax-addass 7836  ax-mulass 7837  ax-distr 7838  ax-i2m1 7839  ax-0id 7842  ax-rnegex 7843  ax-cnre 7845
This theorem depends on definitions:  df-bi 116  df-3an 965  df-tru 1338  df-fal 1341  df-nf 1441  df-sb 1743  df-eu 2009  df-mo 2010  df-clab 2144  df-cleq 2150  df-clel 2153  df-nfc 2288  df-ne 2328  df-ral 2440  df-rex 2441  df-reu 2442  df-rab 2444  df-v 2714  df-sbc 2938  df-dif 3104  df-un 3106  df-in 3108  df-ss 3115  df-pw 3546  df-sn 3567  df-pr 3568  df-op 3570  df-uni 3775  df-int 3810  df-br 3968  df-opab 4028  df-id 4255  df-xp 4594  df-rel 4595  df-cnv 4596  df-co 4597  df-dm 4598  df-iota 5137  df-fun 5174  df-fv 5180  df-riota 5782  df-ov 5829  df-oprab 5830  df-mpo 5831  df-sub 8052  df-inn 8839  df-n0 9096
This theorem is referenced by:  numma2c  9345  numaddc  9347  nummul1c  9348  decmac  9351
  Copyright terms: Public domain W3C validator