coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Matthieu Sozeau <mattam AT mattam.org>
- To: Vladimir Voevodsky <vladimir AT ias.edu>
- Cc: Coq Club <coq-club AT pauillac.inria.fr>
- Subject: Re: [Coq-Club] another question (Prop as a subtype of Set)
- Date: Tue, 13 Oct 2009 14:00:09 -0400
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
Le 13 oct. 09 à 13:49, Vladimir Voevodsky a écrit :
In the following sequence of instructions:
Axiom f5 : Set -> nat .
Axiom P0 : Prop .
Axiom S0 : Set .
Check f5 P0 .
Check eq P0 S0 .
The last two produce the following reactions:
f5 P0
: nat
and
Error: The term "S0" has type "Set" while it is expected to have type "Prop".
respectively.
Why does f5 treat Prop as a subtype of Set but eq does not?
It's because eq's arguments type is fixed by the type of its first argument.
One could say it's somewhat premature, there exists some systems
using unification with subtyping that can handle this case.
In short, [Check @eq Set P0 S0.] works, as does [Check eq S0 P0] :).
-- Matthieu
- Re: [Coq-Club] an inductive types question, (continued)
- Re: [Coq-Club] an inductive types question, André Hirschowitz
- Re: [Coq-Club] an inductive types question, AUGER Cédric
- Re: [Coq-Club] an inductive types question, André Hirschowitz
- Re: [Coq-Club] an inductive types question, Dan Doel
- [Coq-Club] another question (Prop as a subtype of Set), Vladimir Voevodsky
- [Coq-Club] another question (cont.), Vladimir Voevodsky
- Re: [Coq-Club] another question (cont.), Taral
- [Coq-Club] About extraction and mutual recursion, AUGER Cédric
- [Coq-Club] Typo on coq manual, AUGER
- Re: [Coq-Club] Typo on coq manual, Pierre Letouzey
- Re: [Coq-Club] another question (Prop as a subtype of Set), Matthieu Sozeau
- Re: [Coq-Club] an inductive types question, Vladimir Voevodsky
- Re: [Coq-Club] an inductive types question, AUGER Cédric
- Re: [Coq-Club] an inductive types question, André Hirschowitz
- Re: [Coq-Club] an inductive types question, AUGER Cédric
- [Coq-Club] another inductive types question, Vladimir Voevodsky
- Re: [Coq-Club] another inductive types question, AUGER Cédric
- Re: [Coq-Club] another inductive types question, Roman Beslik
- Re: [Coq-Club] another inductive types question, Vladimir Voevodsky
- Re: [Coq-Club] Type hierarchy, Randy Pollack
Archive powered by MhonArc 2.6.16.