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

Theorem modqmul1 10376
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 10323 . . . . . . 7  |-  ( ( A  e.  QQ  /\  D  e.  QQ  /\  0  <  D )  ->  ( A  mod  D )  =  ( A  -  ( D  x.  ( |_ `  ( A  /  D
) ) ) ) )
62, 3, 4, 5syl3anc 1238 . . . . . 6  |-  ( ph  ->  ( A  mod  D
)  =  ( A  -  ( D  x.  ( |_ `  ( A  /  D ) ) ) ) )
7 modqmul1.b . . . . . . 7  |-  ( ph  ->  B  e.  QQ )
8 modqval 10323 . . . . . . 7  |-  ( ( B  e.  QQ  /\  D  e.  QQ  /\  0  <  D )  ->  ( B  mod  D )  =  ( B  -  ( D  x.  ( |_ `  ( B  /  D
) ) ) ) )
97, 3, 4, 8syl3anc 1238 . . . . . 6  |-  ( ph  ->  ( B  mod  D
)  =  ( B  -  ( D  x.  ( |_ `  ( B  /  D ) ) ) ) )
106, 9eqeq12d 2192 . . . . 5  |-  ( ph  ->  ( ( A  mod  D )  =  ( B  mod  D )  <->  ( A  -  ( D  x.  ( |_ `  ( A  /  D ) ) ) )  =  ( B  -  ( D  x.  ( |_ `  ( B  /  D
) ) ) ) ) )
11 oveq1 5881 . . . . 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 163 . . . 4  |-  ( ph  ->  ( ( A  mod  D )  =  ( B  mod  D )  -> 
( ( A  -  ( D  x.  ( |_ `  ( A  /  D ) ) ) )  x.  C )  =  ( ( B  -  ( D  x.  ( |_ `  ( B  /  D ) ) ) )  x.  C
) ) )
13 qcn 9633 . . . . . . . . . 10  |-  ( D  e.  QQ  ->  D  e.  CC )
143, 13syl 14 . . . . . . . . 9  |-  ( ph  ->  D  e.  CC )
15 modqmul1.c . . . . . . . . . 10  |-  ( ph  ->  C  e.  ZZ )
1615zcnd 9375 . . . . . . . . 9  |-  ( ph  ->  C  e.  CC )
174gt0ne0d 8468 . . . . . . . . . . . 12  |-  ( ph  ->  D  =/=  0 )
18 qdivcl 9642 . . . . . . . . . . . 12  |-  ( ( A  e.  QQ  /\  D  e.  QQ  /\  D  =/=  0 )  ->  ( A  /  D )  e.  QQ )
192, 3, 17, 18syl3anc 1238 . . . . . . . . . . 11  |-  ( ph  ->  ( A  /  D
)  e.  QQ )
2019flqcld 10276 . . . . . . . . . 10  |-  ( ph  ->  ( |_ `  ( A  /  D ) )  e.  ZZ )
2120zcnd 9375 . . . . . . . . 9  |-  ( ph  ->  ( |_ `  ( A  /  D ) )  e.  CC )
2214, 16, 21mulassd 7980 . . . . . . . 8  |-  ( ph  ->  ( ( D  x.  C )  x.  ( |_ `  ( A  /  D ) ) )  =  ( D  x.  ( C  x.  ( |_ `  ( A  /  D ) ) ) ) )
2314, 16, 21mul32d 8109 . . . . . . . 8  |-  ( ph  ->  ( ( D  x.  C )  x.  ( |_ `  ( A  /  D ) ) )  =  ( ( D  x.  ( |_ `  ( A  /  D
) ) )  x.  C ) )
2422, 23eqtr3d 2212 . . . . . . 7  |-  ( ph  ->  ( D  x.  ( C  x.  ( |_ `  ( A  /  D
) ) ) )  =  ( ( D  x.  ( |_ `  ( A  /  D
) ) )  x.  C ) )
2524oveq2d 5890 . . . . . 6  |-  ( ph  ->  ( ( A  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( A  /  D ) ) ) ) )  =  ( ( A  x.  C )  -  (
( D  x.  ( |_ `  ( A  /  D ) ) )  x.  C ) ) )
26 qcn 9633 . . . . . . . 8  |-  ( A  e.  QQ  ->  A  e.  CC )
272, 26syl 14 . . . . . . 7  |-  ( ph  ->  A  e.  CC )
2814, 21mulcld 7977 . . . . . . 7  |-  ( ph  ->  ( D  x.  ( |_ `  ( A  /  D ) ) )  e.  CC )
2927, 28, 16subdird 8371 . . . . . 6  |-  ( ph  ->  ( ( A  -  ( D  x.  ( |_ `  ( A  /  D ) ) ) )  x.  C )  =  ( ( A  x.  C )  -  ( ( D  x.  ( |_ `  ( A  /  D ) ) )  x.  C ) ) )
3025, 29eqtr4d 2213 . . . . 5  |-  ( ph  ->  ( ( A  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( A  /  D ) ) ) ) )  =  ( ( A  -  ( D  x.  ( |_ `  ( A  /  D ) ) ) )  x.  C ) )
31 qdivcl 9642 . . . . . . . . . . . 12  |-  ( ( B  e.  QQ  /\  D  e.  QQ  /\  D  =/=  0 )  ->  ( B  /  D )  e.  QQ )
327, 3, 17, 31syl3anc 1238 . . . . . . . . . . 11  |-  ( ph  ->  ( B  /  D
)  e.  QQ )
3332flqcld 10276 . . . . . . . . . 10  |-  ( ph  ->  ( |_ `  ( B  /  D ) )  e.  ZZ )
3433zcnd 9375 . . . . . . . . 9  |-  ( ph  ->  ( |_ `  ( B  /  D ) )  e.  CC )
3514, 16, 34mulassd 7980 . . . . . . . 8  |-  ( ph  ->  ( ( D  x.  C )  x.  ( |_ `  ( B  /  D ) ) )  =  ( D  x.  ( C  x.  ( |_ `  ( B  /  D ) ) ) ) )
3614, 16, 34mul32d 8109 . . . . . . . 8  |-  ( ph  ->  ( ( D  x.  C )  x.  ( |_ `  ( B  /  D ) ) )  =  ( ( D  x.  ( |_ `  ( B  /  D
) ) )  x.  C ) )
3735, 36eqtr3d 2212 . . . . . . 7  |-  ( ph  ->  ( D  x.  ( C  x.  ( |_ `  ( B  /  D
) ) ) )  =  ( ( D  x.  ( |_ `  ( B  /  D
) ) )  x.  C ) )
3837oveq2d 5890 . . . . . 6  |-  ( ph  ->  ( ( B  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( B  /  D ) ) ) ) )  =  ( ( B  x.  C )  -  (
( D  x.  ( |_ `  ( B  /  D ) ) )  x.  C ) ) )
39 qcn 9633 . . . . . . . 8  |-  ( B  e.  QQ  ->  B  e.  CC )
407, 39syl 14 . . . . . . 7  |-  ( ph  ->  B  e.  CC )
4114, 34mulcld 7977 . . . . . . 7  |-  ( ph  ->  ( D  x.  ( |_ `  ( B  /  D ) ) )  e.  CC )
4240, 41, 16subdird 8371 . . . . . 6  |-  ( ph  ->  ( ( B  -  ( D  x.  ( |_ `  ( B  /  D ) ) ) )  x.  C )  =  ( ( B  x.  C )  -  ( ( D  x.  ( |_ `  ( B  /  D ) ) )  x.  C ) ) )
4338, 42eqtr4d 2213 . . . . 5  |-  ( ph  ->  ( ( B  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( B  /  D ) ) ) ) )  =  ( ( B  -  ( D  x.  ( |_ `  ( B  /  D ) ) ) )  x.  C ) )
4430, 43eqeq12d 2192 . . . 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 169 . . 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 5881 . . . 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 9625 . . . . . . . 8  |-  ( C  e.  ZZ  ->  C  e.  QQ )
4815, 47syl 14 . . . . . . 7  |-  ( ph  ->  C  e.  QQ )
49 qmulcl 9636 . . . . . . 7  |-  ( ( A  e.  QQ  /\  C  e.  QQ )  ->  ( A  x.  C
)  e.  QQ )
502, 48, 49syl2anc 411 . . . . . 6  |-  ( ph  ->  ( A  x.  C
)  e.  QQ )
5115, 20zmulcld 9380 . . . . . 6  |-  ( ph  ->  ( C  x.  ( |_ `  ( A  /  D ) ) )  e.  ZZ )
52 modqcyc2 10359 . . . . . 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 1239 . . . . 5  |-  ( ph  ->  ( ( ( A  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( A  /  D
) ) ) ) )  mod  D )  =  ( ( A  x.  C )  mod 
D ) )
54 qmulcl 9636 . . . . . . 7  |-  ( ( B  e.  QQ  /\  C  e.  QQ )  ->  ( B  x.  C
)  e.  QQ )
557, 48, 54syl2anc 411 . . . . . 6  |-  ( ph  ->  ( B  x.  C
)  e.  QQ )
5615, 33zmulcld 9380 . . . . . 6  |-  ( ph  ->  ( C  x.  ( |_ `  ( B  /  D ) ) )  e.  ZZ )
57 modqcyc2 10359 . . . . . 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 1239 . . . . 5  |-  ( ph  ->  ( ( ( B  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( B  /  D
) ) ) ) )  mod  D )  =  ( ( B  x.  C )  mod 
D ) )
5953, 58eqeq12d 2192 . . . 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, 59imbitrid 154 . . 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 1353    e. wcel 2148    =/= wne 2347   class class class wbr 4003   ` cfv 5216  (class class class)co 5874   CCcc 7808   0cc0 7810    x. cmul 7815    < clt 7991    - cmin 8127    / cdiv 8628   ZZcz 9252   QQcq 9618   |_cfl 10267    mod cmo 10321
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 614  ax-in2 615  ax-io 709  ax-5 1447  ax-7 1448  ax-gen 1449  ax-ie1 1493  ax-ie2 1494  ax-8 1504  ax-10 1505  ax-11 1506  ax-i12 1507  ax-bndl 1509  ax-4 1510  ax-17 1526  ax-i9 1530  ax-ial 1534  ax-i5r 1535  ax-13 2150  ax-14 2151  ax-ext 2159  ax-sep 4121  ax-pow 4174  ax-pr 4209  ax-un 4433  ax-setind 4536  ax-cnex 7901  ax-resscn 7902  ax-1cn 7903  ax-1re 7904  ax-icn 7905  ax-addcl 7906  ax-addrcl 7907  ax-mulcl 7908  ax-mulrcl 7909  ax-addcom 7910  ax-mulcom 7911  ax-addass 7912  ax-mulass 7913  ax-distr 7914  ax-i2m1 7915  ax-0lt1 7916  ax-1rid 7917  ax-0id 7918  ax-rnegex 7919  ax-precex 7920  ax-cnre 7921  ax-pre-ltirr 7922  ax-pre-ltwlin 7923  ax-pre-lttrn 7924  ax-pre-apti 7925  ax-pre-ltadd 7926  ax-pre-mulgt0 7927  ax-pre-mulext 7928  ax-arch 7929
This theorem depends on definitions:  df-bi 117  df-3or 979  df-3an 980  df-tru 1356  df-fal 1359  df-nf 1461  df-sb 1763  df-eu 2029  df-mo 2030  df-clab 2164  df-cleq 2170  df-clel 2173  df-nfc 2308  df-ne 2348  df-nel 2443  df-ral 2460  df-rex 2461  df-reu 2462  df-rmo 2463  df-rab 2464  df-v 2739  df-sbc 2963  df-csb 3058  df-dif 3131  df-un 3133  df-in 3135  df-ss 3142  df-pw 3577  df-sn 3598  df-pr 3599  df-op 3601  df-uni 3810  df-int 3845  df-iun 3888  df-br 4004  df-opab 4065  df-mpt 4066  df-id 4293  df-po 4296  df-iso 4297  df-xp 4632  df-rel 4633  df-cnv 4634  df-co 4635  df-dm 4636  df-rn 4637  df-res 4638  df-ima 4639  df-iota 5178  df-fun 5218  df-fn 5219  df-f 5220  df-fv 5224  df-riota 5830  df-ov 5877  df-oprab 5878  df-mpo 5879  df-1st 6140  df-2nd 6141  df-pnf 7993  df-mnf 7994  df-xr 7995  df-ltxr 7996  df-le 7997  df-sub 8129  df-neg 8130  df-reap 8531  df-ap 8538  df-div 8629  df-inn 8919  df-n0 9176  df-z 9253  df-q 9619  df-rp 9653  df-fl 10269  df-mod 10322
This theorem is referenced by:  modqmul12d  10377  modqnegd  10378  modqmulmod  10388  eulerthlema  12229  fermltl  12233  odzdvds  12244  lgsdir2lem4  14402  lgsdirprm  14405
  Copyright terms: Public domain W3C validator