Metamath Proof Explorer


Theorem zeo2

Description: An integer is even or odd but not both. (Contributed by Mario Carneiro, 12-Sep-2015)

Ref Expression
Assertion zeo2 N N 2 ¬ N + 1 2

Proof

Step Hyp Ref Expression
1 zcn N N
2 peano2cn N N + 1
3 1 2 syl N N + 1
4 2cnd N 2
5 2ne0 2 0
6 5 a1i N 2 0
7 3 4 6 divcan2d N 2 N + 1 2 = N + 1
8 1 4 6 divcan2d N 2 N 2 = N
9 8 oveq1d N 2 N 2 + 1 = N + 1
10 7 9 eqtr4d N 2 N + 1 2 = 2 N 2 + 1
11 zneo N + 1 2 N 2 2 N + 1 2 2 N 2 + 1
12 11 expcom N 2 N + 1 2 2 N + 1 2 2 N 2 + 1
13 12 necon2bd N 2 2 N + 1 2 = 2 N 2 + 1 ¬ N + 1 2
14 10 13 syl5com N N 2 ¬ N + 1 2
15 zeo N N 2 N + 1 2
16 15 ord N ¬ N 2 N + 1 2
17 16 con1d N ¬ N + 1 2 N 2
18 14 17 impbid N N 2 ¬ N + 1 2