Zulip Chat Archive

Stream: lean4

Topic: using rw failed


Leni Greco (Oct 16 2023 at 17:36):

why doesn't this work?
example (a b c d e f : ℝ) (h : b * c = e * f) : a * b * c * d = a * e * f * d := by
rw[h]

how am i supposed to change it, such that it works?

Henrik Böving (Oct 16 2023 at 17:39):

it doesn't work due to associativity, you'll also have to use that law in order to get somewhere, right now the terms are implicitly parenthesized in a way such that (b * c) is not obviously part of the expression on the left.

Leni Greco (Oct 16 2023 at 17:46):

thank you

Kevin Buzzard (Oct 17 2023 at 15:14):

You can hover over each multiplication in VS Code and it will highlight the multiplication, the left hand side and the right hand side. This is a nice way to see where the brackets are.


Last updated: Dec 20 2023 at 11:08 UTC