Metamath Proof Explorer


Theorem numadd

Description: Add two decimal integers M and N (no carry). (Contributed by Mario Carneiro, 18-Feb-2014)

Ref Expression
Hypotheses 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 )
numadd.8
|- ( A + C ) = E
numadd.9
|- ( B + D ) = F
Assertion numadd
|- ( M + N ) = ( ( T x. E ) + F )

Proof

Step Hyp Ref Expression
1 numma.1
 |-  T e. NN0
2 numma.2
 |-  A e. NN0
3 numma.3
 |-  B e. NN0
4 numma.4
 |-  C e. NN0
5 numma.5
 |-  D e. NN0
6 numma.6
 |-  M = ( ( T x. A ) + B )
7 numma.7
 |-  N = ( ( T x. C ) + D )
8 numadd.8
 |-  ( A + C ) = E
9 numadd.9
 |-  ( B + D ) = F
10 1 2 3 numcl
 |-  ( ( T x. A ) + B ) e. NN0
11 6 10 eqeltri
 |-  M e. NN0
12 11 nn0cni
 |-  M e. CC
13 12 mulid1i
 |-  ( M x. 1 ) = M
14 13 oveq1i
 |-  ( ( M x. 1 ) + N ) = ( M + N )
15 1nn0
 |-  1 e. NN0
16 2 nn0cni
 |-  A e. CC
17 16 mulid1i
 |-  ( A x. 1 ) = A
18 17 oveq1i
 |-  ( ( A x. 1 ) + C ) = ( A + C )
19 18 8 eqtri
 |-  ( ( A x. 1 ) + C ) = E
20 3 nn0cni
 |-  B e. CC
21 20 mulid1i
 |-  ( B x. 1 ) = B
22 21 oveq1i
 |-  ( ( B x. 1 ) + D ) = ( B + D )
23 22 9 eqtri
 |-  ( ( B x. 1 ) + D ) = F
24 1 2 3 4 5 6 7 15 19 23 numma
 |-  ( ( M x. 1 ) + N ) = ( ( T x. E ) + F )
25 14 24 eqtr3i
 |-  ( M + N ) = ( ( T x. E ) + F )