Zulip Chat Archive
Stream: mathlib4
Topic: elab_strategy
Patrick Massot (Jan 03 2023 at 10:37):
Is there a Lean 4 analog of the elab_strategy
attribute? What should we do of it while porting?
Henrik Böving (Jan 03 2023 at 10:53):
I don't exactly know what it does but purely based on naming it sounds like elab_as_elim might be?
Eric Wieser (Jan 03 2023 at 11:09):
I don't think elab_strategy
is ever supposed to be used, the docstring is "internal attribute for the elaborator strategy for a given constant"
Eric Wieser (Jan 03 2023 at 11:10):
I think it's a bit like the _simp_cache
attribute; it's added by other attributes to help out metaprograms, but not intended to be applied by the user.
Eric Wieser (Jan 03 2023 at 11:10):
Why not backport removing the attribute and see if anything breaks?
Patrick Massot (Jan 03 2023 at 13:18):
There are exactly two uses of elab_strategy
in mathlib, in data/fin/basic
. Removing that attribute does break statements in the same file.
Eric Wieser (Jan 03 2023 at 13:21):
Maybe @[elab_as_eliminator, elab_strategy]
means "attach the elab_as_eliminator
attribute but overwrite the implementation details with the default strategy"?
Eric Wieser (Jan 03 2023 at 13:24):
Debugging with #print
, it seems that @[elab_as_eliminator, elab_strategy]
means the same as @[elab_strategy]
which means @[elab_simple]
Eric Wieser (Jan 03 2023 at 13:26):
@Chris Hughes, do you remember why you wrote this?
Patrick Massot (Jan 03 2023 at 13:28):
I just sent #18049 and #18050 to CI. Let's see if one of them builds.
Chris Hughes (Jan 03 2023 at 14:08):
I think it was to do with Jordan Holder but I might not habe used it in the end
Patrick Massot (Jan 03 2023 at 17:13):
Both PRs passed CI. Eric expressed a preference for #18049 and delegated so I'll merge this tonight if nobody complains in the next couple of hours.
Johan Commelin (Jan 03 2023 at 17:19):
@Patrick Massot I see no harm in merging right now.
Last updated: Dec 20 2023 at 11:08 UTC