Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Simple question about tactic notation

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Simple question about tactic notation


chronological Thread 
  • From: Thomas Braibant <thomas.braibant AT gmail.com>
  • To: Edsko de Vries <devriese AT cs.tcd.ie>
  • Cc: coq-club AT pauillac.inria.fr, Damien Pous <Damien.Pous AT inria.fr>
  • Subject: Re: [Coq-Club] Simple question about tactic notation
  • Date: Sun, 15 Mar 2009 17:43:25 +0100
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=AvFRKQU65Dv7ijvmSTG30cM0MG4ktKq/rE43QGKra0NFxIQnCrbUfu+JhhnTB5A3MT xoBxMURVfmdYJnobNr80zpWP8CmZ+2eqyhC+5PSM42UBItkz63iCWtbpFM5dvN2UEYfV 2dJhfJeJ/7fD0lGJP7813kMlR3sj7IxGKdrVY=
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Maybe I am wrong but it seems to be related to a bug we encountered,
where the n in induction n in your tactic is not linked to the
parameter integer(n) but to a "n" potentially appearing in the context
of your goal (and here, I expect you do not have such n in your
context).

If you write set (n:=1); my_induction 1664.  then your tactic works,
isn't it ?

Thomas

On Sat, Mar 14, 2009 at 1:46 PM, Edsko de Vries 
<devriese AT cs.tcd.ie>
 wrote:
> Hi,
>
> Is it possible to define a tactic that at some point calls 'induction n' for
> some natural number 'n'? I've tried
>
> Tactic Notation "my_induction" integer(n) :=
>  induction n.
>
> Inductive even : nat -> Prop :=
>  | even_zero : even 0
>  | even_succ : forall n, even n -> even (S (S n)).
>
> Lemma foo : forall (n:nat), even n -> True.
> Proof.
>  my_induction 1.
>
> but that gives (coq 8.2):
>
> In nested Ltac calls to "my_induction'" and "n"), last term evaluation
> failed.
> Error: Variable n should be bound to a term.
>
> Is there a way to write my_induction?
>
> Edsko
>
> BTW There seems to be an extraneous bracket in the error message :)
>
> --------------------------------------------------------
> Bug reports: http://logical.saclay.inria.fr/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