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

Theorem rebtwn2z 9631
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  |-  ( A  e.  RR  ->  E. x  e.  ZZ  ( x  < 
A  /\  A  <  ( x  +  2 ) ) )
Distinct variable group:    x, A

Proof of Theorem rebtwn2z
Dummy variables  m  n  y are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 btwnz 8835 . . 3  |-  ( A  e.  RR  ->  ( E. m  e.  ZZ  m  <  A  /\  E. n  e.  ZZ  A  <  n ) )
2 reeanv 2536 . . 3  |-  ( E. m  e.  ZZ  E. n  e.  ZZ  (
m  <  A  /\  A  <  n )  <->  ( E. m  e.  ZZ  m  <  A  /\  E. n  e.  ZZ  A  <  n
) )
31, 2sylibr 132 . 2  |-  ( A  e.  RR  ->  E. m  e.  ZZ  E. n  e.  ZZ  ( m  < 
A  /\  A  <  n ) )
4 simpll 496 . . . . 5  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  ->  A  e.  RR )
5 simplrl 502 . . . . . . . . 9  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  ->  m  e.  ZZ )
65zred 8838 . . . . . . . 8  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  ->  m  e.  RR )
7 simplrr 503 . . . . . . . . 9  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  ->  n  e.  ZZ )
87zred 8838 . . . . . . . 8  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  ->  n  e.  RR )
9 simprl 498 . . . . . . . 8  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  ->  m  <  A )
10 simprr 499 . . . . . . . 8  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  ->  A  <  n )
116, 4, 8, 9, 10lttrd 7588 . . . . . . 7  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  ->  m  <  n )
12 znnsub 8771 . . . . . . . 8  |-  ( ( m  e.  ZZ  /\  n  e.  ZZ )  ->  ( m  <  n  <->  ( n  -  m )  e.  NN ) )
1312ad2antlr 473 . . . . . . 7  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  -> 
( m  <  n  <->  ( n  -  m )  e.  NN ) )
1411, 13mpbid 145 . . . . . 6  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  -> 
( n  -  m
)  e.  NN )
15 elnnuz 9024 . . . . . . . 8  |-  ( ( n  -  m )  e.  NN  <->  ( n  -  m )  e.  (
ZZ>= `  1 ) )
16 eluzp1p1 9013 . . . . . . . 8  |-  ( ( n  -  m )  e.  ( ZZ>= `  1
)  ->  ( (
n  -  m )  +  1 )  e.  ( ZZ>= `  ( 1  +  1 ) ) )
1715, 16sylbi 119 . . . . . . 7  |-  ( ( n  -  m )  e.  NN  ->  (
( n  -  m
)  +  1 )  e.  ( ZZ>= `  (
1  +  1 ) ) )
18 df-2 8452 . . . . . . . 8  |-  2  =  ( 1  +  1 )
1918fveq2i 5292 . . . . . . 7  |-  ( ZZ>= ` 
2 )  =  (
ZZ>= `  ( 1  +  1 ) )
2017, 19syl6eleqr 2181 . . . . . 6  |-  ( ( n  -  m )  e.  NN  ->  (
( n  -  m
)  +  1 )  e.  ( ZZ>= `  2
) )
2114, 20syl 14 . . . . 5  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  -> 
( ( n  -  m )  +  1 )  e.  ( ZZ>= ` 
2 ) )
225zcnd 8839 . . . . . . . . 9  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  ->  m  e.  CC )
237zcnd 8839 . . . . . . . . 9  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  ->  n  e.  CC )
2422, 23pncan3d 7775 . . . . . . . 8  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  -> 
( m  +  ( n  -  m ) )  =  n )
2524, 8eqeltrd 2164 . . . . . . 7  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  -> 
( m  +  ( n  -  m ) )  e.  RR )
268, 6resubcld 7838 . . . . . . . . 9  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  -> 
( n  -  m
)  e.  RR )
27 1red 7482 . . . . . . . . 9  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  -> 
1  e.  RR )
2826, 27readdcld 7496 . . . . . . . 8  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  -> 
( ( n  -  m )  +  1 )  e.  RR )
296, 28readdcld 7496 . . . . . . 7  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  -> 
( m  +  ( ( n  -  m
)  +  1 ) )  e.  RR )
3010, 24breqtrrd 3863 . . . . . . 7  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  ->  A  <  ( m  +  ( n  -  m
) ) )
3126ltp1d 8363 . . . . . . . 8  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  -> 
( n  -  m
)  <  ( (
n  -  m )  +  1 ) )
3226, 28, 6, 31ltadd2dd 7879 . . . . . . 7  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  -> 
( m  +  ( n  -  m ) )  <  ( m  +  ( ( n  -  m )  +  1 ) ) )
334, 25, 29, 30, 32lttrd 7588 . . . . . 6  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  ->  A  <  ( m  +  ( ( n  -  m )  +  1 ) ) )
34 breq1 3840 . . . . . . . 8  |-  ( y  =  m  ->  (
y  <  A  <->  m  <  A ) )
35 oveq1 5641 . . . . . . . . 9  |-  ( y  =  m  ->  (
y  +  ( ( n  -  m )  +  1 ) )  =  ( m  +  ( ( n  -  m )  +  1 ) ) )
3635breq2d 3849 . . . . . . . 8  |-  ( y  =  m  ->  ( A  <  ( y  +  ( ( n  -  m )  +  1 ) )  <->  A  <  ( m  +  ( ( n  -  m )  +  1 ) ) ) )
3734, 36anbi12d 457 . . . . . . 7  |-  ( y  =  m  ->  (
( y  <  A  /\  A  <  ( y  +  ( ( n  -  m )  +  1 ) ) )  <-> 
( m  <  A  /\  A  <  ( m  +  ( ( n  -  m )  +  1 ) ) ) ) )
3837rspcev 2722 . . . . . 6  |-  ( ( m  e.  ZZ  /\  ( m  <  A  /\  A  <  ( m  +  ( ( n  -  m )  +  1 ) ) ) )  ->  E. y  e.  ZZ  ( y  <  A  /\  A  <  ( y  +  ( ( n  -  m )  +  1 ) ) ) )
395, 9, 33, 38syl12anc 1172 . . . . 5  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  ->  E. y  e.  ZZ  ( y  <  A  /\  A  <  ( y  +  ( ( n  -  m )  +  1 ) ) ) )
40 rebtwn2zlemshrink 9630 . . . . 5  |-  ( ( A  e.  RR  /\  ( ( n  -  m )  +  1 )  e.  ( ZZ>= ` 
2 )  /\  E. y  e.  ZZ  (
y  <  A  /\  A  <  ( y  +  ( ( n  -  m )  +  1 ) ) ) )  ->  E. x  e.  ZZ  ( x  <  A  /\  A  <  ( x  + 
2 ) ) )
414, 21, 39, 40syl3anc 1174 . . . 4  |-  ( ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  /\  ( m  <  A  /\  A  <  n ) )  ->  E. x  e.  ZZ  ( x  <  A  /\  A  <  ( x  + 
2 ) ) )
4241ex 113 . . 3  |-  ( ( A  e.  RR  /\  ( m  e.  ZZ  /\  n  e.  ZZ ) )  ->  ( (
m  <  A  /\  A  <  n )  ->  E. x  e.  ZZ  ( x  <  A  /\  A  <  ( x  + 
2 ) ) ) )
4342rexlimdvva 2496 . 2  |-  ( A  e.  RR  ->  ( E. m  e.  ZZ  E. n  e.  ZZ  (
m  <  A  /\  A  <  n )  ->  E. x  e.  ZZ  ( x  <  A  /\  A  <  ( x  + 
2 ) ) ) )
443, 43mpd 13 1  |-  ( A  e.  RR  ->  E. x  e.  ZZ  ( x  < 
A  /\  A  <  ( x  +  2 ) ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 102    <-> wb 103    e. wcel 1438   E.wrex 2360   class class class wbr 3837   ` cfv 5002  (class class class)co 5634   RRcr 7328   1c1 7330    + caddc 7332    < clt 7501    - cmin 7632   NNcn 8394   2c2 8444   ZZcz 8720   ZZ>=cuz 8988
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 104  ax-ia2 105  ax-ia3 106  ax-in1 579  ax-in2 580  ax-io 665  ax-5 1381  ax-7 1382  ax-gen 1383  ax-ie1 1427  ax-ie2 1428  ax-8 1440  ax-10 1441  ax-11 1442  ax-i12 1443  ax-bndl 1444  ax-4 1445  ax-13 1449  ax-14 1450  ax-17 1464  ax-i9 1468  ax-ial 1472  ax-i5r 1473  ax-ext 2070  ax-sep 3949  ax-pow 4001  ax-pr 4027  ax-un 4251  ax-setind 4343  ax-cnex 7415  ax-resscn 7416  ax-1cn 7417  ax-1re 7418  ax-icn 7419  ax-addcl 7420  ax-addrcl 7421  ax-mulcl 7422  ax-addcom 7424  ax-addass 7426  ax-distr 7428  ax-i2m1 7429  ax-0lt1 7430  ax-0id 7432  ax-rnegex 7433  ax-cnre 7435  ax-pre-ltirr 7436  ax-pre-ltwlin 7437  ax-pre-lttrn 7438  ax-pre-ltadd 7440  ax-arch 7443
This theorem depends on definitions:  df-bi 115  df-3or 925  df-3an 926  df-tru 1292  df-fal 1295  df-nf 1395  df-sb 1693  df-eu 1951  df-mo 1952  df-clab 2075  df-cleq 2081  df-clel 2084  df-nfc 2217  df-ne 2256  df-nel 2351  df-ral 2364  df-rex 2365  df-reu 2366  df-rab 2368  df-v 2621  df-sbc 2839  df-dif 2999  df-un 3001  df-in 3003  df-ss 3010  df-pw 3427  df-sn 3447  df-pr 3448  df-op 3450  df-uni 3649  df-int 3684  df-br 3838  df-opab 3892  df-mpt 3893  df-id 4111  df-xp 4434  df-rel 4435  df-cnv 4436  df-co 4437  df-dm 4438  df-rn 4439  df-res 4440  df-ima 4441  df-iota 4967  df-fun 5004  df-fn 5005  df-f 5006  df-fv 5010  df-riota 5590  df-ov 5637  df-oprab 5638  df-mpt2 5639  df-pnf 7503  df-mnf 7504  df-xr 7505  df-ltxr 7506  df-le 7507  df-sub 7634  df-neg 7635  df-inn 8395  df-2 8452  df-n0 8644  df-z 8721  df-uz 8989
This theorem is referenced by:  qbtwnre  9633
  Copyright terms: Public domain W3C validator