Metamath Proof Explorer


Theorem ltoddhalfle

Description: An integer is less than half of an odd number iff it is less than or equal to the half of the predecessor of the odd number (which is an even number). (Contributed by AV, 29-Jun-2021)

Ref Expression
Assertion ltoddhalfle N ¬ 2 N M M < N 2 M N 1 2

Proof

Step Hyp Ref Expression
1 odd2np1 N ¬ 2 N n 2 n + 1 = N
2 halfre 1 2
3 2 a1i n 1 2
4 1red n 1
5 zre n n
6 3 4 5 3jca n 1 2 1 n
7 6 adantr n M 1 2 1 n
8 halflt1 1 2 < 1
9 axltadd 1 2 1 n 1 2 < 1 n + 1 2 < n + 1
10 7 8 9 mpisyl n M n + 1 2 < n + 1
11 zre M M
12 11 adantl n M M
13 5 3 readdcld n n + 1 2
14 13 adantr n M n + 1 2
15 peano2z n n + 1
16 15 zred n n + 1
17 16 adantr n M n + 1
18 lttr M n + 1 2 n + 1 M < n + 1 2 n + 1 2 < n + 1 M < n + 1
19 12 14 17 18 syl3anc n M M < n + 1 2 n + 1 2 < n + 1 M < n + 1
20 10 19 mpan2d n M M < n + 1 2 M < n + 1
21 zleltp1 M n M n M < n + 1
22 21 ancoms n M M n M < n + 1
23 20 22 sylibrd n M M < n + 1 2 M n
24 halfgt0 0 < 1 2
25 3 5 jca n 1 2 n
26 25 adantr n M 1 2 n
27 ltaddpos 1 2 n 0 < 1 2 n < n + 1 2
28 26 27 syl n M 0 < 1 2 n < n + 1 2
29 24 28 mpbii n M n < n + 1 2
30 5 adantr n M n
31 lelttr M n n + 1 2 M n n < n + 1 2 M < n + 1 2
32 12 30 14 31 syl3anc n M M n n < n + 1 2 M < n + 1 2
33 29 32 mpan2d n M M n M < n + 1 2
34 23 33 impbid n M M < n + 1 2 M n
35 zcn n n
36 1cnd n 1
37 2cnne0 2 2 0
38 37 a1i n 2 2 0
39 muldivdir n 1 2 2 0 2 n + 1 2 = n + 1 2
40 35 36 38 39 syl3anc n 2 n + 1 2 = n + 1 2
41 40 breq2d n M < 2 n + 1 2 M < n + 1 2
42 41 adantr n M M < 2 n + 1 2 M < n + 1 2
43 2z 2
44 43 a1i n 2
45 id n n
46 44 45 zmulcld n 2 n
47 46 zcnd n 2 n
48 47 adantr n M 2 n
49 pncan1 2 n 2 n + 1 - 1 = 2 n
50 48 49 syl n M 2 n + 1 - 1 = 2 n
51 50 oveq1d n M 2 n + 1 - 1 2 = 2 n 2
52 2cnd n 2
53 2ne0 2 0
54 53 a1i n 2 0
55 35 52 54 divcan3d n 2 n 2 = n
56 55 adantr n M 2 n 2 = n
57 51 56 eqtrd n M 2 n + 1 - 1 2 = n
58 57 breq2d n M M 2 n + 1 - 1 2 M n
59 34 42 58 3bitr4d n M M < 2 n + 1 2 M 2 n + 1 - 1 2
60 oveq1 2 n + 1 = N 2 n + 1 2 = N 2
61 60 breq2d 2 n + 1 = N M < 2 n + 1 2 M < N 2
62 oveq1 2 n + 1 = N 2 n + 1 - 1 = N 1
63 62 oveq1d 2 n + 1 = N 2 n + 1 - 1 2 = N 1 2
64 63 breq2d 2 n + 1 = N M 2 n + 1 - 1 2 M N 1 2
65 61 64 bibi12d 2 n + 1 = N M < 2 n + 1 2 M 2 n + 1 - 1 2 M < N 2 M N 1 2
66 59 65 syl5ibcom n M 2 n + 1 = N M < N 2 M N 1 2
67 66 ex n M 2 n + 1 = N M < N 2 M N 1 2
68 67 adantl N n M 2 n + 1 = N M < N 2 M N 1 2
69 68 com23 N n 2 n + 1 = N M M < N 2 M N 1 2
70 69 rexlimdva N n 2 n + 1 = N M M < N 2 M N 1 2
71 1 70 sylbid N ¬ 2 N M M < N 2 M N 1 2
72 71 3imp N ¬ 2 N M M < N 2 M N 1 2