Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Tactics for goals containing "exists"

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Tactics for goals containing "exists"


chronological Thread 
  • From: Arnaud Spiwack <aspiwack AT lix.polytechnique.fr>
  • To: coq-club AT pauillac.inria.fr
  • Subject: Re: [Coq-Club] Tactics for goals containing "exists"
  • Date: Fri, 08 Jun 2007 21:26:18 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=UU2a+BB9CZEuLIjJul6j83GP3ui7olfju+ak0VCaly8a2mj1rvsLahWJiuGDn0fuGF76ds3MKVQ/c956hfChfQvVC+SRMuB2KNE7bNthm4g0r052Cob8PmLOv47Ns2luBxmW85NEu/VL2jyQNjJeOeEr7mVbWKvTYOt/uYQeY8o=
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Well, this is a rather typical use of the "esplit" tactic. It is a variation of "eapply" for inductive types with a single constructor type. It simply destruct the constructor in the goal generating metavariables where dependencies are needed.

A bit of action :

Require Import List.
Axiom A : Set.

Goal forall (h:A) (t:list A) (o:list A), exists f : list A, f ++ o = h::t ++o.
intros.
esplit.
change (h::t++o) with ((h::t)++o).
reflexivity.
Qed.



As you can see while running the proof, unification is done at the time of the "reflexivity". I haven't figured a way to go around the "change" though, since "h::t++o" is in normal form where "(h::t)++o" is not. Coq unification is very first order.


Arnaud Spiwack

Sean Wilson a écrit :
Hi,

I'm working with goals containing existential quantifiers like the following:

h : A
t : list A
o : list A
______________________________________(1/1)
exists f : list A, f ++ o = h :: t ++ o

To progress, I must call "exists h::t", which you can work out by unification of the two sides of the equality. Does Coq have any way of inferring this and solving the goal automatically? Also, are there any other tactics besides "exists" that let me manipulate goals like this in useful ways?

Regards,

Sean

--------------------------------------------------------
Bug reports: http://coq.inria.fr/bin/coq-bugs
Archives: http://pauillac.inria.fr/pipermail/coq-club
          http://pauillac.inria.fr/bin/wilma/coq-club
Info: http://pauillac.inria.fr/mailman/listinfo/coq-club







Archive powered by MhonArc 2.6.16.

Top of Page