Metamath Proof Explorer


Theorem nnesq

Description: A positive integer is even iff its square is even. (Contributed by NM, 20-Aug-2001) (Revised by Mario Carneiro, 12-Sep-2015)

Ref Expression
Assertion nnesq N N 2 N 2 2

Proof

Step Hyp Ref Expression
1 nnz N N
2 zesq N N 2 N 2 2
3 1 2 syl N N 2 N 2 2
4 nnrp N N +
5 4 rphalfcld N N 2 +
6 5 rpgt0d N 0 < N 2
7 nnsqcl N N 2
8 7 nnrpd N N 2 +
9 8 rphalfcld N N 2 2 +
10 9 rpgt0d N 0 < N 2 2
11 6 10 2thd N 0 < N 2 0 < N 2 2
12 3 11 anbi12d N N 2 0 < N 2 N 2 2 0 < N 2 2
13 elnnz N 2 N 2 0 < N 2
14 elnnz N 2 2 N 2 2 0 < N 2 2
15 12 13 14 3bitr4g N N 2 N 2 2