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

Theorem addmodid 10534
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 1001 . . . . . . 7  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  M  e.  NN )
21nncnd 9065 . . . . . 6  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  M  e.  CC )
32mulid2d 8106 . . . . 5  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  (
1  x.  M )  =  M )
43eqcomd 2212 . . . 4  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  M  =  ( 1  x.  M ) )
54oveq1d 5971 . . 3  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  ( M  +  A )  =  ( ( 1  x.  M )  +  A ) )
65oveq1d 5971 . 2  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  (
( M  +  A
)  mod  M )  =  ( ( ( 1  x.  M )  +  A )  mod 
M ) )
7 1zzd 9414 . . 3  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  1  e.  ZZ )
8 nnq 9769 . . . 4  |-  ( M  e.  NN  ->  M  e.  QQ )
983ad2ant2 1022 . . 3  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  M  e.  QQ )
10 simp1 1000 . . . . 5  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  A  e.  NN0 )
1110nn0zd 9508 . . . 4  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  A  e.  ZZ )
12 zq 9762 . . . 4  |-  ( A  e.  ZZ  ->  A  e.  QQ )
1311, 12syl 14 . . 3  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  A  e.  QQ )
14 nn0re 9319 . . . . 5  |-  ( A  e.  NN0  ->  A  e.  RR )
15143ad2ant1 1021 . . . 4  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  A  e.  RR )
1610nn0ge0d 9366 . . . 4  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  0  <_  A )
17 simp3 1002 . . . 4  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  A  <  M )
18 0re 8087 . . . . 5  |-  0  e.  RR
19 nnre 9058 . . . . . . 7  |-  ( M  e.  NN  ->  M  e.  RR )
2019rexrd 8137 . . . . . 6  |-  ( M  e.  NN  ->  M  e.  RR* )
21203ad2ant2 1022 . . . . 5  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  M  e.  RR* )
22 elico2 10074 . . . . 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 1183 . . 3  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  A  e.  ( 0 [,) M
) )
25 mulqaddmodid 10526 . . 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 1251 . 2  |-  ( ( A  e.  NN0  /\  M  e.  NN  /\  A  <  M )  ->  (
( ( 1  x.  M )  +  A
)  mod  M )  =  A )
276, 26eqtrd 2239 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 981    = wceq 1373    e. wcel 2177   class class class wbr 4050  (class class class)co 5956   RRcr 7939   0cc0 7940   1c1 7941    + caddc 7943    x. cmul 7945   RR*cxr 8121    < clt 8122    <_ cle 8123   NNcn 9051   NN0cn0 9310   ZZcz 9387   QQcq 9755   [,)cico 10027    mod cmo 10484
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 711  ax-5 1471  ax-7 1472  ax-gen 1473  ax-ie1 1517  ax-ie2 1518  ax-8 1528  ax-10 1529  ax-11 1530  ax-i12 1531  ax-bndl 1533  ax-4 1534  ax-17 1550  ax-i9 1554  ax-ial 1558  ax-i5r 1559  ax-13 2179  ax-14 2180  ax-ext 2188  ax-sep 4169  ax-pow 4225  ax-pr 4260  ax-un 4487  ax-setind 4592  ax-cnex 8031  ax-resscn 8032  ax-1cn 8033  ax-1re 8034  ax-icn 8035  ax-addcl 8036  ax-addrcl 8037  ax-mulcl 8038  ax-mulrcl 8039  ax-addcom 8040  ax-mulcom 8041  ax-addass 8042  ax-mulass 8043  ax-distr 8044  ax-i2m1 8045  ax-0lt1 8046  ax-1rid 8047  ax-0id 8048  ax-rnegex 8049  ax-precex 8050  ax-cnre 8051  ax-pre-ltirr 8052  ax-pre-ltwlin 8053  ax-pre-lttrn 8054  ax-pre-apti 8055  ax-pre-ltadd 8056  ax-pre-mulgt0 8057  ax-pre-mulext 8058  ax-arch 8059
This theorem depends on definitions:  df-bi 117  df-3or 982  df-3an 983  df-tru 1376  df-fal 1379  df-nf 1485  df-sb 1787  df-eu 2058  df-mo 2059  df-clab 2193  df-cleq 2199  df-clel 2202  df-nfc 2338  df-ne 2378  df-nel 2473  df-ral 2490  df-rex 2491  df-reu 2492  df-rmo 2493  df-rab 2494  df-v 2775  df-sbc 3003  df-csb 3098  df-dif 3172  df-un 3174  df-in 3176  df-ss 3183  df-pw 3622  df-sn 3643  df-pr 3644  df-op 3646  df-uni 3856  df-int 3891  df-iun 3934  df-br 4051  df-opab 4113  df-mpt 4114  df-id 4347  df-po 4350  df-iso 4351  df-xp 4688  df-rel 4689  df-cnv 4690  df-co 4691  df-dm 4692  df-rn 4693  df-res 4694  df-ima 4695  df-iota 5240  df-fun 5281  df-fn 5282  df-f 5283  df-fv 5287  df-riota 5911  df-ov 5959  df-oprab 5960  df-mpo 5961  df-1st 6238  df-2nd 6239  df-pnf 8124  df-mnf 8125  df-xr 8126  df-ltxr 8127  df-le 8128  df-sub 8260  df-neg 8261  df-reap 8663  df-ap 8670  df-div 8761  df-inn 9052  df-n0 9311  df-z 9388  df-q 9756  df-rp 9791  df-ico 10031  df-fl 10430  df-mod 10485
This theorem is referenced by:  addmodidr  10535
  Copyright terms: Public domain W3C validator