coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Matthieu Sozeau <matthieu.sozeau AT inria.fr>
- To: Coq Club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] how to stop Coq from unfolding defined constants
- Date: Wed, 5 Aug 2020 12:18:36 +0200
> Le 9 juil. 2020 à 15:46, Jeremy Dawson <Jeremy.Dawson AT anu.edu.au> a écrit :
>
>
> Hi,
>
> I have a goal
>
> swapped ((single a ++ qs) ++ vs) ((qs ++ vs) ++ single a)
>
> where single is defined by
>
> Definition single X (a : X) := [a].
>
> When I try
>
> rewrite - !app_comm_cons.
>
> it unfolds one of the occurrences of single x
>
> (which stops my carefully written Ltac function from working and took ages
> to pinpoint what was happening).
>
> How do I stop this from happening?
Hi,
I think you have to refine the syntactic pattern to `rewrite - [(_ :: _) ++
_]!app_comm_cons`, otherwise
the inferred syntactic pattern of the rule just considers the top-level
symbol, e.g. `[_ ++ _]`
and then uses unification up-to-reduction for the subterms, which succeeds
here.
Best,
— Matthieu
- Re: [Coq-Club] how to stop Coq from unfolding defined constants, Matthieu Sozeau, 08/05/2020
- Re: [Coq-Club] how to stop Coq from unfolding defined constants, Jeremy Dawson, 08/06/2020
Archive powered by MHonArc 2.6.19+.