This is the behaviour Coq rewrite seems to have.
Currently in Lean, we either:
- Add a
@[simp] attribute to the definition, which means it's always unfolded when simplification is called – which is annoying when a goal has multiple functions, only some of which we want to unfold, or
- Manually unfold before calling the
rewrite, which is verbose