MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  2submod Structured version   Unicode version

Theorem 2submod 11775
Description: If a real number is between a positive real number and the double of the positive real number, the real number modulo the positive real number equals the real number minus the positive real number. (Contributed by Alexander van der Vekens, 13-May-2018.)
Assertion
Ref Expression
2submod  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( B  <_  A  /\  A  <  ( 2  x.  B ) ) )  ->  ( A  mod  B )  =  ( A  -  B ) )

Proof of Theorem 2submod
StepHypRef Expression
1 rpre 11012 . . . . . . 7  |-  ( B  e.  RR+  ->  B  e.  RR )
2 ax-1rid 9367 . . . . . . 7  |-  ( B  e.  RR  ->  ( B  x.  1 )  =  B )
31, 2syl 16 . . . . . 6  |-  ( B  e.  RR+  ->  ( B  x.  1 )  =  B )
43adantl 466 . . . . 5  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( B  x.  1 )  =  B )
54oveq2d 6122 . . . 4  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( A  -  ( B  x.  1 ) )  =  ( A  -  B ) )
65oveq1d 6121 . . 3  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( ( A  -  ( B  x.  1
) )  mod  B
)  =  ( ( A  -  B )  mod  B ) )
76adantr 465 . 2  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( B  <_  A  /\  A  <  ( 2  x.  B ) ) )  ->  ( ( A  -  ( B  x.  1 ) )  mod 
B )  =  ( ( A  -  B
)  mod  B )
)
8 simpl 457 . . . . 5  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  ->  A  e.  RR )
9 simpr 461 . . . . 5  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  ->  B  e.  RR+ )
10 1zzd 10692 . . . . 5  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
1  e.  ZZ )
118, 9, 103jca 1168 . . . 4  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( A  e.  RR  /\  B  e.  RR+  /\  1  e.  ZZ ) )
1211adantr 465 . . 3  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( B  <_  A  /\  A  <  ( 2  x.  B ) ) )  ->  ( A  e.  RR  /\  B  e.  RR+  /\  1  e.  ZZ ) )
13 modcyc2 11759 . . 3  |-  ( ( A  e.  RR  /\  B  e.  RR+  /\  1  e.  ZZ )  ->  (
( A  -  ( B  x.  1 ) )  mod  B )  =  ( A  mod  B ) )
1412, 13syl 16 . 2  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( B  <_  A  /\  A  <  ( 2  x.  B ) ) )  ->  ( ( A  -  ( B  x.  1 ) )  mod 
B )  =  ( A  mod  B ) )
15 resubcl 9688 . . . . . 6  |-  ( ( A  e.  RR  /\  B  e.  RR )  ->  ( A  -  B
)  e.  RR )
161, 15sylan2 474 . . . . 5  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( A  -  B
)  e.  RR )
1716, 9jca 532 . . . 4  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( ( A  -  B )  e.  RR  /\  B  e.  RR+ )
)
1817adantr 465 . . 3  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( B  <_  A  /\  A  <  ( 2  x.  B ) ) )  ->  ( ( A  -  B )  e.  RR  /\  B  e.  RR+ ) )
19 subge0 9867 . . . . . . 7  |-  ( ( A  e.  RR  /\  B  e.  RR )  ->  ( 0  <_  ( A  -  B )  <->  B  <_  A ) )
201, 19sylan2 474 . . . . . 6  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( 0  <_  ( A  -  B )  <->  B  <_  A ) )
2120bicomd 201 . . . . 5  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( B  <_  A  <->  0  <_  ( A  -  B ) ) )
22 rpcn 11014 . . . . . . . . 9  |-  ( B  e.  RR+  ->  B  e.  CC )
23222timesd 10582 . . . . . . . 8  |-  ( B  e.  RR+  ->  ( 2  x.  B )  =  ( B  +  B
) )
2423adantl 466 . . . . . . 7  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( 2  x.  B
)  =  ( B  +  B ) )
2524breq2d 4319 . . . . . 6  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( A  <  (
2  x.  B )  <-> 
A  <  ( B  +  B ) ) )
261adantl 466 . . . . . . 7  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  ->  B  e.  RR )
278, 26, 26ltsubaddd 9950 . . . . . 6  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( ( A  -  B )  <  B  <->  A  <  ( B  +  B ) ) )
2825, 27bitr4d 256 . . . . 5  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( A  <  (
2  x.  B )  <-> 
( A  -  B
)  <  B )
)
2921, 28anbi12d 710 . . . 4  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( ( B  <_  A  /\  A  <  (
2  x.  B ) )  <->  ( 0  <_ 
( A  -  B
)  /\  ( A  -  B )  <  B
) ) )
3029biimpa 484 . . 3  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( B  <_  A  /\  A  <  ( 2  x.  B ) ) )  ->  ( 0  <_  ( A  -  B )  /\  ( A  -  B )  <  B ) )
31 modid 11747 . . 3  |-  ( ( ( ( A  -  B )  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  ( A  -  B )  /\  ( A  -  B
)  <  B )
)  ->  ( ( A  -  B )  mod  B )  =  ( A  -  B ) )
3218, 30, 31syl2anc 661 . 2  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( B  <_  A  /\  A  <  ( 2  x.  B ) ) )  ->  ( ( A  -  B )  mod  B )  =  ( A  -  B ) )
337, 14, 323eqtr3d 2483 1  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( B  <_  A  /\  A  <  ( 2  x.  B ) ) )  ->  ( A  mod  B )  =  ( A  -  B ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    /\ w3a 965    = wceq 1369    e. wcel 1756   class class class wbr 4307  (class class class)co 6106   RRcr 9296   0cc0 9297   1c1 9298    + caddc 9300    x. cmul 9302    < clt 9433    <_ cle 9434    - cmin 9610   2c2 10386   ZZcz 10661   RR+crp 11006    mod cmo 11723
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-8 1758  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2423  ax-sep 4428  ax-nul 4436  ax-pow 4485  ax-pr 4546  ax-un 6387  ax-cnex 9353  ax-resscn 9354  ax-1cn 9355  ax-icn 9356  ax-addcl 9357  ax-addrcl 9358  ax-mulcl 9359  ax-mulrcl 9360  ax-mulcom 9361  ax-addass 9362  ax-mulass 9363  ax-distr 9364  ax-i2m1 9365  ax-1ne0 9366  ax-1rid 9367  ax-rnegex 9368  ax-rrecex 9369  ax-cnre 9370  ax-pre-lttri 9371  ax-pre-lttrn 9372  ax-pre-ltadd 9373  ax-pre-mulgt0 9374  ax-pre-sup 9375
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1372  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2257  df-mo 2258  df-clab 2430  df-cleq 2436  df-clel 2439  df-nfc 2577  df-ne 2622  df-nel 2623  df-ral 2735  df-rex 2736  df-reu 2737  df-rmo 2738  df-rab 2739  df-v 2989  df-sbc 3202  df-csb 3304  df-dif 3346  df-un 3348  df-in 3350  df-ss 3357  df-pss 3359  df-nul 3653  df-if 3807  df-pw 3877  df-sn 3893  df-pr 3895  df-tp 3897  df-op 3899  df-uni 4107  df-iun 4188  df-br 4308  df-opab 4366  df-mpt 4367  df-tr 4401  df-eprel 4647  df-id 4651  df-po 4656  df-so 4657  df-fr 4694  df-we 4696  df-ord 4737  df-on 4738  df-lim 4739  df-suc 4740  df-xp 4861  df-rel 4862  df-cnv 4863  df-co 4864  df-dm 4865  df-rn 4866  df-res 4867  df-ima 4868  df-iota 5396  df-fun 5435  df-fn 5436  df-f 5437  df-f1 5438  df-fo 5439  df-f1o 5440  df-fv 5441  df-riota 6067  df-ov 6109  df-oprab 6110  df-mpt2 6111  df-om 6492  df-recs 6847  df-rdg 6881  df-er 7116  df-en 7326  df-dom 7327  df-sdom 7328  df-sup 7706  df-pnf 9435  df-mnf 9436  df-xr 9437  df-ltxr 9438  df-le 9439  df-sub 9612  df-neg 9613  df-div 10009  df-nn 10338  df-2 10395  df-n0 10595  df-z 10662  df-uz 10877  df-rp 11007  df-fl 11657  df-mod 11724
This theorem is referenced by:  modifeq2int  11776  modaddmodup  11777
  Copyright terms: Public domain W3C validator