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

Theorem muladdmodid 12137
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.)
Assertion
Ref Expression
muladdmodid  |-  ( ( N  e.  ZZ  /\  M  e.  RR+  /\  A  e.  ( 0 [,) M
) )  ->  (
( ( N  x.  M )  +  A
)  mod  M )  =  A )

Proof of Theorem muladdmodid
StepHypRef Expression
1 0red 9644 . . . . 5  |-  ( M  e.  RR+  ->  0  e.  RR )
2 rpxr 11309 . . . . 5  |-  ( M  e.  RR+  ->  M  e. 
RR* )
3 elico2 11698 . . . . 5  |-  ( ( 0  e.  RR  /\  M  e.  RR* )  -> 
( A  e.  ( 0 [,) M )  <-> 
( A  e.  RR  /\  0  <_  A  /\  A  <  M ) ) )
41, 2, 3syl2anc 667 . . . 4  |-  ( M  e.  RR+  ->  ( A  e.  ( 0 [,) M )  <->  ( A  e.  RR  /\  0  <_  A  /\  A  <  M
) ) )
54adantl 468 . . 3  |-  ( ( N  e.  ZZ  /\  M  e.  RR+ )  -> 
( A  e.  ( 0 [,) M )  <-> 
( A  e.  RR  /\  0  <_  A  /\  A  <  M ) ) )
6 zcn 10942 . . . . . . . . 9  |-  ( N  e.  ZZ  ->  N  e.  CC )
7 rpcn 11310 . . . . . . . . 9  |-  ( M  e.  RR+  ->  M  e.  CC )
8 mulcl 9623 . . . . . . . . 9  |-  ( ( N  e.  CC  /\  M  e.  CC )  ->  ( N  x.  M
)  e.  CC )
96, 7, 8syl2an 480 . . . . . . . 8  |-  ( ( N  e.  ZZ  /\  M  e.  RR+ )  -> 
( N  x.  M
)  e.  CC )
109adantr 467 . . . . . . 7  |-  ( ( ( N  e.  ZZ  /\  M  e.  RR+ )  /\  ( A  e.  RR  /\  0  <_  A  /\  A  <  M ) )  ->  ( N  x.  M )  e.  CC )
11 recn 9629 . . . . . . . . 9  |-  ( A  e.  RR  ->  A  e.  CC )
12113ad2ant1 1029 . . . . . . . 8  |-  ( ( A  e.  RR  /\  0  <_  A  /\  A  <  M )  ->  A  e.  CC )
1312adantl 468 . . . . . . 7  |-  ( ( ( N  e.  ZZ  /\  M  e.  RR+ )  /\  ( A  e.  RR  /\  0  <_  A  /\  A  <  M ) )  ->  A  e.  CC )
1410, 13addcomd 9835 . . . . . 6  |-  ( ( ( N  e.  ZZ  /\  M  e.  RR+ )  /\  ( A  e.  RR  /\  0  <_  A  /\  A  <  M ) )  ->  ( ( N  x.  M )  +  A )  =  ( A  +  ( N  x.  M ) ) )
1514oveq1d 6305 . . . . 5  |-  ( ( ( N  e.  ZZ  /\  M  e.  RR+ )  /\  ( A  e.  RR  /\  0  <_  A  /\  A  <  M ) )  ->  ( ( ( N  x.  M )  +  A )  mod 
M )  =  ( ( A  +  ( N  x.  M ) )  mod  M ) )
16 simp1 1008 . . . . . . 7  |-  ( ( A  e.  RR  /\  0  <_  A  /\  A  <  M )  ->  A  e.  RR )
1716adantl 468 . . . . . 6  |-  ( ( ( N  e.  ZZ  /\  M  e.  RR+ )  /\  ( A  e.  RR  /\  0  <_  A  /\  A  <  M ) )  ->  A  e.  RR )
18 simpr 463 . . . . . . 7  |-  ( ( N  e.  ZZ  /\  M  e.  RR+ )  ->  M  e.  RR+ )
1918adantr 467 . . . . . 6  |-  ( ( ( N  e.  ZZ  /\  M  e.  RR+ )  /\  ( A  e.  RR  /\  0  <_  A  /\  A  <  M ) )  ->  M  e.  RR+ )
20 simpll 760 . . . . . 6  |-  ( ( ( N  e.  ZZ  /\  M  e.  RR+ )  /\  ( A  e.  RR  /\  0  <_  A  /\  A  <  M ) )  ->  N  e.  ZZ )
21 modcyc 12132 . . . . . 6  |-  ( ( A  e.  RR  /\  M  e.  RR+  /\  N  e.  ZZ )  ->  (
( A  +  ( N  x.  M ) )  mod  M )  =  ( A  mod  M ) )
2217, 19, 20, 21syl3anc 1268 . . . . 5  |-  ( ( ( N  e.  ZZ  /\  M  e.  RR+ )  /\  ( A  e.  RR  /\  0  <_  A  /\  A  <  M ) )  ->  ( ( A  +  ( N  x.  M ) )  mod 
M )  =  ( A  mod  M ) )
2318, 16anim12ci 571 . . . . . 6  |-  ( ( ( N  e.  ZZ  /\  M  e.  RR+ )  /\  ( A  e.  RR  /\  0  <_  A  /\  A  <  M ) )  ->  ( A  e.  RR  /\  M  e.  RR+ ) )
24 3simpc 1007 . . . . . . 7  |-  ( ( A  e.  RR  /\  0  <_  A  /\  A  <  M )  ->  (
0  <_  A  /\  A  <  M ) )
2524adantl 468 . . . . . 6  |-  ( ( ( N  e.  ZZ  /\  M  e.  RR+ )  /\  ( A  e.  RR  /\  0  <_  A  /\  A  <  M ) )  ->  ( 0  <_  A  /\  A  <  M
) )
26 modid 12121 . . . . . 6  |-  ( ( ( A  e.  RR  /\  M  e.  RR+ )  /\  ( 0  <_  A  /\  A  <  M ) )  ->  ( A  mod  M )  =  A )
2723, 25, 26syl2anc 667 . . . . 5  |-  ( ( ( N  e.  ZZ  /\  M  e.  RR+ )  /\  ( A  e.  RR  /\  0  <_  A  /\  A  <  M ) )  ->  ( A  mod  M )  =  A )
2815, 22, 273eqtrd 2489 . . . 4  |-  ( ( ( N  e.  ZZ  /\  M  e.  RR+ )  /\  ( A  e.  RR  /\  0  <_  A  /\  A  <  M ) )  ->  ( ( ( N  x.  M )  +  A )  mod 
M )  =  A )
2928ex 436 . . 3  |-  ( ( N  e.  ZZ  /\  M  e.  RR+ )  -> 
( ( A  e.  RR  /\  0  <_  A  /\  A  <  M
)  ->  ( (
( N  x.  M
)  +  A )  mod  M )  =  A ) )
305, 29sylbid 219 . 2  |-  ( ( N  e.  ZZ  /\  M  e.  RR+ )  -> 
( A  e.  ( 0 [,) M )  ->  ( ( ( N  x.  M )  +  A )  mod 
M )  =  A ) )
31303impia 1205 1  |-  ( ( N  e.  ZZ  /\  M  e.  RR+  /\  A  e.  ( 0 [,) M
) )  ->  (
( ( N  x.  M )  +  A
)  mod  M )  =  A )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 188    /\ wa 371    /\ w3a 985    = wceq 1444    e. wcel 1887   class class class wbr 4402  (class class class)co 6290   CCcc 9537   RRcr 9538   0cc0 9539    + caddc 9542    x. cmul 9544   RR*cxr 9674    < clt 9675    <_ cle 9676   ZZcz 10937   RR+crp 11302   [,)cico 11637    mod cmo 12096
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1669  ax-4 1682  ax-5 1758  ax-6 1805  ax-7 1851  ax-8 1889  ax-9 1896  ax-10 1915  ax-11 1920  ax-12 1933  ax-13 2091  ax-ext 2431  ax-sep 4525  ax-nul 4534  ax-pow 4581  ax-pr 4639  ax-un 6583  ax-cnex 9595  ax-resscn 9596  ax-1cn 9597  ax-icn 9598  ax-addcl 9599  ax-addrcl 9600  ax-mulcl 9601  ax-mulrcl 9602  ax-mulcom 9603  ax-addass 9604  ax-mulass 9605  ax-distr 9606  ax-i2m1 9607  ax-1ne0 9608  ax-1rid 9609  ax-rnegex 9610  ax-rrecex 9611  ax-cnre 9612  ax-pre-lttri 9613  ax-pre-lttrn 9614  ax-pre-ltadd 9615  ax-pre-mulgt0 9616  ax-pre-sup 9617
This theorem depends on definitions:  df-bi 189  df-or 372  df-an 373  df-3or 986  df-3an 987  df-tru 1447  df-ex 1664  df-nf 1668  df-sb 1798  df-eu 2303  df-mo 2304  df-clab 2438  df-cleq 2444  df-clel 2447  df-nfc 2581  df-ne 2624  df-nel 2625  df-ral 2742  df-rex 2743  df-reu 2744  df-rmo 2745  df-rab 2746  df-v 3047  df-sbc 3268  df-csb 3364  df-dif 3407  df-un 3409  df-in 3411  df-ss 3418  df-pss 3420  df-nul 3732  df-if 3882  df-pw 3953  df-sn 3969  df-pr 3971  df-tp 3973  df-op 3975  df-uni 4199  df-iun 4280  df-br 4403  df-opab 4462  df-mpt 4463  df-tr 4498  df-eprel 4745  df-id 4749  df-po 4755  df-so 4756  df-fr 4793  df-we 4795  df-xp 4840  df-rel 4841  df-cnv 4842  df-co 4843  df-dm 4844  df-rn 4845  df-res 4846  df-ima 4847  df-pred 5380  df-ord 5426  df-on 5427  df-lim 5428  df-suc 5429  df-iota 5546  df-fun 5584  df-fn 5585  df-f 5586  df-f1 5587  df-fo 5588  df-f1o 5589  df-fv 5590  df-riota 6252  df-ov 6293  df-oprab 6294  df-mpt2 6295  df-om 6693  df-wrecs 7028  df-recs 7090  df-rdg 7128  df-er 7363  df-en 7570  df-dom 7571  df-sdom 7572  df-sup 7956  df-inf 7957  df-pnf 9677  df-mnf 9678  df-xr 9679  df-ltxr 9680  df-le 9681  df-sub 9862  df-neg 9863  df-div 10270  df-nn 10610  df-n0 10870  df-z 10938  df-uz 11160  df-rp 11303  df-ico 11641  df-fl 12028  df-mod 12097
This theorem is referenced by:  addmodid  12139
  Copyright terms: Public domain W3C validator