Metamath Proof Explorer |
< Previous
Next >
Nearby theorems |
||
Mirrors > Home > MPE Home > Th. List > mod0 | Structured version Visualization version GIF version |
Description: 𝐴 mod 𝐵 is zero iff 𝐴 is evenly divisible by 𝐵. (Contributed by Jeff Madsen, 2-Sep-2009.) (Proof shortened by Fan Zheng, 7-Jun-2016.) |
Ref | Expression |
---|---|
mod0 | ⊢ ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+) → ((𝐴 mod 𝐵) = 0 ↔ (𝐴 / 𝐵) ∈ ℤ)) |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | modval 13600 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+) → (𝐴 mod 𝐵) = (𝐴 − (𝐵 · (⌊‘(𝐴 / 𝐵))))) | |
2 | 1 | eqeq1d 2741 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+) → ((𝐴 mod 𝐵) = 0 ↔ (𝐴 − (𝐵 · (⌊‘(𝐴 / 𝐵)))) = 0)) |
3 | recn 10970 | . . . . . 6 ⊢ (𝐴 ∈ ℝ → 𝐴 ∈ ℂ) | |
4 | 3 | adantr 481 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+) → 𝐴 ∈ ℂ) |
5 | rpre 12747 | . . . . . . . 8 ⊢ (𝐵 ∈ ℝ+ → 𝐵 ∈ ℝ) | |
6 | 5 | adantl 482 | . . . . . . 7 ⊢ ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+) → 𝐵 ∈ ℝ) |
7 | refldivcl 13552 | . . . . . . 7 ⊢ ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+) → (⌊‘(𝐴 / 𝐵)) ∈ ℝ) | |
8 | 6, 7 | remulcld 11014 | . . . . . 6 ⊢ ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+) → (𝐵 · (⌊‘(𝐴 / 𝐵))) ∈ ℝ) |
9 | 8 | recnd 11012 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+) → (𝐵 · (⌊‘(𝐴 / 𝐵))) ∈ ℂ) |
10 | 4, 9 | subeq0ad 11351 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+) → ((𝐴 − (𝐵 · (⌊‘(𝐴 / 𝐵)))) = 0 ↔ 𝐴 = (𝐵 · (⌊‘(𝐴 / 𝐵))))) |
11 | 2, 10 | bitrd 278 | . . 3 ⊢ ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+) → ((𝐴 mod 𝐵) = 0 ↔ 𝐴 = (𝐵 · (⌊‘(𝐴 / 𝐵))))) |
12 | 7 | recnd 11012 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+) → (⌊‘(𝐴 / 𝐵)) ∈ ℂ) |
13 | rpcnne0 12757 | . . . . . 6 ⊢ (𝐵 ∈ ℝ+ → (𝐵 ∈ ℂ ∧ 𝐵 ≠ 0)) | |
14 | 13 | adantl 482 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+) → (𝐵 ∈ ℂ ∧ 𝐵 ≠ 0)) |
15 | divmul2 11646 | . . . . 5 ⊢ ((𝐴 ∈ ℂ ∧ (⌊‘(𝐴 / 𝐵)) ∈ ℂ ∧ (𝐵 ∈ ℂ ∧ 𝐵 ≠ 0)) → ((𝐴 / 𝐵) = (⌊‘(𝐴 / 𝐵)) ↔ 𝐴 = (𝐵 · (⌊‘(𝐴 / 𝐵))))) | |
16 | 4, 12, 14, 15 | syl3anc 1370 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+) → ((𝐴 / 𝐵) = (⌊‘(𝐴 / 𝐵)) ↔ 𝐴 = (𝐵 · (⌊‘(𝐴 / 𝐵))))) |
17 | eqcom 2746 | . . . 4 ⊢ ((𝐴 / 𝐵) = (⌊‘(𝐴 / 𝐵)) ↔ (⌊‘(𝐴 / 𝐵)) = (𝐴 / 𝐵)) | |
18 | 16, 17 | bitr3di 286 | . . 3 ⊢ ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+) → (𝐴 = (𝐵 · (⌊‘(𝐴 / 𝐵))) ↔ (⌊‘(𝐴 / 𝐵)) = (𝐴 / 𝐵))) |
19 | 11, 18 | bitrd 278 | . 2 ⊢ ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+) → ((𝐴 mod 𝐵) = 0 ↔ (⌊‘(𝐴 / 𝐵)) = (𝐴 / 𝐵))) |
20 | rerpdivcl 12769 | . . 3 ⊢ ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+) → (𝐴 / 𝐵) ∈ ℝ) | |
21 | flidz 13539 | . . 3 ⊢ ((𝐴 / 𝐵) ∈ ℝ → ((⌊‘(𝐴 / 𝐵)) = (𝐴 / 𝐵) ↔ (𝐴 / 𝐵) ∈ ℤ)) | |
22 | 20, 21 | syl 17 | . 2 ⊢ ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+) → ((⌊‘(𝐴 / 𝐵)) = (𝐴 / 𝐵) ↔ (𝐴 / 𝐵) ∈ ℤ)) |
23 | 19, 22 | bitrd 278 | 1 ⊢ ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ+) → ((𝐴 mod 𝐵) = 0 ↔ (𝐴 / 𝐵) ∈ ℤ)) |
Colors of variables: wff setvar class |
Syntax hints: → wi 4 ↔ wb 205 ∧ wa 396 = wceq 1539 ∈ wcel 2107 ≠ wne 2944 ‘cfv 6437 (class class class)co 7284 ℂcc 10878 ℝcr 10879 0cc0 10880 · cmul 10885 − cmin 11214 / cdiv 11641 ℤcz 12328 ℝ+crp 12739 ⌊cfl 13519 mod cmo 13598 |
This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1798 ax-4 1812 ax-5 1914 ax-6 1972 ax-7 2012 ax-8 2109 ax-9 2117 ax-10 2138 ax-11 2155 ax-12 2172 ax-ext 2710 ax-sep 5224 ax-nul 5231 ax-pow 5289 ax-pr 5353 ax-un 7597 ax-cnex 10936 ax-resscn 10937 ax-1cn 10938 ax-icn 10939 ax-addcl 10940 ax-addrcl 10941 ax-mulcl 10942 ax-mulrcl 10943 ax-mulcom 10944 ax-addass 10945 ax-mulass 10946 ax-distr 10947 ax-i2m1 10948 ax-1ne0 10949 ax-1rid 10950 ax-rnegex 10951 ax-rrecex 10952 ax-cnre 10953 ax-pre-lttri 10954 ax-pre-lttrn 10955 ax-pre-ltadd 10956 ax-pre-mulgt0 10957 ax-pre-sup 10958 |
This theorem depends on definitions: df-bi 206 df-an 397 df-or 845 df-3or 1087 df-3an 1088 df-tru 1542 df-fal 1552 df-ex 1783 df-nf 1787 df-sb 2069 df-mo 2541 df-eu 2570 df-clab 2717 df-cleq 2731 df-clel 2817 df-nfc 2890 df-ne 2945 df-nel 3051 df-ral 3070 df-rex 3071 df-rmo 3072 df-reu 3073 df-rab 3074 df-v 3435 df-sbc 3718 df-csb 3834 df-dif 3891 df-un 3893 df-in 3895 df-ss 3905 df-pss 3907 df-nul 4258 df-if 4461 df-pw 4536 df-sn 4563 df-pr 4565 df-op 4569 df-uni 4841 df-iun 4927 df-br 5076 df-opab 5138 df-mpt 5159 df-tr 5193 df-id 5490 df-eprel 5496 df-po 5504 df-so 5505 df-fr 5545 df-we 5547 df-xp 5596 df-rel 5597 df-cnv 5598 df-co 5599 df-dm 5600 df-rn 5601 df-res 5602 df-ima 5603 df-pred 6206 df-ord 6273 df-on 6274 df-lim 6275 df-suc 6276 df-iota 6395 df-fun 6439 df-fn 6440 df-f 6441 df-f1 6442 df-fo 6443 df-f1o 6444 df-fv 6445 df-riota 7241 df-ov 7287 df-oprab 7288 df-mpo 7289 df-om 7722 df-2nd 7841 df-frecs 8106 df-wrecs 8137 df-recs 8211 df-rdg 8250 df-er 8507 df-en 8743 df-dom 8744 df-sdom 8745 df-sup 9210 df-inf 9211 df-pnf 11020 df-mnf 11021 df-xr 11022 df-ltxr 11023 df-le 11024 df-sub 11216 df-neg 11217 df-div 11642 df-nn 11983 df-n0 12243 df-z 12329 df-uz 12592 df-rp 12740 df-fl 13521 df-mod 13599 |
This theorem is referenced by: mulmod0 13606 negmod0 13607 modid0 13626 2txmodxeq0 13660 addmodlteq 13675 dvdsval3 15976 mod2eq1n2dvds 16065 elqaalem2 25489 elqaalem3 25490 sineq0 25689 pellexlem6 40663 sineq0ALT 42564 oddfl 42823 dirker2re 43640 dirkerdenne0 43641 dirkertrigeqlem3 43648 dirkertrigeq 43649 dirkercncflem1 43651 dirkercncflem2 43652 dirkercncflem4 43654 fourierdlem24 43679 fourierswlem 43778 dfeven3 45121 dfodd4 45122 mod0mul 45876 dignn0fr 45958 digexp 45964 0dig2nn0e 45969 dignn0flhalflem1 45972 |
Copyright terms: Public domain | W3C validator |