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

Theorem modid 11835
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 11813 . . 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 11121 . . . . . . . . . 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 9515 . . . . . . . 8  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  /  B )  e.  CC )
6 addid2 9655 . . . . . . . . 9  |-  ( ( A  /  B )  e.  CC  ->  (
0  +  ( A  /  B ) )  =  ( A  /  B ) )
76fveq2d 5795 . . . . . . . 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 11107 . . . . . . . . . . 11  |-  ( B  e.  RR+  ->  ( B  e.  RR  /\  0  <  B ) )
10 divge0 10301 . . . . . . . . . . 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 802 . . . . . . . . 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 11102 . . . . . . . . . . . . 13  |-  ( B  e.  RR+  ->  B  e.  CC )
1615mulid1d 9506 . . . . . . . . . . . 12  |-  ( B  e.  RR+  ->  ( B  x.  1 )  =  B )
1716adantr 465 . . . . . . . . . . 11  |-  ( ( B  e.  RR+  /\  A  <  B )  ->  ( B  x.  1 )  =  B )
1814, 17breqtrrd 4418 . . . . . . . . . 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 9488 . . . . . . . . . . 11  |-  1  e.  RR
23 ltdivmul 10307 . . . . . . . . . . 11  |-  ( ( A  e.  RR  /\  1  e.  RR  /\  ( B  e.  RR  /\  0  <  B ) )  -> 
( ( A  /  B )  <  1  <->  A  <  ( B  x.  1 ) ) )
2422, 23mp3an2 1303 . . . . . . . . . 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 10760 . . . . . . . . 9  |-  0  e.  ZZ
28 flbi2 11768 . . . . . . . . 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 913 . . . . . . 7  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( |_ `  ( 0  +  ( A  /  B ) ) )  =  0 )
318, 30eqtr3d 2494 . . . . . 6  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( |_ `  ( A  /  B
) )  =  0 )
3231oveq2d 6208 . . . . 5  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( B  x.  ( |_ `  ( A  /  B ) ) )  =  ( B  x.  0 ) )
3315mul01d 9671 . . . . . 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 2492 . . . 4  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( B  x.  ( |_ `  ( A  /  B ) ) )  =  0 )
3635oveq2d 6208 . . 3  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  -  ( B  x.  ( |_ `  ( A  /  B ) ) ) )  =  ( A  -  0 ) )
37 recn 9475 . . . . 5  |-  ( A  e.  RR  ->  A  e.  CC )
3837subid1d 9811 . . . 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 2492 . 2  |-  ( ( ( A  e.  RR  /\  B  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  B ) )  ->  ( A  -  ( B  x.  ( |_ `  ( A  /  B ) ) ) )  =  A )
412, 40eqtrd 2492 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 1370    e. wcel 1758   class class class wbr 4392   ` cfv 5518  (class class class)co 6192   CCcc 9383   RRcr 9384   0cc0 9385   1c1 9386    + caddc 9388    x. cmul 9390    < clt 9521    <_ cle 9522    - cmin 9698    / cdiv 10096   ZZcz 10749   RR+crp 11094   |_cfl 11743    mod cmo 11811
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1592  ax-4 1603  ax-5 1671  ax-6 1710  ax-7 1730  ax-8 1760  ax-9 1762  ax-10 1777  ax-11 1782  ax-12 1794  ax-13 1952  ax-ext 2430  ax-sep 4513  ax-nul 4521  ax-pow 4570  ax-pr 4631  ax-un 6474  ax-cnex 9441  ax-resscn 9442  ax-1cn 9443  ax-icn 9444  ax-addcl 9445  ax-addrcl 9446  ax-mulcl 9447  ax-mulrcl 9448  ax-mulcom 9449  ax-addass 9450  ax-mulass 9451  ax-distr 9452  ax-i2m1 9453  ax-1ne0 9454  ax-1rid 9455  ax-rnegex 9456  ax-rrecex 9457  ax-cnre 9458  ax-pre-lttri 9459  ax-pre-lttrn 9460  ax-pre-ltadd 9461  ax-pre-mulgt0 9462  ax-pre-sup 9463
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1373  df-ex 1588  df-nf 1591  df-sb 1703  df-eu 2264  df-mo 2265  df-clab 2437  df-cleq 2443  df-clel 2446  df-nfc 2601  df-ne 2646  df-nel 2647  df-ral 2800  df-rex 2801  df-reu 2802  df-rmo 2803  df-rab 2804  df-v 3072  df-sbc 3287  df-csb 3389  df-dif 3431  df-un 3433  df-in 3435  df-ss 3442  df-pss 3444  df-nul 3738  df-if 3892  df-pw 3962  df-sn 3978  df-pr 3980  df-tp 3982  df-op 3984  df-uni 4192  df-iun 4273  df-br 4393  df-opab 4451  df-mpt 4452  df-tr 4486  df-eprel 4732  df-id 4736  df-po 4741  df-so 4742  df-fr 4779  df-we 4781  df-ord 4822  df-on 4823  df-lim 4824  df-suc 4825  df-xp 4946  df-rel 4947  df-cnv 4948  df-co 4949  df-dm 4950  df-rn 4951  df-res 4952  df-ima 4953  df-iota 5481  df-fun 5520  df-fn 5521  df-f 5522  df-f1 5523  df-fo 5524  df-f1o 5525  df-fv 5526  df-riota 6153  df-ov 6195  df-oprab 6196  df-mpt2 6197  df-om 6579  df-recs 6934  df-rdg 6968  df-er 7203  df-en 7413  df-dom 7414  df-sdom 7415  df-sup 7794  df-pnf 9523  df-mnf 9524  df-xr 9525  df-ltxr 9526  df-le 9527  df-sub 9700  df-neg 9701  df-div 10097  df-nn 10426  df-n0 10683  df-z 10750  df-uz 10965  df-rp 11095  df-fl 11745  df-mod 11812
This theorem is referenced by:  modid2  11838  0mod  11842  1mod  11843  modabs  11844  addmodid  11851  modltm1p1mod  11854  2submod  11863  modifeq2int  11864  modaddmodlo  11866  modsubdir  11870  digit1  12101  cshwidxm1  12547  bitsinv1  13742  sadaddlem  13766  sadasslem  13770  sadeq  13772  crt  13957  eulerthlem2  13961  prmdiveq  13965  modprm0  13977  4sqlem12  14121  dfod2  16171  znf1o  18095  wilthlem1  22524  ppiub  22661  lgslem1  22753  lgsdir2lem1  22780  lgsdirprm  22786  lgsqrlem2  22799  lgseisenlem1  22806  lgseisenlem2  22807  lgseisen  22810  m1lgs  22819  2sqlem11  22832
  Copyright terms: Public domain W3C validator