Zulip Chat Archive
Stream: mathlib4
Topic: apply and refine up to syntactic equality
Sky Wilshaw (Mar 07 2024 at 12:52):
Is there a way to limit apply
and/or refine
to only work up to syntactic equality? This would improve the speed of a parser combinator I'm writing, since it would fail faster.
Yaël Dillies (Mar 07 2024 at 13:14):
Use a with_something
combinator
Yaël Dillies (Mar 07 2024 at 13:15):
Something like with_reducible_and_instances apply your_lemma
Sky Wilshaw (Mar 07 2024 at 15:09):
I can't find any references online for these sorts of things - can you point me to an example?
Yaël Dillies (Mar 07 2024 at 16:21):
I have never used it myself but there are examples on Zulip
Kyle Miller (Mar 07 2024 at 16:59):
There's no option for just syntactic equality, but the most restrictive one is with_reducible apply foo
, which does unification unfolding only reducible definitions (so those with the @[reducible]
attribute, which includes abbrev
s)
Kyle Miller (Mar 07 2024 at 17:01):
with_reducible_and_instances
will additionally unfold instances
Kyle Miller (Mar 07 2024 at 17:02):
Then, to unfold more than what is normally unfolded, there's with_unfolding_all
Last updated: May 02 2025 at 03:31 UTC