Metamath Proof Explorer


Theorem nnadd1com

Description: Addition with 1 is commutative for natural numbers. (Contributed by Steven Nguyen, 9-Dec-2022)

Ref Expression
Assertion nnadd1com
|- ( A e. NN -> ( A + 1 ) = ( 1 + A ) )

Proof

Step Hyp Ref Expression
1 oveq1
 |-  ( x = 1 -> ( x + 1 ) = ( 1 + 1 ) )
2 oveq2
 |-  ( x = 1 -> ( 1 + x ) = ( 1 + 1 ) )
3 1 2 eqeq12d
 |-  ( x = 1 -> ( ( x + 1 ) = ( 1 + x ) <-> ( 1 + 1 ) = ( 1 + 1 ) ) )
4 oveq1
 |-  ( x = y -> ( x + 1 ) = ( y + 1 ) )
5 oveq2
 |-  ( x = y -> ( 1 + x ) = ( 1 + y ) )
6 4 5 eqeq12d
 |-  ( x = y -> ( ( x + 1 ) = ( 1 + x ) <-> ( y + 1 ) = ( 1 + y ) ) )
7 oveq1
 |-  ( x = ( y + 1 ) -> ( x + 1 ) = ( ( y + 1 ) + 1 ) )
8 oveq2
 |-  ( x = ( y + 1 ) -> ( 1 + x ) = ( 1 + ( y + 1 ) ) )
9 7 8 eqeq12d
 |-  ( x = ( y + 1 ) -> ( ( x + 1 ) = ( 1 + x ) <-> ( ( y + 1 ) + 1 ) = ( 1 + ( y + 1 ) ) ) )
10 oveq1
 |-  ( x = A -> ( x + 1 ) = ( A + 1 ) )
11 oveq2
 |-  ( x = A -> ( 1 + x ) = ( 1 + A ) )
12 10 11 eqeq12d
 |-  ( x = A -> ( ( x + 1 ) = ( 1 + x ) <-> ( A + 1 ) = ( 1 + A ) ) )
13 eqid
 |-  ( 1 + 1 ) = ( 1 + 1 )
14 oveq1
 |-  ( ( y + 1 ) = ( 1 + y ) -> ( ( y + 1 ) + 1 ) = ( ( 1 + y ) + 1 ) )
15 1cnd
 |-  ( y e. NN -> 1 e. CC )
16 nncn
 |-  ( y e. NN -> y e. CC )
17 15 16 15 addassd
 |-  ( y e. NN -> ( ( 1 + y ) + 1 ) = ( 1 + ( y + 1 ) ) )
18 14 17 sylan9eqr
 |-  ( ( y e. NN /\ ( y + 1 ) = ( 1 + y ) ) -> ( ( y + 1 ) + 1 ) = ( 1 + ( y + 1 ) ) )
19 18 ex
 |-  ( y e. NN -> ( ( y + 1 ) = ( 1 + y ) -> ( ( y + 1 ) + 1 ) = ( 1 + ( y + 1 ) ) ) )
20 3 6 9 12 13 19 nnind
 |-  ( A e. NN -> ( A + 1 ) = ( 1 + A ) )