Zulip Chat Archive

Stream: Is there code for X?

Topic: rat.mul_eq


Patrick Johnson (Apr 15 2022 at 18:51):

Is this (or similar) lemma in mathlib?

example {a b : } : a * b = a * b.num / b.denom :=
begin
  sorry
end

Alex J. Best (Apr 15 2022 at 18:54):

I don't think you can do much closer than

import data.rat.basic
lemma a {a b : } : a * b = a * b.num / b.denom :=
begin
  nth_rewrite 0  rat.num_div_denom b,
  rw mul_div_assoc,
end

Alex J. Best (Apr 15 2022 at 18:55):

I wouldn't think the explicit lemma you wrote with the multiplication and division assoc'd would be added to mathlib as a standalone lemma


Last updated: Dec 20 2023 at 11:08 UTC