Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Trouble constructing terms of dependent types involving proofs

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Trouble constructing terms of dependent types involving proofs


Chronological Thread 
  • From: Clément Pit--Claudel <clement.pit AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Trouble constructing terms of dependent types involving proofs
  • Date: Thu, 3 Mar 2016 14:37:22 -0700
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=clement.pit AT gmail.com; spf=SoftFail smtp.mailfrom=clement.pit AT gmail.com; spf=None smtp.helo=postmaster AT mout.kundenserver.de
  • Ironport-phdr: 9a23:B56bhR9h4nFoYf9uRHKM819IXTAuvvDOBiVQ1KB91+0cTK2v8tzYMVDF4r011RmSDdqdtK4P0rGH+4nbGkU+or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6anHS+4HYoFwnlMkItf6KuStGU0Jj8jrvjs7ToICx2xxOFKYtoKxu3qQiD/uI3uqBFbpgL9x3Sv3FTcP5Xz247bXianhL7+9vitMU7q3cY6Lod8JtLVry/dKAlR5RZCi4nOiY7/p7Frx7GGCCLZ34RVHkhqhtURk3u6BjnUpr1+n/xsud41S+Ge9X3UZg7XD2j6+FgTxq+23RPDCIw7GyC0p84t6lcuh/0/xE=

You can make it look a bit cleaner with a notation, too:

Tactic Notation "!!" uconstr(term) :=
refine term; solve [apply eq_refl].

Definition test2 : expr nil :=
ltac:(!! (Lam _ "x" (Var _ "x" _))).

Clément.

On 03/03/2016 02:26 PM, Clément Pit--Claudel wrote:
>
>
> On 03/03/2016 02:23 PM, Ralf Jung wrote:
>>> )
>> All my experiments with tactics-in-terms lead to the same trouble as
>> plain eq_refl: The tactic is run before the contexts are propagated
>> down, so things don't work. But it may well be that I did this wrong; I
>> have yet to see a successful use of tactics-in-terms ;-)
>
> Something like this?
>
> Definition test2 : expr nil :=
> ltac:(refine (Lam _ "x" (Var _ "x" _)); apply eq_refl).
>

Attachment: signature.asc
Description: OpenPGP digital signature




Archive powered by MHonArc 2.6.18.

Top of Page