coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Adam Chlipala <adamc AT csail.mit.edu>
- To: "Edward Z. Yang" <ezyang AT mit.edu>
- Cc: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Negated ltac pattern match
- Date: Sat, 10 Dec 2011 14:48:56 -0500
Edward Z. Yang wrote:
Suppose that I would like to run a tactic, but only if some hypothesis
isn't present. Namely, I would like to do a negated pattern match,
i.e. a red cut. It might seem that this would work OK:
(**)
match goal with
| [ H : P X | _ ] => fail 2
| _ => assert (P X); [eauto|]
(**)
Unfortunately, 'fail 2' is overzealous and escapes too far.
Did you try [fail 1]? That's what I would have attempted first.
- [Coq-Club] Negated ltac pattern match, Edward Z. Yang
- Re: [Coq-Club] Negated ltac pattern match, Adam Chlipala
- Re: [Coq-Club] Negated ltac pattern match, Edward Z. Yang
- Re: [Coq-Club] Negated ltac pattern match, Marko Malikoviæ
- Re: [Coq-Club] Negated ltac pattern match, Adam Chlipala
Archive powered by MhonArc 2.6.16.