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

Theorem modqmul1 10269
Description: Multiplication property of the modulo operation. Note that the multiplier  C must be an integer. (Contributed by Jim Kingdon, 24-Oct-2021.)
Hypotheses
Ref Expression
modqmul1.a  |-  ( ph  ->  A  e.  QQ )
modqmul1.b  |-  ( ph  ->  B  e.  QQ )
modqmul1.c  |-  ( ph  ->  C  e.  ZZ )
modqmul1.d  |-  ( ph  ->  D  e.  QQ )
modqmul1.dgt0  |-  ( ph  ->  0  <  D )
modqmul1.ab  |-  ( ph  ->  ( A  mod  D
)  =  ( B  mod  D ) )
Assertion
Ref Expression
modqmul1  |-  ( ph  ->  ( ( A  x.  C )  mod  D
)  =  ( ( B  x.  C )  mod  D ) )

Proof of Theorem modqmul1
StepHypRef Expression
1 modqmul1.ab . 2  |-  ( ph  ->  ( A  mod  D
)  =  ( B  mod  D ) )
2 modqmul1.a . . . . . . 7  |-  ( ph  ->  A  e.  QQ )
3 modqmul1.d . . . . . . 7  |-  ( ph  ->  D  e.  QQ )
4 modqmul1.dgt0 . . . . . . 7  |-  ( ph  ->  0  <  D )
5 modqval 10216 . . . . . . 7  |-  ( ( A  e.  QQ  /\  D  e.  QQ  /\  0  <  D )  ->  ( A  mod  D )  =  ( A  -  ( D  x.  ( |_ `  ( A  /  D
) ) ) ) )
62, 3, 4, 5syl3anc 1220 . . . . . 6  |-  ( ph  ->  ( A  mod  D
)  =  ( A  -  ( D  x.  ( |_ `  ( A  /  D ) ) ) ) )
7 modqmul1.b . . . . . . 7  |-  ( ph  ->  B  e.  QQ )
8 modqval 10216 . . . . . . 7  |-  ( ( B  e.  QQ  /\  D  e.  QQ  /\  0  <  D )  ->  ( B  mod  D )  =  ( B  -  ( D  x.  ( |_ `  ( B  /  D
) ) ) ) )
97, 3, 4, 8syl3anc 1220 . . . . . 6  |-  ( ph  ->  ( B  mod  D
)  =  ( B  -  ( D  x.  ( |_ `  ( B  /  D ) ) ) ) )
106, 9eqeq12d 2172 . . . . 5  |-  ( ph  ->  ( ( A  mod  D )  =  ( B  mod  D )  <->  ( A  -  ( D  x.  ( |_ `  ( A  /  D ) ) ) )  =  ( B  -  ( D  x.  ( |_ `  ( B  /  D
) ) ) ) ) )
11 oveq1 5828 . . . . 5  |-  ( ( A  -  ( D  x.  ( |_ `  ( A  /  D
) ) ) )  =  ( B  -  ( D  x.  ( |_ `  ( B  /  D ) ) ) )  ->  ( ( A  -  ( D  x.  ( |_ `  ( A  /  D ) ) ) )  x.  C
)  =  ( ( B  -  ( D  x.  ( |_ `  ( B  /  D
) ) ) )  x.  C ) )
1210, 11syl6bi 162 . . . 4  |-  ( ph  ->  ( ( A  mod  D )  =  ( B  mod  D )  -> 
( ( A  -  ( D  x.  ( |_ `  ( A  /  D ) ) ) )  x.  C )  =  ( ( B  -  ( D  x.  ( |_ `  ( B  /  D ) ) ) )  x.  C
) ) )
13 qcn 9536 . . . . . . . . . 10  |-  ( D  e.  QQ  ->  D  e.  CC )
143, 13syl 14 . . . . . . . . 9  |-  ( ph  ->  D  e.  CC )
15 modqmul1.c . . . . . . . . . 10  |-  ( ph  ->  C  e.  ZZ )
1615zcnd 9281 . . . . . . . . 9  |-  ( ph  ->  C  e.  CC )
174gt0ne0d 8381 . . . . . . . . . . . 12  |-  ( ph  ->  D  =/=  0 )
18 qdivcl 9545 . . . . . . . . . . . 12  |-  ( ( A  e.  QQ  /\  D  e.  QQ  /\  D  =/=  0 )  ->  ( A  /  D )  e.  QQ )
192, 3, 17, 18syl3anc 1220 . . . . . . . . . . 11  |-  ( ph  ->  ( A  /  D
)  e.  QQ )
2019flqcld 10169 . . . . . . . . . 10  |-  ( ph  ->  ( |_ `  ( A  /  D ) )  e.  ZZ )
2120zcnd 9281 . . . . . . . . 9  |-  ( ph  ->  ( |_ `  ( A  /  D ) )  e.  CC )
2214, 16, 21mulassd 7895 . . . . . . . 8  |-  ( ph  ->  ( ( D  x.  C )  x.  ( |_ `  ( A  /  D ) ) )  =  ( D  x.  ( C  x.  ( |_ `  ( A  /  D ) ) ) ) )
2314, 16, 21mul32d 8022 . . . . . . . 8  |-  ( ph  ->  ( ( D  x.  C )  x.  ( |_ `  ( A  /  D ) ) )  =  ( ( D  x.  ( |_ `  ( A  /  D
) ) )  x.  C ) )
2422, 23eqtr3d 2192 . . . . . . 7  |-  ( ph  ->  ( D  x.  ( C  x.  ( |_ `  ( A  /  D
) ) ) )  =  ( ( D  x.  ( |_ `  ( A  /  D
) ) )  x.  C ) )
2524oveq2d 5837 . . . . . 6  |-  ( ph  ->  ( ( A  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( A  /  D ) ) ) ) )  =  ( ( A  x.  C )  -  (
( D  x.  ( |_ `  ( A  /  D ) ) )  x.  C ) ) )
26 qcn 9536 . . . . . . . 8  |-  ( A  e.  QQ  ->  A  e.  CC )
272, 26syl 14 . . . . . . 7  |-  ( ph  ->  A  e.  CC )
2814, 21mulcld 7892 . . . . . . 7  |-  ( ph  ->  ( D  x.  ( |_ `  ( A  /  D ) ) )  e.  CC )
2927, 28, 16subdird 8284 . . . . . 6  |-  ( ph  ->  ( ( A  -  ( D  x.  ( |_ `  ( A  /  D ) ) ) )  x.  C )  =  ( ( A  x.  C )  -  ( ( D  x.  ( |_ `  ( A  /  D ) ) )  x.  C ) ) )
3025, 29eqtr4d 2193 . . . . 5  |-  ( ph  ->  ( ( A  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( A  /  D ) ) ) ) )  =  ( ( A  -  ( D  x.  ( |_ `  ( A  /  D ) ) ) )  x.  C ) )
31 qdivcl 9545 . . . . . . . . . . . 12  |-  ( ( B  e.  QQ  /\  D  e.  QQ  /\  D  =/=  0 )  ->  ( B  /  D )  e.  QQ )
327, 3, 17, 31syl3anc 1220 . . . . . . . . . . 11  |-  ( ph  ->  ( B  /  D
)  e.  QQ )
3332flqcld 10169 . . . . . . . . . 10  |-  ( ph  ->  ( |_ `  ( B  /  D ) )  e.  ZZ )
3433zcnd 9281 . . . . . . . . 9  |-  ( ph  ->  ( |_ `  ( B  /  D ) )  e.  CC )
3514, 16, 34mulassd 7895 . . . . . . . 8  |-  ( ph  ->  ( ( D  x.  C )  x.  ( |_ `  ( B  /  D ) ) )  =  ( D  x.  ( C  x.  ( |_ `  ( B  /  D ) ) ) ) )
3614, 16, 34mul32d 8022 . . . . . . . 8  |-  ( ph  ->  ( ( D  x.  C )  x.  ( |_ `  ( B  /  D ) ) )  =  ( ( D  x.  ( |_ `  ( B  /  D
) ) )  x.  C ) )
3735, 36eqtr3d 2192 . . . . . . 7  |-  ( ph  ->  ( D  x.  ( C  x.  ( |_ `  ( B  /  D
) ) ) )  =  ( ( D  x.  ( |_ `  ( B  /  D
) ) )  x.  C ) )
3837oveq2d 5837 . . . . . 6  |-  ( ph  ->  ( ( B  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( B  /  D ) ) ) ) )  =  ( ( B  x.  C )  -  (
( D  x.  ( |_ `  ( B  /  D ) ) )  x.  C ) ) )
39 qcn 9536 . . . . . . . 8  |-  ( B  e.  QQ  ->  B  e.  CC )
407, 39syl 14 . . . . . . 7  |-  ( ph  ->  B  e.  CC )
4114, 34mulcld 7892 . . . . . . 7  |-  ( ph  ->  ( D  x.  ( |_ `  ( B  /  D ) ) )  e.  CC )
4240, 41, 16subdird 8284 . . . . . 6  |-  ( ph  ->  ( ( B  -  ( D  x.  ( |_ `  ( B  /  D ) ) ) )  x.  C )  =  ( ( B  x.  C )  -  ( ( D  x.  ( |_ `  ( B  /  D ) ) )  x.  C ) ) )
4338, 42eqtr4d 2193 . . . . 5  |-  ( ph  ->  ( ( B  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( B  /  D ) ) ) ) )  =  ( ( B  -  ( D  x.  ( |_ `  ( B  /  D ) ) ) )  x.  C ) )
4430, 43eqeq12d 2172 . . . 4  |-  ( ph  ->  ( ( ( A  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( A  /  D
) ) ) ) )  =  ( ( B  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( B  /  D ) ) ) ) )  <->  ( ( A  -  ( D  x.  ( |_ `  ( A  /  D ) ) ) )  x.  C
)  =  ( ( B  -  ( D  x.  ( |_ `  ( B  /  D
) ) ) )  x.  C ) ) )
4512, 44sylibrd 168 . . 3  |-  ( ph  ->  ( ( A  mod  D )  =  ( B  mod  D )  -> 
( ( A  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( A  /  D ) ) ) ) )  =  ( ( B  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( B  /  D ) ) ) ) ) ) )
46 oveq1 5828 . . . 4  |-  ( ( ( A  x.  C
)  -  ( D  x.  ( C  x.  ( |_ `  ( A  /  D ) ) ) ) )  =  ( ( B  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( B  /  D ) ) ) ) )  -> 
( ( ( A  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( A  /  D
) ) ) ) )  mod  D )  =  ( ( ( B  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( B  /  D ) ) ) ) )  mod  D
) )
47 zq 9528 . . . . . . . 8  |-  ( C  e.  ZZ  ->  C  e.  QQ )
4815, 47syl 14 . . . . . . 7  |-  ( ph  ->  C  e.  QQ )
49 qmulcl 9539 . . . . . . 7  |-  ( ( A  e.  QQ  /\  C  e.  QQ )  ->  ( A  x.  C
)  e.  QQ )
502, 48, 49syl2anc 409 . . . . . 6  |-  ( ph  ->  ( A  x.  C
)  e.  QQ )
5115, 20zmulcld 9286 . . . . . 6  |-  ( ph  ->  ( C  x.  ( |_ `  ( A  /  D ) ) )  e.  ZZ )
52 modqcyc2 10252 . . . . . 6  |-  ( ( ( ( A  x.  C )  e.  QQ  /\  ( C  x.  ( |_ `  ( A  /  D ) ) )  e.  ZZ )  /\  ( D  e.  QQ  /\  0  <  D ) )  ->  ( (
( A  x.  C
)  -  ( D  x.  ( C  x.  ( |_ `  ( A  /  D ) ) ) ) )  mod 
D )  =  ( ( A  x.  C
)  mod  D )
)
5350, 51, 3, 4, 52syl22anc 1221 . . . . 5  |-  ( ph  ->  ( ( ( A  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( A  /  D
) ) ) ) )  mod  D )  =  ( ( A  x.  C )  mod 
D ) )
54 qmulcl 9539 . . . . . . 7  |-  ( ( B  e.  QQ  /\  C  e.  QQ )  ->  ( B  x.  C
)  e.  QQ )
557, 48, 54syl2anc 409 . . . . . 6  |-  ( ph  ->  ( B  x.  C
)  e.  QQ )
5615, 33zmulcld 9286 . . . . . 6  |-  ( ph  ->  ( C  x.  ( |_ `  ( B  /  D ) ) )  e.  ZZ )
57 modqcyc2 10252 . . . . . 6  |-  ( ( ( ( B  x.  C )  e.  QQ  /\  ( C  x.  ( |_ `  ( B  /  D ) ) )  e.  ZZ )  /\  ( D  e.  QQ  /\  0  <  D ) )  ->  ( (
( B  x.  C
)  -  ( D  x.  ( C  x.  ( |_ `  ( B  /  D ) ) ) ) )  mod 
D )  =  ( ( B  x.  C
)  mod  D )
)
5855, 56, 3, 4, 57syl22anc 1221 . . . . 5  |-  ( ph  ->  ( ( ( B  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( B  /  D
) ) ) ) )  mod  D )  =  ( ( B  x.  C )  mod 
D ) )
5953, 58eqeq12d 2172 . . . 4  |-  ( ph  ->  ( ( ( ( A  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( A  /  D ) ) ) ) )  mod  D
)  =  ( ( ( B  x.  C
)  -  ( D  x.  ( C  x.  ( |_ `  ( B  /  D ) ) ) ) )  mod 
D )  <->  ( ( A  x.  C )  mod  D )  =  ( ( B  x.  C
)  mod  D )
) )
6046, 59syl5ib 153 . . 3  |-  ( ph  ->  ( ( ( A  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( A  /  D
) ) ) ) )  =  ( ( B  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( B  /  D ) ) ) ) )  ->  (
( A  x.  C
)  mod  D )  =  ( ( B  x.  C )  mod 
D ) ) )
6145, 60syld 45 . 2  |-  ( ph  ->  ( ( A  mod  D )  =  ( B  mod  D )  -> 
( ( A  x.  C )  mod  D
)  =  ( ( B  x.  C )  mod  D ) ) )
621, 61mpd 13 1  |-  ( ph  ->  ( ( A  x.  C )  mod  D
)  =  ( ( B  x.  C )  mod  D ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    = wceq 1335    e. wcel 2128    =/= wne 2327   class class class wbr 3965   ` cfv 5169  (class class class)co 5821   CCcc 7724   0cc0 7726    x. cmul 7731    < clt 7906    - cmin 8040    / cdiv 8539   ZZcz 9161   QQcq 9521   |_cfl 10160    mod cmo 10214
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 7817  ax-resscn 7818  ax-1cn 7819  ax-1re 7820  ax-icn 7821  ax-addcl 7822  ax-addrcl 7823  ax-mulcl 7824  ax-mulrcl 7825  ax-addcom 7826  ax-mulcom 7827  ax-addass 7828  ax-mulass 7829  ax-distr 7830  ax-i2m1 7831  ax-0lt1 7832  ax-1rid 7833  ax-0id 7834  ax-rnegex 7835  ax-precex 7836  ax-cnre 7837  ax-pre-ltirr 7838  ax-pre-ltwlin 7839  ax-pre-lttrn 7840  ax-pre-apti 7841  ax-pre-ltadd 7842  ax-pre-mulgt0 7843  ax-pre-mulext 7844  ax-arch 7845
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 7908  df-mnf 7909  df-xr 7910  df-ltxr 7911  df-le 7912  df-sub 8042  df-neg 8043  df-reap 8444  df-ap 8451  df-div 8540  df-inn 8828  df-n0 9085  df-z 9162  df-q 9522  df-rp 9554  df-fl 10162  df-mod 10215
This theorem is referenced by:  modqmul12d  10270  modqnegd  10271  modqmulmod  10281  eulerthlema  12093  fermltl  12097
  Copyright terms: Public domain W3C validator