I want to simplify the expression 0 * 1 * 1 * 1 * 0
using simp only [mul_zero, zero_mul]
. I would like mul_zero
to fire first, so that the entire expression is simplified to zero in only one step. If mul_zero
fires first, I would expect the simplification process to take 4 steps, due to there being one step to eliminate each 1
.
Is there a way I can tell Lean to prioritize which simplification lemma to try first?
simp
operates by deeply entering expressions, seeing what applies, then working outwards. That means it'll see the0 * 1
first no matter what. I could be wrong, though. $\endgroup$