MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  ltoddhalfle Structured version   Visualization version   GIF version

Theorem ltoddhalfle 15698
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.)
Assertion
Ref Expression
ltoddhalfle ((𝑁 ∈ ℤ ∧ ¬ 2 ∥ 𝑁𝑀 ∈ ℤ) → (𝑀 < (𝑁 / 2) ↔ 𝑀 ≤ ((𝑁 − 1) / 2)))

Proof of Theorem ltoddhalfle
Dummy variable 𝑛 is distinct from all other variables.
StepHypRef Expression
1 odd2np1 15678 . . 3 (𝑁 ∈ ℤ → (¬ 2 ∥ 𝑁 ↔ ∃𝑛 ∈ ℤ ((2 · 𝑛) + 1) = 𝑁))
2 halfre 11839 . . . . . . . . . . . . . . . 16 (1 / 2) ∈ ℝ
32a1i 11 . . . . . . . . . . . . . . 15 (𝑛 ∈ ℤ → (1 / 2) ∈ ℝ)
4 1red 10630 . . . . . . . . . . . . . . 15 (𝑛 ∈ ℤ → 1 ∈ ℝ)
5 zre 11973 . . . . . . . . . . . . . . 15 (𝑛 ∈ ℤ → 𝑛 ∈ ℝ)
63, 4, 53jca 1120 . . . . . . . . . . . . . 14 (𝑛 ∈ ℤ → ((1 / 2) ∈ ℝ ∧ 1 ∈ ℝ ∧ 𝑛 ∈ ℝ))
76adantr 481 . . . . . . . . . . . . 13 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → ((1 / 2) ∈ ℝ ∧ 1 ∈ ℝ ∧ 𝑛 ∈ ℝ))
8 halflt1 11843 . . . . . . . . . . . . 13 (1 / 2) < 1
9 axltadd 10702 . . . . . . . . . . . . 13 (((1 / 2) ∈ ℝ ∧ 1 ∈ ℝ ∧ 𝑛 ∈ ℝ) → ((1 / 2) < 1 → (𝑛 + (1 / 2)) < (𝑛 + 1)))
107, 8, 9mpisyl 21 . . . . . . . . . . . 12 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑛 + (1 / 2)) < (𝑛 + 1))
11 zre 11973 . . . . . . . . . . . . . 14 (𝑀 ∈ ℤ → 𝑀 ∈ ℝ)
1211adantl 482 . . . . . . . . . . . . 13 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → 𝑀 ∈ ℝ)
135, 3readdcld 10658 . . . . . . . . . . . . . 14 (𝑛 ∈ ℤ → (𝑛 + (1 / 2)) ∈ ℝ)
1413adantr 481 . . . . . . . . . . . . 13 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑛 + (1 / 2)) ∈ ℝ)
15 peano2z 12011 . . . . . . . . . . . . . . 15 (𝑛 ∈ ℤ → (𝑛 + 1) ∈ ℤ)
1615zred 12075 . . . . . . . . . . . . . 14 (𝑛 ∈ ℤ → (𝑛 + 1) ∈ ℝ)
1716adantr 481 . . . . . . . . . . . . 13 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑛 + 1) ∈ ℝ)
18 lttr 10705 . . . . . . . . . . . . 13 ((𝑀 ∈ ℝ ∧ (𝑛 + (1 / 2)) ∈ ℝ ∧ (𝑛 + 1) ∈ ℝ) → ((𝑀 < (𝑛 + (1 / 2)) ∧ (𝑛 + (1 / 2)) < (𝑛 + 1)) → 𝑀 < (𝑛 + 1)))
1912, 14, 17, 18syl3anc 1363 . . . . . . . . . . . 12 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → ((𝑀 < (𝑛 + (1 / 2)) ∧ (𝑛 + (1 / 2)) < (𝑛 + 1)) → 𝑀 < (𝑛 + 1)))
2010, 19mpan2d 690 . . . . . . . . . . 11 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑀 < (𝑛 + (1 / 2)) → 𝑀 < (𝑛 + 1)))
21 zleltp1 12021 . . . . . . . . . . . 12 ((𝑀 ∈ ℤ ∧ 𝑛 ∈ ℤ) → (𝑀𝑛𝑀 < (𝑛 + 1)))
2221ancoms 459 . . . . . . . . . . 11 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑀𝑛𝑀 < (𝑛 + 1)))
2320, 22sylibrd 260 . . . . . . . . . 10 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑀 < (𝑛 + (1 / 2)) → 𝑀𝑛))
24 halfgt0 11841 . . . . . . . . . . . 12 0 < (1 / 2)
253, 5jca 512 . . . . . . . . . . . . . 14 (𝑛 ∈ ℤ → ((1 / 2) ∈ ℝ ∧ 𝑛 ∈ ℝ))
2625adantr 481 . . . . . . . . . . . . 13 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → ((1 / 2) ∈ ℝ ∧ 𝑛 ∈ ℝ))
27 ltaddpos 11118 . . . . . . . . . . . . 13 (((1 / 2) ∈ ℝ ∧ 𝑛 ∈ ℝ) → (0 < (1 / 2) ↔ 𝑛 < (𝑛 + (1 / 2))))
2826, 27syl 17 . . . . . . . . . . . 12 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (0 < (1 / 2) ↔ 𝑛 < (𝑛 + (1 / 2))))
2924, 28mpbii 234 . . . . . . . . . . 11 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → 𝑛 < (𝑛 + (1 / 2)))
305adantr 481 . . . . . . . . . . . 12 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → 𝑛 ∈ ℝ)
31 lelttr 10719 . . . . . . . . . . . 12 ((𝑀 ∈ ℝ ∧ 𝑛 ∈ ℝ ∧ (𝑛 + (1 / 2)) ∈ ℝ) → ((𝑀𝑛𝑛 < (𝑛 + (1 / 2))) → 𝑀 < (𝑛 + (1 / 2))))
3212, 30, 14, 31syl3anc 1363 . . . . . . . . . . 11 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → ((𝑀𝑛𝑛 < (𝑛 + (1 / 2))) → 𝑀 < (𝑛 + (1 / 2))))
3329, 32mpan2d 690 . . . . . . . . . 10 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑀𝑛𝑀 < (𝑛 + (1 / 2))))
3423, 33impbid 213 . . . . . . . . 9 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑀 < (𝑛 + (1 / 2)) ↔ 𝑀𝑛))
35 zcn 11974 . . . . . . . . . . . 12 (𝑛 ∈ ℤ → 𝑛 ∈ ℂ)
36 1cnd 10624 . . . . . . . . . . . 12 (𝑛 ∈ ℤ → 1 ∈ ℂ)
37 2cnne0 11835 . . . . . . . . . . . . 13 (2 ∈ ℂ ∧ 2 ≠ 0)
3837a1i 11 . . . . . . . . . . . 12 (𝑛 ∈ ℤ → (2 ∈ ℂ ∧ 2 ≠ 0))
39 muldivdir 11321 . . . . . . . . . . . 12 ((𝑛 ∈ ℂ ∧ 1 ∈ ℂ ∧ (2 ∈ ℂ ∧ 2 ≠ 0)) → (((2 · 𝑛) + 1) / 2) = (𝑛 + (1 / 2)))
4035, 36, 38, 39syl3anc 1363 . . . . . . . . . . 11 (𝑛 ∈ ℤ → (((2 · 𝑛) + 1) / 2) = (𝑛 + (1 / 2)))
4140breq2d 5069 . . . . . . . . . 10 (𝑛 ∈ ℤ → (𝑀 < (((2 · 𝑛) + 1) / 2) ↔ 𝑀 < (𝑛 + (1 / 2))))
4241adantr 481 . . . . . . . . 9 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑀 < (((2 · 𝑛) + 1) / 2) ↔ 𝑀 < (𝑛 + (1 / 2))))
43 2z 12002 . . . . . . . . . . . . . . . . 17 2 ∈ ℤ
4443a1i 11 . . . . . . . . . . . . . . . 16 (𝑛 ∈ ℤ → 2 ∈ ℤ)
45 id 22 . . . . . . . . . . . . . . . 16 (𝑛 ∈ ℤ → 𝑛 ∈ ℤ)
4644, 45zmulcld 12081 . . . . . . . . . . . . . . 15 (𝑛 ∈ ℤ → (2 · 𝑛) ∈ ℤ)
4746zcnd 12076 . . . . . . . . . . . . . 14 (𝑛 ∈ ℤ → (2 · 𝑛) ∈ ℂ)
4847adantr 481 . . . . . . . . . . . . 13 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (2 · 𝑛) ∈ ℂ)
49 pncan1 11052 . . . . . . . . . . . . 13 ((2 · 𝑛) ∈ ℂ → (((2 · 𝑛) + 1) − 1) = (2 · 𝑛))
5048, 49syl 17 . . . . . . . . . . . 12 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (((2 · 𝑛) + 1) − 1) = (2 · 𝑛))
5150oveq1d 7160 . . . . . . . . . . 11 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → ((((2 · 𝑛) + 1) − 1) / 2) = ((2 · 𝑛) / 2))
52 2cnd 11703 . . . . . . . . . . . . 13 (𝑛 ∈ ℤ → 2 ∈ ℂ)
53 2ne0 11729 . . . . . . . . . . . . . 14 2 ≠ 0
5453a1i 11 . . . . . . . . . . . . 13 (𝑛 ∈ ℤ → 2 ≠ 0)
5535, 52, 54divcan3d 11409 . . . . . . . . . . . 12 (𝑛 ∈ ℤ → ((2 · 𝑛) / 2) = 𝑛)
5655adantr 481 . . . . . . . . . . 11 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → ((2 · 𝑛) / 2) = 𝑛)
5751, 56eqtrd 2853 . . . . . . . . . 10 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → ((((2 · 𝑛) + 1) − 1) / 2) = 𝑛)
5857breq2d 5069 . . . . . . . . 9 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑀 ≤ ((((2 · 𝑛) + 1) − 1) / 2) ↔ 𝑀𝑛))
5934, 42, 583bitr4d 312 . . . . . . . 8 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑀 < (((2 · 𝑛) + 1) / 2) ↔ 𝑀 ≤ ((((2 · 𝑛) + 1) − 1) / 2)))
60 oveq1 7152 . . . . . . . . . 10 (((2 · 𝑛) + 1) = 𝑁 → (((2 · 𝑛) + 1) / 2) = (𝑁 / 2))
6160breq2d 5069 . . . . . . . . 9 (((2 · 𝑛) + 1) = 𝑁 → (𝑀 < (((2 · 𝑛) + 1) / 2) ↔ 𝑀 < (𝑁 / 2)))
62 oveq1 7152 . . . . . . . . . . 11 (((2 · 𝑛) + 1) = 𝑁 → (((2 · 𝑛) + 1) − 1) = (𝑁 − 1))
6362oveq1d 7160 . . . . . . . . . 10 (((2 · 𝑛) + 1) = 𝑁 → ((((2 · 𝑛) + 1) − 1) / 2) = ((𝑁 − 1) / 2))
6463breq2d 5069 . . . . . . . . 9 (((2 · 𝑛) + 1) = 𝑁 → (𝑀 ≤ ((((2 · 𝑛) + 1) − 1) / 2) ↔ 𝑀 ≤ ((𝑁 − 1) / 2)))
6561, 64bibi12d 347 . . . . . . . 8 (((2 · 𝑛) + 1) = 𝑁 → ((𝑀 < (((2 · 𝑛) + 1) / 2) ↔ 𝑀 ≤ ((((2 · 𝑛) + 1) − 1) / 2)) ↔ (𝑀 < (𝑁 / 2) ↔ 𝑀 ≤ ((𝑁 − 1) / 2))))
6659, 65syl5ibcom 246 . . . . . . 7 ((𝑛 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (((2 · 𝑛) + 1) = 𝑁 → (𝑀 < (𝑁 / 2) ↔ 𝑀 ≤ ((𝑁 − 1) / 2))))
6766ex 413 . . . . . 6 (𝑛 ∈ ℤ → (𝑀 ∈ ℤ → (((2 · 𝑛) + 1) = 𝑁 → (𝑀 < (𝑁 / 2) ↔ 𝑀 ≤ ((𝑁 − 1) / 2)))))
6867adantl 482 . . . . 5 ((𝑁 ∈ ℤ ∧ 𝑛 ∈ ℤ) → (𝑀 ∈ ℤ → (((2 · 𝑛) + 1) = 𝑁 → (𝑀 < (𝑁 / 2) ↔ 𝑀 ≤ ((𝑁 − 1) / 2)))))
6968com23 86 . . . 4 ((𝑁 ∈ ℤ ∧ 𝑛 ∈ ℤ) → (((2 · 𝑛) + 1) = 𝑁 → (𝑀 ∈ ℤ → (𝑀 < (𝑁 / 2) ↔ 𝑀 ≤ ((𝑁 − 1) / 2)))))
7069rexlimdva 3281 . . 3 (𝑁 ∈ ℤ → (∃𝑛 ∈ ℤ ((2 · 𝑛) + 1) = 𝑁 → (𝑀 ∈ ℤ → (𝑀 < (𝑁 / 2) ↔ 𝑀 ≤ ((𝑁 − 1) / 2)))))
711, 70sylbid 241 . 2 (𝑁 ∈ ℤ → (¬ 2 ∥ 𝑁 → (𝑀 ∈ ℤ → (𝑀 < (𝑁 / 2) ↔ 𝑀 ≤ ((𝑁 − 1) / 2)))))
72713imp 1103 1 ((𝑁 ∈ ℤ ∧ ¬ 2 ∥ 𝑁𝑀 ∈ ℤ) → (𝑀 < (𝑁 / 2) ↔ 𝑀 ≤ ((𝑁 − 1) / 2)))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 207  wa 396  w3a 1079   = wceq 1528  wcel 2105  wne 3013  wrex 3136   class class class wbr 5057  (class class class)co 7145  cc 10523  cr 10524  0cc0 10525  1c1 10526   + caddc 10528   · cmul 10530   < clt 10663  cle 10664  cmin 10858   / cdiv 11285  2c2 11680  cz 11969  cdvds 15595
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1787  ax-4 1801  ax-5 1902  ax-6 1961  ax-7 2006  ax-8 2107  ax-9 2115  ax-10 2136  ax-11 2151  ax-12 2167  ax-ext 2790  ax-sep 5194  ax-nul 5201  ax-pow 5257  ax-pr 5320  ax-un 7450  ax-resscn 10582  ax-1cn 10583  ax-icn 10584  ax-addcl 10585  ax-addrcl 10586  ax-mulcl 10587  ax-mulrcl 10588  ax-mulcom 10589  ax-addass 10590  ax-mulass 10591  ax-distr 10592  ax-i2m1 10593  ax-1ne0 10594  ax-1rid 10595  ax-rnegex 10596  ax-rrecex 10597  ax-cnre 10598  ax-pre-lttri 10599  ax-pre-lttrn 10600  ax-pre-ltadd 10601  ax-pre-mulgt0 10602
This theorem depends on definitions:  df-bi 208  df-an 397  df-or 842  df-3or 1080  df-3an 1081  df-tru 1531  df-ex 1772  df-nf 1776  df-sb 2061  df-mo 2615  df-eu 2647  df-clab 2797  df-cleq 2811  df-clel 2890  df-nfc 2960  df-ne 3014  df-nel 3121  df-ral 3140  df-rex 3141  df-reu 3142  df-rmo 3143  df-rab 3144  df-v 3494  df-sbc 3770  df-csb 3881  df-dif 3936  df-un 3938  df-in 3940  df-ss 3949  df-pss 3951  df-nul 4289  df-if 4464  df-pw 4537  df-sn 4558  df-pr 4560  df-tp 4562  df-op 4564  df-uni 4831  df-iun 4912  df-br 5058  df-opab 5120  df-mpt 5138  df-tr 5164  df-id 5453  df-eprel 5458  df-po 5467  df-so 5468  df-fr 5507  df-we 5509  df-xp 5554  df-rel 5555  df-cnv 5556  df-co 5557  df-dm 5558  df-rn 5559  df-res 5560  df-ima 5561  df-pred 6141  df-ord 6187  df-on 6188  df-lim 6189  df-suc 6190  df-iota 6307  df-fun 6350  df-fn 6351  df-f 6352  df-f1 6353  df-fo 6354  df-f1o 6355  df-fv 6356  df-riota 7103  df-ov 7148  df-oprab 7149  df-mpo 7150  df-om 7570  df-wrecs 7936  df-recs 7997  df-rdg 8035  df-er 8278  df-en 8498  df-dom 8499  df-sdom 8500  df-pnf 10665  df-mnf 10666  df-xr 10667  df-ltxr 10668  df-le 10669  df-sub 10860  df-neg 10861  df-div 11286  df-nn 11627  df-2 11688  df-n0 11886  df-z 11970  df-dvds 15596
This theorem is referenced by:  gausslemma2dlem1a  25868
  Copyright terms: Public domain W3C validator