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

Theorem rebtwn2z 10241
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 9361 . . 3 (𝐴 ∈ ℝ → (∃𝑚 ∈ ℤ 𝑚 < 𝐴 ∧ ∃𝑛 ∈ ℤ 𝐴 < 𝑛))
2 reeanv 2646 . . 3 (∃𝑚 ∈ ℤ ∃𝑛 ∈ ℤ (𝑚 < 𝐴𝐴 < 𝑛) ↔ (∃𝑚 ∈ ℤ 𝑚 < 𝐴 ∧ ∃𝑛 ∈ ℤ 𝐴 < 𝑛))
31, 2sylibr 134 . 2 (𝐴 ∈ ℝ → ∃𝑚 ∈ ℤ ∃𝑛 ∈ ℤ (𝑚 < 𝐴𝐴 < 𝑛))
4 simpll 527 . . . . 5 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝐴 ∈ ℝ)
5 simplrl 535 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝑚 ∈ ℤ)
65zred 9364 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝑚 ∈ ℝ)
7 simplrr 536 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝑛 ∈ ℤ)
87zred 9364 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝑛 ∈ ℝ)
9 simprl 529 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝑚 < 𝐴)
10 simprr 531 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝐴 < 𝑛)
116, 4, 8, 9, 10lttrd 8073 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝑚 < 𝑛)
12 znnsub 9293 . . . . . . . 8 ((𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ) → (𝑚 < 𝑛 ↔ (𝑛𝑚) ∈ ℕ))
1312ad2antlr 489 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → (𝑚 < 𝑛 ↔ (𝑛𝑚) ∈ ℕ))
1411, 13mpbid 147 . . . . . 6 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → (𝑛𝑚) ∈ ℕ)
15 elnnuz 9553 . . . . . . . 8 ((𝑛𝑚) ∈ ℕ ↔ (𝑛𝑚) ∈ (ℤ‘1))
16 eluzp1p1 9542 . . . . . . . 8 ((𝑛𝑚) ∈ (ℤ‘1) → ((𝑛𝑚) + 1) ∈ (ℤ‘(1 + 1)))
1715, 16sylbi 121 . . . . . . 7 ((𝑛𝑚) ∈ ℕ → ((𝑛𝑚) + 1) ∈ (ℤ‘(1 + 1)))
18 df-2 8967 . . . . . . . 8 2 = (1 + 1)
1918fveq2i 5514 . . . . . . 7 (ℤ‘2) = (ℤ‘(1 + 1))
2017, 19eleqtrrdi 2271 . . . . . 6 ((𝑛𝑚) ∈ ℕ → ((𝑛𝑚) + 1) ∈ (ℤ‘2))
2114, 20syl 14 . . . . 5 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → ((𝑛𝑚) + 1) ∈ (ℤ‘2))
225zcnd 9365 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝑚 ∈ ℂ)
237zcnd 9365 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝑛 ∈ ℂ)
2422, 23pncan3d 8261 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → (𝑚 + (𝑛𝑚)) = 𝑛)
2524, 8eqeltrd 2254 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → (𝑚 + (𝑛𝑚)) ∈ ℝ)
268, 6resubcld 8328 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → (𝑛𝑚) ∈ ℝ)
27 1red 7963 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 1 ∈ ℝ)
2826, 27readdcld 7977 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → ((𝑛𝑚) + 1) ∈ ℝ)
296, 28readdcld 7977 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → (𝑚 + ((𝑛𝑚) + 1)) ∈ ℝ)
3010, 24breqtrrd 4028 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝐴 < (𝑚 + (𝑛𝑚)))
3126ltp1d 8876 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → (𝑛𝑚) < ((𝑛𝑚) + 1))
3226, 28, 6, 31ltadd2dd 8369 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → (𝑚 + (𝑛𝑚)) < (𝑚 + ((𝑛𝑚) + 1)))
334, 25, 29, 30, 32lttrd 8073 . . . . . 6 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → 𝐴 < (𝑚 + ((𝑛𝑚) + 1)))
34 breq1 4003 . . . . . . . 8 (𝑦 = 𝑚 → (𝑦 < 𝐴𝑚 < 𝐴))
35 oveq1 5876 . . . . . . . . 9 (𝑦 = 𝑚 → (𝑦 + ((𝑛𝑚) + 1)) = (𝑚 + ((𝑛𝑚) + 1)))
3635breq2d 4012 . . . . . . . 8 (𝑦 = 𝑚 → (𝐴 < (𝑦 + ((𝑛𝑚) + 1)) ↔ 𝐴 < (𝑚 + ((𝑛𝑚) + 1))))
3734, 36anbi12d 473 . . . . . . 7 (𝑦 = 𝑚 → ((𝑦 < 𝐴𝐴 < (𝑦 + ((𝑛𝑚) + 1))) ↔ (𝑚 < 𝐴𝐴 < (𝑚 + ((𝑛𝑚) + 1)))))
3837rspcev 2841 . . . . . 6 ((𝑚 ∈ ℤ ∧ (𝑚 < 𝐴𝐴 < (𝑚 + ((𝑛𝑚) + 1)))) → ∃𝑦 ∈ ℤ (𝑦 < 𝐴𝐴 < (𝑦 + ((𝑛𝑚) + 1))))
395, 9, 33, 38syl12anc 1236 . . . . 5 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → ∃𝑦 ∈ ℤ (𝑦 < 𝐴𝐴 < (𝑦 + ((𝑛𝑚) + 1))))
40 rebtwn2zlemshrink 10240 . . . . 5 ((𝐴 ∈ ℝ ∧ ((𝑛𝑚) + 1) ∈ (ℤ‘2) ∧ ∃𝑦 ∈ ℤ (𝑦 < 𝐴𝐴 < (𝑦 + ((𝑛𝑚) + 1)))) → ∃𝑥 ∈ ℤ (𝑥 < 𝐴𝐴 < (𝑥 + 2)))
414, 21, 39, 40syl3anc 1238 . . . 4 (((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) ∧ (𝑚 < 𝐴𝐴 < 𝑛)) → ∃𝑥 ∈ ℤ (𝑥 < 𝐴𝐴 < (𝑥 + 2)))
4241ex 115 . . 3 ((𝐴 ∈ ℝ ∧ (𝑚 ∈ ℤ ∧ 𝑛 ∈ ℤ)) → ((𝑚 < 𝐴𝐴 < 𝑛) → ∃𝑥 ∈ ℤ (𝑥 < 𝐴𝐴 < (𝑥 + 2))))
4342rexlimdvva 2602 . 2 (𝐴 ∈ ℝ → (∃𝑚 ∈ ℤ ∃𝑛 ∈ ℤ (𝑚 < 𝐴𝐴 < 𝑛) → ∃𝑥 ∈ ℤ (𝑥 < 𝐴𝐴 < (𝑥 + 2))))
443, 43mpd 13 1 (𝐴 ∈ ℝ → ∃𝑥 ∈ ℤ (𝑥 < 𝐴𝐴 < (𝑥 + 2)))
Colors of variables: wff set class
Syntax hints:  wi 4  wa 104  wb 105  wcel 2148  wrex 2456   class class class wbr 4000  cfv 5212  (class class class)co 5869  cr 7801  1c1 7803   + caddc 7805   < clt 7982  cmin 8118  cn 8908  2c2 8959  cz 9242  cuz 9517
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 106  ax-ia2 107  ax-ia3 108  ax-in1 614  ax-in2 615  ax-io 709  ax-5 1447  ax-7 1448  ax-gen 1449  ax-ie1 1493  ax-ie2 1494  ax-8 1504  ax-10 1505  ax-11 1506  ax-i12 1507  ax-bndl 1509  ax-4 1510  ax-17 1526  ax-i9 1530  ax-ial 1534  ax-i5r 1535  ax-13 2150  ax-14 2151  ax-ext 2159  ax-sep 4118  ax-pow 4171  ax-pr 4206  ax-un 4430  ax-setind 4533  ax-cnex 7893  ax-resscn 7894  ax-1cn 7895  ax-1re 7896  ax-icn 7897  ax-addcl 7898  ax-addrcl 7899  ax-mulcl 7900  ax-addcom 7902  ax-addass 7904  ax-distr 7906  ax-i2m1 7907  ax-0lt1 7908  ax-0id 7910  ax-rnegex 7911  ax-cnre 7913  ax-pre-ltirr 7914  ax-pre-ltwlin 7915  ax-pre-lttrn 7916  ax-pre-ltadd 7918  ax-arch 7921
This theorem depends on definitions:  df-bi 117  df-3or 979  df-3an 980  df-tru 1356  df-fal 1359  df-nf 1461  df-sb 1763  df-eu 2029  df-mo 2030  df-clab 2164  df-cleq 2170  df-clel 2173  df-nfc 2308  df-ne 2348  df-nel 2443  df-ral 2460  df-rex 2461  df-reu 2462  df-rab 2464  df-v 2739  df-sbc 2963  df-dif 3131  df-un 3133  df-in 3135  df-ss 3142  df-pw 3576  df-sn 3597  df-pr 3598  df-op 3600  df-uni 3808  df-int 3843  df-br 4001  df-opab 4062  df-mpt 4063  df-id 4290  df-xp 4629  df-rel 4630  df-cnv 4631  df-co 4632  df-dm 4633  df-rn 4634  df-res 4635  df-ima 4636  df-iota 5174  df-fun 5214  df-fn 5215  df-f 5216  df-fv 5220  df-riota 5825  df-ov 5872  df-oprab 5873  df-mpo 5874  df-pnf 7984  df-mnf 7985  df-xr 7986  df-ltxr 7987  df-le 7988  df-sub 8120  df-neg 8121  df-inn 8909  df-2 8967  df-n0 9166  df-z 9243  df-uz 9518
This theorem is referenced by:  qbtwnre  10243
  Copyright terms: Public domain W3C validator