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

Theorem mod0 11982
Description:  A  mod  B is zero iff  A is evenly divisible by 
B. (Contributed by Jeff Madsen, 2-Sep-2009.) (Proof shortened by Fan Zheng, 7-Jun-2016.)
Assertion
Ref Expression
mod0  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( ( A  mod  B )  =  0  <->  ( A  /  B )  e.  ZZ ) )

Proof of Theorem mod0
StepHypRef Expression
1 modval 11977 . . . . 5  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( A  mod  B
)  =  ( A  -  ( B  x.  ( |_ `  ( A  /  B ) ) ) ) )
21eqeq1d 2445 . . . 4  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( ( A  mod  B )  =  0  <->  ( A  -  ( B  x.  ( |_ `  ( A  /  B ) ) ) )  =  0 ) )
3 recn 9585 . . . . . 6  |-  ( A  e.  RR  ->  A  e.  CC )
43adantr 465 . . . . 5  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  ->  A  e.  CC )
5 rpre 11235 . . . . . . . 8  |-  ( B  e.  RR+  ->  B  e.  RR )
65adantl 466 . . . . . . 7  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  ->  B  e.  RR )
7 refldivcl 11936 . . . . . . 7  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( |_ `  ( A  /  B ) )  e.  RR )
86, 7remulcld 9627 . . . . . 6  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( B  x.  ( |_ `  ( A  /  B ) ) )  e.  RR )
98recnd 9625 . . . . 5  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( B  x.  ( |_ `  ( A  /  B ) ) )  e.  CC )
104, 9subeq0ad 9946 . . . 4  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( ( A  -  ( B  x.  ( |_ `  ( A  /  B ) ) ) )  =  0  <->  A  =  ( B  x.  ( |_ `  ( A  /  B ) ) ) ) )
112, 10bitrd 253 . . 3  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( ( A  mod  B )  =  0  <->  A  =  ( B  x.  ( |_ `  ( A  /  B ) ) ) ) )
12 eqcom 2452 . . . 4  |-  ( ( A  /  B )  =  ( |_ `  ( A  /  B
) )  <->  ( |_ `  ( A  /  B
) )  =  ( A  /  B ) )
137recnd 9625 . . . . 5  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( |_ `  ( A  /  B ) )  e.  CC )
14 rpcnne0 11246 . . . . . 6  |-  ( B  e.  RR+  ->  ( B  e.  CC  /\  B  =/=  0 ) )
1514adantl 466 . . . . 5  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( B  e.  CC  /\  B  =/=  0 ) )
16 divmul2 10217 . . . . 5  |-  ( ( A  e.  CC  /\  ( |_ `  ( A  /  B ) )  e.  CC  /\  ( B  e.  CC  /\  B  =/=  0 ) )  -> 
( ( A  /  B )  =  ( |_ `  ( A  /  B ) )  <-> 
A  =  ( B  x.  ( |_ `  ( A  /  B
) ) ) ) )
174, 13, 15, 16syl3anc 1229 . . . 4  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( ( A  /  B )  =  ( |_ `  ( A  /  B ) )  <-> 
A  =  ( B  x.  ( |_ `  ( A  /  B
) ) ) ) )
1812, 17syl5rbbr 260 . . 3  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( A  =  ( B  x.  ( |_
`  ( A  /  B ) ) )  <-> 
( |_ `  ( A  /  B ) )  =  ( A  /  B ) ) )
1911, 18bitrd 253 . 2  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( ( A  mod  B )  =  0  <->  ( |_ `  ( A  /  B ) )  =  ( A  /  B
) ) )
20 rerpdivcl 11256 . . 3  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( A  /  B
)  e.  RR )
21 flidz 11926 . . 3  |-  ( ( A  /  B )  e.  RR  ->  (
( |_ `  ( A  /  B ) )  =  ( A  /  B )  <->  ( A  /  B )  e.  ZZ ) )
2220, 21syl 16 . 2  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( ( |_ `  ( A  /  B
) )  =  ( A  /  B )  <-> 
( A  /  B
)  e.  ZZ ) )
2319, 22bitrd 253 1  |-  ( ( A  e.  RR  /\  B  e.  RR+ )  -> 
( ( A  mod  B )  =  0  <->  ( A  /  B )  e.  ZZ ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    = wceq 1383    e. wcel 1804    =/= wne 2638   ` cfv 5578  (class class class)co 6281   CCcc 9493   RRcr 9494   0cc0 9495    x. cmul 9500    - cmin 9810    / cdiv 10212   ZZcz 10870   RR+crp 11229   |_cfl 11906    mod cmo 11975
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1605  ax-4 1618  ax-5 1691  ax-6 1734  ax-7 1776  ax-8 1806  ax-9 1808  ax-10 1823  ax-11 1828  ax-12 1840  ax-13 1985  ax-ext 2421  ax-sep 4558  ax-nul 4566  ax-pow 4615  ax-pr 4676  ax-un 6577  ax-cnex 9551  ax-resscn 9552  ax-1cn 9553  ax-icn 9554  ax-addcl 9555  ax-addrcl 9556  ax-mulcl 9557  ax-mulrcl 9558  ax-mulcom 9559  ax-addass 9560  ax-mulass 9561  ax-distr 9562  ax-i2m1 9563  ax-1ne0 9564  ax-1rid 9565  ax-rnegex 9566  ax-rrecex 9567  ax-cnre 9568  ax-pre-lttri 9569  ax-pre-lttrn 9570  ax-pre-ltadd 9571  ax-pre-mulgt0 9572  ax-pre-sup 9573
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 975  df-3an 976  df-tru 1386  df-ex 1600  df-nf 1604  df-sb 1727  df-eu 2272  df-mo 2273  df-clab 2429  df-cleq 2435  df-clel 2438  df-nfc 2593  df-ne 2640  df-nel 2641  df-ral 2798  df-rex 2799  df-reu 2800  df-rmo 2801  df-rab 2802  df-v 3097  df-sbc 3314  df-csb 3421  df-dif 3464  df-un 3466  df-in 3468  df-ss 3475  df-pss 3477  df-nul 3771  df-if 3927  df-pw 3999  df-sn 4015  df-pr 4017  df-tp 4019  df-op 4021  df-uni 4235  df-iun 4317  df-br 4438  df-opab 4496  df-mpt 4497  df-tr 4531  df-eprel 4781  df-id 4785  df-po 4790  df-so 4791  df-fr 4828  df-we 4830  df-ord 4871  df-on 4872  df-lim 4873  df-suc 4874  df-xp 4995  df-rel 4996  df-cnv 4997  df-co 4998  df-dm 4999  df-rn 5000  df-res 5001  df-ima 5002  df-iota 5541  df-fun 5580  df-fn 5581  df-f 5582  df-f1 5583  df-fo 5584  df-f1o 5585  df-fv 5586  df-riota 6242  df-ov 6284  df-oprab 6285  df-mpt2 6286  df-om 6686  df-recs 7044  df-rdg 7078  df-er 7313  df-en 7519  df-dom 7520  df-sdom 7521  df-sup 7903  df-pnf 9633  df-mnf 9634  df-xr 9635  df-ltxr 9636  df-le 9637  df-sub 9812  df-neg 9813  df-div 10213  df-nn 10543  df-n0 10802  df-z 10871  df-uz 11091  df-rp 11230  df-fl 11908  df-mod 11976
This theorem is referenced by:  negmod0  11983  modid0  12000  modidmul0  12001  2txmodxeq0  12026  dvdsval3  13867  elqaalem2  22588  elqaalem3  22589  sineq0  22786  pellexlem6  30745  oddfl  31408  dirker2re  31763  dirkerdenne0  31764  dirkertrigeqlem3  31771  dirkertrigeq  31772  dirkercncflem1  31774  dirkercncflem2  31775  dirkercncflem4  31777  fourierdlem24  31802  fourierswlem  31902  sineq0ALT  33470
  Copyright terms: Public domain W3C validator