coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Hugo Herbelin <Hugo.Herbelin AT inria.fr>
- To: Eddy Westbrook <westbrook AT galois.com>
- Cc: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Finding a pattern-matching fix in a term?
- Date: Sun, 17 May 2020 10:04:22 +0200
Hi,
As far as Ltac is concerned, its "match" is pretty constrained when it
is about matching a "fix" or "match" term (for instance the {struct id}
of a "fix" has to be the same in the pattern and in the matched term,
and, for "match" of terms, it has to be on the same inductive type).
There is otherwise a tactic "is_fix t" which tests if t is a fix and
fails it is not. There is also an ad hoc "destauto"/"destauto in H"
which destructs the "x" of all "match x with ... end" present in the
conclusion or in an hypothesis. Don't know what others would recommend
and what would more generally be the nicest approach to imagine to
deal with this kind of configuration.
Best,
Hugo
On Fri, May 15, 2020 at 06:17:13PM -0700, Eddy Westbrook wrote:
> Hey Coq Club,
>
> Is there any way to pattern-match on a fix + match term like (fix foo
> (x1:A1) … := match xi with … ) in a term? I am trying to write some tactics
> to determine if a particular argument is being destructed in a term, in
> order to apply the destruct or induction tactic on it, but it seems that
> Ltac at least won’t let me search for fix terms…?
>
> Thanks in advance,
> -Eddy
- [Coq-Club] Finding a pattern-matching fix in a term?, Eddy Westbrook, 05/16/2020
- Re: [Coq-Club] Finding a pattern-matching fix in a term?, Hugo Herbelin, 05/17/2020
- Re: [Coq-Club] Finding a pattern-matching fix in a term?, Beta Ziliani, 05/17/2020
- Re: [Coq-Club] Finding a pattern-matching fix in a term?, Pierre-Marie Pédrot, 05/18/2020
- Re: [Coq-Club] Finding a pattern-matching fix in a term?, Hugo Herbelin, 05/17/2020
Archive powered by MHonArc 2.6.19+.