Zulip Chat Archive

Stream: general

Topic: rewrite_search


Scott Morrison (Nov 10 2018 at 06:59):

Hi @Keeley Hoek, I think I'm getting "XXX" is not a valid rewrite lemma! errors which I shouldn't be. I think in this case the problem is you need to unfold a step before the lemma looks right. Can we make rewrite_search more forgiving?

Scott Morrison (Nov 10 2018 at 07:00):

There are examples in my branch <https://github.com/semorrison/monoidal-categories-reboot/tree/monoidal_functor.comp> of @Michael Jendrusch's new monoidal categories development.

Keeley Hoek (Nov 10 2018 at 10:36):

@Scott Morrison I can't see anything there which doesn't compile (on the monoidal_functor.comp branch), am I meant to try to remove the sorrys?

Keeley Hoek (Nov 10 2018 at 12:29):

Nonetheless, off a fuzzy memory of something like this happening to me with projections or local variables or something, I've made a total shot in the dark and hopefully whnf'd the problem away

Scott Morrison (Nov 10 2018 at 21:25):

Hmm, doesn't seem to have helped. Here's the problem: <https://github.com/semorrison/monoidal-categories-reboot/blob/monoidal_functor.comp/src/monoidal_categories_reboot/monoidal_category.lean#L52>

Keeley Hoek (Nov 11 2018 at 03:35):

Gotcha, I'll take a look

Keeley Hoek (Nov 11 2018 at 04:10):

ok I've just turned it the checks off for now. Does anyone know how to do something similar to #reduce, but to an expr in tactic-mode?

Keeley Hoek (Nov 11 2018 at 04:12):

I'd just like to unfold some definitions, to be able to tell certain things (e.g. of type monoidal_category.associator_naturality') are secretly just equalities

Keeley Hoek (Nov 11 2018 at 04:13):

I thought whnf maybe did this? Is there a problem if the expression being passed is after binders?

Keeley Hoek (Nov 11 2018 at 04:18):

ah, I see I want dsimp

Keeley Hoek (Nov 11 2018 at 04:26):

Hmm... it seems to unfold projections when I pass in arguments, but it doesn't deduce their type

Scott Morrison (Mar 29 2020 at 05:03):

Per the discussion in the maintainers' meeting this morning, I've located the rewrite_search branch, merged master, and got it compiling again. General challenge: understand what's in there, and work out a route to PR it into mathlib. :-)

Bryan Gin-ge Chen (Mar 29 2020 at 05:10):

I guess we could start by PRing everything not under tactic/rewrite_search that hasn't already been PR'd? Assuming the meta/expr and tactic/core changes are already in PRs, it looks like that's just two new files under data/array.


Last updated: Dec 20 2023 at 11:08 UTC