coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Arnaud Spiwack <aspiwack AT lix.polytechnique.fr>
- To: Coq Club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] H a defined identifier?
- Date: Mon, 4 Aug 2014 20:38:15 +0200
The message is due to the use of the [intro] tactic which is done when the goal is created. You could do something a bit more verbose like:
It should work. I may be able to arrange that the trunk would have a less surprising behaviour if that is considered better. Definition nat_compose : forall
(F : C -> D) `{Functor F}
(G : C -> D) `{Functor G}
(H : C -> D) `{Functor H}
(f : Natural G H) (g : Natural F G), Natural F H.
(F : C -> D) `{Functor F}
(G : C -> D) `{Functor G}
(H : C -> D) `{Functor H}
(f : Natural G H) (g : Natural F G), Natural F H.
Proof.
intros F ? G ? H ? f g.
On 4 August 2014 17:40, Guillaume Melquiond <guillaume.melquiond AT inria.fr> wrote:
On 03/08/2014 22:04, John Wiegley wrote:
I was trying to define composition of natural transformations
Definition nat_compose
(F : C -> D) `{Functor F}
(G : C -> D) `{Functor G}
(H : C -> D) `{Functor H}
(f : Natural G H) (g : Natural F G) : Natural F H.
But Coq says:
Error: H is already used.
If I change H to I, everything works fine. Since I was unable to Print H, or
find H defined in any of my modules, I wondered if this reminded anyone of
anything?
My guess is that, by the time Coq encounters (H : C -> D), this name has already been claimed by one of the {Functor ...} arguments. You can check whether this is the case by printing nat_compose (the version with I instead of H). I don't think there is a workaround, except by explicitly naming all your arguments.
Best regards,
Guillaume
- [Coq-Club] H a defined identifier?, John Wiegley, 08/03/2014
- Re: [Coq-Club] H a defined identifier?, Guillaume Melquiond, 08/04/2014
- Re: [Coq-Club] H a defined identifier?, Arnaud Spiwack, 08/04/2014
- Re: [Coq-Club] H a defined identifier?, Guillaume Melquiond, 08/04/2014
Archive powered by MHonArc 2.6.18.