Metamath Proof Explorer


Theorem 2tnp1ge0ge0

Description: Two times an integer plus one is not negative iff the integer is not negative. (Contributed by AV, 19-Jun-2021) (Proof shortened by AV, 10-Jul-2022)

Ref Expression
Assertion 2tnp1ge0ge0 N 0 2 N + 1 0 N

Proof

Step Hyp Ref Expression
1 2z 2
2 1 a1i N 2
3 id N N
4 2 3 zmulcld N 2 N
5 4 peano2zd N 2 N + 1
6 5 zred N 2 N + 1
7 2rp 2 +
8 7 a1i N 2 +
9 6 8 ge0divd N 0 2 N + 1 0 2 N + 1 2
10 4 zcnd N 2 N
11 1cnd N 1
12 2cnne0 2 2 0
13 12 a1i N 2 2 0
14 divdir 2 N 1 2 2 0 2 N + 1 2 = 2 N 2 + 1 2
15 10 11 13 14 syl3anc N 2 N + 1 2 = 2 N 2 + 1 2
16 zcn N N
17 2cnd N 2
18 2ne0 2 0
19 18 a1i N 2 0
20 16 17 19 divcan3d N 2 N 2 = N
21 20 oveq1d N 2 N 2 + 1 2 = N + 1 2
22 15 21 eqtrd N 2 N + 1 2 = N + 1 2
23 22 breq2d N 0 2 N + 1 2 0 N + 1 2
24 zre N N
25 halfre 1 2
26 25 a1i N 1 2
27 24 26 readdcld N N + 1 2
28 halfge0 0 1 2
29 24 26 addge01d N 0 1 2 N N + 1 2
30 28 29 mpbii N N N + 1 2
31 1red N 1
32 halflt1 1 2 < 1
33 32 a1i N 1 2 < 1
34 26 31 24 33 ltadd2dd N N + 1 2 < N + 1
35 btwnzge0 N + 1 2 N N N + 1 2 N + 1 2 < N + 1 0 N + 1 2 0 N
36 27 3 30 34 35 syl22anc N 0 N + 1 2 0 N
37 9 23 36 3bitrd N 0 2 N + 1 0 N