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

Theorem modqmul1 9933
Description: Multiplication property of the modulo operation. Note that the multiplier 𝐶 must be an integer. (Contributed by Jim Kingdon, 24-Oct-2021.)
Hypotheses
Ref Expression
modqmul1.a (𝜑𝐴 ∈ ℚ)
modqmul1.b (𝜑𝐵 ∈ ℚ)
modqmul1.c (𝜑𝐶 ∈ ℤ)
modqmul1.d (𝜑𝐷 ∈ ℚ)
modqmul1.dgt0 (𝜑 → 0 < 𝐷)
modqmul1.ab (𝜑 → (𝐴 mod 𝐷) = (𝐵 mod 𝐷))
Assertion
Ref Expression
modqmul1 (𝜑 → ((𝐴 · 𝐶) mod 𝐷) = ((𝐵 · 𝐶) mod 𝐷))

Proof of Theorem modqmul1
StepHypRef Expression
1 modqmul1.ab . 2 (𝜑 → (𝐴 mod 𝐷) = (𝐵 mod 𝐷))
2 modqmul1.a . . . . . . 7 (𝜑𝐴 ∈ ℚ)
3 modqmul1.d . . . . . . 7 (𝜑𝐷 ∈ ℚ)
4 modqmul1.dgt0 . . . . . . 7 (𝜑 → 0 < 𝐷)
5 modqval 9880 . . . . . . 7 ((𝐴 ∈ ℚ ∧ 𝐷 ∈ ℚ ∧ 0 < 𝐷) → (𝐴 mod 𝐷) = (𝐴 − (𝐷 · (⌊‘(𝐴 / 𝐷)))))
62, 3, 4, 5syl3anc 1181 . . . . . 6 (𝜑 → (𝐴 mod 𝐷) = (𝐴 − (𝐷 · (⌊‘(𝐴 / 𝐷)))))
7 modqmul1.b . . . . . . 7 (𝜑𝐵 ∈ ℚ)
8 modqval 9880 . . . . . . 7 ((𝐵 ∈ ℚ ∧ 𝐷 ∈ ℚ ∧ 0 < 𝐷) → (𝐵 mod 𝐷) = (𝐵 − (𝐷 · (⌊‘(𝐵 / 𝐷)))))
97, 3, 4, 8syl3anc 1181 . . . . . 6 (𝜑 → (𝐵 mod 𝐷) = (𝐵 − (𝐷 · (⌊‘(𝐵 / 𝐷)))))
106, 9eqeq12d 2109 . . . . 5 (𝜑 → ((𝐴 mod 𝐷) = (𝐵 mod 𝐷) ↔ (𝐴 − (𝐷 · (⌊‘(𝐴 / 𝐷)))) = (𝐵 − (𝐷 · (⌊‘(𝐵 / 𝐷))))))
11 oveq1 5697 . . . . 5 ((𝐴 − (𝐷 · (⌊‘(𝐴 / 𝐷)))) = (𝐵 − (𝐷 · (⌊‘(𝐵 / 𝐷)))) → ((𝐴 − (𝐷 · (⌊‘(𝐴 / 𝐷)))) · 𝐶) = ((𝐵 − (𝐷 · (⌊‘(𝐵 / 𝐷)))) · 𝐶))
1210, 11syl6bi 162 . . . 4 (𝜑 → ((𝐴 mod 𝐷) = (𝐵 mod 𝐷) → ((𝐴 − (𝐷 · (⌊‘(𝐴 / 𝐷)))) · 𝐶) = ((𝐵 − (𝐷 · (⌊‘(𝐵 / 𝐷)))) · 𝐶)))
13 qcn 9218 . . . . . . . . . 10 (𝐷 ∈ ℚ → 𝐷 ∈ ℂ)
143, 13syl 14 . . . . . . . . 9 (𝜑𝐷 ∈ ℂ)
15 modqmul1.c . . . . . . . . . 10 (𝜑𝐶 ∈ ℤ)
1615zcnd 8968 . . . . . . . . 9 (𝜑𝐶 ∈ ℂ)
174gt0ne0d 8087 . . . . . . . . . . . 12 (𝜑𝐷 ≠ 0)
18 qdivcl 9227 . . . . . . . . . . . 12 ((𝐴 ∈ ℚ ∧ 𝐷 ∈ ℚ ∧ 𝐷 ≠ 0) → (𝐴 / 𝐷) ∈ ℚ)
192, 3, 17, 18syl3anc 1181 . . . . . . . . . . 11 (𝜑 → (𝐴 / 𝐷) ∈ ℚ)
2019flqcld 9833 . . . . . . . . . 10 (𝜑 → (⌊‘(𝐴 / 𝐷)) ∈ ℤ)
2120zcnd 8968 . . . . . . . . 9 (𝜑 → (⌊‘(𝐴 / 𝐷)) ∈ ℂ)
2214, 16, 21mulassd 7608 . . . . . . . 8 (𝜑 → ((𝐷 · 𝐶) · (⌊‘(𝐴 / 𝐷))) = (𝐷 · (𝐶 · (⌊‘(𝐴 / 𝐷)))))
2314, 16, 21mul32d 7732 . . . . . . . 8 (𝜑 → ((𝐷 · 𝐶) · (⌊‘(𝐴 / 𝐷))) = ((𝐷 · (⌊‘(𝐴 / 𝐷))) · 𝐶))
2422, 23eqtr3d 2129 . . . . . . 7 (𝜑 → (𝐷 · (𝐶 · (⌊‘(𝐴 / 𝐷)))) = ((𝐷 · (⌊‘(𝐴 / 𝐷))) · 𝐶))
2524oveq2d 5706 . . . . . 6 (𝜑 → ((𝐴 · 𝐶) − (𝐷 · (𝐶 · (⌊‘(𝐴 / 𝐷))))) = ((𝐴 · 𝐶) − ((𝐷 · (⌊‘(𝐴 / 𝐷))) · 𝐶)))
26 qcn 9218 . . . . . . . 8 (𝐴 ∈ ℚ → 𝐴 ∈ ℂ)
272, 26syl 14 . . . . . . 7 (𝜑𝐴 ∈ ℂ)
2814, 21mulcld 7605 . . . . . . 7 (𝜑 → (𝐷 · (⌊‘(𝐴 / 𝐷))) ∈ ℂ)
2927, 28, 16subdird 7990 . . . . . 6 (𝜑 → ((𝐴 − (𝐷 · (⌊‘(𝐴 / 𝐷)))) · 𝐶) = ((𝐴 · 𝐶) − ((𝐷 · (⌊‘(𝐴 / 𝐷))) · 𝐶)))
3025, 29eqtr4d 2130 . . . . 5 (𝜑 → ((𝐴 · 𝐶) − (𝐷 · (𝐶 · (⌊‘(𝐴 / 𝐷))))) = ((𝐴 − (𝐷 · (⌊‘(𝐴 / 𝐷)))) · 𝐶))
31 qdivcl 9227 . . . . . . . . . . . 12 ((𝐵 ∈ ℚ ∧ 𝐷 ∈ ℚ ∧ 𝐷 ≠ 0) → (𝐵 / 𝐷) ∈ ℚ)
327, 3, 17, 31syl3anc 1181 . . . . . . . . . . 11 (𝜑 → (𝐵 / 𝐷) ∈ ℚ)
3332flqcld 9833 . . . . . . . . . 10 (𝜑 → (⌊‘(𝐵 / 𝐷)) ∈ ℤ)
3433zcnd 8968 . . . . . . . . 9 (𝜑 → (⌊‘(𝐵 / 𝐷)) ∈ ℂ)
3514, 16, 34mulassd 7608 . . . . . . . 8 (𝜑 → ((𝐷 · 𝐶) · (⌊‘(𝐵 / 𝐷))) = (𝐷 · (𝐶 · (⌊‘(𝐵 / 𝐷)))))
3614, 16, 34mul32d 7732 . . . . . . . 8 (𝜑 → ((𝐷 · 𝐶) · (⌊‘(𝐵 / 𝐷))) = ((𝐷 · (⌊‘(𝐵 / 𝐷))) · 𝐶))
3735, 36eqtr3d 2129 . . . . . . 7 (𝜑 → (𝐷 · (𝐶 · (⌊‘(𝐵 / 𝐷)))) = ((𝐷 · (⌊‘(𝐵 / 𝐷))) · 𝐶))
3837oveq2d 5706 . . . . . 6 (𝜑 → ((𝐵 · 𝐶) − (𝐷 · (𝐶 · (⌊‘(𝐵 / 𝐷))))) = ((𝐵 · 𝐶) − ((𝐷 · (⌊‘(𝐵 / 𝐷))) · 𝐶)))
39 qcn 9218 . . . . . . . 8 (𝐵 ∈ ℚ → 𝐵 ∈ ℂ)
407, 39syl 14 . . . . . . 7 (𝜑𝐵 ∈ ℂ)
4114, 34mulcld 7605 . . . . . . 7 (𝜑 → (𝐷 · (⌊‘(𝐵 / 𝐷))) ∈ ℂ)
4240, 41, 16subdird 7990 . . . . . 6 (𝜑 → ((𝐵 − (𝐷 · (⌊‘(𝐵 / 𝐷)))) · 𝐶) = ((𝐵 · 𝐶) − ((𝐷 · (⌊‘(𝐵 / 𝐷))) · 𝐶)))
4338, 42eqtr4d 2130 . . . . 5 (𝜑 → ((𝐵 · 𝐶) − (𝐷 · (𝐶 · (⌊‘(𝐵 / 𝐷))))) = ((𝐵 − (𝐷 · (⌊‘(𝐵 / 𝐷)))) · 𝐶))
4430, 43eqeq12d 2109 . . . 4 (𝜑 → (((𝐴 · 𝐶) − (𝐷 · (𝐶 · (⌊‘(𝐴 / 𝐷))))) = ((𝐵 · 𝐶) − (𝐷 · (𝐶 · (⌊‘(𝐵 / 𝐷))))) ↔ ((𝐴 − (𝐷 · (⌊‘(𝐴 / 𝐷)))) · 𝐶) = ((𝐵 − (𝐷 · (⌊‘(𝐵 / 𝐷)))) · 𝐶)))
4512, 44sylibrd 168 . . 3 (𝜑 → ((𝐴 mod 𝐷) = (𝐵 mod 𝐷) → ((𝐴 · 𝐶) − (𝐷 · (𝐶 · (⌊‘(𝐴 / 𝐷))))) = ((𝐵 · 𝐶) − (𝐷 · (𝐶 · (⌊‘(𝐵 / 𝐷)))))))
46 oveq1 5697 . . . 4 (((𝐴 · 𝐶) − (𝐷 · (𝐶 · (⌊‘(𝐴 / 𝐷))))) = ((𝐵 · 𝐶) − (𝐷 · (𝐶 · (⌊‘(𝐵 / 𝐷))))) → (((𝐴 · 𝐶) − (𝐷 · (𝐶 · (⌊‘(𝐴 / 𝐷))))) mod 𝐷) = (((𝐵 · 𝐶) − (𝐷 · (𝐶 · (⌊‘(𝐵 / 𝐷))))) mod 𝐷))
47 zq 9210 . . . . . . . 8 (𝐶 ∈ ℤ → 𝐶 ∈ ℚ)
4815, 47syl 14 . . . . . . 7 (𝜑𝐶 ∈ ℚ)
49 qmulcl 9221 . . . . . . 7 ((𝐴 ∈ ℚ ∧ 𝐶 ∈ ℚ) → (𝐴 · 𝐶) ∈ ℚ)
502, 48, 49syl2anc 404 . . . . . 6 (𝜑 → (𝐴 · 𝐶) ∈ ℚ)
5115, 20zmulcld 8973 . . . . . 6 (𝜑 → (𝐶 · (⌊‘(𝐴 / 𝐷))) ∈ ℤ)
52 modqcyc2 9916 . . . . . 6 ((((𝐴 · 𝐶) ∈ ℚ ∧ (𝐶 · (⌊‘(𝐴 / 𝐷))) ∈ ℤ) ∧ (𝐷 ∈ ℚ ∧ 0 < 𝐷)) → (((𝐴 · 𝐶) − (𝐷 · (𝐶 · (⌊‘(𝐴 / 𝐷))))) mod 𝐷) = ((𝐴 · 𝐶) mod 𝐷))
5350, 51, 3, 4, 52syl22anc 1182 . . . . 5 (𝜑 → (((𝐴 · 𝐶) − (𝐷 · (𝐶 · (⌊‘(𝐴 / 𝐷))))) mod 𝐷) = ((𝐴 · 𝐶) mod 𝐷))
54 qmulcl 9221 . . . . . . 7 ((𝐵 ∈ ℚ ∧ 𝐶 ∈ ℚ) → (𝐵 · 𝐶) ∈ ℚ)
557, 48, 54syl2anc 404 . . . . . 6 (𝜑 → (𝐵 · 𝐶) ∈ ℚ)
5615, 33zmulcld 8973 . . . . . 6 (𝜑 → (𝐶 · (⌊‘(𝐵 / 𝐷))) ∈ ℤ)
57 modqcyc2 9916 . . . . . 6 ((((𝐵 · 𝐶) ∈ ℚ ∧ (𝐶 · (⌊‘(𝐵 / 𝐷))) ∈ ℤ) ∧ (𝐷 ∈ ℚ ∧ 0 < 𝐷)) → (((𝐵 · 𝐶) − (𝐷 · (𝐶 · (⌊‘(𝐵 / 𝐷))))) mod 𝐷) = ((𝐵 · 𝐶) mod 𝐷))
5855, 56, 3, 4, 57syl22anc 1182 . . . . 5 (𝜑 → (((𝐵 · 𝐶) − (𝐷 · (𝐶 · (⌊‘(𝐵 / 𝐷))))) mod 𝐷) = ((𝐵 · 𝐶) mod 𝐷))
5953, 58eqeq12d 2109 . . . 4 (𝜑 → ((((𝐴 · 𝐶) − (𝐷 · (𝐶 · (⌊‘(𝐴 / 𝐷))))) mod 𝐷) = (((𝐵 · 𝐶) − (𝐷 · (𝐶 · (⌊‘(𝐵 / 𝐷))))) mod 𝐷) ↔ ((𝐴 · 𝐶) mod 𝐷) = ((𝐵 · 𝐶) mod 𝐷)))
6046, 59syl5ib 153 . . 3 (𝜑 → (((𝐴 · 𝐶) − (𝐷 · (𝐶 · (⌊‘(𝐴 / 𝐷))))) = ((𝐵 · 𝐶) − (𝐷 · (𝐶 · (⌊‘(𝐵 / 𝐷))))) → ((𝐴 · 𝐶) mod 𝐷) = ((𝐵 · 𝐶) mod 𝐷)))
6145, 60syld 45 . 2 (𝜑 → ((𝐴 mod 𝐷) = (𝐵 mod 𝐷) → ((𝐴 · 𝐶) mod 𝐷) = ((𝐵 · 𝐶) mod 𝐷)))
621, 61mpd 13 1 (𝜑 → ((𝐴 · 𝐶) mod 𝐷) = ((𝐵 · 𝐶) mod 𝐷))
Colors of variables: wff set class
Syntax hints:  wi 4   = wceq 1296  wcel 1445  wne 2262   class class class wbr 3867  cfv 5049  (class class class)co 5690  cc 7445  0cc0 7447   · cmul 7452   < clt 7619  cmin 7750   / cdiv 8236  cz 8848  cq 9203  cfl 9824   mod cmo 9878
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 582  ax-in2 583  ax-io 668  ax-5 1388  ax-7 1389  ax-gen 1390  ax-ie1 1434  ax-ie2 1435  ax-8 1447  ax-10 1448  ax-11 1449  ax-i12 1450  ax-bndl 1451  ax-4 1452  ax-13 1456  ax-14 1457  ax-17 1471  ax-i9 1475  ax-ial 1479  ax-i5r 1480  ax-ext 2077  ax-sep 3978  ax-pow 4030  ax-pr 4060  ax-un 4284  ax-setind 4381  ax-cnex 7533  ax-resscn 7534  ax-1cn 7535  ax-1re 7536  ax-icn 7537  ax-addcl 7538  ax-addrcl 7539  ax-mulcl 7540  ax-mulrcl 7541  ax-addcom 7542  ax-mulcom 7543  ax-addass 7544  ax-mulass 7545  ax-distr 7546  ax-i2m1 7547  ax-0lt1 7548  ax-1rid 7549  ax-0id 7550  ax-rnegex 7551  ax-precex 7552  ax-cnre 7553  ax-pre-ltirr 7554  ax-pre-ltwlin 7555  ax-pre-lttrn 7556  ax-pre-apti 7557  ax-pre-ltadd 7558  ax-pre-mulgt0 7559  ax-pre-mulext 7560  ax-arch 7561
This theorem depends on definitions:  df-bi 116  df-3or 928  df-3an 929  df-tru 1299  df-fal 1302  df-nf 1402  df-sb 1700  df-eu 1958  df-mo 1959  df-clab 2082  df-cleq 2088  df-clel 2091  df-nfc 2224  df-ne 2263  df-nel 2358  df-ral 2375  df-rex 2376  df-reu 2377  df-rmo 2378  df-rab 2379  df-v 2635  df-sbc 2855  df-csb 2948  df-dif 3015  df-un 3017  df-in 3019  df-ss 3026  df-pw 3451  df-sn 3472  df-pr 3473  df-op 3475  df-uni 3676  df-int 3711  df-iun 3754  df-br 3868  df-opab 3922  df-mpt 3923  df-id 4144  df-po 4147  df-iso 4148  df-xp 4473  df-rel 4474  df-cnv 4475  df-co 4476  df-dm 4477  df-rn 4478  df-res 4479  df-ima 4480  df-iota 5014  df-fun 5051  df-fn 5052  df-f 5053  df-fv 5057  df-riota 5646  df-ov 5693  df-oprab 5694  df-mpt2 5695  df-1st 5949  df-2nd 5950  df-pnf 7621  df-mnf 7622  df-xr 7623  df-ltxr 7624  df-le 7625  df-sub 7752  df-neg 7753  df-reap 8149  df-ap 8156  df-div 8237  df-inn 8521  df-n0 8772  df-z 8849  df-q 9204  df-rp 9234  df-fl 9826  df-mod 9879
This theorem is referenced by:  modqmul12d  9934  modqnegd  9935  modqmulmod  9945
  Copyright terms: Public domain W3C validator