Skip to Content.
Sympa Menu

coq-club - [Coq-Club] rewrite and instantiation of existential variables

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] rewrite and instantiation of existential variables


chronological Thread 
  • From: Jacques Garrigue <garrigue AT math.nagoya-u.ac.jp>
  • To: coq-club AT pauillac.inria.fr
  • Subject: [Coq-Club] rewrite and instantiation of existential variables
  • Date: Mon, 27 Jul 2009 16:13:45 +0900 (JST)
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

I have the same kind of problem as described in

  http://logical.saclay.inria.fr/coq-puma/messages/1e1098e5dd22df43

and

  http://logical.saclay.inria.fr/coq-puma/messages/16f7d4c858cc1da4

Namely, when hypotheses contain existential variables, repeatedly
applying rewrite can cause an infinite loop (the variables get
incrementally instantiated...)

I really wish there were a version of rewrite that would not
match on existentials.

Alternatively, is there any way to detect whether the current goal
contains existentials? I've written a tactic to do that, but it seems
rather ad-hoc (it just tries to instantiate, and fails when succeeding).

Ltac instantiate_fail :=
  instantiate;
  try ((instantiate (1 := nil) || instantiate (1:={})) ; fail 1);
  try (match goal with H: _ |- _ =>
   (instantiate (1:=nil) in H || instantiate (1:={}) in H) end;
   fail 1).

Jacques
---------------------------------------------------------------------------
Jacques Garrigue      Nagoya University     garrigue at math.nagoya-u.ac.jp
                   <A HREF=http://www.math.nagoya-u.ac.jp/~garrigue/>JG</A>





Archive powered by MhonArc 2.6.16.

Top of Page