Zulip Chat Archive

Stream: lean4

Topic: Infoview `abbrev`


Martin Dvořák (Nov 27 2023 at 11:00):

Can I make Infoview respect abbrev (i.e., show the LHS (shorter version) term)?

Eric Wieser (Nov 27 2023 at 11:48):

You can maybe rw [← yourAbbrev]

Yaël Dillies (Nov 27 2023 at 12:23):

That sadly doesn't work.

Martin Dvořák (Nov 27 2023 at 12:29):

I guess we have a case for reducible def over abbrev now.

Eric Wieser (Nov 27 2023 at 12:35):

Do you have a #mwe where they're different?

Martin Dvořák (Nov 27 2023 at 12:38):

I can make it, but the difference is in the Infoview, not in the code.

Eric Wieser (Nov 27 2023 at 12:38):

If the infoview reproduces from the mwe, then that's all that matters

François G. Dorais (Nov 27 2023 at 13:02):

abbrev doesn't generate the same equation lemmas, which is why the rw doesn't work. I feel into a similar trap this morning where a function got marked noncomputable because it was matching on a term that was an abbrev instead of a @[reducible] def.

Martin Dvořák (Nov 27 2023 at 17:29):

Martin Dvořák said:

I can make it, but the difference is in the Infoview, not in the code.

I cannot replicate it now. I think I just overlooked something previously.
Consider my comment to be wrong and continue with the original topic if there is something to say about it.


Last updated: Dec 20 2023 at 11:08 UTC