coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Christian Doczkal <christian.doczkal AT ens-lyon.fr>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Debugging Universe Inconsistencies
- Date: Tue, 11 Sep 2018 16:03:56 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=christian.doczkal AT ens-lyon.fr; spf=Pass smtp.mailfrom=christian.doczkal AT ens-lyon.fr; spf=None smtp.helo=postmaster AT labbe.ens-lyon.fr
- Ironport-phdr: 9a23:jv1KGxBjnHGMKW1skjLIUyQJP3N1i/DPJgcQr6AfoPdwSPv8osbcNUDSrc9gkEXOFd2Cra4c1KyO6+jJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6JvjvGo7Vks+7y/2+94fcbglUhjexe69+IAmrpgjNq8cahpdvJLwswRXTuHtIfOpWxWJsJV2Nmhv3+9m98p1+/SlOovwt78FPX7n0cKQ+VrxYES8pM3sp683xtBnMVhWA630BWWgLiBVIAgzF7BbnXpfttybxq+Rw1DWGMcDwULs5Xymp4aV2Rx/ykCoJKiA38G/XhMJzgqxUrh2uqB5jzIDbe4yVKPlzc7nBcd8GS2dMXMBcXDFBDIOmaIsPCvIMMPhYr4nnplsOtge+BQi2C+Pp1zRGiHj20rE70uQiCw7G2BErEtUSv3TUttX1NbwSUfy0zKbSyzXPde5Z2TDh54nJcRAuu/WMUKlufsrX0kkjDgfFj1WXqYzjJT+V2P4NvnGd4uF9Vuyvk3Yqpxx+rzSz3MshiIvEipgIxl3F9yh12pg5KcOmREJjfNKpH4dcuzuYOoZ0WM8uXm9ltDw+x7AIv5OwYTIEx449xxHFbvyKa4iI7QznVOaWOTp4gGhqd6mkiBms60Sv1Ov8VtKt3FZOritFld/MumoD1xzJ8sSHS/198Vm92TuXygze5f1ILVo2mKfZMZIt3789m5gJvUjdACP6hl36jKqMeUUl/uio5f7nYrLjppKEK4B0ihv+MqU1msyjAOQ3KA4OU3KG9uS7yLLi/E75T69OjvAtjKbZtovaKd0fpq+5BA9V1Jwv6xilDzu+ytQXgWEHLE5ZeBKAl4XmJ1bOIOnhAfijh1SsjSxkyuvdPrzhB5XNNmLMnK3gfbZ78U5cyRA8wcpR55JOWfk9J6f4XVa0v9jFBDc4NRa1yqDpEoZTzIQbDEmPGK6CLKLbtxek4ek9IOCILNseuCz8MOQk7viogXgyi1wUeYGk24BSbGG/GLJoORPKMjLXnt4dHDJS7UIFR+vwhQjaCG8BVzOJR6s5owoDJsejBIbHSJqqheXajiq9BdhSd2dATF6WQy6xK9e0HswUYSfXGfdP1yQeXOH6GYInzlSqpQj8jbR9fLKNp38o8Kn73d0w3NX90BE/8TstXpaZ2muHQid5mHhNQy4x2uZxux4lxw==
Hello,
I stumbled across another universe behavior where I am not sure whether
this is a bug or not.
I have declared a bunch of Universes, say L,S,M and U and used them in a
bunch of definitions. This ensures that U,S <= L as can be witnessed by:
Fail Constraint L < S.
Fail Constraint L < U.
Now I can enforce S = L before some definition:
Constraint S = L.
Definition foo := Foo Type@{U} ... (@eq)
Constraint S = L.
In this case, everything typechecks. However, if I remove the first
line, then the universe constraints imposed by foo change (become
stronger) and the third line yields a universe inconsisteny.
In the first case, the constraints imposed by foo are:
U < M and U <= Coq.Init.Logic.8 (the argument of eq)
Without the constraint "S = L", I get
U < M and U = Coq.Init.Logic.8
So S = L is consistent with foo, but ruled out by it unless enforced before.
The concrete example is again too large, but having discovered the
"Constraint" command, coming up with a reasonably sized example may be
feasible.
Best,
Christian
PS. It would be nice if the automatically generated universe names were
actually names in the Coq sense, so that one could use them with the
Constraint command.
On 10/09/18 14:53, Matthieu Sozeau wrote:
> Dear Christian,
>
> There is documentation in dev/doc/universes about the changes necessary.
> The main idea is that if your tactic produces a term with polymorphic
> constants in it, it must produce one fresh instance of the constant at
> each use. Before giving the final proof term containing those fresh
> instances, you can call a type inference function to gather the universe
> constraints necessary for the whole term to typecheck automatically.
> Maybe a look at the OCaml code you use could help us fix this.
> The « cannot ensure that i <= j » error could also be because that
> constraint is not present in the graph you produce in a tactic I believe.
>
> The order-of-Imports issue is a bug for sure. Note that if you have a
> module A with everything polymorphic then importing it incurs no global
> constraints so the bug couldn’t happen in that case.
>
> Best,
> — Matthieu
> Le lun. 10 sept. 2018 à 14:28, Christian Doczkal
> <christian.doczkal AT ens-lyon.fr
>
> <mailto:christian.doczkal AT ens-lyon.fr>>
> a
> écrit :
>
> Hi,
> >> - Require Import A B. succeeds
> >> - Require Import B A. fails
> >
> > That sounds like a bug, you can open an issue on github with
> > reproduction instructions and we will look into it.
>
> Unfortunately, that's an internal repository with well over 10K lines,
> and the problem occurs at the end. Should I manage to find a small
> example, I will open an issue.
>
> >> globalization of polymorphic reference <ID> would forget universes.
> >
> > Unfortunately various tactics and commands do not support or badly
> > support universe polymorphism. This error means some function hasn't
> > been adapted. It should probably be an anomaly.
> > Depending on what exactly is failing it may be possible for us to fix
> > it, or it could be beyond our current manpower.
>
> This happens when calling one of our own tactics written in OCaml. So
> how does one have to adapt tactics in order to properly support universe
> polymorphism? (The error occurred while trying to see what happens if I
> make just about everything universe polymorphic, so it may or may not be
> necessary to fix this)
>
> Thanks for the pointers,
> Christian
>
- [Coq-Club] Debugging Universe Inconsistencies, Christian Doczkal, 09/05/2018
- Re: [Coq-Club] Debugging Universe Inconsistencies, Gaëtan Gilbert, 09/05/2018
- Message not available
- Re: [Coq-Club] Debugging Universe Inconsistencies, Gaëtan Gilbert, 09/06/2018
- Message not available
- Re: [Coq-Club] Debugging Universe Inconsistencies, Christian Doczkal, 09/06/2018
- Re: [Coq-Club] Debugging Universe Inconsistencies, Jan-Oliver Kaiser, 09/06/2018
- Re: [Coq-Club] Debugging Universe Inconsistencies, Christian Doczkal, 09/06/2018
- Re: [Coq-Club] Debugging Universe Inconsistencies, Christian Doczkal, 09/07/2018
- Re: [Coq-Club] Debugging Universe Inconsistencies, Gaëtan Gilbert, 09/07/2018
- Re: [Coq-Club] Debugging Universe Inconsistencies, Christian Doczkal, 09/10/2018
- Re: [Coq-Club] Debugging Universe Inconsistencies, Matthieu Sozeau, 09/10/2018
- Re: [Coq-Club] Debugging Universe Inconsistencies, Christian Doczkal, 09/11/2018
- Re: [Coq-Club] Debugging Universe Inconsistencies, Gaëtan Gilbert, 09/10/2018
- Re: [Coq-Club] Debugging Universe Inconsistencies, Gaëtan Gilbert, 09/07/2018
- Re: [Coq-Club] Debugging Universe Inconsistencies, Christian Doczkal, 09/07/2018
- Re: [Coq-Club] Debugging Universe Inconsistencies, Christian Doczkal, 09/06/2018
- Re: [Coq-Club] Debugging Universe Inconsistencies, Jan-Oliver Kaiser, 09/06/2018
- Re: [Coq-Club] Debugging Universe Inconsistencies, Gaëtan Gilbert, 09/05/2018
Archive powered by MHonArc 2.6.18.