Metamath Proof Explorer


Theorem numma

Description: Perform a multiply-add of two decimal integers M and N against a fixed multiplicand P (no carry). (Contributed by Mario Carneiro, 18-Feb-2014)

Ref Expression
Hypotheses numma.1 T0
numma.2 A0
numma.3 B0
numma.4 C0
numma.5 D0
numma.6 M=TA+B
numma.7 N=TC+D
numma.8 P0
numma.9 AP+C=E
numma.10 BP+D=F
Assertion numma MP+N=TE+F

Proof

Step Hyp Ref Expression
1 numma.1 T0
2 numma.2 A0
3 numma.3 B0
4 numma.4 C0
5 numma.5 D0
6 numma.6 M=TA+B
7 numma.7 N=TC+D
8 numma.8 P0
9 numma.9 AP+C=E
10 numma.10 BP+D=F
11 6 oveq1i MP=TA+BP
12 11 7 oveq12i MP+N=TA+BP+TC+D
13 1 nn0cni T
14 2 nn0cni A
15 8 nn0cni P
16 14 15 mulcli AP
17 4 nn0cni C
18 13 16 17 adddii TAP+C=TAP+TC
19 13 14 15 mulassi TAP=TAP
20 19 oveq1i TAP+TC=TAP+TC
21 18 20 eqtr4i TAP+C=TAP+TC
22 21 oveq1i TAP+C+BP+D=TAP+TC+BP+D
23 13 14 mulcli TA
24 3 nn0cni B
25 23 24 15 adddiri TA+BP=TAP+BP
26 25 oveq1i TA+BP+TC+D=TAP+BP+TC+D
27 23 15 mulcli TAP
28 13 17 mulcli TC
29 24 15 mulcli BP
30 5 nn0cni D
31 27 28 29 30 add4i TAP+TC+BP+D=TAP+BP+TC+D
32 26 31 eqtr4i TA+BP+TC+D=TAP+TC+BP+D
33 22 32 eqtr4i TAP+C+BP+D=TA+BP+TC+D
34 9 oveq2i TAP+C=TE
35 34 10 oveq12i TAP+C+BP+D=TE+F
36 12 33 35 3eqtr2i MP+N=TE+F