Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Generating fresh names with string variables

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Generating fresh names with string variables


chronological Thread 
  • From: AUGER Cedric <Cedric.Auger AT lri.fr>
  • To: Jesper Bengtson <jebe AT itu.dk>
  • Cc: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Generating fresh names with string variables
  • Date: Thu, 8 Sep 2011 17:04:23 +0200

Le Thu, 8 Sep 2011 14:27:31 +0200,
Jesper Bengtson 
<jebe AT itu.dk>
 a écrit :

> Greetings Coq users.
> 
> I am trying to generate fresh names in the context from strings
> provided by the user.
> 
> If i type the command 'fresh t', where t is a variable of type
> string, I get an error message that t cannot be coerced to a fresh
> identifier. Is there a way forward here, or should I just choose a
> name at random?
> 
> Best regards
> 
> /Jesper

AFAIK, you cannot convert a string of the String coq library to a
string used by tactics, but you can provide a (tactic) string to the
tactic, so that it is used to generate identifiers.

>>>
Ltac demo s :=
 let H := fresh s in
 intros H.

Goal forall (t u v:bool), True.
intro.
demo u.
demo t.
split.
Qed.
<<<




Archive powered by MhonArc 2.6.16.

Top of Page