coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Pierre Courtieu <Pierre.Courtieu AT cnam.fr>
- To: Coq Club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Question about Coq universes
- Date: Wed, 22 Apr 2020 18:04:02 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=Pierre.Courtieu AT cnam.fr; spf=Pass smtp.mailfrom=pierre.courtieu AT gmail.com; spf=None smtp.helo=postmaster AT mail-io1-f53.google.com
- Ironport-phdr: 9a23:ihv2eh8qItl2zf9uRHKM819IXTAuvvDOBiVQ1KB30egcTK2v8tzYMVDF4r011RmVBNidt60P27qempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9JDffgVFiCCybL5wIxm7rgbcvdQKjIV/Lao81gHHqWZSdeRMwmNoK1OTnxLi6cq14ZVu7Sdete8/+sBZSan1cLg2QrJeDDQ9LmA6/9brugXZTQuO/XQTTGMbmQdVDgff7RH6WpDxsjbmtud4xSKXM9H6QawyVD+/9KpgVgPmhzkbOD446GHXi9J/jKRHoBK6uhdzx5fYbJyJOPZie6/Qe84RS2hcUcZLTyFODY28YIkPAeQPPuhWspfzqEcVoBSkGQWhHvnixiNUinL026AxzuQvERvB3AwlB98AqnXUo8vvNKcIT+++0bfFzTLeb/NMxTf96ZbHcg08qvyLR7xwcNTeyVM1FwzblFmdt4vlPy6P1uQRsmiU8fdgWPmzhG4hsQ5xpyKjxsk2ioTQgI8e117K9SJ8wIkvJN24TlZ2YcOiEJtRqSGWLpB2QsY5TG1ytiY60LsLsoO4cigS0Jkr2QLTZvidf4WL4h/vTvudLDZ5iX5/eL+yiRC/+lW6xOLmTMm7ylNKozJFktbSsnAN0ATe6s2dRft8+ketwDeP1wfO5u1dL0A5laTWJ4Quwr43kZoTvkDDETHslErqi6+Wc10o+umu6+v5frXrvoGQO5Nwhw3kMakjmtazDfk5PwUPRWSW+eqx2KXm/ULjQbVKivM2krPesJDfPckbvq+5DBFP0oY59RmzFSup0NMFnXkdMFJFeQyIj5XyNlHBJfD3F/a/g1C2nDh3wPDGO6XtAo/RIXjbjLfhYbF95lZAxwo01NBT/o5bCrUcIP3oQULxr9zZDhohMwOu2ernCdN91pkfWW2VGKOZPrnS4he04bcEJPDET4sIsn6pIP88ovXqkHURmFkHfKDv04FBO16iGfEzG0SUe2DhyvwGDH0WvwcjBLjSiVCYSzMVTHGvRb496ywTA4SvCMHNXNb+0/S6wC6nE8gONSh9AVeWHCKtLt3cAqteWGepOsZk1wc8e/25UYZwhxqovQq8xaA1drOFqB1djorq0Z1O38OWkBgz8TJuCMHEijOCSmh1miUDQDpkhfki83w48U+K1O1Du9IdFdFX4KkUAAIzNJqZzusjTt6vAUTOedCGTFvgSdKjU2k8
Hi,
As far as I understand the constraints you express do not prevent sf1 and sf0 to be equal. When you introduce constraints Coq consider them as the "minimal" ones that must hold, but nothing prevents the typer from adding new relations if they don't break the order relation. Here adding sf1=sf0 (or sf1<=sf0 or sf0<=sf1) does not break the constraints. As you can check:
Universes sf2 sf1 sf0.
Constraint sf0 < sf2.
Constraint sf1 < sf2.
Constraint sf1 = sf0.
Constraint sf0 < sf2.
Constraint sf1 < sf2.
Constraint sf1 = sf0.
I don't think there is a way to say sf0 <> sf1 without saying either sf1>sf0 or sf0 > sf1.
So as far as I understand the correct statement is: given the constraints Coq checks the existence of a total (weak) ordering (>=) and its associated strict ordering which satisfies the constraints. In particular I don't think there is no way in coq to force (u <> v) without forcing either u>v or v>u.
You can see this by adding a definition wich forces the sf1=sf0:
Universes sf2 sf1 sf0.
Constraint sf0 < sf2.
Constraint sf1 < sf2.
Constraint sf0 <= sf1.
Parameter t1 : Type@{sf0}.
Parameter t2 : Type@{sf1}.
Parameter test : Type@{sf0} -> Prop.
Print Universes Subgraph(sf1 sf2 sf0).
Check (test t1).
Check (test t2).
Print Universes Subgraph(sf1 sf2 sf0).
Definition foo := test t2.
Constraint sf0 < sf2.
Constraint sf1 < sf2.
Constraint sf0 <= sf1.
Parameter t1 : Type@{sf0}.
Parameter t2 : Type@{sf1}.
Parameter test : Type@{sf0} -> Prop.
Print Universes Subgraph(sf1 sf2 sf0).
Check (test t1).
Check (test t2).
Print Universes Subgraph(sf1 sf2 sf0).
Definition foo := test t2.
P.
Le mer. 22 avr. 2020 à 17:26, richard Dapoigny <richard.dapoigny AT univ-smb.fr> a écrit :
Thanks for your prompt answer. Let us consider the following test :
Universes sf2 sf1 sf0.
Constraint sf0 < sf2.
Constraint sf1 < sf2.
Parameter t1 : Type@{sf0}.
Parameter t2 : Type@{sf1}.
Parameter test : Type@{sf0} -> Prop.
Check (test t1).
(* we expect that sf0 and sf1 are two branches under sf2 and that the following test fails *)
Check (test t2).
Le 22/04/2020 à 17:12, Gaëtan Gilbert a écrit :
I don't understand what you mean, perhaps you could show some example code which does something you didn't expect or want?
Gaëtan Gilbert
On 22/04/2020 17:08, richard Dapoigny wrote:
Dear Coq Members,
We are using the Coq hierarchy of polymorphic universes which has been recently implemented by Sozeau.
We want to use it for subtyping and we expect it to be an implementation of Grothendieck universes, however it seems to be a total order. Therefore we cannot have a tree-like hierarchy.
However is it possible to ultimately have that structure?
Thanks for your answer,
Richard
--
*Richard Dapoigny*
/Associate Professor/ - LISTIC Laboratory
University Savoie Mont-Blanc
5, chemin de Bellevue
Po. Box 80439
Annecy-le-Vieux 74940
FRANCE
https://www.listic.univ-smb.fr/en/presentation-en/members/lecturers/richard-dapoigny-en/
/****** People who don't know history are condemned to repeat it. ******/
--
Richard Dapoigny
Associate Professor - LISTIC Laboratory
University Savoie Mont-Blanc
5, chemin de Bellevue
Po. Box 80439
Annecy-le-Vieux 74940
FRANCE
https://www.listic.univ-smb.fr/en/presentation-en/members/lecturers/richard-dapoigny-en/
****** People who don't know history are condemned to repeat it. ******
- [Coq-Club] Question about Coq universes, richard Dapoigny, 04/22/2020
- Re: [Coq-Club] Question about Coq universes, Gaëtan Gilbert, 04/22/2020
- Re: [Coq-Club] Question about Coq universes, richard Dapoigny, 04/22/2020
- Re: [Coq-Club] Question about Coq universes, Kenji Maillard, 04/22/2020
- Re: [Coq-Club] Question about Coq universes, Gaëtan Gilbert, 04/22/2020
- Re: [Coq-Club] Question about Coq universes, richard Dapoigny, 04/22/2020
- Re: [Coq-Club] Question about Coq universes, Gaëtan Gilbert, 04/22/2020
- Re: [Coq-Club] Question about Coq universes, Pierre Courtieu, 04/22/2020
- Re: [Coq-Club] Question about Coq universes, Kenji Maillard, 04/22/2020
- Re: [Coq-Club] Question about Coq universes, richard Dapoigny, 04/22/2020
- Re: [Coq-Club] Question about Coq universes, Gaëtan Gilbert, 04/22/2020
Archive powered by MHonArc 2.6.18.