Metamath Proof Explorer


Theorem nnaddcl

Description: Closure of addition of positive integers, proved by induction on the second addend. (Contributed by NM, 12-Jan-1997)

Ref Expression
Assertion nnaddcl A B A + B

Proof

Step Hyp Ref Expression
1 oveq2 x = 1 A + x = A + 1
2 1 eleq1d x = 1 A + x A + 1
3 2 imbi2d x = 1 A A + x A A + 1
4 oveq2 x = y A + x = A + y
5 4 eleq1d x = y A + x A + y
6 5 imbi2d x = y A A + x A A + y
7 oveq2 x = y + 1 A + x = A + y + 1
8 7 eleq1d x = y + 1 A + x A + y + 1
9 8 imbi2d x = y + 1 A A + x A A + y + 1
10 oveq2 x = B A + x = A + B
11 10 eleq1d x = B A + x A + B
12 11 imbi2d x = B A A + x A A + B
13 peano2nn A A + 1
14 peano2nn A + y A + y + 1
15 nncn A A
16 nncn y y
17 ax-1cn 1
18 addass A y 1 A + y + 1 = A + y + 1
19 17 18 mp3an3 A y A + y + 1 = A + y + 1
20 15 16 19 syl2an A y A + y + 1 = A + y + 1
21 20 eleq1d A y A + y + 1 A + y + 1
22 14 21 syl5ib A y A + y A + y + 1
23 22 expcom y A A + y A + y + 1
24 23 a2d y A A + y A A + y + 1
25 3 6 9 12 13 24 nnind B A A + B
26 25 impcom A B A + B