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

Theorem modqdi 9799
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 967 . . . . 5  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  A  e.  QQ )
2 qcn 9119 . . . . 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 944 . . . . 5  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  B  e.  QQ )
5 qcn 9119 . . . . 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 971 . . . . . 6  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  C  e.  QQ )
8 simp3r 972 . . . . . . . . . 10  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  0  <  C )
98gt0ne0d 7990 . . . . . . . . 9  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  C  =/=  0 )
10 qdivcl 9128 . . . . . . . . 9  |-  ( ( B  e.  QQ  /\  C  e.  QQ  /\  C  =/=  0 )  ->  ( B  /  C )  e.  QQ )
114, 7, 9, 10syl3anc 1174 . . . . . . . 8  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( B  /  C )  e.  QQ )
1211flqcld 9684 . . . . . . 7  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( |_ `  ( B  /  C
) )  e.  ZZ )
13 zq 9111 . . . . . . 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 9122 . . . . . 6  |-  ( ( C  e.  QQ  /\  ( |_ `  ( B  /  C ) )  e.  QQ )  -> 
( C  x.  ( |_ `  ( B  /  C ) ) )  e.  QQ )
167, 14, 15syl2anc 403 . . . . 5  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( C  x.  ( |_ `  ( B  /  C ) ) )  e.  QQ )
17 qcn 9119 . . . . 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 7892 . . 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 9119 . . . . . . . . 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 9110 . . . . . . . . . 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 8105 . . . . . . . 8  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  C #  0
)
25 qre 9110 . . . . . . . . . 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 968 . . . . . . . . 9  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  0  <  A )
2826, 27gt0ap0d 8105 . . . . . . . 8  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  A #  0
)
296, 21, 3, 24, 28divcanap5d 8284 . . . . . . 7  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( ( A  x.  B )  /  ( A  x.  C ) )  =  ( B  /  C
) )
3029fveq2d 5309 . . . . . 6  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( |_ `  ( ( A  x.  B )  /  ( A  x.  C )
) )  =  ( |_ `  ( B  /  C ) ) )
3130oveq2d 5668 . . . . 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 8869 . . . . . 6  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( |_ `  ( B  /  C
) )  e.  CC )
333, 21, 32mulassd 7511 . . . . 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 2121 . . . 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 5668 . . 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 2120 . 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 9731 . . . 4  |-  ( ( B  e.  QQ  /\  C  e.  QQ  /\  0  <  C )  ->  ( B  mod  C )  =  ( B  -  ( C  x.  ( |_ `  ( B  /  C
) ) ) ) )
384, 7, 8, 37syl3anc 1174 . . 3  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( B  mod  C )  =  ( B  -  ( C  x.  ( |_ `  ( B  /  C
) ) ) ) )
3938oveq2d 5668 . 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 9122 . . . 4  |-  ( ( A  e.  QQ  /\  B  e.  QQ )  ->  ( A  x.  B
)  e.  QQ )
411, 4, 40syl2anc 403 . . 3  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( A  x.  B )  e.  QQ )
42 qmulcl 9122 . . . 4  |-  ( ( A  e.  QQ  /\  C  e.  QQ )  ->  ( A  x.  C
)  e.  QQ )
431, 7, 42syl2anc 403 . . 3  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  ( A  x.  C )  e.  QQ )
4426, 23, 27, 8mulgt0d 7606 . . 3  |-  ( ( ( A  e.  QQ  /\  0  <  A )  /\  B  e.  QQ  /\  ( C  e.  QQ  /\  0  <  C ) )  ->  0  <  ( A  x.  C ) )
45 modqval 9731 . . 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 1174 . 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 2130 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 102    /\ w3a 924    = wceq 1289    e. wcel 1438    =/= wne 2255   class class class wbr 3845   ` cfv 5015  (class class class)co 5652   CCcc 7348   RRcr 7349   0cc0 7350    x. cmul 7355    < clt 7522    - cmin 7653    / cdiv 8139   ZZcz 8750   QQcq 9104   |_cfl 9675    mod cmo 9729
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 579  ax-in2 580  ax-io 665  ax-5 1381  ax-7 1382  ax-gen 1383  ax-ie1 1427  ax-ie2 1428  ax-8 1440  ax-10 1441  ax-11 1442  ax-i12 1443  ax-bndl 1444  ax-4 1445  ax-13 1449  ax-14 1450  ax-17 1464  ax-i9 1468  ax-ial 1472  ax-i5r 1473  ax-ext 2070  ax-sep 3957  ax-pow 4009  ax-pr 4036  ax-un 4260  ax-setind 4353  ax-cnex 7436  ax-resscn 7437  ax-1cn 7438  ax-1re 7439  ax-icn 7440  ax-addcl 7441  ax-addrcl 7442  ax-mulcl 7443  ax-mulrcl 7444  ax-addcom 7445  ax-mulcom 7446  ax-addass 7447  ax-mulass 7448  ax-distr 7449  ax-i2m1 7450  ax-0lt1 7451  ax-1rid 7452  ax-0id 7453  ax-rnegex 7454  ax-precex 7455  ax-cnre 7456  ax-pre-ltirr 7457  ax-pre-ltwlin 7458  ax-pre-lttrn 7459  ax-pre-apti 7460  ax-pre-ltadd 7461  ax-pre-mulgt0 7462  ax-pre-mulext 7463  ax-arch 7464
This theorem depends on definitions:  df-bi 115  df-3or 925  df-3an 926  df-tru 1292  df-fal 1295  df-nf 1395  df-sb 1693  df-eu 1951  df-mo 1952  df-clab 2075  df-cleq 2081  df-clel 2084  df-nfc 2217  df-ne 2256  df-nel 2351  df-ral 2364  df-rex 2365  df-reu 2366  df-rmo 2367  df-rab 2368  df-v 2621  df-sbc 2841  df-csb 2934  df-dif 3001  df-un 3003  df-in 3005  df-ss 3012  df-pw 3431  df-sn 3452  df-pr 3453  df-op 3455  df-uni 3654  df-int 3689  df-iun 3732  df-br 3846  df-opab 3900  df-mpt 3901  df-id 4120  df-po 4123  df-iso 4124  df-xp 4444  df-rel 4445  df-cnv 4446  df-co 4447  df-dm 4448  df-rn 4449  df-res 4450  df-ima 4451  df-iota 4980  df-fun 5017  df-fn 5018  df-f 5019  df-fv 5023  df-riota 5608  df-ov 5655  df-oprab 5656  df-mpt2 5657  df-1st 5911  df-2nd 5912  df-pnf 7524  df-mnf 7525  df-xr 7526  df-ltxr 7527  df-le 7528  df-sub 7655  df-neg 7656  df-reap 8052  df-ap 8059  df-div 8140  df-inn 8423  df-n0 8674  df-z 8751  df-q 9105  df-rp 9135  df-fl 9677  df-mod 9730
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator