ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  rebtwn2z GIF version

Theorem rebtwn2z 10154
Description: A real number can be bounded by integers above and below which are two apart.

The proof starts by finding two integers which are less than and greater than the given real number. Then this range can be shrunk by choosing an integer in between the endpoints of the range and then deciding which half of the range to keep based on weak linearity, and iterating until the range consists of integers which are two apart. (Contributed by Jim Kingdon, 13-Oct-2021.)

Assertion
Ref Expression
rebtwn2z (𝐴 ∈ ℝ → ∃𝑥 ∈ ℤ (𝑥 < 𝐴𝐴 < (𝑥 + 2)))
Distinct variable group:   𝑥,𝐴

Proof of Theorem rebtwn2z
Dummy variables 𝑚 𝑛 𝑦 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 btwnz 9283 . . 3 (𝐴 ∈ ℝ → (∃𝑚 ∈ ℤ 𝑚 < 𝐴 ∧ ∃𝑛 ∈ ℤ 𝐴 < 𝑛))
2 reeanv 2626 . . 3 (∃𝑚 ∈ ℤ ∃𝑛 ∈ ℤ (𝑚 < 𝐴𝐴 < 𝑛) ↔ (∃𝑚 ∈ ℤ 𝑚 < 𝐴 ∧ ∃𝑛 ∈ ℤ 𝐴 < 𝑛))
31, 2sylibr 133 . 2 (𝐴 ∈ ℝ → ∃𝑚 ∈ ℤ ∃𝑛 ∈ ℤ (𝑚 < 𝐴𝐴 < 𝑛))
4 simpll 519 . . . . 5 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝐴 ∈ ℝ)
5 simplrl 525 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝑚 ∈ ℤ)
65zred 9286 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝑚 ∈ ℝ)
7 simplrr 526 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝑛 ∈ ℤ)
87zred 9286 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝑛 ∈ ℝ)
9 simprl 521 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝑚 < 𝐴)
10 simprr 522 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝐴 < 𝑛)
116, 4, 8, 9, 10lttrd 8001 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝑚 < 𝑛)
12 znnsub 9218 . . . . . . . 8 ((𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ) → (𝑚 < 𝑛 ↔ (𝑛𝑚) ∈ ℕ))
1312ad2antlr 481 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → (𝑚 < 𝑛 ↔ (𝑛𝑚) ∈ ℕ))
1411, 13mpbid 146 . . . . . 6 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → (𝑛𝑚) ∈ ℕ)
15 elnnuz 9475 . . . . . . . 8 ((𝑛𝑚) ∈ ℕ ↔ (𝑛𝑚) ∈ (ℤ‘1))
16 eluzp1p1 9464 . . . . . . . 8 ((𝑛𝑚) ∈ (ℤ‘1) → ((𝑛𝑚) + 1) ∈ (ℤ‘(1 + 1)))
1715, 16sylbi 120 . . . . . . 7 ((𝑛𝑚) ∈ ℕ → ((𝑛𝑚) + 1) ∈ (ℤ‘(1 + 1)))
18 df-2 8892 . . . . . . . 8 2 = (1 + 1)
1918fveq2i 5471 . . . . . . 7 (ℤ‘2) = (ℤ‘(1 + 1))
2017, 19eleqtrrdi 2251 . . . . . 6 ((𝑛𝑚) ∈ ℕ → ((𝑛𝑚) + 1) ∈ (ℤ‘2))
2114, 20syl 14 . . . . 5 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → ((𝑛𝑚) + 1) ∈ (ℤ‘2))
225zcnd 9287 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝑚 ∈ ℂ)
237zcnd 9287 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝑛 ∈ ℂ)
2422, 23pncan3d 8189 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → (𝑚 + (𝑛𝑚)) = 𝑛)
2524, 8eqeltrd 2234 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → (𝑚 + (𝑛𝑚)) ∈ ℝ)
268, 6resubcld 8256 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → (𝑛𝑚) ∈ ℝ)
27 1red 7893 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 1 ∈ ℝ)
2826, 27readdcld 7907 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → ((𝑛𝑚) + 1) ∈ ℝ)
296, 28readdcld 7907 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → (𝑚 + ((𝑛𝑚) + 1)) ∈ ℝ)
3010, 24breqtrrd 3992 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝐴 < (𝑚 + (𝑛𝑚)))
3126ltp1d 8801 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → (𝑛𝑚) < ((𝑛𝑚) + 1))
3226, 28, 6, 31ltadd2dd 8297 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → (𝑚 + (𝑛𝑚)) < (𝑚 + ((𝑛𝑚) + 1)))
334, 25, 29, 30, 32lttrd 8001 . . . . . 6 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝐴 < (𝑚 + ((𝑛𝑚) + 1)))
34 breq1 3968 . . . . . . . 8 (𝑦 = 𝑚 → (𝑦 < 𝐴𝑚 < 𝐴))
35 oveq1 5831 . . . . . . . . 9 (𝑦 = 𝑚 → (𝑦 + ((𝑛𝑚) + 1)) = (𝑚 + ((𝑛𝑚) + 1)))
3635breq2d 3977 . . . . . . . 8 (𝑦 = 𝑚 → (𝐴 < (𝑦 + ((𝑛𝑚) + 1)) ↔ 𝐴 < (𝑚 + ((𝑛𝑚) + 1))))
3734, 36anbi12d 465 . . . . . . 7 (𝑦 = 𝑚 → ((𝑦 < 𝐴𝐴 < (𝑦 + ((𝑛𝑚) + 1))) ↔ (𝑚 < 𝐴𝐴 < (𝑚 + ((𝑛𝑚) + 1)))))
3837rspcev 2816 . . . . . 6 ((𝑚 ∈ ℤ ∧ (𝑚 < 𝐴𝐴 < (𝑚 + ((𝑛𝑚) + 1)))) → ∃𝑦 ∈ ℤ (𝑦 < 𝐴𝐴 < (𝑦 + ((𝑛𝑚) + 1))))
395, 9, 33, 38syl12anc 1218 . . . . 5 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → ∃𝑦 ∈ ℤ (𝑦 < 𝐴𝐴 < (𝑦 + ((𝑛𝑚) + 1))))
40 rebtwn2zlemshrink 10153 . . . . 5 ((𝐴 ∈ ℝ ∧ ((𝑛𝑚) + 1) ∈ (ℤ‘2) ∧ ∃𝑦 ∈ ℤ (𝑦 < 𝐴𝐴 < (𝑦 + ((𝑛𝑚) + 1)))) → ∃𝑥 ∈ ℤ (𝑥 < 𝐴𝐴 < (𝑥 + 2)))
414, 21, 39, 40syl3anc 1220 . . . 4 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → ∃𝑥 ∈ ℤ (𝑥 < 𝐴𝐴 < (𝑥 + 2)))
4241ex 114 . . 3 ((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) → ((𝑚 < 𝐴𝐴 < 𝑛) → ∃𝑥 ∈ ℤ (𝑥 < 𝐴𝐴 < (𝑥 + 2))))
4342rexlimdvva 2582 . 2 (𝐴 ∈ ℝ → (∃𝑚 ∈ ℤ ∃𝑛 ∈ ℤ (𝑚 < 𝐴𝐴 < 𝑛) → ∃𝑥 ∈ ℤ (𝑥 < 𝐴𝐴 < (𝑥 + 2))))
443, 43mpd 13 1 (𝐴 ∈ ℝ → ∃𝑥 ∈ ℤ (𝑥 < 𝐴𝐴 < (𝑥 + 2)))
Colors of variables: wff set class
Syntax hints:  wi 4  wa 103  wb 104  wcel 2128  wrex 2436   class class class wbr 3965  cfv 5170  (class class class)co 5824  cr 7731  1c1 7733   + caddc 7735   < clt 7912  cmin 8046  cn 8833  2c2 8884  cz 9167  cuz 9439
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 604  ax-in2 605  ax-io 699  ax-5 1427  ax-7 1428  ax-gen 1429  ax-ie1 1473  ax-ie2 1474  ax-8 1484  ax-10 1485  ax-11 1486  ax-i12 1487  ax-bndl 1489  ax-4 1490  ax-17 1506  ax-i9 1510  ax-ial 1514  ax-i5r 1515  ax-13 2130  ax-14 2131  ax-ext 2139  ax-sep 4082  ax-pow 4135  ax-pr 4169  ax-un 4393  ax-setind 4496  ax-cnex 7823  ax-resscn 7824  ax-1cn 7825  ax-1re 7826  ax-icn 7827  ax-addcl 7828  ax-addrcl 7829  ax-mulcl 7830  ax-addcom 7832  ax-addass 7834  ax-distr 7836  ax-i2m1 7837  ax-0lt1 7838  ax-0id 7840  ax-rnegex 7841  ax-cnre 7843  ax-pre-ltirr 7844  ax-pre-ltwlin 7845  ax-pre-lttrn 7846  ax-pre-ltadd 7848  ax-arch 7851
This theorem depends on definitions:  df-bi 116  df-3or 964  df-3an 965  df-tru 1338  df-fal 1341  df-nf 1441  df-sb 1743  df-eu 2009  df-mo 2010  df-clab 2144  df-cleq 2150  df-clel 2153  df-nfc 2288  df-ne 2328  df-nel 2423  df-ral 2440  df-rex 2441  df-reu 2442  df-rab 2444  df-v 2714  df-sbc 2938  df-dif 3104  df-un 3106  df-in 3108  df-ss 3115  df-pw 3545  df-sn 3566  df-pr 3567  df-op 3569  df-uni 3773  df-int 3808  df-br 3966  df-opab 4026  df-mpt 4027  df-id 4253  df-xp 4592  df-rel 4593  df-cnv 4594  df-co 4595  df-dm 4596  df-rn 4597  df-res 4598  df-ima 4599  df-iota 5135  df-fun 5172  df-fn 5173  df-f 5174  df-fv 5178  df-riota 5780  df-ov 5827  df-oprab 5828  df-mpo 5829  df-pnf 7914  df-mnf 7915  df-xr 7916  df-ltxr 7917  df-le 7918  df-sub 8048  df-neg 8049  df-inn 8834  df-2 8892  df-n0 9091  df-z 9168  df-uz 9440
This theorem is referenced by:  qbtwnre  10156
  Copyright terms: Public domain W3C validator