coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Adam Chlipala <adamc AT csail.mit.edu>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] automating consecutive branches
- Date: Sun, 09 Feb 2014 14:26:16 -0500
On 02/09/2014 12:07 PM, Justus Matthiesen wrote:
I was trying something along the lines ofYou need backtracking to implement the above. Fortunately(?), Ltac's pattern
(exists s1 || exists s2 || exists s3) ; (exists s4 || exists s5 ||
exists s6) ; (simpl ; .... ; intuition).
However, since all the exist commands on their own will go through and
the "stuckedness" is only discovered much later in the tactic, || does
not work.
matching has a backtracking semantics (c.f. [1]).
There's no need to implement the backtracking afresh with Ltac. [eauto] already does everything you need.
Hint Extern 1 False => discriminate.
Hint Extern 1 (_ \/ _) => progress unfold update;
repeat match goal with
| [ |- context[if ?E then _ else _] ] => destruct E; subst; try discriminate; try tauto
end.
Goal (MCDC (fun s => s = s1 \/ s = s2 \/ s = s3 \/ s = s4 \/ s = s5 \/ s = s6) (fun g => g = f)).
hnf; destruct x; intros; subst; simpl; eauto 20.
Qed.
- [Coq-Club] automating consecutive branches, Jonas Oberhauser, 02/09/2014
- Re: [Coq-Club] automating consecutive branches, Justus Matthiesen, 02/09/2014
- Re: [Coq-Club] automating consecutive branches, Adam Chlipala, 02/09/2014
- Re: [Coq-Club] automating consecutive branches, Arnaud Spiwack, 02/10/2014
- Re: [Coq-Club] automating consecutive branches, Justus Matthiesen, 02/09/2014
Archive powered by MHonArc 2.6.18.