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

Theorem modid 11263
Description: Identity law for modulo. (Contributed by NM, 29-Dec-2008.)
Assertion
Ref Expression
modid  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  mod  B )  =  A )

Proof of Theorem modid
StepHypRef Expression
1 modval 11245 . . 3  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( A  mod  B
)  =  ( A  -  ( B  x.  ( |_ `  ( A  /  B ) ) ) ) )
21adantr 452 . 2  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  mod  B )  =  ( A  -  ( B  x.  ( |_ `  ( A  /  B
) ) ) ) )
3 rerpdivcl 10632 . . . . . . . . . 10  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( A  /  B
)  e.  RR )
43adantr 452 . . . . . . . . 9  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  /  B )  e.  RR )
54recnd 9107 . . . . . . . 8  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  /  B )  e.  CC )
6 addid2 9242 . . . . . . . . 9  |-  ( ( A  /  B )  e.  CC  ->  (
0  +  ( A  /  B ) )  =  ( A  /  B ) )
76fveq2d 5725 . . . . . . . 8  |-  ( ( A  /  B )  e.  CC  ->  ( |_ `  ( 0  +  ( A  /  B
) ) )  =  ( |_ `  ( A  /  B ) ) )
85, 7syl 16 . . . . . . 7  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( |_ `  ( 0  +  ( A  /  B ) ) )  =  ( |_ `  ( A  /  B ) ) )
9 rpregt0 10618 . . . . . . . . . . 11  |-  ( B  e.  RR+  ->  ( B  e.  RR  /\  0  <  B ) )
10 divge0 9872 . . . . . . . . . . 11  |-  ( ( ( A  e.  RR  /\  0  <_  A )  /\  ( B  e.  RR  /\  0  <  B ) )  ->  0  <_  ( A  /  B ) )
119, 10sylan2 461 . . . . . . . . . 10  |-  ( ( ( A  e.  RR  /\  0  <_  A )  /\  B  e.  RR+ )  ->  0  <_  ( A  /  B ) )
1211an32s 780 . . . . . . . . 9  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  0  <_  A )  ->  0  <_  ( A  /  B ) )
1312adantrr 698 . . . . . . . 8  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  0  <_  ( A  /  B ) )
14 simpr 448 . . . . . . . . . . 11  |-  ( ( B  e.  RR+  /\  A  <  B )  ->  A  <  B )
15 rpcn 10613 . . . . . . . . . . . . 13  |-  ( B  e.  RR+  ->  B  e.  CC )
1615mulid1d 9098 . . . . . . . . . . . 12  |-  ( B  e.  RR+  ->  ( B  x.  1 )  =  B )
1716adantr 452 . . . . . . . . . . 11  |-  ( ( B  e.  RR+  /\  A  <  B )  ->  ( B  x.  1 )  =  B )
1814, 17breqtrrd 4231 . . . . . . . . . 10  |-  ( ( B  e.  RR+  /\  A  <  B )  ->  A  <  ( B  x.  1 ) )
1918ad2ant2l 727 . . . . . . . . 9  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  A  <  ( B  x.  1 ) )
20 simpll 731 . . . . . . . . . 10  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  A  e.  RR )
219ad2antlr 708 . . . . . . . . . 10  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( B  e.  RR  /\  0  < 
B ) )
22 1re 9083 . . . . . . . . . . 11  |-  1  e.  RR
23 ltdivmul 9875 . . . . . . . . . . 11  |-  ( ( A  e.  RR  /\  1  e.  RR  /\  ( B  e.  RR  /\  0  <  B ) )  -> 
( ( A  /  B )  <  1  <->  A  <  ( B  x.  1 ) ) )
2422, 23mp3an2 1267 . . . . . . . . . 10  |-  ( ( A  e.  RR  /\  ( B  e.  RR  /\  0  <  B ) )  ->  ( ( A  /  B )  <  1  <->  A  <  ( B  x.  1 ) ) )
2520, 21, 24syl2anc 643 . . . . . . . . 9  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( ( A  /  B )  <  1  <->  A  <  ( B  x.  1 ) ) )
2619, 25mpbird 224 . . . . . . . 8  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  /  B )  <  1
)
27 0z 10286 . . . . . . . . 9  |-  0  e.  ZZ
28 flbi2 11217 . . . . . . . . 9  |-  ( ( 0  e.  ZZ  /\  ( A  /  B
)  e.  RR )  ->  ( ( |_
`  ( 0  +  ( A  /  B
) ) )  =  0  <->  ( 0  <_ 
( A  /  B
)  /\  ( A  /  B )  <  1
) ) )
2927, 4, 28sylancr 645 . . . . . . . 8  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( ( |_ `  ( 0  +  ( A  /  B
) ) )  =  0  <->  ( 0  <_ 
( A  /  B
)  /\  ( A  /  B )  <  1
) ) )
3013, 26, 29mpbir2and 889 . . . . . . 7  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( |_ `  ( 0  +  ( A  /  B ) ) )  =  0 )
318, 30eqtr3d 2470 . . . . . 6  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( |_ `  ( A  /  B
) )  =  0 )
3231oveq2d 6090 . . . . 5  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( B  x.  ( |_ `  ( A  /  B ) ) )  =  ( B  x.  0 ) )
3315mul01d 9258 . . . . . 6  |-  ( B  e.  RR+  ->  ( B  x.  0 )  =  0 )
3433ad2antlr 708 . . . . 5  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( B  x.  0 )  =  0 )
3532, 34eqtrd 2468 . . . 4  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( B  x.  ( |_ `  ( A  /  B ) ) )  =  0 )
3635oveq2d 6090 . . 3  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  -  ( B  x.  ( |_ `  ( A  /  B ) ) ) )  =  ( A  -  0 ) )
37 recn 9073 . . . . 5  |-  ( A  e.  RR  ->  A  e.  CC )
3837subid1d 9393 . . . 4  |-  ( A  e.  RR  ->  ( A  -  0 )  =  A )
3938ad2antrr 707 . . 3  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  -  0 )  =  A )
4036, 39eqtrd 2468 . 2  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  -  ( B  x.  ( |_ `  ( A  /  B ) ) ) )  =  A )
412, 40eqtrd 2468 1  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  mod  B )  =  A )
Colors of variables: wff set class
Syntax hints:    -> wi 4    <-> wb 177    /\ wa 359    = wceq 1652    e. wcel 1725   class class class wbr 4205   ` cfv 5447  (class class class)co 6074   CCcc 8981   RRcr 8982   0cc0 8983   1c1 8984    + caddc 8986    x. cmul 8988    < clt 9113    <_ cle 9114    - cmin 9284    / cdiv 9670   ZZcz 10275   RR+crp 10605   |_cfl 11194    mod cmo 11243
This theorem is referenced by:  modid2  11264  0mod  11265  1mod  11266  modabs  11267  modsubdir  11278  digit1  11506  bitsinv1  12947  sadaddlem  12971  sadasslem  12975  sadeq  12977  crt  13160  eulerthlem2  13164  prmdiveq  13168  4sqlem12  13317  dfod2  15193  znf1o  16825  wilthlem1  20844  ppiub  20981  lgslem1  21073  lgsdir2lem1  21100  lgsdirprm  21106  lgsqrlem2  21119  lgseisenlem1  21126  lgseisenlem2  21127  lgseisen  21130  m1lgs  21139  2sqlem11  21152  2submod  28131  modifeq2int  28140  modprm0  28195  2cshwmod  28224  cshw1  28239
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1555  ax-5 1566  ax-17 1626  ax-9 1666  ax-8 1687  ax-13 1727  ax-14 1729  ax-6 1744  ax-7 1749  ax-11 1761  ax-12 1950  ax-ext 2417  ax-sep 4323  ax-nul 4331  ax-pow 4370  ax-pr 4396  ax-un 4694  ax-cnex 9039  ax-resscn 9040  ax-1cn 9041  ax-icn 9042  ax-addcl 9043  ax-addrcl 9044  ax-mulcl 9045  ax-mulrcl 9046  ax-mulcom 9047  ax-addass 9048  ax-mulass 9049  ax-distr 9050  ax-i2m1 9051  ax-1ne0 9052  ax-1rid 9053  ax-rnegex 9054  ax-rrecex 9055  ax-cnre 9056  ax-pre-lttri 9057  ax-pre-lttrn 9058  ax-pre-ltadd 9059  ax-pre-mulgt0 9060  ax-pre-sup 9061
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1328  df-ex 1551  df-nf 1554  df-sb 1659  df-eu 2285  df-mo 2286  df-clab 2423  df-cleq 2429  df-clel 2432  df-nfc 2561  df-ne 2601  df-nel 2602  df-ral 2703  df-rex 2704  df-reu 2705  df-rmo 2706  df-rab 2707  df-v 2951  df-sbc 3155  df-csb 3245  df-dif 3316  df-un 3318  df-in 3320  df-ss 3327  df-pss 3329  df-nul 3622  df-if 3733  df-pw 3794  df-sn 3813  df-pr 3814  df-tp 3815  df-op 3816  df-uni 4009  df-iun 4088  df-br 4206  df-opab 4260  df-mpt 4261  df-tr 4296  df-eprel 4487  df-id 4491  df-po 4496  df-so 4497  df-fr 4534  df-we 4536  df-ord 4577  df-on 4578  df-lim 4579  df-suc 4580  df-om 4839  df-xp 4877  df-rel 4878  df-cnv 4879  df-co 4880  df-dm 4881  df-rn 4882  df-res 4883  df-ima 4884  df-iota 5411  df-fun 5449  df-fn 5450  df-f 5451  df-f1 5452  df-fo 5453  df-f1o 5454  df-fv 5455  df-ov 6077  df-oprab 6078  df-mpt2 6079  df-riota 6542  df-recs 6626  df-rdg 6661  df-er 6898  df-en 7103  df-dom 7104  df-sdom 7105  df-sup 7439  df-pnf 9115  df-mnf 9116  df-xr 9117  df-ltxr 9118  df-le 9119  df-sub 9286  df-neg 9287  df-div 9671  df-nn 9994  df-n0 10215  df-z 10276  df-uz 10482  df-rp 10606  df-fl 11195  df-mod 11244
  Copyright terms: Public domain W3C validator