coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Helmut Brandl <helmut.luis.brandl AT gmail.com>
- To: Coq-Club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Strange subtyping
- Date: Fri, 8 Jun 2018 18:12:48 -0500
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=helmut.luis.brandl AT gmail.com; spf=Pass smtp.mailfrom=helmut.luis.brandl AT gmail.com; spf=None smtp.helo=postmaster AT mail-wr0-f170.google.com
- Ironport-phdr: 9a23:kpA6XRzlQyIcZILXCy+O+j09IxM/srCxBDY+r6Qd1O8VIJqq85mqBkHD//Il1AaPAd2Graocw8Pt8InYEVQa5piAtH1QOLdtbDQizfssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1JuPoEYLOksi7ze+/94HTbglSmDaxfa55IQmrownWqsQYm5ZpJLwryhvOrHtIeuBWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbOSxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDwULs6Wymt771zRRDnhicINT43/m/UhMJtkqxUvAmsqAZjz4POeoyZKOZyc6HbcNgHRWRBRMFRVylZD42+cYQPC+8BPftEr4LgulYOtwGxBQ+xC+Pr1zRFgX/20rM+0+QkDAHGwBYsH9YTsHTVt9X5LrwdUfqvw6nO0DrDa+hb2Tj46IfScxAhpeuAUq53ccrU0EQiER7OgFaIqYH9IT+ZyuAAv3KY4udgT+6jlnArpgJrrjSyxMoglo/EjZ8PxF/e7yV22oM1KMW4SEFlZd6kF4NdtySAOIt3RsMuWm9puDwmxrEft563YSoHxIg9yx7QbPyHdIeI4hb9W+qLPTh4g3dldKq+hxa070eg1vXxWteo3FtOtCZIkdnBumoQ2xDN6cWLUOZx80W91TqX0gDc8OBEIUQ6larBLJ4hx6Y9lpoNvkTHGy/2hVn2gLWSdkU5++io8P7rba78ppCGMY97lwX+P78hmsy6G+s4MwwOU3KH9uS70b3v5Vf5T6lSjv0qjqnZt4jXKtgcpq6gGgNazoIj6wukADq9y9QZnXwHLEpfdx6djojpPUvOIPHiAvuljVSsimQj+/eTFbr4R77JM3KLxLzmZPN271NW4As119FWoZxOXOIvOvX2D2/8sNnFElcTKQWyz+KvXNVw0oYDRSSLH66CdqnIuFmE4sogJuCNYMkevzOreKtt3OLnkXJswQxVRqKux5ZCMCnpTMQjGF2QZD/XuvlEFG4LugQkS+mz0Q+NVDdSYzC5WKduv2hnWrLjNp/KQ8WWuJLExD2yR8QEaWVPC1TKGnDtJd3dBqU8LRmKK8okqQQqELisT4h7i0OrvQ7+jqV9dq/ao3JA853k09dx6qvYkhRgrTE=
Sorry. I cannot yet get it straight.
From the subtype rules in the reference manual and your response to my question it has to be the case that Prop <= Set.
From the Conv rule I conclude that T:Prop implies T:Set.
This implies that I can feed any proposition into an argument expecting a Set.
Definition idset (A:Set)(x:A):=x.
The term idset (0<=0) (le_n 0) surprisingly passes the type checker.
Is this really the intended behaviour?
Sorry if my question is to stupid. But it puzzles me.
Regards
Helmut
On Thu, Jun 7, 2018, 10:04 Matthieu Sozeau <mattam AT mattam.org> wrote:
Hi,
What we don’t have is Prop : Set indeed, only Prop <= Set and Set <= Type(i). Actually we even have Prop < Set internally, i.e the two sorts are enforced to be distinct. One reason is that the set-theoretic model allows this, the impredicative universe Prop being interpreted as { ø, { ø } } which is a subset of Set’s interpretation. However this subtyping rule is a bit of a pain as it complicates the model: one has to modify the interpretation of function types and applications to use a so-called trace encoding to kind of dynamically detect if a term is in Prop or Set. If we remove it (which is a plan we have for a future version of the calculus), then one can see Prop as a separate universe from the predicative Type hierarchy and your example wouldn’t work anymore.
Hope this helps a little,
— MatthieuLe jeu. 7 juin 2018 à 16:34, Helmut Brandl <helmut.brandl AT gmx.net> a écrit :Hi.I am confused by a subtyping rule mentioned in chapter 4.4 of the reference manual.It says that Prop is a subtype of Set. I checked it with the identity functionDefinition id {T:Set} (x:T):= x.And indeed the _expression_ "id I" is well typed.I always thought that both Set and Prop are subtypes of Type(i) for any i but are not related in the subtyping relation.What is the reason for this subtyping rule? Can anybody explain?ThanksHelmut
- [Coq-Club] Strange subtyping, Helmut Brandl, 06/07/2018
- Re: [Coq-Club] Strange subtyping, Matthieu Sozeau, 06/07/2018
- Re: [Coq-Club] Strange subtyping, Stefan Monnier, 06/07/2018
- Re: [Coq-Club] Strange subtyping, Maxime Dénès, 06/07/2018
- Re: [Coq-Club] Strange subtyping, Stefan Monnier, 06/07/2018
- Re: [Coq-Club] Strange subtyping, Maxime Dénès, 06/07/2018
- Re: [Coq-Club] Strange subtyping, Stefan Monnier, 06/07/2018
- Re: [Coq-Club] Strange subtyping, Maxime Dénès, 06/07/2018
- Re: [Coq-Club] Strange subtyping, Helmut Brandl, 06/07/2018
- Re: [Coq-Club] Strange subtyping, Helmut Brandl, 06/09/2018
- Re: [Coq-Club] Strange subtyping, Théo Zimmermann, 06/09/2018
- Re: [Coq-Club] Strange subtyping, Helmut Brandl, 06/15/2018
- Re: [Coq-Club] Strange subtyping, Théo Zimmermann, 06/09/2018
- Re: [Coq-Club] Strange subtyping, Stefan Monnier, 06/07/2018
- Re: [Coq-Club] Strange subtyping, Matthieu Sozeau, 06/07/2018
Archive powered by MHonArc 2.6.18.