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

Theorem modmulconst 11753
Description: Constant multiplication in a modulo operation, see theorem 5.3 in [ApostolNT] p. 108. (Contributed by AV, 21-Jul-2021.)
Assertion
Ref Expression
modmulconst  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  /\  M  e.  NN )  ->  ( ( A  mod  M )  =  ( B  mod  M
)  <->  ( ( C  x.  A )  mod  ( C  x.  M
) )  =  ( ( C  x.  B
)  mod  ( C  x.  M ) ) ) )

Proof of Theorem modmulconst
StepHypRef Expression
1 nnz 9202 . . . . 5  |-  ( M  e.  NN  ->  M  e.  ZZ )
21adantl 275 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  /\  M  e.  NN )  ->  M  e.  ZZ )
3 zsubcl 9224 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( A  -  B
)  e.  ZZ )
433adant3 1006 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  ( A  -  B )  e.  ZZ )
54adantr 274 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  /\  M  e.  NN )  ->  ( A  -  B )  e.  ZZ )
6 nnz 9202 . . . . . . 7  |-  ( C  e.  NN  ->  C  e.  ZZ )
7 nnne0 8877 . . . . . . 7  |-  ( C  e.  NN  ->  C  =/=  0 )
86, 7jca 304 . . . . . 6  |-  ( C  e.  NN  ->  ( C  e.  ZZ  /\  C  =/=  0 ) )
983ad2ant3 1009 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  ( C  e.  ZZ  /\  C  =/=  0 ) )
109adantr 274 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  /\  M  e.  NN )  ->  ( C  e.  ZZ  /\  C  =/=  0 ) )
11 dvdscmulr 11750 . . . . 5  |-  ( ( M  e.  ZZ  /\  ( A  -  B
)  e.  ZZ  /\  ( C  e.  ZZ  /\  C  =/=  0 ) )  ->  ( ( C  x.  M )  ||  ( C  x.  ( A  -  B )
)  <->  M  ||  ( A  -  B ) ) )
1211bicomd 140 . . . 4  |-  ( ( M  e.  ZZ  /\  ( A  -  B
)  e.  ZZ  /\  ( C  e.  ZZ  /\  C  =/=  0 ) )  ->  ( M  ||  ( A  -  B
)  <->  ( C  x.  M )  ||  ( C  x.  ( A  -  B ) ) ) )
132, 5, 10, 12syl3anc 1227 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  /\  M  e.  NN )  ->  ( M  ||  ( A  -  B
)  <->  ( C  x.  M )  ||  ( C  x.  ( A  -  B ) ) ) )
14 zcn 9188 . . . . . . . 8  |-  ( A  e.  ZZ  ->  A  e.  CC )
15 zcn 9188 . . . . . . . 8  |-  ( B  e.  ZZ  ->  B  e.  CC )
16 nncn 8857 . . . . . . . 8  |-  ( C  e.  NN  ->  C  e.  CC )
1714, 15, 163anim123i 1173 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC ) )
18 3anrot 972 . . . . . . 7  |-  ( ( C  e.  CC  /\  A  e.  CC  /\  B  e.  CC )  <->  ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC ) )
1917, 18sylibr 133 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  ( C  e.  CC  /\  A  e.  CC  /\  B  e.  CC ) )
20 subdi 8275 . . . . . 6  |-  ( ( C  e.  CC  /\  A  e.  CC  /\  B  e.  CC )  ->  ( C  x.  ( A  -  B ) )  =  ( ( C  x.  A )  -  ( C  x.  B )
) )
2119, 20syl 14 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  ( C  x.  ( A  -  B ) )  =  ( ( C  x.  A )  -  ( C  x.  B )
) )
2221adantr 274 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  /\  M  e.  NN )  ->  ( C  x.  ( A  -  B
) )  =  ( ( C  x.  A
)  -  ( C  x.  B ) ) )
2322breq2d 3989 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  /\  M  e.  NN )  ->  ( ( C  x.  M )  ||  ( C  x.  ( A  -  B )
)  <->  ( C  x.  M )  ||  (
( C  x.  A
)  -  ( C  x.  B ) ) ) )
2413, 23bitrd 187 . 2  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  /\  M  e.  NN )  ->  ( M  ||  ( A  -  B
)  <->  ( C  x.  M )  ||  (
( C  x.  A
)  -  ( C  x.  B ) ) ) )
25 simpr 109 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  /\  M  e.  NN )  ->  M  e.  NN )
26 simp1 986 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  A  e.  ZZ )
2726adantr 274 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  /\  M  e.  NN )  ->  A  e.  ZZ )
28 simp2 987 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  B  e.  ZZ )
2928adantr 274 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  /\  M  e.  NN )  ->  B  e.  ZZ )
30 moddvds 11729 . . 3  |-  ( ( M  e.  NN  /\  A  e.  ZZ  /\  B  e.  ZZ )  ->  (
( A  mod  M
)  =  ( B  mod  M )  <->  M  ||  ( A  -  B )
) )
3125, 27, 29, 30syl3anc 1227 . 2  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  /\  M  e.  NN )  ->  ( ( A  mod  M )  =  ( B  mod  M
)  <->  M  ||  ( A  -  B ) ) )
32 simpl3 991 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  /\  M  e.  NN )  ->  C  e.  NN )
3332, 25nnmulcld 8898 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  /\  M  e.  NN )  ->  ( C  x.  M )  e.  NN )
3463ad2ant3 1009 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  C  e.  ZZ )
3534, 26zmulcld 9311 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  ( C  x.  A )  e.  ZZ )
3635adantr 274 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  /\  M  e.  NN )  ->  ( C  x.  A )  e.  ZZ )
3734, 28zmulcld 9311 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  ( C  x.  B )  e.  ZZ )
3837adantr 274 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  /\  M  e.  NN )  ->  ( C  x.  B )  e.  ZZ )
39 moddvds 11729 . . 3  |-  ( ( ( C  x.  M
)  e.  NN  /\  ( C  x.  A
)  e.  ZZ  /\  ( C  x.  B
)  e.  ZZ )  ->  ( ( ( C  x.  A )  mod  ( C  x.  M ) )  =  ( ( C  x.  B )  mod  ( C  x.  M )
)  <->  ( C  x.  M )  ||  (
( C  x.  A
)  -  ( C  x.  B ) ) ) )
4033, 36, 38, 39syl3anc 1227 . 2  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  /\  M  e.  NN )  ->  ( ( ( C  x.  A )  mod  ( C  x.  M ) )  =  ( ( C  x.  B )  mod  ( C  x.  M )
)  <->  ( C  x.  M )  ||  (
( C  x.  A
)  -  ( C  x.  B ) ) ) )
4124, 31, 403bitr4d 219 1  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  /\  M  e.  NN )  ->  ( ( A  mod  M )  =  ( B  mod  M
)  <->  ( ( C  x.  A )  mod  ( C  x.  M
) )  =  ( ( C  x.  B
)  mod  ( C  x.  M ) ) ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 103    <-> wb 104    /\ w3a 967    = wceq 1342    e. wcel 2135    =/= wne 2334   class class class wbr 3977  (class class class)co 5837   CCcc 7743   0cc0 7745    x. cmul 7750    - cmin 8061   NNcn 8849   ZZcz 9183    mod cmo 10248    || cdvds 11717
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 1434  ax-7 1435  ax-gen 1436  ax-ie1 1480  ax-ie2 1481  ax-8 1491  ax-10 1492  ax-11 1493  ax-i12 1494  ax-bndl 1496  ax-4 1497  ax-17 1513  ax-i9 1517  ax-ial 1521  ax-i5r 1522  ax-13 2137  ax-14 2138  ax-ext 2146  ax-sep 4095  ax-pow 4148  ax-pr 4182  ax-un 4406  ax-setind 4509  ax-cnex 7836  ax-resscn 7837  ax-1cn 7838  ax-1re 7839  ax-icn 7840  ax-addcl 7841  ax-addrcl 7842  ax-mulcl 7843  ax-mulrcl 7844  ax-addcom 7845  ax-mulcom 7846  ax-addass 7847  ax-mulass 7848  ax-distr 7849  ax-i2m1 7850  ax-0lt1 7851  ax-1rid 7852  ax-0id 7853  ax-rnegex 7854  ax-precex 7855  ax-cnre 7856  ax-pre-ltirr 7857  ax-pre-ltwlin 7858  ax-pre-lttrn 7859  ax-pre-apti 7860  ax-pre-ltadd 7861  ax-pre-mulgt0 7862  ax-pre-mulext 7863  ax-arch 7864
This theorem depends on definitions:  df-bi 116  df-3or 968  df-3an 969  df-tru 1345  df-fal 1348  df-nf 1448  df-sb 1750  df-eu 2016  df-mo 2017  df-clab 2151  df-cleq 2157  df-clel 2160  df-nfc 2295  df-ne 2335  df-nel 2430  df-ral 2447  df-rex 2448  df-reu 2449  df-rmo 2450  df-rab 2451  df-v 2724  df-sbc 2948  df-csb 3042  df-dif 3114  df-un 3116  df-in 3118  df-ss 3125  df-pw 3556  df-sn 3577  df-pr 3578  df-op 3580  df-uni 3785  df-int 3820  df-iun 3863  df-br 3978  df-opab 4039  df-mpt 4040  df-id 4266  df-po 4269  df-iso 4270  df-xp 4605  df-rel 4606  df-cnv 4607  df-co 4608  df-dm 4609  df-rn 4610  df-res 4611  df-ima 4612  df-iota 5148  df-fun 5185  df-fn 5186  df-f 5187  df-fv 5191  df-riota 5793  df-ov 5840  df-oprab 5841  df-mpo 5842  df-1st 6101  df-2nd 6102  df-pnf 7927  df-mnf 7928  df-xr 7929  df-ltxr 7930  df-le 7931  df-sub 8063  df-neg 8064  df-reap 8465  df-ap 8472  df-div 8561  df-inn 8850  df-n0 9107  df-z 9184  df-q 9550  df-rp 9582  df-fl 10196  df-mod 10249  df-dvds 11718
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator