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

Theorem modqmul1 9448
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 9395 . . . . . . 7  |-  ( ( A  e.  QQ  /\  D  e.  QQ  /\  0  <  D )  ->  ( A  mod  D )  =  ( A  -  ( D  x.  ( |_ `  ( A  /  D
) ) ) ) )
62, 3, 4, 5syl3anc 1170 . . . . . 6  |-  ( ph  ->  ( A  mod  D
)  =  ( A  -  ( D  x.  ( |_ `  ( A  /  D ) ) ) ) )
7 modqmul1.b . . . . . . 7  |-  ( ph  ->  B  e.  QQ )
8 modqval 9395 . . . . . . 7  |-  ( ( B  e.  QQ  /\  D  e.  QQ  /\  0  <  D )  ->  ( B  mod  D )  =  ( B  -  ( D  x.  ( |_ `  ( B  /  D
) ) ) ) )
97, 3, 4, 8syl3anc 1170 . . . . . 6  |-  ( ph  ->  ( B  mod  D
)  =  ( B  -  ( D  x.  ( |_ `  ( B  /  D ) ) ) ) )
106, 9eqeq12d 2096 . . . . 5  |-  ( ph  ->  ( ( A  mod  D )  =  ( B  mod  D )  <->  ( A  -  ( D  x.  ( |_ `  ( A  /  D ) ) ) )  =  ( B  -  ( D  x.  ( |_ `  ( B  /  D
) ) ) ) ) )
11 oveq1 5544 . . . . 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 161 . . . 4  |-  ( ph  ->  ( ( A  mod  D )  =  ( B  mod  D )  -> 
( ( A  -  ( D  x.  ( |_ `  ( A  /  D ) ) ) )  x.  C )  =  ( ( B  -  ( D  x.  ( |_ `  ( B  /  D ) ) ) )  x.  C
) ) )
13 qcn 8789 . . . . . . . . . 10  |-  ( D  e.  QQ  ->  D  e.  CC )
143, 13syl 14 . . . . . . . . 9  |-  ( ph  ->  D  e.  CC )
15 modqmul1.c . . . . . . . . . 10  |-  ( ph  ->  C  e.  ZZ )
1615zcnd 8540 . . . . . . . . 9  |-  ( ph  ->  C  e.  CC )
174gt0ne0d 7669 . . . . . . . . . . . 12  |-  ( ph  ->  D  =/=  0 )
18 qdivcl 8798 . . . . . . . . . . . 12  |-  ( ( A  e.  QQ  /\  D  e.  QQ  /\  D  =/=  0 )  ->  ( A  /  D )  e.  QQ )
192, 3, 17, 18syl3anc 1170 . . . . . . . . . . 11  |-  ( ph  ->  ( A  /  D
)  e.  QQ )
2019flqcld 9348 . . . . . . . . . 10  |-  ( ph  ->  ( |_ `  ( A  /  D ) )  e.  ZZ )
2120zcnd 8540 . . . . . . . . 9  |-  ( ph  ->  ( |_ `  ( A  /  D ) )  e.  CC )
2214, 16, 21mulassd 7193 . . . . . . . 8  |-  ( ph  ->  ( ( D  x.  C )  x.  ( |_ `  ( A  /  D ) ) )  =  ( D  x.  ( C  x.  ( |_ `  ( A  /  D ) ) ) ) )
2314, 16, 21mul32d 7317 . . . . . . . 8  |-  ( ph  ->  ( ( D  x.  C )  x.  ( |_ `  ( A  /  D ) ) )  =  ( ( D  x.  ( |_ `  ( A  /  D
) ) )  x.  C ) )
2422, 23eqtr3d 2116 . . . . . . 7  |-  ( ph  ->  ( D  x.  ( C  x.  ( |_ `  ( A  /  D
) ) ) )  =  ( ( D  x.  ( |_ `  ( A  /  D
) ) )  x.  C ) )
2524oveq2d 5553 . . . . . 6  |-  ( ph  ->  ( ( A  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( A  /  D ) ) ) ) )  =  ( ( A  x.  C )  -  (
( D  x.  ( |_ `  ( A  /  D ) ) )  x.  C ) ) )
26 qcn 8789 . . . . . . . 8  |-  ( A  e.  QQ  ->  A  e.  CC )
272, 26syl 14 . . . . . . 7  |-  ( ph  ->  A  e.  CC )
2814, 21mulcld 7190 . . . . . . 7  |-  ( ph  ->  ( D  x.  ( |_ `  ( A  /  D ) ) )  e.  CC )
2927, 28, 16subdird 7575 . . . . . 6  |-  ( ph  ->  ( ( A  -  ( D  x.  ( |_ `  ( A  /  D ) ) ) )  x.  C )  =  ( ( A  x.  C )  -  ( ( D  x.  ( |_ `  ( A  /  D ) ) )  x.  C ) ) )
3025, 29eqtr4d 2117 . . . . 5  |-  ( ph  ->  ( ( A  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( A  /  D ) ) ) ) )  =  ( ( A  -  ( D  x.  ( |_ `  ( A  /  D ) ) ) )  x.  C ) )
31 qdivcl 8798 . . . . . . . . . . . 12  |-  ( ( B  e.  QQ  /\  D  e.  QQ  /\  D  =/=  0 )  ->  ( B  /  D )  e.  QQ )
327, 3, 17, 31syl3anc 1170 . . . . . . . . . . 11  |-  ( ph  ->  ( B  /  D
)  e.  QQ )
3332flqcld 9348 . . . . . . . . . 10  |-  ( ph  ->  ( |_ `  ( B  /  D ) )  e.  ZZ )
3433zcnd 8540 . . . . . . . . 9  |-  ( ph  ->  ( |_ `  ( B  /  D ) )  e.  CC )
3514, 16, 34mulassd 7193 . . . . . . . 8  |-  ( ph  ->  ( ( D  x.  C )  x.  ( |_ `  ( B  /  D ) ) )  =  ( D  x.  ( C  x.  ( |_ `  ( B  /  D ) ) ) ) )
3614, 16, 34mul32d 7317 . . . . . . . 8  |-  ( ph  ->  ( ( D  x.  C )  x.  ( |_ `  ( B  /  D ) ) )  =  ( ( D  x.  ( |_ `  ( B  /  D
) ) )  x.  C ) )
3735, 36eqtr3d 2116 . . . . . . 7  |-  ( ph  ->  ( D  x.  ( C  x.  ( |_ `  ( B  /  D
) ) ) )  =  ( ( D  x.  ( |_ `  ( B  /  D
) ) )  x.  C ) )
3837oveq2d 5553 . . . . . 6  |-  ( ph  ->  ( ( B  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( B  /  D ) ) ) ) )  =  ( ( B  x.  C )  -  (
( D  x.  ( |_ `  ( B  /  D ) ) )  x.  C ) ) )
39 qcn 8789 . . . . . . . 8  |-  ( B  e.  QQ  ->  B  e.  CC )
407, 39syl 14 . . . . . . 7  |-  ( ph  ->  B  e.  CC )
4114, 34mulcld 7190 . . . . . . 7  |-  ( ph  ->  ( D  x.  ( |_ `  ( B  /  D ) ) )  e.  CC )
4240, 41, 16subdird 7575 . . . . . 6  |-  ( ph  ->  ( ( B  -  ( D  x.  ( |_ `  ( B  /  D ) ) ) )  x.  C )  =  ( ( B  x.  C )  -  ( ( D  x.  ( |_ `  ( B  /  D ) ) )  x.  C ) ) )
4338, 42eqtr4d 2117 . . . . 5  |-  ( ph  ->  ( ( B  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( B  /  D ) ) ) ) )  =  ( ( B  -  ( D  x.  ( |_ `  ( B  /  D ) ) ) )  x.  C ) )
4430, 43eqeq12d 2096 . . . 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 167 . . 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 5544 . . . 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 8781 . . . . . . . 8  |-  ( C  e.  ZZ  ->  C  e.  QQ )
4815, 47syl 14 . . . . . . 7  |-  ( ph  ->  C  e.  QQ )
49 qmulcl 8792 . . . . . . 7  |-  ( ( A  e.  QQ  /\  C  e.  QQ )  ->  ( A  x.  C
)  e.  QQ )
502, 48, 49syl2anc 403 . . . . . 6  |-  ( ph  ->  ( A  x.  C
)  e.  QQ )
5115, 20zmulcld 8545 . . . . . 6  |-  ( ph  ->  ( C  x.  ( |_ `  ( A  /  D ) ) )  e.  ZZ )
52 modqcyc2 9431 . . . . . 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 1171 . . . . 5  |-  ( ph  ->  ( ( ( A  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( A  /  D
) ) ) ) )  mod  D )  =  ( ( A  x.  C )  mod 
D ) )
54 qmulcl 8792 . . . . . . 7  |-  ( ( B  e.  QQ  /\  C  e.  QQ )  ->  ( B  x.  C
)  e.  QQ )
557, 48, 54syl2anc 403 . . . . . 6  |-  ( ph  ->  ( B  x.  C
)  e.  QQ )
5615, 33zmulcld 8545 . . . . . 6  |-  ( ph  ->  ( C  x.  ( |_ `  ( B  /  D ) ) )  e.  ZZ )
57 modqcyc2 9431 . . . . . 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 1171 . . . . 5  |-  ( ph  ->  ( ( ( B  x.  C )  -  ( D  x.  ( C  x.  ( |_ `  ( B  /  D
) ) ) ) )  mod  D )  =  ( ( B  x.  C )  mod 
D ) )
5953, 58eqeq12d 2096 . . . 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 152 . . 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 44 . 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 1285    e. wcel 1434    =/= wne 2246   class class class wbr 3787   ` cfv 4926  (class class class)co 5537   CCcc 7030   0cc0 7032    x. cmul 7037    < clt 7204    - cmin 7335    / cdiv 7816   ZZcz 8421   QQcq 8774   |_cfl 9339    mod cmo 9393
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 104  ax-ia2 105  ax-ia3 106  ax-in1 577  ax-in2 578  ax-io 663  ax-5 1377  ax-7 1378  ax-gen 1379  ax-ie1 1423  ax-ie2 1424  ax-8 1436  ax-10 1437  ax-11 1438  ax-i12 1439  ax-bndl 1440  ax-4 1441  ax-13 1445  ax-14 1446  ax-17 1460  ax-i9 1464  ax-ial 1468  ax-i5r 1469  ax-ext 2064  ax-sep 3898  ax-pow 3950  ax-pr 3966  ax-un 4190  ax-setind 4282  ax-cnex 7118  ax-resscn 7119  ax-1cn 7120  ax-1re 7121  ax-icn 7122  ax-addcl 7123  ax-addrcl 7124  ax-mulcl 7125  ax-mulrcl 7126  ax-addcom 7127  ax-mulcom 7128  ax-addass 7129  ax-mulass 7130  ax-distr 7131  ax-i2m1 7132  ax-0lt1 7133  ax-1rid 7134  ax-0id 7135  ax-rnegex 7136  ax-precex 7137  ax-cnre 7138  ax-pre-ltirr 7139  ax-pre-ltwlin 7140  ax-pre-lttrn 7141  ax-pre-apti 7142  ax-pre-ltadd 7143  ax-pre-mulgt0 7144  ax-pre-mulext 7145  ax-arch 7146
This theorem depends on definitions:  df-bi 115  df-3or 921  df-3an 922  df-tru 1288  df-fal 1291  df-nf 1391  df-sb 1687  df-eu 1945  df-mo 1946  df-clab 2069  df-cleq 2075  df-clel 2078  df-nfc 2209  df-ne 2247  df-nel 2341  df-ral 2354  df-rex 2355  df-reu 2356  df-rmo 2357  df-rab 2358  df-v 2604  df-sbc 2817  df-csb 2910  df-dif 2976  df-un 2978  df-in 2980  df-ss 2987  df-pw 3386  df-sn 3406  df-pr 3407  df-op 3409  df-uni 3604  df-int 3639  df-iun 3682  df-br 3788  df-opab 3842  df-mpt 3843  df-id 4050  df-po 4053  df-iso 4054  df-xp 4371  df-rel 4372  df-cnv 4373  df-co 4374  df-dm 4375  df-rn 4376  df-res 4377  df-ima 4378  df-iota 4891  df-fun 4928  df-fn 4929  df-f 4930  df-fv 4934  df-riota 5493  df-ov 5540  df-oprab 5541  df-mpt2 5542  df-1st 5792  df-2nd 5793  df-pnf 7206  df-mnf 7207  df-xr 7208  df-ltxr 7209  df-le 7210  df-sub 7337  df-neg 7338  df-reap 7731  df-ap 7738  df-div 7817  df-inn 8096  df-n0 8345  df-z 8422  df-q 8775  df-rp 8805  df-fl 9341  df-mod 9394
This theorem is referenced by:  modqmul12d  9449  modqnegd  9450  modqmulmod  9460
  Copyright terms: Public domain W3C validator