Zulip Chat Archive
Stream: lean4
Topic: Should `getElem_mem` be `@[simp]`?
Daniel Weber (Sep 25 2024 at 11:31):
Why is getElem_mem
not a simp lemma? This seems like something we should want simp
to solve, and it doesn't look like it will hurt performance significantly
Kim Morrison (Sep 26 2024 at 00:49):
I've gone back and forth on this one. It does mess up confluence of the simp set a bit, but that is a minor concern given how nice it is not to have to close such a goal by hand.
Similarly head_mem
and getLast_mem
.
Kim Morrison (Sep 26 2024 at 00:49):
I would be happy to have further opinions on this one.
Joachim Breitner (Sep 26 2024 at 13:24):
Probably fine to keep it [simp]
. Maybe non-confluence is less bad for “closing” simp lemmas like these, where at least if it doesn't fire the rewriting won’t go in a completely different direction, but just gets stuck.
Kim Morrison (Sep 29 2024 at 11:20):
Notification Bot (Sep 29 2024 at 21:34):
33 messages were moved from this topic to #lean4 > "Closing simp lemmas" by Kyle Miller.
Last updated: May 02 2025 at 03:31 UTC