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

Theorem modid 12023
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 12001 . . 3  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( A  mod  B
)  =  ( A  -  ( B  x.  ( |_ `  ( A  /  B ) ) ) ) )
21adantr 465 . 2  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  mod  B )  =  ( A  -  ( B  x.  ( |_ `  ( A  /  B
) ) ) ) )
3 rerpdivcl 11272 . . . . . . . . . 10  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( A  /  B
)  e.  RR )
43adantr 465 . . . . . . . . 9  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  /  B )  e.  RR )
54recnd 9639 . . . . . . . 8  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  /  B )  e.  CC )
6 addid2 9780 . . . . . . . . 9  |-  ( ( A  /  B )  e.  CC  ->  (
0  +  ( A  /  B ) )  =  ( A  /  B ) )
76fveq2d 5876 . . . . . . . 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 11258 . . . . . . . . . . 11  |-  ( B  e.  RR+  ->  ( B  e.  RR  /\  0  <  B ) )
10 divge0 10432 . . . . . . . . . . 11  |-  ( ( ( A  e.  RR  /\  0  <_  A )  /\  ( B  e.  RR  /\  0  <  B ) )  ->  0  <_  ( A  /  B ) )
119, 10sylan2 474 . . . . . . . . . 10  |-  ( ( ( A  e.  RR  /\  0  <_  A )  /\  B  e.  RR+ )  ->  0  <_  ( A  /  B ) )
1211an32s 804 . . . . . . . . 9  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  0  <_  A )  ->  0  <_  ( A  /  B ) )
1312adantrr 716 . . . . . . . 8  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  0  <_  ( A  /  B ) )
14 simpr 461 . . . . . . . . . . 11  |-  ( ( B  e.  RR+  /\  A  <  B )  ->  A  <  B )
15 rpcn 11253 . . . . . . . . . . . . 13  |-  ( B  e.  RR+  ->  B  e.  CC )
1615mulid1d 9630 . . . . . . . . . . . 12  |-  ( B  e.  RR+  ->  ( B  x.  1 )  =  B )
1716adantr 465 . . . . . . . . . . 11  |-  ( ( B  e.  RR+  /\  A  <  B )  ->  ( B  x.  1 )  =  B )
1814, 17breqtrrd 4482 . . . . . . . . . 10  |-  ( ( B  e.  RR+  /\  A  <  B )  ->  A  <  ( B  x.  1 ) )
1918ad2ant2l 745 . . . . . . . . 9  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  A  <  ( B  x.  1 ) )
20 simpll 753 . . . . . . . . . 10  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  A  e.  RR )
219ad2antlr 726 . . . . . . . . . 10  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( B  e.  RR  /\  0  < 
B ) )
22 1re 9612 . . . . . . . . . . 11  |-  1  e.  RR
23 ltdivmul 10438 . . . . . . . . . . 11  |-  ( ( A  e.  RR  /\  1  e.  RR  /\  ( B  e.  RR  /\  0  <  B ) )  -> 
( ( A  /  B )  <  1  <->  A  <  ( B  x.  1 ) ) )
2422, 23mp3an2 1312 . . . . . . . . . 10  |-  ( ( A  e.  RR  /\  ( B  e.  RR  /\  0  <  B ) )  ->  ( ( A  /  B )  <  1  <->  A  <  ( B  x.  1 ) ) )
2520, 21, 24syl2anc 661 . . . . . . . . 9  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( ( A  /  B )  <  1  <->  A  <  ( B  x.  1 ) ) )
2619, 25mpbird 232 . . . . . . . 8  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  /  B )  <  1
)
27 0z 10896 . . . . . . . . 9  |-  0  e.  ZZ
28 flbi2 11956 . . . . . . . . 9  |-  ( ( 0  e.  ZZ  /\  ( A  /  B
)  e.  RR )  ->  ( ( |_
`  ( 0  +  ( A  /  B
) ) )  =  0  <->  ( 0  <_ 
( A  /  B
)  /\  ( A  /  B )  <  1
) ) )
2927, 4, 28sylancr 663 . . . . . . . 8  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( ( |_ `  ( 0  +  ( A  /  B
) ) )  =  0  <->  ( 0  <_ 
( A  /  B
)  /\  ( A  /  B )  <  1
) ) )
3013, 26, 29mpbir2and 922 . . . . . . 7  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( |_ `  ( 0  +  ( A  /  B ) ) )  =  0 )
318, 30eqtr3d 2500 . . . . . 6  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( |_ `  ( A  /  B
) )  =  0 )
3231oveq2d 6312 . . . . 5  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( B  x.  ( |_ `  ( A  /  B ) ) )  =  ( B  x.  0 ) )
3315mul01d 9796 . . . . . 6  |-  ( B  e.  RR+  ->  ( B  x.  0 )  =  0 )
3433ad2antlr 726 . . . . 5  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( B  x.  0 )  =  0 )
3532, 34eqtrd 2498 . . . 4  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( B  x.  ( |_ `  ( A  /  B ) ) )  =  0 )
3635oveq2d 6312 . . 3  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  -  ( B  x.  ( |_ `  ( A  /  B ) ) ) )  =  ( A  -  0 ) )
37 recn 9599 . . . . 5  |-  ( A  e.  RR  ->  A  e.  CC )
3837subid1d 9939 . . . 4  |-  ( A  e.  RR  ->  ( A  -  0 )  =  A )
3938ad2antrr 725 . . 3  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  -  0 )  =  A )
4036, 39eqtrd 2498 . 2  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  -  ( B  x.  ( |_ `  ( A  /  B ) ) ) )  =  A )
412, 40eqtrd 2498 1  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  mod  B )  =  A )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    = wceq 1395    e. wcel 1819   class class class wbr 4456   ` cfv 5594  (class class class)co 6296   CCcc 9507   RRcr 9508   0cc0 9509   1c1 9510    + caddc 9512    x. cmul 9514    < clt 9645    <_ cle 9646    - cmin 9824    / cdiv 10227   ZZcz 10885   RR+crp 11245   |_cfl 11930    mod cmo 11999
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1619  ax-4 1632  ax-5 1705  ax-6 1748  ax-7 1791  ax-8 1821  ax-9 1823  ax-10 1838  ax-11 1843  ax-12 1855  ax-13 2000  ax-ext 2435  ax-sep 4578  ax-nul 4586  ax-pow 4634  ax-pr 4695  ax-un 6591  ax-cnex 9565  ax-resscn 9566  ax-1cn 9567  ax-icn 9568  ax-addcl 9569  ax-addrcl 9570  ax-mulcl 9571  ax-mulrcl 9572  ax-mulcom 9573  ax-addass 9574  ax-mulass 9575  ax-distr 9576  ax-i2m1 9577  ax-1ne0 9578  ax-1rid 9579  ax-rnegex 9580  ax-rrecex 9581  ax-cnre 9582  ax-pre-lttri 9583  ax-pre-lttrn 9584  ax-pre-ltadd 9585  ax-pre-mulgt0 9586  ax-pre-sup 9587
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-tru 1398  df-ex 1614  df-nf 1618  df-sb 1741  df-eu 2287  df-mo 2288  df-clab 2443  df-cleq 2449  df-clel 2452  df-nfc 2607  df-ne 2654  df-nel 2655  df-ral 2812  df-rex 2813  df-reu 2814  df-rmo 2815  df-rab 2816  df-v 3111  df-sbc 3328  df-csb 3431  df-dif 3474  df-un 3476  df-in 3478  df-ss 3485  df-pss 3487  df-nul 3794  df-if 3945  df-pw 4017  df-sn 4033  df-pr 4035  df-tp 4037  df-op 4039  df-uni 4252  df-iun 4334  df-br 4457  df-opab 4516  df-mpt 4517  df-tr 4551  df-eprel 4800  df-id 4804  df-po 4809  df-so 4810  df-fr 4847  df-we 4849  df-ord 4890  df-on 4891  df-lim 4892  df-suc 4893  df-xp 5014  df-rel 5015  df-cnv 5016  df-co 5017  df-dm 5018  df-rn 5019  df-res 5020  df-ima 5021  df-iota 5557  df-fun 5596  df-fn 5597  df-f 5598  df-f1 5599  df-fo 5600  df-f1o 5601  df-fv 5602  df-riota 6258  df-ov 6299  df-oprab 6300  df-mpt2 6301  df-om 6700  df-recs 7060  df-rdg 7094  df-er 7329  df-en 7536  df-dom 7537  df-sdom 7538  df-sup 7919  df-pnf 9647  df-mnf 9648  df-xr 9649  df-ltxr 9650  df-le 9651  df-sub 9826  df-neg 9827  df-div 10228  df-nn 10557  df-n0 10817  df-z 10886  df-uz 11107  df-rp 11246  df-fl 11932  df-mod 12000
This theorem is referenced by:  modid2  12026  0mod  12030  1mod  12031  modabs  12032  addmodid  12039  modltm1p1mod  12042  2submod  12051  modifeq2int  12052  modaddmodlo  12054  modsubdir  12058  digit1  12303  cshwidxm1  12789  bitsinv1  14104  sadaddlem  14128  sadasslem  14132  sadeq  14134  crt  14320  eulerthlem2  14324  prmdiveq  14328  modprm0  14342  4sqlem12  14486  dfod2  16713  znf1o  18717  wilthlem1  23468  ppiub  23605  lgslem1  23697  lgsdir2lem1  23724  lgsdirprm  23730  lgsqrlem2  23743  lgseisenlem1  23750  lgseisenlem2  23751  lgseisen  23754  m1lgs  23763  2sqlem11  23776  sqwvfoura  32193  sqwvfourb  32194  fourierswlem  32195  fouriersw  32196
  Copyright terms: Public domain W3C validator