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

Theorem modid 10993
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 10975 . . 3  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( A  mod  B
)  =  ( A  -  ( B  x.  ( |_ `  ( A  /  B ) ) ) ) )
21adantr 451 . 2  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  mod  B )  =  ( A  -  ( B  x.  ( |_ `  ( A  /  B
) ) ) ) )
3 rerpdivcl 10381 . . . . . . . . . 10  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( A  /  B
)  e.  RR )
43adantr 451 . . . . . . . . 9  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  /  B )  e.  RR )
54recnd 8861 . . . . . . . 8  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  /  B )  e.  CC )
6 addid2 8995 . . . . . . . . 9  |-  ( ( A  /  B )  e.  CC  ->  (
0  +  ( A  /  B ) )  =  ( A  /  B ) )
76fveq2d 5529 . . . . . . . 8  |-  ( ( A  /  B )  e.  CC  ->  ( |_ `  ( 0  +  ( A  /  B
) ) )  =  ( |_ `  ( A  /  B ) ) )
85, 7syl 15 . . . . . . 7  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( |_ `  ( 0  +  ( A  /  B ) ) )  =  ( |_ `  ( A  /  B ) ) )
9 rpregt0 10367 . . . . . . . . . . 11  |-  ( B  e.  RR+  ->  ( B  e.  RR  /\  0  <  B ) )
10 divge0 9625 . . . . . . . . . . 11  |-  ( ( ( A  e.  RR  /\  0  <_  A )  /\  ( B  e.  RR  /\  0  <  B ) )  ->  0  <_  ( A  /  B ) )
119, 10sylan2 460 . . . . . . . . . 10  |-  ( ( ( A  e.  RR  /\  0  <_  A )  /\  B  e.  RR+ )  ->  0  <_  ( A  /  B ) )
1211an32s 779 . . . . . . . . 9  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  0  <_  A )  ->  0  <_  ( A  /  B ) )
1312adantrr 697 . . . . . . . 8  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  0  <_  ( A  /  B ) )
14 simpr 447 . . . . . . . . . . 11  |-  ( ( B  e.  RR+  /\  A  <  B )  ->  A  <  B )
15 rpcn 10362 . . . . . . . . . . . . 13  |-  ( B  e.  RR+  ->  B  e.  CC )
1615mulid1d 8852 . . . . . . . . . . . 12  |-  ( B  e.  RR+  ->  ( B  x.  1 )  =  B )
1716adantr 451 . . . . . . . . . . 11  |-  ( ( B  e.  RR+  /\  A  <  B )  ->  ( B  x.  1 )  =  B )
1814, 17breqtrrd 4049 . . . . . . . . . 10  |-  ( ( B  e.  RR+  /\  A  <  B )  ->  A  <  ( B  x.  1 ) )
1918ad2ant2l 726 . . . . . . . . 9  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  A  <  ( B  x.  1 ) )
20 simpll 730 . . . . . . . . . 10  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  A  e.  RR )
219ad2antlr 707 . . . . . . . . . 10  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( B  e.  RR  /\  0  < 
B ) )
22 1re 8837 . . . . . . . . . . 11  |-  1  e.  RR
23 ltdivmul 9628 . . . . . . . . . . 11  |-  ( ( A  e.  RR  /\  1  e.  RR  /\  ( B  e.  RR  /\  0  <  B ) )  -> 
( ( A  /  B )  <  1  <->  A  <  ( B  x.  1 ) ) )
2422, 23mp3an2 1265 . . . . . . . . . 10  |-  ( ( A  e.  RR  /\  ( B  e.  RR  /\  0  <  B ) )  ->  ( ( A  /  B )  <  1  <->  A  <  ( B  x.  1 ) ) )
2520, 21, 24syl2anc 642 . . . . . . . . 9  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( ( A  /  B )  <  1  <->  A  <  ( B  x.  1 ) ) )
2619, 25mpbird 223 . . . . . . . 8  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  /  B )  <  1
)
27 0z 10035 . . . . . . . . 9  |-  0  e.  ZZ
28 flbi2 10947 . . . . . . . . 9  |-  ( ( 0  e.  ZZ  /\  ( A  /  B
)  e.  RR )  ->  ( ( |_
`  ( 0  +  ( A  /  B
) ) )  =  0  <->  ( 0  <_ 
( A  /  B
)  /\  ( A  /  B )  <  1
) ) )
2927, 4, 28sylancr 644 . . . . . . . 8  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( ( |_ `  ( 0  +  ( A  /  B
) ) )  =  0  <->  ( 0  <_ 
( A  /  B
)  /\  ( A  /  B )  <  1
) ) )
3013, 26, 29mpbir2and 888 . . . . . . 7  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( |_ `  ( 0  +  ( A  /  B ) ) )  =  0 )
318, 30eqtr3d 2317 . . . . . 6  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( |_ `  ( A  /  B
) )  =  0 )
3231oveq2d 5874 . . . . 5  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( B  x.  ( |_ `  ( A  /  B ) ) )  =  ( B  x.  0 ) )
3315mul01d 9011 . . . . . 6  |-  ( B  e.  RR+  ->  ( B  x.  0 )  =  0 )
3433ad2antlr 707 . . . . 5  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( B  x.  0 )  =  0 )
3532, 34eqtrd 2315 . . . 4  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( B  x.  ( |_ `  ( A  /  B ) ) )  =  0 )
3635oveq2d 5874 . . 3  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  -  ( B  x.  ( |_ `  ( A  /  B ) ) ) )  =  ( A  -  0 ) )
37 recn 8827 . . . . 5  |-  ( A  e.  RR  ->  A  e.  CC )
3837subid1d 9146 . . . 4  |-  ( A  e.  RR  ->  ( A  -  0 )  =  A )
3938ad2antrr 706 . . 3  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  -  0 )  =  A )
4036, 39eqtrd 2315 . 2  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  -  ( B  x.  ( |_ `  ( A  /  B ) ) ) )  =  A )
412, 40eqtrd 2315 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 176    /\ wa 358    = wceq 1623    e. wcel 1684   class class class wbr 4023   ` cfv 5255  (class class class)co 5858   CCcc 8735   RRcr 8736   0cc0 8737   1c1 8738    + caddc 8740    x. cmul 8742    < clt 8867    <_ cle 8868    - cmin 9037    / cdiv 9423   ZZcz 10024   RR+crp 10354   |_cfl 10924    mod cmo 10973
This theorem is referenced by:  modid2  10994  0mod  10995  1mod  10996  modabs  10997  modsubdir  11008  digit1  11235  bitsinv1  12633  sadaddlem  12657  sadasslem  12661  sadeq  12663  crt  12846  eulerthlem2  12850  prmdiveq  12854  4sqlem12  13003  dfod2  14877  znf1o  16505  wilthlem1  20306  ppiub  20443  lgslem1  20535  lgsdir2lem1  20562  lgsdirprm  20568  lgsqrlem2  20581  lgseisenlem1  20588  lgseisenlem2  20589  lgseisen  20592  m1lgs  20601  2sqlem11  20614
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1533  ax-5 1544  ax-17 1603  ax-9 1635  ax-8 1643  ax-13 1686  ax-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512  ax-cnex 8793  ax-resscn 8794  ax-1cn 8795  ax-icn 8796  ax-addcl 8797  ax-addrcl 8798  ax-mulcl 8799  ax-mulrcl 8800  ax-mulcom 8801  ax-addass 8802  ax-mulass 8803  ax-distr 8804  ax-i2m1 8805  ax-1ne0 8806  ax-1rid 8807  ax-rnegex 8808  ax-rrecex 8809  ax-cnre 8810  ax-pre-lttri 8811  ax-pre-lttrn 8812  ax-pre-ltadd 8813  ax-pre-mulgt0 8814  ax-pre-sup 8815
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1529  df-nf 1532  df-sb 1630  df-eu 2147  df-mo 2148  df-clab 2270  df-cleq 2276  df-clel 2279  df-nfc 2408  df-ne 2448  df-nel 2449  df-ral 2548  df-rex 2549  df-reu 2550  df-rmo 2551  df-rab 2552  df-v 2790  df-sbc 2992  df-csb 3082  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-pss 3168  df-nul 3456  df-if 3566  df-pw 3627  df-sn 3646  df-pr 3647  df-tp 3648  df-op 3649  df-uni 3828  df-iun 3907  df-br 4024  df-opab 4078  df-mpt 4079  df-tr 4114  df-eprel 4305  df-id 4309  df-po 4314  df-so 4315  df-fr 4352  df-we 4354  df-ord 4395  df-on 4396  df-lim 4397  df-suc 4398  df-om 4657  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-rn 4700  df-res 4701  df-ima 4702  df-iota 5219  df-fun 5257  df-fn 5258  df-f 5259  df-f1 5260  df-fo 5261  df-f1o 5262  df-fv 5263  df-ov 5861  df-oprab 5862  df-mpt2 5863  df-riota 6304  df-recs 6388  df-rdg 6423  df-er 6660  df-en 6864  df-dom 6865  df-sdom 6866  df-sup 7194  df-pnf 8869  df-mnf 8870  df-xr 8871  df-ltxr 8872  df-le 8873  df-sub 9039  df-neg 9040  df-div 9424  df-nn 9747  df-n0 9966  df-z 10025  df-uz 10231  df-rp 10355  df-fl 10925  df-mod 10974
  Copyright terms: Public domain W3C validator