Metamath Proof Explorer


Theorem decmac

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

Ref Expression
Hypotheses 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 decmac ( ( ๐‘€ ยท ๐‘ƒ ) + ๐‘ ) = ๐ธ ๐น

Proof

Step Hyp Ref Expression
1 decma.a โŠข ๐ด โˆˆ โ„•0
2 decma.b โŠข ๐ต โˆˆ โ„•0
3 decma.c โŠข ๐ถ โˆˆ โ„•0
4 decma.d โŠข ๐ท โˆˆ โ„•0
5 decma.m โŠข ๐‘€ = ๐ด ๐ต
6 decma.n โŠข ๐‘ = ๐ถ ๐ท
7 decmac.p โŠข ๐‘ƒ โˆˆ โ„•0
8 decmac.f โŠข ๐น โˆˆ โ„•0
9 decmac.g โŠข ๐บ โˆˆ โ„•0
10 decmac.e โŠข ( ( ๐ด ยท ๐‘ƒ ) + ( ๐ถ + ๐บ ) ) = ๐ธ
11 decmac.2 โŠข ( ( ๐ต ยท ๐‘ƒ ) + ๐ท ) = ๐บ ๐น
12 10nn0 โŠข 1 0 โˆˆ โ„•0
13 dfdec10 โŠข ๐ด ๐ต = ( ( 1 0 ยท ๐ด ) + ๐ต )
14 5 13 eqtri โŠข ๐‘€ = ( ( 1 0 ยท ๐ด ) + ๐ต )
15 dfdec10 โŠข ๐ถ ๐ท = ( ( 1 0 ยท ๐ถ ) + ๐ท )
16 6 15 eqtri โŠข ๐‘ = ( ( 1 0 ยท ๐ถ ) + ๐ท )
17 dfdec10 โŠข ๐บ ๐น = ( ( 1 0 ยท ๐บ ) + ๐น )
18 11 17 eqtri โŠข ( ( ๐ต ยท ๐‘ƒ ) + ๐ท ) = ( ( 1 0 ยท ๐บ ) + ๐น )
19 12 1 2 3 4 14 16 7 8 9 10 18 nummac โŠข ( ( ๐‘€ ยท ๐‘ƒ ) + ๐‘ ) = ( ( 1 0 ยท ๐ธ ) + ๐น )
20 dfdec10 โŠข ๐ธ ๐น = ( ( 1 0 ยท ๐ธ ) + ๐น )
21 19 20 eqtr4i โŠข ( ( ๐‘€ ยท ๐‘ƒ ) + ๐‘ ) = ๐ธ ๐น