coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Matthieu Sozeau <mattam AT mattam.org>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Debugging universe inconsistencies
- Date: Wed, 20 Jun 2018 13:55:47 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=mattam AT mattam.org; spf=Pass smtp.mailfrom=matthieu.sozeau AT gmail.com; spf=None smtp.helo=postmaster AT mail-wm0-f50.google.com
- Ironport-phdr: 9a23:jX3fQBYwy5X+2DtdTVKz5cn/LSx+4OfEezUN459isYplN5qZoM+9bnLW6fgltlLVR4KTs6sC17KL9fi4EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCa9bL9oMBm6sRjau9ULj4dlNqs/0AbCrGFSe+RRy2NoJFaTkAj568yt4pNt8Dletuw4+cJYXqr0Y6o3TbpDDDQ7KG81/9HktQPCTQSU+HQRVHgdnwdSDAjE6BH6WYrxsjf/u+Fg1iSWIdH6QLYpUjmk8qxlSgLniD0fOjE2/mHYiMx+gqxYrhy8uRJw35XZb5uJOPdkZK7RYc8WSGhHU81MVyJBGIS8b44XAuQGJ+lYs5X9p1sPrRSgGAmnGf7hyjhJh3Dox6I6zvkqHAbD3AM6A9IOrG7brNDuOacXS++10LXIwi/Gb/9M3jf98ofIfwknrPqRU7xwds/RxlMuFwPDlliQpo3lPy+V1uQQqGeX9fZvVeWqi2Mhtgp/oSCvy98uh4TGnI4Z107I+CVjzIs2O9G0Uk52bcKiHZBNrS+VLZF2TdknQ2xwuCY11LkGuZmjcSgP0psnxhrfZ+WJcoiN/h7vTeiRLDdkiH5/d7K/gBGy8UekyuLiTMW7zFFKri9dntnNsHACyQDT59CFR/Zy5EutxCiD2gDJ5uxHP0w4j6rWJ4I5zr41jJUTsEDDHiHsmEXxia+bbkAk9fK06+T7YrXmp4GTN5JuhgHlNaQvm9KwDv4lMgUVUGib/P6z1Lzn/UHjXLpKifg2nrHDsJ/GPcQburK5AwhN34k/7Ba/Fi6q38gcnXkaN11IYwmHjojsO1HWOv/0F/a/g1K2kDdq3f/KJLPhAo+eZkTExbzmZPN271NW4As119FWoZxOWZ8bJ/emf0btqNzZAwJxCAumzu/6QIF4358CUGenB6aFLKrX91iS6bR8cKG3eIYJtWOleLAe7Pn0gCphwA5PTeySxZISLUuAMLFjKkSdb2Drh45YQ2gPtws6CuftjQ/bCGIBVzOJR6s5owoDJse+F46aHNKoiaCd1SL9GYdZNDgfVwK8VEzwfoDBYM8iLSKfJsg7z24BXLmlDpAkjVSg6Ve8xL1gIe7ZvCYfsMC72Q==
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.