Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Strange subtyping

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Strange subtyping


Chronological Thread 
  • From: Helmut Brandl <helmut.luis.brandl AT gmail.com>
  • To: Coq-Club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Strange subtyping
  • Date: Thu, 7 Jun 2018 11:16:24 -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-f193.google.com
  • Ironport-phdr: 9a23:nCvh1hxL6FdlwXHXCy+O+j09IxM/srCxBDY+r6Qd1O8VIJqq85mqBkHD//Il1AaPAd2Graocw8Pt8InYEVQa5piAtH1QOLdtbDQizfssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1JuPoEYLOksi7ze+/94HTbglSmDaxfa55IQmrownWqsQYm5ZpJLwryhvOrHtIeuBWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbOSxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDwULs6Wymt771zRRDnhicINT43/m/UhMJtkqxUvAmsqAZjz4POeoyZKOZyc6HbcNgHRWRBRMFRVylZD42+cYQPC+8BPftEr4LgulYOtwGxBQ+xC+Pr1zRFgX/20rM+0+QkDAHGwBYsH9YTsHTVt9X5LrwdUfqvw6nO0DrDa+hb2Tj46IfScxAhpeuAUq53ccrU0EQiER7OgFaIqYH9IT+ZyuAAv3KY4udgT+6jlnArpgJrrjSywsohhI/EjZ8PxF/e7yV22oM1KMW4SEFlZd6kF4NdtySAOIt3RsMuWm9puDwmxrEft563YSwHxZo9yx7QbPyHdIeI4hb9W+qLPTh4g3dldKq+hxa070eg1vXxWteo3FtOtCZIkdnBumoQ2xDN6cWLUOZx80Ov1DqX0gDc8OBEIUQ6larBLJ4hx6Y9lpoNvkTHGy/2hVn2gLWSdkU5++io8P7rba78ppCGMY97lwX+P78hmsy6G+s4MwwOU3KH9uS70b3v5Vf5T6lSjv0qjqnZt4jXKtgcpq6gGgNazoIj6wukADq9y9QZnXwHLEpfdx6djojpPUvOIPHiAvuljVSsimQj+/eTFbr4R77JM3KLxLzmZPN271NW4As119FWoZxOXOIvOvX2D2/8sNnFElcTKQWyz+KvXNVw0oYDRSSLH66CdqnIuFmE4sogJuCNYMkevzOreKtt3OLnkXJswQxVRqKux5ZCMCnpTMQjGF2QZD/XuvlEFG4LugQkS+mz0Q+NVDdSYzC5WKduv2hnWrLjNp/KQ8WWuJLExD2yR8QEaWVPC1TKGnDtJd3dBqU8LRmKK8okqQQqELisT4h7i0OrvQ7+jqV9dq/ao3xD853k09dx6qvYkhRgrTE=

Thanks for the answer. Is it correct that "Prop <= Set" is not necessary for the expressive power of CIC?

The answer is probably yes since you plan to remove it.

My silly example is no problem since I didn't expect it to work anyhow. It is always possible to define the identity function having the type "forall (T:Type)(x:T):T".

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,
— Matthieu
Le 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 function

Definition 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?

Thanks
Helmut



Archive powered by MHonArc 2.6.18.

Top of Page