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

Theorem modqdi 10058
Description: Distribute multiplication over a modulo operation. (Contributed by Jim Kingdon, 26-Oct-2021.)
Assertion
Ref Expression
modqdi  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( A  x.  ( B  mod  C
) )  =  ( ( A  x.  B
)  mod  ( A  x.  C ) ) )

Proof of Theorem modqdi
StepHypRef Expression
1 simp1l 988 . . . . 5  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  A  e.  QQ )
2 qcn 9328 . . . . 5  |-  ( A  e.  QQ  ->  A  e.  CC )
31, 2syl 14 . . . 4  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  A  e.  CC )
4 simp2 965 . . . . 5  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  B  e.  QQ )
5 qcn 9328 . . . . 5  |-  ( B  e.  QQ  ->  B  e.  CC )
64, 5syl 14 . . . 4  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  B  e.  CC )
7 simp3l 992 . . . . . 6  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  C  e.  QQ )
8 simp3r 993 . . . . . . . . . 10  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  0  <  C )
98gt0ne0d 8193 . . . . . . . . 9  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  C  =/=  0 )
10 qdivcl 9337 . . . . . . . . 9  |-  ( ( B  e.  QQ  /\  C  e.  QQ  /\  C  =/=  0 )  ->  ( B  /  C )  e.  QQ )
114, 7, 9, 10syl3anc 1199 . . . . . . . 8  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( B  /  C )  e.  QQ )
1211flqcld 9943 . . . . . . 7  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( |_ `  ( B  /  C
) )  e.  ZZ )
13 zq 9320 . . . . . . 7  |-  ( ( |_ `  ( B  /  C ) )  e.  ZZ  ->  ( |_ `  ( B  /  C ) )  e.  QQ )
1412, 13syl 14 . . . . . 6  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( |_ `  ( B  /  C
) )  e.  QQ )
15 qmulcl 9331 . . . . . 6  |-  ( ( C  e.  QQ  /\  ( |_ `  ( B  /  C ) )  e.  QQ )  -> 
( C  x.  ( |_ `  ( B  /  C ) ) )  e.  QQ )
167, 14, 15syl2anc 406 . . . . 5  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( C  x.  ( |_ `  ( B  /  C ) ) )  e.  QQ )
17 qcn 9328 . . . . 5  |-  ( ( C  x.  ( |_
`  ( B  /  C ) ) )  e.  QQ  ->  ( C  x.  ( |_ `  ( B  /  C
) ) )  e.  CC )
1816, 17syl 14 . . . 4  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( C  x.  ( |_ `  ( B  /  C ) ) )  e.  CC )
193, 6, 18subdid 8095 . . 3  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( A  x.  ( B  -  ( C  x.  ( |_ `  ( B  /  C
) ) ) ) )  =  ( ( A  x.  B )  -  ( A  x.  ( C  x.  ( |_ `  ( B  /  C ) ) ) ) ) )
20 qcn 9328 . . . . . . . . 9  |-  ( C  e.  QQ  ->  C  e.  CC )
217, 20syl 14 . . . . . . . 8  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  C  e.  CC )
22 qre 9319 . . . . . . . . . 10  |-  ( C  e.  QQ  ->  C  e.  RR )
237, 22syl 14 . . . . . . . . 9  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  C  e.  RR )
2423, 8gt0ap0d 8309 . . . . . . . 8  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  C #  0
)
25 qre 9319 . . . . . . . . . 10  |-  ( A  e.  QQ  ->  A  e.  RR )
261, 25syl 14 . . . . . . . . 9  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  A  e.  RR )
27 simp1r 989 . . . . . . . . 9  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  0  <  A )
2826, 27gt0ap0d 8309 . . . . . . . 8  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  A #  0
)
296, 21, 3, 24, 28divcanap5d 8490 . . . . . . 7  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( ( A  x.  B )  /  ( A  x.  C ) )  =  ( B  /  C
) )
3029fveq2d 5379 . . . . . 6  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( |_ `  ( ( A  x.  B )  /  ( A  x.  C )
) )  =  ( |_ `  ( B  /  C ) ) )
3130oveq2d 5744 . . . . 5  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( ( A  x.  C )  x.  ( |_ `  (
( A  x.  B
)  /  ( A  x.  C ) ) ) )  =  ( ( A  x.  C
)  x.  ( |_
`  ( B  /  C ) ) ) )
3212zcnd 9078 . . . . . 6  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( |_ `  ( B  /  C
) )  e.  CC )
333, 21, 32mulassd 7713 . . . . 5  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( ( A  x.  C )  x.  ( |_ `  ( B  /  C ) ) )  =  ( A  x.  ( C  x.  ( |_ `  ( B  /  C ) ) ) ) )
3431, 33eqtr2d 2148 . . . 4  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( A  x.  ( C  x.  ( |_ `  ( B  /  C ) ) ) )  =  ( ( A  x.  C )  x.  ( |_ `  ( ( A  x.  B )  /  ( A  x.  C )
) ) ) )
3534oveq2d 5744 . . 3  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( ( A  x.  B )  -  ( A  x.  ( C  x.  ( |_ `  ( B  /  C ) ) ) ) )  =  ( ( A  x.  B
)  -  ( ( A  x.  C )  x.  ( |_ `  ( ( A  x.  B )  /  ( A  x.  C )
) ) ) ) )
3619, 35eqtrd 2147 . 2  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( A  x.  ( B  -  ( C  x.  ( |_ `  ( B  /  C
) ) ) ) )  =  ( ( A  x.  B )  -  ( ( A  x.  C )  x.  ( |_ `  (
( A  x.  B
)  /  ( A  x.  C ) ) ) ) ) )
37 modqval 9990 . . . 4  |-  ( ( B  e.  QQ  /\  C  e.  QQ  /\  0  <  C )  ->  ( B  mod  C )  =  ( B  -  ( C  x.  ( |_ `  ( B  /  C
) ) ) ) )
384, 7, 8, 37syl3anc 1199 . . 3  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( B  mod  C )  =  ( B  -  ( C  x.  ( |_ `  ( B  /  C
) ) ) ) )
3938oveq2d 5744 . 2  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( A  x.  ( B  mod  C
) )  =  ( A  x.  ( B  -  ( C  x.  ( |_ `  ( B  /  C ) ) ) ) ) )
40 qmulcl 9331 . . . 4  |-  ( ( A  e.  QQ  /\  B  e.  QQ )  ->  ( A  x.  B
)  e.  QQ )
411, 4, 40syl2anc 406 . . 3  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( A  x.  B )  e.  QQ )
42 qmulcl 9331 . . . 4  |-  ( ( A  e.  QQ  /\  C  e.  QQ )  ->  ( A  x.  C
)  e.  QQ )
431, 7, 42syl2anc 406 . . 3  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( A  x.  C )  e.  QQ )
4426, 23, 27, 8mulgt0d 7808 . . 3  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  0  <  ( A  x.  C ) )
45 modqval 9990 . . 3  |-  ( ( ( A  x.  B
)  e.  QQ  /\  ( A  x.  C
)  e.  QQ  /\  0  <  ( A  x.  C ) )  -> 
( ( A  x.  B )  mod  ( A  x.  C )
)  =  ( ( A  x.  B )  -  ( ( A  x.  C )  x.  ( |_ `  (
( A  x.  B
)  /  ( A  x.  C ) ) ) ) ) )
4641, 43, 44, 45syl3anc 1199 . 2  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( ( A  x.  B )  mod  ( A  x.  C
) )  =  ( ( A  x.  B
)  -  ( ( A  x.  C )  x.  ( |_ `  ( ( A  x.  B )  /  ( A  x.  C )
) ) ) ) )
4736, 39, 463eqtr4d 2157 1  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( A  x.  ( B  mod  C
) )  =  ( ( A  x.  B
)  mod  ( A  x.  C ) ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 103    /\ w3a 945    = wceq 1314    e. wcel 1463    =/= wne 2282   class class class wbr 3895   ` cfv 5081  (class class class)co 5728   CCcc 7545   RRcr 7546   0cc0 7547    x. cmul 7552    < clt 7724    - cmin 7856    / cdiv 8345   ZZcz 8958   QQcq 9313   |_cfl 9934    mod cmo 9988
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 586  ax-in2 587  ax-io 681  ax-5 1406  ax-7 1407  ax-gen 1408  ax-ie1 1452  ax-ie2 1453  ax-8 1465  ax-10 1466  ax-11 1467  ax-i12 1468  ax-bndl 1469  ax-4 1470  ax-13 1474  ax-14 1475  ax-17 1489  ax-i9 1493  ax-ial 1497  ax-i5r 1498  ax-ext 2097  ax-sep 4006  ax-pow 4058  ax-pr 4091  ax-un 4315  ax-setind 4412  ax-cnex 7636  ax-resscn 7637  ax-1cn 7638  ax-1re 7639  ax-icn 7640  ax-addcl 7641  ax-addrcl 7642  ax-mulcl 7643  ax-mulrcl 7644  ax-addcom 7645  ax-mulcom 7646  ax-addass 7647  ax-mulass 7648  ax-distr 7649  ax-i2m1 7650  ax-0lt1 7651  ax-1rid 7652  ax-0id 7653  ax-rnegex 7654  ax-precex 7655  ax-cnre 7656  ax-pre-ltirr 7657  ax-pre-ltwlin 7658  ax-pre-lttrn 7659  ax-pre-apti 7660  ax-pre-ltadd 7661  ax-pre-mulgt0 7662  ax-pre-mulext 7663  ax-arch 7664
This theorem depends on definitions:  df-bi 116  df-3or 946  df-3an 947  df-tru 1317  df-fal 1320  df-nf 1420  df-sb 1719  df-eu 1978  df-mo 1979  df-clab 2102  df-cleq 2108  df-clel 2111  df-nfc 2244  df-ne 2283  df-nel 2378  df-ral 2395  df-rex 2396  df-reu 2397  df-rmo 2398  df-rab 2399  df-v 2659  df-sbc 2879  df-csb 2972  df-dif 3039  df-un 3041  df-in 3043  df-ss 3050  df-pw 3478  df-sn 3499  df-pr 3500  df-op 3502  df-uni 3703  df-int 3738  df-iun 3781  df-br 3896  df-opab 3950  df-mpt 3951  df-id 4175  df-po 4178  df-iso 4179  df-xp 4505  df-rel 4506  df-cnv 4507  df-co 4508  df-dm 4509  df-rn 4510  df-res 4511  df-ima 4512  df-iota 5046  df-fun 5083  df-fn 5084  df-f 5085  df-fv 5089  df-riota 5684  df-ov 5731  df-oprab 5732  df-mpo 5733  df-1st 5992  df-2nd 5993  df-pnf 7726  df-mnf 7727  df-xr 7728  df-ltxr 7729  df-le 7730  df-sub 7858  df-neg 7859  df-reap 8255  df-ap 8262  df-div 8346  df-inn 8631  df-n0 8882  df-z 8959  df-q 9314  df-rp 9344  df-fl 9936  df-mod 9989
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator