Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Why do we have "Prop < Set" ? Why not just "Prop ≤ Set" ?


Chronological Thread 
  • From: Jason Gross <jasongross9 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: Sat, 21 Jan 2017 17:03:32 +0000
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jasongross9 AT gmail.com; spf=Pass smtp.mailfrom=jasongross9 AT gmail.com; spf=None smtp.helo=postmaster AT mail-qt0-f177.google.com
  • Ironport-phdr: 9a23:jEhqixCAP5rpl8h7s3ROUyQJP3N1i/DPJgcQr6AfoPdwSPv6p8bcNUDSrc9gkEXOFd2CrakV16yK7uuxCSQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9GiTe5br5+Nhq7oAXeusQSgoZpN7o8xAbOrnZUYepd2HlmJUiUnxby58ew+IBs/iFNsP8/9MBOTLv3cb0gQbNXEDopPWY15Nb2tRbYVguA+mEcUmQNnRVWBQXO8Qz3UY3wsiv+sep9xTWaMMjrRr06RTiu86FmQwLuhSwaNTA27XvXh9R/g6JVoh2vpxJxzY3Jbo+LKPVzZbnScc8ASGdbQspdSy5MD4WhZIUPFeoBOuNYopH5qVQUthu+Ag+sD/7uxD9SgX/2xrY62PkmHAHExgMgBNUOsHLbrNXvM6cSSvu1wa3TwDXMavNZwzb96IzSfh89pvGMWKt9fMzMwkcsDwPIlkucpZDhMj+P1ekAs3KX4/R9We+ukWIrtgN8rzqpy8wxkIfGnJgVxUrB9ShhwIY6O9m4SEljbN6hCpRQtiWaO5JvQsM+X21koSg6xqAEtJO5ZiQKx5MnxxnQa/yDbYeE+A7sVOGUITtghXJlfqywhwqq/ES+1uHxUtO43VVKoyZfjNXAq3EA2wbO5sWFSPZx5kKh1iyO1wDX5OFEO0c0la/DJp4j2LEwjZ0TsULMHi/sn0X2l7SWe0E/9+in7uToeLTmppuGO4BojQH+N7wimtajDuQgLggOQ2+b9Pyg273k5E31WalFjvkrkqbCq53aPsQapquhAwBPyIoj6hC/Dy2n0NsCh3UHIkhFK1q7iN3iPEiLK/TlB9++hU6tmXFl3aPoJLrkV7fENX/F2Jj7eq1moxpewRE0y99F4IlPW5kOJfvyXgn6s9mOXUxxCBC93+uyUIY17YgZQ2/aWqI=

If you write
  (fun x : Set => (x : Prop))
Coq will currently reject that.  If you relax Prop < Set to Prop ≤ Set, Coq will add the global constraint that Set ≤ Prop and hence that Prop = Set, just as when you write
(fun x : Type@{i} => (x : Type@{j}))
Coq adds the constraint that i ≤ j.

It might also be the case that you'd get this constraint in more subtle situations, such as if you write
  Inductive inhabited (X : Set) : Prop := inhabits (_ : X).
or if you write
  (forall X : Set, X) : Set

Does this answer your question?


On Sat, Jan 21, 2017, 11:27 AM Matej Kosik <5764c029b688c1c0d24a2e97cd764f AT gmail.com> wrote:
Hi Hugo,

For me, the most surprising parts of you reply are:

On 01/19/2017 11:58 PM, Hugo Herbelin wrote:
>
> The "Prop < Set" is technical: the universe-acyclicity algorithm
> internally needs to consider Prop <> Set to ensure that Prop is not
> accidentally equated to Set (*). Matthieu, who introduced this for the
> polymorphism of universes, confirmed.

...

> (*) In particular, changing the line "enforce_univ_lt Level.prop
> Level.set empty" into "enforce_univ_le Level.prop Level.set empty"
> would be incorrect, unless other means are used to ensure that the
> algorithm does not eventually incorrectly conclude that Prop = Set is
> part of the logic.

I wouldn't be surprised if Coq concluded that:

  X ≤ Z      (* all inhabitants of X are also inhabitants of Z *)

from the following two universe constraints:

  X ≤ Y      (* all inhabitants of X are also inhabitants of Y *)

  Y ≤ Z      (* all inhabitants of Y are also inhabitants of Z *)


Similarly, no surprise when it concludes:

  X = Y      (* X and Y have the same inhabitants *)

from these constraints:

  X ≤ Y      (* all inhabitants of X are also inhabitants of Y *)

  Y ≤ X      (* all inhabitants of Y are also inhabitants of X *)


However, when you claim that Coq can conclude

  Prop = Set   (* Prop and Set have the same inhabitants *)

from, and solely from:

  Prop ≤ Set   (* all inhabitants of Prop are also inhabitants of Set *)

isn't that counterintuitive for the user?

Did I understand you correctly when you said that this could really happen (if we imagine that "Prop < Set" was relaxed to "Prop ≤ Set") ?

Would Coq do this only in case of Prop and Set or in general for any two universes?



Archive powered by MHonArc 2.6.18.

Top of Page