coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Théo Zimmermann <theo.zimmi AT gmail.com>
- To: coq-club AT inria.fr, John Wiegley <johnw AT newartisans.com>
- Subject: Re: [Coq-Club] Question about change in polymorphism with 8.8
- Date: Sat, 16 Jun 2018 18:11:08 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=theo.zimmi AT gmail.com; spf=Pass smtp.mailfrom=theo.zimmi AT gmail.com; spf=None smtp.helo=postmaster AT mail-ua0-f182.google.com
- Ironport-phdr: 9a23:eRXUIRCp79+9xgl+yXynUyQJP3N1i/DPJgcQr6AfoPdwSPT4osbcNUDSrc9gkEXOFd2Cra4c1qyO6+jJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6JvjvGo7Vks+7y/2+94fcbglUhDexe69+IAmrpgjNq8cahpdvJLwswRXTuHtIfOpWxWJsJV2Nmhv3+9m98p1+/SlOovwt78FPX7n0cKQ+VrxYES8pM3sp683xtBnMVhWA630BWWgLiBVIAgzF7BbnXpfttybxq+Rw1DWGMcDwULs5Qiqp4bt1RxD0iScHLz85/3/Risxsl6JQvRatqwViz4LIfI2ZMfxzdb7fc9wHX2pMRsleVyJDDY28YYUBDPcPM/hEoITmvVQCsQGzCBOwCO/zyDJFgGL9060g0+QmFAHLxBIuH9IUt3TTtNr6N6YSUeWwzKbW1zXDaulZ2TH76IPVdR0hvfGMUqx3ccbLyEgvFgbFjlCRqYH+MDOV0/4Cs2mf7+Z6Se2vjGsnphh3rzOyyMksjYzJiZgUylDC7Sh5xpg6JNOiR05hfd6kEYBQuDucN4ttWM8tX2ZouCM8x7YbupC7ZDAHxIo7yxPbcfCKcIiF7gj9WOqMIzp0nm9pdbGhixu07EOu0PfzVtOu31ZPtidFksfDtnQK1xHL78iIUPp9/kO41TaSzQ/f9vhIIU4pmafYNZIt2LEwlp0UsUTMGi/5hl/6g7ORdkUh4uSo6uLnbav6ppKEKYN4lgXzPr4tl8G/G+g0LBUCUmqB9eih17Dv41X1QLBQgf03lqnZvoraJcMepqOhHw9V0pgs6xGlAzan0dQYmHwHLFNedRKIiojmIVDOIPTiAfijhFSslS9nx+raMb35HpXNMn/Dna/9crZ68k5Q0RY8zdRC551PEbwBO/LyWkrptNPCFBM5Mgq0w/zmCNpnzI8eV3iPUeelN/bZtkbN7eYyKcGNYpUUsXDzMbxtxfnuizcGmFISeaS4lc8Vb3C+AdxgLlqQe2btmd4HCiEBuQ9oH8Lwj1jXbT7SYEGAXqc56ys+AYSgRdPfRo2qxq6A2SK6NpJTb2FCTFuLFCG7JM2/R/4QZXfKcYdamTseWO3kEtd5jED8hErB07Nia9Hs1GgdvJPn2sJy4rSKxx43/D1wSc+a1jPUFj0mriYzXzYzmZtHjwll0F7aiPp3hvVZEZpY4PYbCl5nZ66Z9PRzDpXJYiyEftqNTwz4ENCvADV0U9tphtFXMxw7FNKlgRTOmSGtBu1Nmg==
Hi John,
I don't know if anyone answered to you before.This clearly looks like a bug to me: there should never be such errors at Defined time when you are using "safe" tactics like "apply". There must be a problem in collecting and threading the universe constraints generated during the proof.
Le ven. 18 mai 2018 à 02:33, John Wiegley <johnw AT newartisans.com> a écrit :
Hi,
The code below (or something like it) occurs in several places in one of my
projects. This works fine with Coq 8.5, 8.6, and 8.7. But with 8.8, I'm now
getting universe errors I don't quite understand on the final line:
File "./Bug.v", line 39, characters 0-8:
Error:
Illegal application:
The term "list_equivalence_obligation_1" of type
"forall (A : Type) (H : Setoid A), Reflexive list_equiv"
cannot be applied to the terms
"A" : "Type"
"H" : "Setoid A"
The 1st term has type "Type@{Bug.181}" which should be coercible to
"Type@{Bug.196}".
Note that if I explicitly type the parameter {A : Type}, the error changes to
complain about the 2nd term.
I'd like to know if this is a bug to be reported, or if not, what the nature
of the problem is so I can fix it in a way that's compatible with at least
8.6-8.8.
Thanks,
John
--8<---------------cut here---------------start------------->8---
Require Import Coq.Classes.CMorphisms.
Set Universe Polymorphism.
Class Setoid A := {
equiv : crelation A;
setoid_equiv :> Equivalence equiv
}.
Generalizable All Variables.
Fixpoint list_equiv `{Setoid A} (xs ys : list A) : Type :=
match xs, ys with
| nil, nil => True
| cons x xs, cons y ys => prod (equiv x y) (list_equiv xs ys)
| _, _ => False
end.
Axiom admit : forall A : Type, A.
Program Instance list_equivalence `{Setoid A} : Equivalence list_equiv.
Next Obligation.
repeat intro.
induction x; simpl; split; auto.
apply reflexivity.
Qed.
Next Obligation.
repeat intro.
generalize dependent y.
induction x, y; simpl in *; intros; auto.
destruct X.
split; [now apply symmetry|now apply IHx].
Qed.
Next Obligation.
apply admit.
Defined.
--8<---------------cut here---------------end--------------->8---
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
- Re: [Coq-Club] Question about change in polymorphism with 8.8, Théo Zimmermann, 06/16/2018
Archive powered by MHonArc 2.6.18.