Metamath Proof Explorer


Theorem decma

Description: Perform a multiply-add of two numerals M and N against a fixed multiplicand P (no carry). (Contributed by Mario Carneiro, 18-Feb-2014) (Revised by AV, 6-Sep-2021)

Ref Expression
Hypotheses decma.a
|- A e. NN0
decma.b
|- B e. NN0
decma.c
|- C e. NN0
decma.d
|- D e. NN0
decma.m
|- M = ; A B
decma.n
|- N = ; C D
decma.p
|- P e. NN0
decma.e
|- ( ( A x. P ) + C ) = E
decma.f
|- ( ( B x. P ) + D ) = F
Assertion decma
|- ( ( M x. P ) + N ) = ; E F

Proof

Step Hyp Ref Expression
1 decma.a
 |-  A e. NN0
2 decma.b
 |-  B e. NN0
3 decma.c
 |-  C e. NN0
4 decma.d
 |-  D e. NN0
5 decma.m
 |-  M = ; A B
6 decma.n
 |-  N = ; C D
7 decma.p
 |-  P e. NN0
8 decma.e
 |-  ( ( A x. P ) + C ) = E
9 decma.f
 |-  ( ( B x. P ) + D ) = F
10 10nn0
 |-  ; 1 0 e. NN0
11 dfdec10
 |-  ; A B = ( ( ; 1 0 x. A ) + B )
12 5 11 eqtri
 |-  M = ( ( ; 1 0 x. A ) + B )
13 dfdec10
 |-  ; C D = ( ( ; 1 0 x. C ) + D )
14 6 13 eqtri
 |-  N = ( ( ; 1 0 x. C ) + D )
15 10 1 2 3 4 12 14 7 8 9 numma
 |-  ( ( M x. P ) + N ) = ( ( ; 1 0 x. E ) + F )
16 dfdec10
 |-  ; E F = ( ( ; 1 0 x. E ) + F )
17 15 16 eqtr4i
 |-  ( ( M x. P ) + N ) = ; E F