coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Théo Zimmermann <theo.zimmi AT gmail.com>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?
- Date: Wed, 18 Jan 2017 16:39:03 +0000
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=theo.zimmi AT gmail.com; spf=Pass smtp.mailfrom=theo.zimmi AT gmail.com; spf=None smtp.helo=postmaster AT mail-qt0-f178.google.com
- Ironport-phdr: 9a23:X09kNxVSyHDWHaB7UphDt5Np0/DV8LGtZVwlr6E/grcLSJyIuqrYYx2At8tkgFKBZ4jH8fUM07OQ6PG8HzdRqsfZ+Fk5M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aFRrwLxd6KfroEYDOkcu3y/qy+5rOaAlUmTaxe71/IRG5oAnLuMQbhYRuJ6ItxhDUvnZGZuNayH9yK1mOhRj8/MCw/JBi8yRUpf0s8tNLXLv5caolU7FWFSwqPG8p6sLlsxnDVhaP6WAHUmoKiBpIAhPK4w/8U5zsryb1rOt92C2dPc3rUbA5XCmp4ql3RBP0jioMKjg0+3zVhMNtlqJWuB2upxJ9zIDUbo+bN+dwcL3Bct4BX2VNQtxcWjZdDo+gbYYCCfcKM+ZCr4n6olsDtQWwBQm2A+Po0jBHhX723ag/0+s/CwHG2RYvH9QIsH/Jq9j1KKcSXv6yzKXSzDTDbvZW2TL86IXTfRAhpOuDXbN0ccbL1UYvEAbFg0yWpIf4MT2V0eENvHKa7+pmTe+gl2knqxt3ojexwscsjpPFiZwIxVDZ7Sl5wYA1Jce5SEFhe9KkHoFQuzmVN4t3XsMiQ3xotz0gxrIavp67eS4Hw4kkyR7Hc/GLbZSE7xb5WOuSITp0nmxpdK++ihqo7EStyO7xW8+p21hQtCVFiMPDtnUV2hzT9MeHTvx981+k2TmV1gDT7vhIIVkolabHMpIhzKM8m5gQvEjZES/2n0L2jKCSdko64OSn9+PnYrD+qp+dMY97lB3+P7wwlsCjBek0KAsDUmiB9eiiybHu/Ff1TKhIg/A1iqXZtYrVJcUfpq63GQ9V1YMj5g6jDzemztsYmmMLLVNEeBKCiojpOkrDIP/9DfilglSslC1nyOzBPr3kGpnNNGTMkK/9fbZh7E5R0BY8zddG555NFr4BJO/zVVTqudzDDh45NhS0zPz9BNV80IMeQ2OPDbWDPKPcq1/brt4oduKLfcoevCv3A/kj/f/ny3EjynEHeqz84ZuWb0eKH/FjLl+caHzqyoMdEWoN+Bg/SenroFKHWD9XIX21WvRvtXkAFIu6ANKbFciWi7ub0XLjEw==
Hi,
Disclaimer: there are people so much more qualified than me on this list who can answer this question. But as they did not wake up yet (maybe they are too engrossed in some POPL presentations) I will try to give a few hints.
Coq < Check Prop:Set.
> ^^^^^^^^^^^^^^^
Error:
The term "Prop" has type "Type" while it is expected to have type "Set".
However, we can see that the constraint allows one to give type Set to something of type Prop:
Coq < Check False : Prop.
False : Prop
: Prop
Coq < Check False : Set.
False : Set
: Set
Coq < Check False : Prop.
False : Prop
: Prop
Coq < Check False : Set.
False : Set
: Set
Coq < Check nat : Prop.
> Check nat : Prop.
> ^^^
Error:
The term "nat" has type "Set" while it is expected to have type
"Prop" (universe inconsistency).
Le mer. 18 janv. 2017 à 17:20, Matej Kosik <5764c029b688c1c0d24a2e97cd764f AT gmail.com> a écrit :
Hi,
On 01/18/2017 05:10 PM, Abhishek Anand wrote:
> Going by the general rule that Ui:Uj if i<j, I suspect that Prop < Set would allow the following:
> Check (Prop:Set)
> which fails in Coq 8.5pl3.
AFAIK this:
Check Prop:Set.
in all versions of Coq (8.5, 8.6, trunk).
That makes sense.
And precisely for that, the current version of the constraint:
Prop < Set
does not make sense (to me).
>
> So the stronger constraint may allow some new well-typed terms and potentially complicate arguments about normalization/consistency etc.
>
>
>
> -- Abhishek
> http://www.cs.cornell.edu/~aa755/ <http://www.cs.cornell.edu/~aa755/>
>
> On Wed, Jan 18, 2017 at 9:27 AM, Matej Kosik <5764c029b688c1c0d24a2e97cd764f AT gmail.com <mailto:5764c029b688c1c0d24a2e97cd764f AT gmail.com>> wrote:
>
> Hi,
>
> I have noticed that in Coq, we have the following universe constraint:
>
> Prop < Set
>
> I am wondering what is the reason for that?
> Wouldn't
>
> Prop <= Set
>
> suffice in this case?
>
> The code that makes the decision is here:
>
> https://github.com/coq/coq/blob/trunk/kernel/uGraph.ml#L716 <https://github.com/coq/coq/blob/trunk/kernel/uGraph.ml#L716>
>
> I wonder whether it is necessary to do:
>
> enforce_univ_lt Level.prop Level.set empty
>
> as now, or we could simply do
>
> enforce_univ_leq Level.prop Level.set empty
>
> I've created an experimental branch where I did the change:
>
> https://github.com/matej-kosik/coq/commit/2fcbb0ced3bc32210ae9fbf4acc40804841c9200 <https://github.com/matej-kosik/coq/commit/2fcbb0ced3bc32210ae9fbf4acc40804841c9200>
>
> ran some tests:
>
> https://ci.inria.fr/coq/view/coq-contribs/job/coq-contribs/653/console <https://ci.inria.fr/coq/view/coq-contribs/job/coq-contribs/653/console>
> https://ci.inria.fr/coq/view/opam/job/opam-install/22/console <https://ci.inria.fr/coq/view/opam/job/opam-install/22/console>
>
> and I do not see any breakage but the major question is, would this kind of change make Coq inconsistent
> (enable us to prove False)
> or not?
>
> Thank you in advance for any insight on this.
> --
> Matej Košík
>
>
--
Matej Košík
- Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?, (continued)
- Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?, Matej Kosik, 01/19/2017
- Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?, Maxime Dénès, 01/19/2017
- Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?, Matej Kosik, 01/19/2017
- Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?, Matej Kosik, 01/19/2017
- Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?, Guillaume Melquiond, 01/19/2017
- Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?, Matej Kosik, 01/19/2017
- Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?, Théo Zimmermann, 01/18/2017
- Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?, Bruno Barras, 01/19/2017
- Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?, Matej Kosik, 01/19/2017
- Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?, Matej Kosik, 01/19/2017
- Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?, Emilio Jesús Gallego Arias, 01/19/2017
- Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?, Matej Kosik, 01/19/2017
- Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?, Matej Kosik, 01/19/2017
- Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?, Jonathan Leivent, 01/19/2017
- Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?, Pierre Courtieu, 01/19/2017
- Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?, Théo Zimmermann, 01/19/2017
- Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?, Matej Kosik, 01/19/2017
- Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?, Emilio Jesús Gallego Arias, 01/19/2017
Archive powered by MHonArc 2.6.18.