Metamath Proof Explorer


Theorem nn1m1nn

Description: Every positive integer is one or a successor. (Contributed by Mario Carneiro, 16-May-2014)

Ref Expression
Assertion nn1m1nn
|- ( A e. NN -> ( A = 1 \/ ( A - 1 ) e. NN ) )

Proof

Step Hyp Ref Expression
1 orc
 |-  ( x = 1 -> ( x = 1 \/ ( x - 1 ) e. NN ) )
2 1cnd
 |-  ( x = 1 -> 1 e. CC )
3 1 2 2thd
 |-  ( x = 1 -> ( ( x = 1 \/ ( x - 1 ) e. NN ) <-> 1 e. CC ) )
4 eqeq1
 |-  ( x = y -> ( x = 1 <-> y = 1 ) )
5 oveq1
 |-  ( x = y -> ( x - 1 ) = ( y - 1 ) )
6 5 eleq1d
 |-  ( x = y -> ( ( x - 1 ) e. NN <-> ( y - 1 ) e. NN ) )
7 4 6 orbi12d
 |-  ( x = y -> ( ( x = 1 \/ ( x - 1 ) e. NN ) <-> ( y = 1 \/ ( y - 1 ) e. NN ) ) )
8 eqeq1
 |-  ( x = ( y + 1 ) -> ( x = 1 <-> ( y + 1 ) = 1 ) )
9 oveq1
 |-  ( x = ( y + 1 ) -> ( x - 1 ) = ( ( y + 1 ) - 1 ) )
10 9 eleq1d
 |-  ( x = ( y + 1 ) -> ( ( x - 1 ) e. NN <-> ( ( y + 1 ) - 1 ) e. NN ) )
11 8 10 orbi12d
 |-  ( x = ( y + 1 ) -> ( ( x = 1 \/ ( x - 1 ) e. NN ) <-> ( ( y + 1 ) = 1 \/ ( ( y + 1 ) - 1 ) e. NN ) ) )
12 eqeq1
 |-  ( x = A -> ( x = 1 <-> A = 1 ) )
13 oveq1
 |-  ( x = A -> ( x - 1 ) = ( A - 1 ) )
14 13 eleq1d
 |-  ( x = A -> ( ( x - 1 ) e. NN <-> ( A - 1 ) e. NN ) )
15 12 14 orbi12d
 |-  ( x = A -> ( ( x = 1 \/ ( x - 1 ) e. NN ) <-> ( A = 1 \/ ( A - 1 ) e. NN ) ) )
16 ax-1cn
 |-  1 e. CC
17 nncn
 |-  ( y e. NN -> y e. CC )
18 pncan
 |-  ( ( y e. CC /\ 1 e. CC ) -> ( ( y + 1 ) - 1 ) = y )
19 17 16 18 sylancl
 |-  ( y e. NN -> ( ( y + 1 ) - 1 ) = y )
20 id
 |-  ( y e. NN -> y e. NN )
21 19 20 eqeltrd
 |-  ( y e. NN -> ( ( y + 1 ) - 1 ) e. NN )
22 21 olcd
 |-  ( y e. NN -> ( ( y + 1 ) = 1 \/ ( ( y + 1 ) - 1 ) e. NN ) )
23 22 a1d
 |-  ( y e. NN -> ( ( y = 1 \/ ( y - 1 ) e. NN ) -> ( ( y + 1 ) = 1 \/ ( ( y + 1 ) - 1 ) e. NN ) ) )
24 3 7 11 15 16 23 nnind
 |-  ( A e. NN -> ( A = 1 \/ ( A - 1 ) e. NN ) )