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

Theorem modqltm1p1mod 10270
Description: If a number modulo a modulus is less than the modulus decreased by 1, the first number increased by 1 modulo the modulus equals the first number modulo the modulus, increased by 1. (Contributed by Jim Kingdon, 24-Oct-2021.)
Assertion
Ref Expression
modqltm1p1mod  |-  ( ( ( A  e.  QQ  /\  ( A  mod  M
)  <  ( M  -  1 ) )  /\  ( M  e.  QQ  /\  0  < 
M ) )  -> 
( ( A  + 
1 )  mod  M
)  =  ( ( A  mod  M )  +  1 ) )

Proof of Theorem modqltm1p1mod
StepHypRef Expression
1 simpll 519 . . 3  |-  ( ( ( A  e.  QQ  /\  ( A  mod  M
)  <  ( M  -  1 ) )  /\  ( M  e.  QQ  /\  0  < 
M ) )  ->  A  e.  QQ )
2 1z 9188 . . . 4  |-  1  e.  ZZ
3 zq 9530 . . . 4  |-  ( 1  e.  ZZ  ->  1  e.  QQ )
42, 3mp1i 10 . . 3  |-  ( ( ( A  e.  QQ  /\  ( A  mod  M
)  <  ( M  -  1 ) )  /\  ( M  e.  QQ  /\  0  < 
M ) )  -> 
1  e.  QQ )
5 simprl 521 . . 3  |-  ( ( ( A  e.  QQ  /\  ( A  mod  M
)  <  ( M  -  1 ) )  /\  ( M  e.  QQ  /\  0  < 
M ) )  ->  M  e.  QQ )
6 simprr 522 . . 3  |-  ( ( ( A  e.  QQ  /\  ( A  mod  M
)  <  ( M  -  1 ) )  /\  ( M  e.  QQ  /\  0  < 
M ) )  -> 
0  <  M )
7 modqaddmod 10257 . . 3  |-  ( ( ( A  e.  QQ  /\  1  e.  QQ )  /\  ( M  e.  QQ  /\  0  < 
M ) )  -> 
( ( ( A  mod  M )  +  1 )  mod  M
)  =  ( ( A  +  1 )  mod  M ) )
81, 4, 5, 6, 7syl22anc 1221 . 2  |-  ( ( ( A  e.  QQ  /\  ( A  mod  M
)  <  ( M  -  1 ) )  /\  ( M  e.  QQ  /\  0  < 
M ) )  -> 
( ( ( A  mod  M )  +  1 )  mod  M
)  =  ( ( A  +  1 )  mod  M ) )
91, 5, 6modqcld 10222 . . . 4  |-  ( ( ( A  e.  QQ  /\  ( A  mod  M
)  <  ( M  -  1 ) )  /\  ( M  e.  QQ  /\  0  < 
M ) )  -> 
( A  mod  M
)  e.  QQ )
10 qaddcl 9539 . . . 4  |-  ( ( ( A  mod  M
)  e.  QQ  /\  1  e.  QQ )  ->  ( ( A  mod  M )  +  1 )  e.  QQ )
119, 4, 10syl2anc 409 . . 3  |-  ( ( ( A  e.  QQ  /\  ( A  mod  M
)  <  ( M  -  1 ) )  /\  ( M  e.  QQ  /\  0  < 
M ) )  -> 
( ( A  mod  M )  +  1 )  e.  QQ )
12 0red 7874 . . . 4  |-  ( ( ( A  e.  QQ  /\  ( A  mod  M
)  <  ( M  -  1 ) )  /\  ( M  e.  QQ  /\  0  < 
M ) )  -> 
0  e.  RR )
13 qre 9529 . . . . 5  |-  ( ( A  mod  M )  e.  QQ  ->  ( A  mod  M )  e.  RR )
149, 13syl 14 . . . 4  |-  ( ( ( A  e.  QQ  /\  ( A  mod  M
)  <  ( M  -  1 ) )  /\  ( M  e.  QQ  /\  0  < 
M ) )  -> 
( A  mod  M
)  e.  RR )
15 1red 7888 . . . . 5  |-  ( ( ( A  e.  QQ  /\  ( A  mod  M
)  <  ( M  -  1 ) )  /\  ( M  e.  QQ  /\  0  < 
M ) )  -> 
1  e.  RR )
1614, 15readdcld 7902 . . . 4  |-  ( ( ( A  e.  QQ  /\  ( A  mod  M
)  <  ( M  -  1 ) )  /\  ( M  e.  QQ  /\  0  < 
M ) )  -> 
( ( A  mod  M )  +  1 )  e.  RR )
17 modqge0 10226 . . . . 5  |-  ( ( A  e.  QQ  /\  M  e.  QQ  /\  0  <  M )  ->  0  <_  ( A  mod  M
) )
181, 5, 6, 17syl3anc 1220 . . . 4  |-  ( ( ( A  e.  QQ  /\  ( A  mod  M
)  <  ( M  -  1 ) )  /\  ( M  e.  QQ  /\  0  < 
M ) )  -> 
0  <_  ( A  mod  M ) )
1914lep1d 8797 . . . 4  |-  ( ( ( A  e.  QQ  /\  ( A  mod  M
)  <  ( M  -  1 ) )  /\  ( M  e.  QQ  /\  0  < 
M ) )  -> 
( A  mod  M
)  <_  ( ( A  mod  M )  +  1 ) )
2012, 14, 16, 18, 19letrd 7994 . . 3  |-  ( ( ( A  e.  QQ  /\  ( A  mod  M
)  <  ( M  -  1 ) )  /\  ( M  e.  QQ  /\  0  < 
M ) )  -> 
0  <_  ( ( A  mod  M )  +  1 ) )
21 simplr 520 . . . 4  |-  ( ( ( A  e.  QQ  /\  ( A  mod  M
)  <  ( M  -  1 ) )  /\  ( M  e.  QQ  /\  0  < 
M ) )  -> 
( A  mod  M
)  <  ( M  -  1 ) )
22 qre 9529 . . . . . 6  |-  ( M  e.  QQ  ->  M  e.  RR )
235, 22syl 14 . . . . 5  |-  ( ( ( A  e.  QQ  /\  ( A  mod  M
)  <  ( M  -  1 ) )  /\  ( M  e.  QQ  /\  0  < 
M ) )  ->  M  e.  RR )
2414, 15, 23ltaddsubd 8415 . . . 4  |-  ( ( ( A  e.  QQ  /\  ( A  mod  M
)  <  ( M  -  1 ) )  /\  ( M  e.  QQ  /\  0  < 
M ) )  -> 
( ( ( A  mod  M )  +  1 )  <  M  <->  ( A  mod  M )  <  ( M  - 
1 ) ) )
2521, 24mpbird 166 . . 3  |-  ( ( ( A  e.  QQ  /\  ( A  mod  M
)  <  ( M  -  1 ) )  /\  ( M  e.  QQ  /\  0  < 
M ) )  -> 
( ( A  mod  M )  +  1 )  <  M )
26 modqid 10243 . . 3  |-  ( ( ( ( ( A  mod  M )  +  1 )  e.  QQ  /\  M  e.  QQ )  /\  ( 0  <_ 
( ( A  mod  M )  +  1 )  /\  ( ( A  mod  M )  +  1 )  <  M
) )  ->  (
( ( A  mod  M )  +  1 )  mod  M )  =  ( ( A  mod  M )  +  1 ) )
2711, 5, 20, 25, 26syl22anc 1221 . 2  |-  ( ( ( A  e.  QQ  /\  ( A  mod  M
)  <  ( M  -  1 ) )  /\  ( M  e.  QQ  /\  0  < 
M ) )  -> 
( ( ( A  mod  M )  +  1 )  mod  M
)  =  ( ( A  mod  M )  +  1 ) )
288, 27eqtr3d 2192 1  |-  ( ( ( A  e.  QQ  /\  ( A  mod  M
)  <  ( M  -  1 ) )  /\  ( M  e.  QQ  /\  0  < 
M ) )  -> 
( ( A  + 
1 )  mod  M
)  =  ( ( A  mod  M )  +  1 ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 103    = wceq 1335    e. wcel 2128   class class class wbr 3965  (class class class)co 5821   RRcr 7726   0cc0 7727   1c1 7728    + caddc 7730    < clt 7907    <_ cle 7908    - cmin 8041   ZZcz 9162   QQcq 9523    mod cmo 10216
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 604  ax-in2 605  ax-io 699  ax-5 1427  ax-7 1428  ax-gen 1429  ax-ie1 1473  ax-ie2 1474  ax-8 1484  ax-10 1485  ax-11 1486  ax-i12 1487  ax-bndl 1489  ax-4 1490  ax-17 1506  ax-i9 1510  ax-ial 1514  ax-i5r 1515  ax-13 2130  ax-14 2131  ax-ext 2139  ax-sep 4082  ax-pow 4135  ax-pr 4169  ax-un 4393  ax-setind 4495  ax-cnex 7818  ax-resscn 7819  ax-1cn 7820  ax-1re 7821  ax-icn 7822  ax-addcl 7823  ax-addrcl 7824  ax-mulcl 7825  ax-mulrcl 7826  ax-addcom 7827  ax-mulcom 7828  ax-addass 7829  ax-mulass 7830  ax-distr 7831  ax-i2m1 7832  ax-0lt1 7833  ax-1rid 7834  ax-0id 7835  ax-rnegex 7836  ax-precex 7837  ax-cnre 7838  ax-pre-ltirr 7839  ax-pre-ltwlin 7840  ax-pre-lttrn 7841  ax-pre-apti 7842  ax-pre-ltadd 7843  ax-pre-mulgt0 7844  ax-pre-mulext 7845  ax-arch 7846
This theorem depends on definitions:  df-bi 116  df-3or 964  df-3an 965  df-tru 1338  df-fal 1341  df-nf 1441  df-sb 1743  df-eu 2009  df-mo 2010  df-clab 2144  df-cleq 2150  df-clel 2153  df-nfc 2288  df-ne 2328  df-nel 2423  df-ral 2440  df-rex 2441  df-reu 2442  df-rmo 2443  df-rab 2444  df-v 2714  df-sbc 2938  df-csb 3032  df-dif 3104  df-un 3106  df-in 3108  df-ss 3115  df-pw 3545  df-sn 3566  df-pr 3567  df-op 3569  df-uni 3773  df-int 3808  df-iun 3851  df-br 3966  df-opab 4026  df-mpt 4027  df-id 4253  df-po 4256  df-iso 4257  df-xp 4591  df-rel 4592  df-cnv 4593  df-co 4594  df-dm 4595  df-rn 4596  df-res 4597  df-ima 4598  df-iota 5134  df-fun 5171  df-fn 5172  df-f 5173  df-fv 5177  df-riota 5777  df-ov 5824  df-oprab 5825  df-mpo 5826  df-1st 6085  df-2nd 6086  df-pnf 7909  df-mnf 7910  df-xr 7911  df-ltxr 7912  df-le 7913  df-sub 8043  df-neg 8044  df-reap 8445  df-ap 8452  df-div 8541  df-inn 8829  df-n0 9086  df-z 9163  df-q 9524  df-rp 9556  df-fl 10164  df-mod 10217
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator