Metamath Proof Explorer


Theorem nn0le2is012

Description: A nonnegative integer which is less than or equal to 2 is either 0 or 1 or 2. (Contributed by AV, 16-Mar-2019)

Ref Expression
Assertion nn0le2is012 N 0 N 2 N = 0 N = 1 N = 2

Proof

Step Hyp Ref Expression
1 nn0re N 0 N
2 2re 2
3 2 a1i N 0 2
4 1 3 leloed N 0 N 2 N < 2 N = 2
5 nn0z N 0 N
6 2z 2
7 zltlem1 N 2 N < 2 N 2 1
8 5 6 7 sylancl N 0 N < 2 N 2 1
9 2m1e1 2 1 = 1
10 9 a1i N 0 2 1 = 1
11 10 breq2d N 0 N 2 1 N 1
12 8 11 bitrd N 0 N < 2 N 1
13 1red N 0 1
14 1 13 leloed N 0 N 1 N < 1 N = 1
15 nn0lt10b N 0 N < 1 N = 0
16 3mix1 N = 0 N = 0 N = 1 N = 2
17 15 16 syl6bi N 0 N < 1 N = 0 N = 1 N = 2
18 17 com12 N < 1 N 0 N = 0 N = 1 N = 2
19 3mix2 N = 1 N = 0 N = 1 N = 2
20 19 a1d N = 1 N 0 N = 0 N = 1 N = 2
21 18 20 jaoi N < 1 N = 1 N 0 N = 0 N = 1 N = 2
22 21 com12 N 0 N < 1 N = 1 N = 0 N = 1 N = 2
23 14 22 sylbid N 0 N 1 N = 0 N = 1 N = 2
24 12 23 sylbid N 0 N < 2 N = 0 N = 1 N = 2
25 24 com12 N < 2 N 0 N = 0 N = 1 N = 2
26 3mix3 N = 2 N = 0 N = 1 N = 2
27 26 a1d N = 2 N 0 N = 0 N = 1 N = 2
28 25 27 jaoi N < 2 N = 2 N 0 N = 0 N = 1 N = 2
29 28 com12 N 0 N < 2 N = 2 N = 0 N = 1 N = 2
30 4 29 sylbid N 0 N 2 N = 0 N = 1 N = 2
31 30 imp N 0 N 2 N = 0 N = 1 N = 2