coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Ralf Jung <jung AT mpi-sws.org>
- To: coq-club AT inria.fr, Hugo.Herbelin AT inria.fr
- Subject: Re: [Coq-Club] Names of bound variables of existing lemma changes
- Date: Fri, 6 May 2016 15:39:09 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jung AT mpi-sws.org; spf=Pass smtp.mailfrom=jung AT mpi-sws.org; spf=None smtp.helo=postmaster AT hera.mpi-klsb.mpg.de
- Ironport-phdr: 9a23:l6oHphyJocnQxonXCy+O+j09IxM/srCxBDY+r6Qd0e8VIJqq85mqBkHD//Il1AaPBtWKraoawLSK+4nbGkU+or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6anHS+4HYoFwnlMkItf6KuSt+U15r8ibz60qaQSjsLrQL1Wal1IhSyoFeZnegtqqwmFJwMzADUqGBDYeVcyDAgD1uSmxHh+pX4p8Y7oGwD884mosVHSODxe7kyZb1eFjUvdW4voIXLqBbECyuC/HERVmQQuhtOGQnMqh/gDbnrtS6vjON51mG4IMv5BeQ2RDKtx6JzSVrzlzxBMCQ2pjKEwvdshb5W9Ury7yd0xJTZNdmY
Hi Hugo,
> I just replied to your bug report. I'm afraid the misunderstanding
> comes from the maximal implicit argument of foo.
>
> Indeed, if you type
>
> Set Printing Existential Instances.
>
> and do
>
> Check foo.
> (*
> foo
> : forall P0 Q0 : Prop, ?n@{P:=P; Q:=Q; H:=H; H0:=H0} = 0 -> Q0 -> P0
> -> Q0
> *)
>
> You'll see that the type of foo depends on the "P" of the goal and
> that there is no other choice than renaming the "P" of foo into
> another name.
I do not understand this syntax. What is the "?n@{...}"?
Also, what you say does not seem to explain why this only happens when
[foo] was declared in a Section.
However, disregarding the details of the implementation, don't you agree
that having to write
foo (P0:=P)
when foo was actually declared as having type "forall P:Prop, ..." is
very confusing? There is no ambiguity here, I am writing an application
of [foo] which only has one parameter called [P].
From a user perspective, Coq is essentially making up a new name here
for something that I already named differently.
> So, probably, you intended to do
>
> apply @foo with (P:=P).
>
> Hope it helps,
Being able to work around this with the @ is certainly useful. However,
since only *implicit* arguments can be named, this trick becomes
impractical once any non-implicit argument has to be specified -- it
cannot be named, so one has to resort to underscores again.
Kind regards,
Ralf
- [Coq-Club] Names of bound variables of existing lemma changes, Ralf Jung, 05/04/2016
- Re: [Coq-Club] Names of bound variables of existing lemma changes, Beta Ziliani, 05/04/2016
- Re: [Coq-Club] Names of bound variables of existing lemma changes, Hugo Herbelin, 05/04/2016
- Re: [Coq-Club] Names of bound variables of existing lemma changes, Ralf Jung, 05/06/2016
- Re: [Coq-Club] Names of bound variables of existing lemma changes, Hugo Herbelin, 05/06/2016
- Re: [Coq-Club] Names of bound variables of existing lemma changes, Ralf Jung, 05/06/2016
- Re: [Coq-Club] Names of bound variables of existing lemma changes, Pierre Courtieu, 05/04/2016
- Re: [Coq-Club] Names of bound variables of existing lemma changes, Ralf Jung, 05/04/2016
- Re: [Coq-Club] Names of bound variables of existing lemma changes, Pierre Courtieu, 05/04/2016
- Re: [Coq-Club] Names of bound variables of existing lemma changes, Ralf Jung, 05/04/2016
- <Possible follow-up(s)>
- Re: [Coq-Club] Names of bound variables of existing lemma changes, Beta Ziliani, 05/04/2016
Archive powered by MHonArc 2.6.18.