Metamath Proof Explorer |
< Previous
Next >
Nearby theorems |
||
Mirrors > Home > MPE Home > Th. List > muladdmodid | Structured version Visualization version GIF version |
Description: The sum of a positive real number less than an upper bound and the product of an integer and the upper bound is the positive real number modulo the upper bound. (Contributed by AV, 5-Jul-2020.) |
Ref | Expression |
---|---|
muladdmodid | ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℝ+ ∧ 𝐴 ∈ (0[,)𝑀)) → (((𝑁 · 𝑀) + 𝐴) mod 𝑀) = 𝐴) |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | 0red 10715 | . . . . 5 ⊢ (𝑀 ∈ ℝ+ → 0 ∈ ℝ) | |
2 | rpxr 12474 | . . . . 5 ⊢ (𝑀 ∈ ℝ+ → 𝑀 ∈ ℝ*) | |
3 | elico2 12878 | . . . . 5 ⊢ ((0 ∈ ℝ ∧ 𝑀 ∈ ℝ*) → (𝐴 ∈ (0[,)𝑀) ↔ (𝐴 ∈ ℝ ∧ 0 ≤ 𝐴 ∧ 𝐴 < 𝑀))) | |
4 | 1, 2, 3 | syl2anc 587 | . . . 4 ⊢ (𝑀 ∈ ℝ+ → (𝐴 ∈ (0[,)𝑀) ↔ (𝐴 ∈ ℝ ∧ 0 ≤ 𝐴 ∧ 𝐴 < 𝑀))) |
5 | 4 | adantl 485 | . . 3 ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℝ+) → (𝐴 ∈ (0[,)𝑀) ↔ (𝐴 ∈ ℝ ∧ 0 ≤ 𝐴 ∧ 𝐴 < 𝑀))) |
6 | zcn 12060 | . . . . . . . . 9 ⊢ (𝑁 ∈ ℤ → 𝑁 ∈ ℂ) | |
7 | rpcn 12475 | . . . . . . . . 9 ⊢ (𝑀 ∈ ℝ+ → 𝑀 ∈ ℂ) | |
8 | mulcl 10692 | . . . . . . . . 9 ⊢ ((𝑁 ∈ ℂ ∧ 𝑀 ∈ ℂ) → (𝑁 · 𝑀) ∈ ℂ) | |
9 | 6, 7, 8 | syl2an 599 | . . . . . . . 8 ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℝ+) → (𝑁 · 𝑀) ∈ ℂ) |
10 | 9 | adantr 484 | . . . . . . 7 ⊢ (((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℝ+) ∧ (𝐴 ∈ ℝ ∧ 0 ≤ 𝐴 ∧ 𝐴 < 𝑀)) → (𝑁 · 𝑀) ∈ ℂ) |
11 | recn 10698 | . . . . . . . . 9 ⊢ (𝐴 ∈ ℝ → 𝐴 ∈ ℂ) | |
12 | 11 | 3ad2ant1 1134 | . . . . . . . 8 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴 ∧ 𝐴 < 𝑀) → 𝐴 ∈ ℂ) |
13 | 12 | adantl 485 | . . . . . . 7 ⊢ (((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℝ+) ∧ (𝐴 ∈ ℝ ∧ 0 ≤ 𝐴 ∧ 𝐴 < 𝑀)) → 𝐴 ∈ ℂ) |
14 | 10, 13 | addcomd 10913 | . . . . . 6 ⊢ (((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℝ+) ∧ (𝐴 ∈ ℝ ∧ 0 ≤ 𝐴 ∧ 𝐴 < 𝑀)) → ((𝑁 · 𝑀) + 𝐴) = (𝐴 + (𝑁 · 𝑀))) |
15 | 14 | oveq1d 7179 | . . . . 5 ⊢ (((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℝ+) ∧ (𝐴 ∈ ℝ ∧ 0 ≤ 𝐴 ∧ 𝐴 < 𝑀)) → (((𝑁 · 𝑀) + 𝐴) mod 𝑀) = ((𝐴 + (𝑁 · 𝑀)) mod 𝑀)) |
16 | simp1 1137 | . . . . . . 7 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴 ∧ 𝐴 < 𝑀) → 𝐴 ∈ ℝ) | |
17 | 16 | adantl 485 | . . . . . 6 ⊢ (((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℝ+) ∧ (𝐴 ∈ ℝ ∧ 0 ≤ 𝐴 ∧ 𝐴 < 𝑀)) → 𝐴 ∈ ℝ) |
18 | simpr 488 | . . . . . . 7 ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℝ+) → 𝑀 ∈ ℝ+) | |
19 | 18 | adantr 484 | . . . . . 6 ⊢ (((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℝ+) ∧ (𝐴 ∈ ℝ ∧ 0 ≤ 𝐴 ∧ 𝐴 < 𝑀)) → 𝑀 ∈ ℝ+) |
20 | simpll 767 | . . . . . 6 ⊢ (((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℝ+) ∧ (𝐴 ∈ ℝ ∧ 0 ≤ 𝐴 ∧ 𝐴 < 𝑀)) → 𝑁 ∈ ℤ) | |
21 | modcyc 13358 | . . . . . 6 ⊢ ((𝐴 ∈ ℝ ∧ 𝑀 ∈ ℝ+ ∧ 𝑁 ∈ ℤ) → ((𝐴 + (𝑁 · 𝑀)) mod 𝑀) = (𝐴 mod 𝑀)) | |
22 | 17, 19, 20, 21 | syl3anc 1372 | . . . . 5 ⊢ (((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℝ+) ∧ (𝐴 ∈ ℝ ∧ 0 ≤ 𝐴 ∧ 𝐴 < 𝑀)) → ((𝐴 + (𝑁 · 𝑀)) mod 𝑀) = (𝐴 mod 𝑀)) |
23 | 18, 16 | anim12ci 617 | . . . . . 6 ⊢ (((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℝ+) ∧ (𝐴 ∈ ℝ ∧ 0 ≤ 𝐴 ∧ 𝐴 < 𝑀)) → (𝐴 ∈ ℝ ∧ 𝑀 ∈ ℝ+)) |
24 | 3simpc 1151 | . . . . . . 7 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴 ∧ 𝐴 < 𝑀) → (0 ≤ 𝐴 ∧ 𝐴 < 𝑀)) | |
25 | 24 | adantl 485 | . . . . . 6 ⊢ (((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℝ+) ∧ (𝐴 ∈ ℝ ∧ 0 ≤ 𝐴 ∧ 𝐴 < 𝑀)) → (0 ≤ 𝐴 ∧ 𝐴 < 𝑀)) |
26 | modid 13348 | . . . . . 6 ⊢ (((𝐴 ∈ ℝ ∧ 𝑀 ∈ ℝ+) ∧ (0 ≤ 𝐴 ∧ 𝐴 < 𝑀)) → (𝐴 mod 𝑀) = 𝐴) | |
27 | 23, 25, 26 | syl2anc 587 | . . . . 5 ⊢ (((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℝ+) ∧ (𝐴 ∈ ℝ ∧ 0 ≤ 𝐴 ∧ 𝐴 < 𝑀)) → (𝐴 mod 𝑀) = 𝐴) |
28 | 15, 22, 27 | 3eqtrd 2777 | . . . 4 ⊢ (((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℝ+) ∧ (𝐴 ∈ ℝ ∧ 0 ≤ 𝐴 ∧ 𝐴 < 𝑀)) → (((𝑁 · 𝑀) + 𝐴) mod 𝑀) = 𝐴) |
29 | 28 | ex 416 | . . 3 ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℝ+) → ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴 ∧ 𝐴 < 𝑀) → (((𝑁 · 𝑀) + 𝐴) mod 𝑀) = 𝐴)) |
30 | 5, 29 | sylbid 243 | . 2 ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℝ+) → (𝐴 ∈ (0[,)𝑀) → (((𝑁 · 𝑀) + 𝐴) mod 𝑀) = 𝐴)) |
31 | 30 | 3impia 1118 | 1 ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℝ+ ∧ 𝐴 ∈ (0[,)𝑀)) → (((𝑁 · 𝑀) + 𝐴) mod 𝑀) = 𝐴) |
Colors of variables: wff setvar class |
Syntax hints: → wi 4 ↔ wb 209 ∧ wa 399 ∧ w3a 1088 = wceq 1542 ∈ wcel 2113 class class class wbr 5027 (class class class)co 7164 ℂcc 10606 ℝcr 10607 0cc0 10608 + caddc 10611 · cmul 10613 ℝ*cxr 10745 < clt 10746 ≤ cle 10747 ℤcz 12055 ℝ+crp 12465 [,)cico 12816 mod cmo 13321 |
This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1802 ax-4 1816 ax-5 1916 ax-6 1974 ax-7 2019 ax-8 2115 ax-9 2123 ax-10 2144 ax-11 2161 ax-12 2178 ax-ext 2710 ax-sep 5164 ax-nul 5171 ax-pow 5229 ax-pr 5293 ax-un 7473 ax-cnex 10664 ax-resscn 10665 ax-1cn 10666 ax-icn 10667 ax-addcl 10668 ax-addrcl 10669 ax-mulcl 10670 ax-mulrcl 10671 ax-mulcom 10672 ax-addass 10673 ax-mulass 10674 ax-distr 10675 ax-i2m1 10676 ax-1ne0 10677 ax-1rid 10678 ax-rnegex 10679 ax-rrecex 10680 ax-cnre 10681 ax-pre-lttri 10682 ax-pre-lttrn 10683 ax-pre-ltadd 10684 ax-pre-mulgt0 10685 ax-pre-sup 10686 |
This theorem depends on definitions: df-bi 210 df-an 400 df-or 847 df-3or 1089 df-3an 1090 df-tru 1545 df-fal 1555 df-ex 1787 df-nf 1791 df-sb 2074 df-mo 2540 df-eu 2570 df-clab 2717 df-cleq 2730 df-clel 2811 df-nfc 2881 df-ne 2935 df-nel 3039 df-ral 3058 df-rex 3059 df-reu 3060 df-rmo 3061 df-rab 3062 df-v 3399 df-sbc 3680 df-csb 3789 df-dif 3844 df-un 3846 df-in 3848 df-ss 3858 df-pss 3860 df-nul 4210 df-if 4412 df-pw 4487 df-sn 4514 df-pr 4516 df-tp 4518 df-op 4520 df-uni 4794 df-iun 4880 df-br 5028 df-opab 5090 df-mpt 5108 df-tr 5134 df-id 5425 df-eprel 5430 df-po 5438 df-so 5439 df-fr 5478 df-we 5480 df-xp 5525 df-rel 5526 df-cnv 5527 df-co 5528 df-dm 5529 df-rn 5530 df-res 5531 df-ima 5532 df-pred 6123 df-ord 6169 df-on 6170 df-lim 6171 df-suc 6172 df-iota 6291 df-fun 6335 df-fn 6336 df-f 6337 df-f1 6338 df-fo 6339 df-f1o 6340 df-fv 6341 df-riota 7121 df-ov 7167 df-oprab 7168 df-mpo 7169 df-om 7594 df-wrecs 7969 df-recs 8030 df-rdg 8068 df-er 8313 df-en 8549 df-dom 8550 df-sdom 8551 df-sup 8972 df-inf 8973 df-pnf 10748 df-mnf 10749 df-xr 10750 df-ltxr 10751 df-le 10752 df-sub 10943 df-neg 10944 df-div 11369 df-nn 11710 df-n0 11970 df-z 12056 df-uz 12318 df-rp 12466 df-ico 12820 df-fl 13246 df-mod 13322 |
This theorem is referenced by: modmuladd 13365 addmodid 13371 mod42tp1mod8 44572 |
Copyright terms: Public domain | W3C validator |