coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Nathanaël Courant <nathanael.courant AT ens.fr>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Debugging universe inconsistencies
- Date: Wed, 20 Jun 2018 16:22:24 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=nathanael.courant AT ens.fr; spf=Pass smtp.mailfrom=nathanael.courant AT ens.fr; spf=None smtp.helo=postmaster AT nef2.ens.fr
- Ironport-phdr: 9a23:77aKihfwneJTQSV6JI23GddtlGMj4u6mDksu8pMizoh2WeGdxcu9Zh7h7PlgxGXEQZ/co6odzbaO7ua4ASQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTahYb5+Ngm6oRnMvcQKnIVuLbo8xAHUqXVSYeRWwm1oJVOXnxni48q74YBu/SdNtf8/7sBMSar1cbg2QrxeFzQmLns65Nb3uhnZTAuA/WUTX2MLmRdVGQfF7RX6XpDssivms+d2xSeXMdHqQb0yRD+v6bpgRh31hycdLzM37X/ZisJwgqxYrhyuqRNwzIzIb4+aL/d+YqDQcMkGSWZdUMtcVSpMCZ68YYsVCOoBOP5VoZHnqFsSrRuxHw+sC/nzzT9MnnD7w6o60/k7EQ7c2gwgA88FvXPSrNrvKKcSUfq6zK/Swjrda/Nawyvy6I/VchA7u/6MW65wfNHPxkkpDAPJlFuQqZb8Mj6Ty+8DvW+b7+96WuKujW4qsw5xojmzxscsl4nGnZgZxUzD9SV8xos+ON62SFZjbNK5DpddszuWO5ZyT84mWW1lvCc3xqcJtJKnZCQG1Yoryh3FZ/GDfYWE+BPuWeaLLTp7mn5ofq+0iQyo/ki60OL8U9G50FZUoSpBldnBrnYN2ALd6sSZUPdy4EGh2S2V2wDd8OFIOUE0lazFJJ492rM8i4QfvEDZEiPrnEj7iLWae0El9+Sy5Onrfq3qppqGOI91jgH+PL4umsu6AekgNAgBRXSb+eSm273l50L2XrFKgucqnanerZDaP94UpqilAwJOzIkj7Q2/Ay2o0NQChXUHNk5KeAqbj4j1PFHDOOz3DfCmg1i1jDhrw+3GMab6D5XWLnnDla/hcqxn505dzgoz19Ff6IhOBrEPOvKgEnP24dffF1oyNxG+6+fhEtR0kI0ECkyVBarMFqrOsVaO72ErFMKLeZUcviq1f/4s+/7ni3Y0nRkWerSz1J0LQH2+BbJoORPKMjLXnt4dHDJS7UIFR+vwhQjaCG8BVzOJR6s5owoDJsejBIbHSJqqhezT0SGgWJNMNDkfVgK8VEzwfoDBYM8iLTqIK58znzofE7a7Gdd4iEOe8TTiwr8iFdL6vy0VsZW6j4pz6uOJ0xw07np6FZbF3g==
Hi,
The issue is reported at
https://github.com/coq/coq/issues/7875 ; I included as many details as possible. It looks like it was not map's second parameter that was constrained, but the parameter of eq itself (!).
Thanks,
Nathanaël
On 20/06/2018 14:55, Matthieu Sozeau wrote:
Hi,
This looks like a bug, probably linked to template polymorphism, could you
report it at github.com/coq/coq/issues please? Those are rather hard to
debug, but not impossible. If you Print Universes, it’s likely that the
stdlib universe for map’s second parameter (...List.270 I believe) is
constrained from above by one of Vpl’s universes, and this should not
happen. One has to find the definition in Vpl that forces that and fix it,
certainly by fixing a tactic.
Best regards,
— Matthieu
Le mer. 20 juin 2018 à 12:25, Nathanaël Courant
<nathanael.courant AT ens.fr>
a écrit :
Looking through the code, it looks like the problem is caused by the use
of setoid_rewrite in multiple places. For instance, trying to put the
snippet below at the end of Map_poly.v produces an universe inconsistency.
Require Import ImpureConfig.
Require Import List.
Definition f (x : unit) : imp unit := pure x.
Definition g l := map f l
However, changing the proof of mapsto_add_compat in the same file to
avoid using "rewrite ... at 1", which does a setoid_rewrite with the
equality relation, is enough to make the inconsistency error disappear.
I am a bit clueless as to why setoid_rewrite poses such problems though,
and why map is specifically affected.
Thanks,
Nathanaël
On 20/06/2018 10:59, Sylvain Boulmé wrote:
Hi Nathanaël,
I am not an expert on universe issues. But this is very strange, because
it seems somehow specific to "map". I do not understand why.
Here is a little variant of your code that is accepted by Coq: it uses
"fold_right" instead of "map".
Require Import Vpl.ImpureConfig.
Require Import Vpl.PedraQ.
Require Import List.
Definition f (x : unit) : imp unit := pure x.
Definition g := fold_right (fun x l => (f x)::l).
A variant with "fold_left" also works !
Moreover, the VPL already uses some higher-order iterator, see
"swithAll" in
https://github.com/VERIMAG-Polyhedra/VPL/blob/master/coq/AssignD.v
So, I do not understand where this issue comes from. I am also
interested in any hint about this...
Thanks,
Sylvain.
Le 20/06/2018 à 10:09, Nathanaël Courant a écrit :
Require Import ImpureConfig.
Require Import PedraQ.
Require Import List.
Definition f (x : unit) : imp unit := pure x.
Definition g l := map f l.
- [Coq-Club] Debugging universe inconsistencies, Nathanaël Courant, 06/20/2018
- Re: [Coq-Club] Debugging universe inconsistencies, Sylvain Boulmé, 06/20/2018
- Re: [Coq-Club] Debugging universe inconsistencies, Nathanaël Courant, 06/20/2018
- Re: [Coq-Club] Debugging universe inconsistencies, Matthieu Sozeau, 06/20/2018
- Re: [Coq-Club] Debugging universe inconsistencies, Nathanaël Courant, 06/20/2018
- Re: [Coq-Club] Debugging universe inconsistencies, Matthieu Sozeau, 06/20/2018
- Re: [Coq-Club] Debugging universe inconsistencies, Nathanaël Courant, 06/20/2018
- Re: [Coq-Club] Debugging universe inconsistencies, Sylvain Boulmé, 06/20/2018
Archive powered by MHonArc 2.6.18.