ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  addmodid Unicode version

Theorem addmodid 10389
Description: The sum of a positive integer and a nonnegative integer less than the positive integer is equal to the nonnegative integer modulo the positive integer. (Contributed by Alexander van der Vekens, 30-Oct-2018.) (Proof shortened by AV, 5-Jul-2020.)
Assertion
Ref Expression
addmodid  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  (
( M  +  A
)  mod  M )  =  A )

Proof of Theorem addmodid
StepHypRef Expression
1 simp2 999 . . . . . . 7  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  M  e.  NN )
21nncnd 8950 . . . . . 6  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  M  e.  CC )
32mulid2d 7993 . . . . 5  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  (
1  x.  M )  =  M )
43eqcomd 2194 . . . 4  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  M  =  ( 1  x.  M ) )
54oveq1d 5905 . . 3  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  ( M  +  A )  =  ( ( 1  x.  M )  +  A ) )
65oveq1d 5905 . 2  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  (
( M  +  A
)  mod  M )  =  ( ( ( 1  x.  M )  +  A )  mod 
M ) )
7 1zzd 9297 . . 3  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  1  e.  ZZ )
8 nnq 9650 . . . 4  |-  ( M  e.  NN  ->  M  e.  QQ )
983ad2ant2 1020 . . 3  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  M  e.  QQ )
10 simp1 998 . . . . 5  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  A  e.  NN0 )
1110nn0zd 9390 . . . 4  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  A  e.  ZZ )
12 zq 9643 . . . 4  |-  ( A  e.  ZZ  ->  A  e.  QQ )
1311, 12syl 14 . . 3  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  A  e.  QQ )
14 nn0re 9202 . . . . 5  |-  ( A  e.  NN0  ->  A  e.  RR )
15143ad2ant1 1019 . . . 4  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  A  e.  RR )
1610nn0ge0d 9249 . . . 4  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  0  <_  A )
17 simp3 1000 . . . 4  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  A  <  M )
18 0re 7974 . . . . 5  |-  0  e.  RR
19 nnre 8943 . . . . . . 7  |-  ( M  e.  NN  ->  M  e.  RR )
2019rexrd 8024 . . . . . 6  |-  ( M  e.  NN  ->  M  e.  RR* )
21203ad2ant2 1020 . . . . 5  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  M  e.  RR* )
22 elico2 9954 . . . . 5  |-  ( ( 0  e.  RR  /\  M  e.  RR* )  -> 
( A  e.  ( 0 [,) M )  <-> 
( A  e.  RR  /\  0  <_  A  /\  A  <  M ) ) )
2318, 21, 22sylancr 414 . . . 4  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  ( A  e.  ( 0 [,) M )  <->  ( A  e.  RR  /\  0  <_  A  /\  A  <  M
) ) )
2415, 16, 17, 23mpbir3and 1181 . . 3  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  A  e.  ( 0 [,) M
) )
25 mulqaddmodid 10381 . . 3  |-  ( ( ( 1  e.  ZZ  /\  M  e.  QQ )  /\  ( A  e.  QQ  /\  A  e.  ( 0 [,) M
) ) )  -> 
( ( ( 1  x.  M )  +  A )  mod  M
)  =  A )
267, 9, 13, 24, 25syl22anc 1249 . 2  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  (
( ( 1  x.  M )  +  A
)  mod  M )  =  A )
276, 26eqtrd 2221 1  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  (
( M  +  A
)  mod  M )  =  A )
Colors of variables: wff set class
Syntax hints:    -> wi 4    <-> wb 105    /\ w3a 979    = wceq 1363    e. wcel 2159   class class class wbr 4017  (class class class)co 5890   RRcr 7827   0cc0 7828   1c1 7829    + caddc 7831    x. cmul 7833   RR*cxr 8008    < clt 8009    <_ cle 8010   NNcn 8936   NN0cn0 9193   ZZcz 9270   QQcq 9636   [,)cico 9907    mod cmo 10339
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 106  ax-ia2 107  ax-ia3 108  ax-in1 615  ax-in2 616  ax-io 710  ax-5 1457  ax-7 1458  ax-gen 1459  ax-ie1 1503  ax-ie2 1504  ax-8 1514  ax-10 1515  ax-11 1516  ax-i12 1517  ax-bndl 1519  ax-4 1520  ax-17 1536  ax-i9 1540  ax-ial 1544  ax-i5r 1545  ax-13 2161  ax-14 2162  ax-ext 2170  ax-sep 4135  ax-pow 4188  ax-pr 4223  ax-un 4447  ax-setind 4550  ax-cnex 7919  ax-resscn 7920  ax-1cn 7921  ax-1re 7922  ax-icn 7923  ax-addcl 7924  ax-addrcl 7925  ax-mulcl 7926  ax-mulrcl 7927  ax-addcom 7928  ax-mulcom 7929  ax-addass 7930  ax-mulass 7931  ax-distr 7932  ax-i2m1 7933  ax-0lt1 7934  ax-1rid 7935  ax-0id 7936  ax-rnegex 7937  ax-precex 7938  ax-cnre 7939  ax-pre-ltirr 7940  ax-pre-ltwlin 7941  ax-pre-lttrn 7942  ax-pre-apti 7943  ax-pre-ltadd 7944  ax-pre-mulgt0 7945  ax-pre-mulext 7946  ax-arch 7947
This theorem depends on definitions:  df-bi 117  df-3or 980  df-3an 981  df-tru 1366  df-fal 1369  df-nf 1471  df-sb 1773  df-eu 2040  df-mo 2041  df-clab 2175  df-cleq 2181  df-clel 2184  df-nfc 2320  df-ne 2360  df-nel 2455  df-ral 2472  df-rex 2473  df-reu 2474  df-rmo 2475  df-rab 2476  df-v 2753  df-sbc 2977  df-csb 3072  df-dif 3145  df-un 3147  df-in 3149  df-ss 3156  df-pw 3591  df-sn 3612  df-pr 3613  df-op 3615  df-uni 3824  df-int 3859  df-iun 3902  df-br 4018  df-opab 4079  df-mpt 4080  df-id 4307  df-po 4310  df-iso 4311  df-xp 4646  df-rel 4647  df-cnv 4648  df-co 4649  df-dm 4650  df-rn 4651  df-res 4652  df-ima 4653  df-iota 5192  df-fun 5232  df-fn 5233  df-f 5234  df-fv 5238  df-riota 5846  df-ov 5893  df-oprab 5894  df-mpo 5895  df-1st 6158  df-2nd 6159  df-pnf 8011  df-mnf 8012  df-xr 8013  df-ltxr 8014  df-le 8015  df-sub 8147  df-neg 8148  df-reap 8549  df-ap 8556  df-div 8647  df-inn 8937  df-n0 9194  df-z 9271  df-q 9637  df-rp 9671  df-ico 9911  df-fl 10287  df-mod 10340
This theorem is referenced by:  addmodidr  10390
  Copyright terms: Public domain W3C validator