coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Georges Gonthier <gonthier AT microsoft.com>
- To: Valentin ROBERT <valentin.robert.42 AT gmail.com>
- Cc: "coq-club AT inria.fr" <coq-club AT inria.fr>
- Subject: RE: [Coq-Club] Abstracting leads to a term ill-typed… yet well-typed
- Date: Sun, 17 Feb 2013 22:45:23 +0000
- Accept-language: en-GB, en-US
Indeed, it would be, because nat enjoys decidable equality and hence UIP in nat is derivable (I believe this is in the FAQ). In fact you will have to do so – there is no way to generate a correct elimination predicate for your example. In ssreflect, you’d need to use rewrite eq_axiomK, which despite its name, is a theorem and not a system axiom. (I’d missed that there were two occurrences of x when I first replied – ssreflect, and the dependent destruct of Coq 8.4 would both give error messages here, less precise but not quite as puzzling as that of destruct).
Georges
From: coq-club-request AT inria.fr [mailto:coq-club-request AT inria.fr]
On Behalf Of Valentin ROBERT
Thank you for the answer. It is now clearer what the error is and should have been.
What term would ssreflect create to handle this example? Does it rely on eq_rect_eq?
It seems that I could just apply UIP_refl and happily rewrite e into Logic.eq_refl... Would that be fair to do?
Best regards, - Valentin
On Sun, Feb 17, 2013 at 1:08 PM, Georges Gonthier <gonthier AT microsoft.com> wrote: This is just a case of misleading diagnostic. Indeed, the term is well-typed -- but it does have the type expected by the 'eq' eliminator.
I was stuck on a problem for a while, for which I derived a smaller standalone
|
- [Coq-Club] Abstracting leads to a term ill-typed… yet well-typed, Valentin ROBERT, 02/16/2013
- <Possible follow-up(s)>
- [Coq-Club] Abstracting leads to a term ill-typed… yet well-typed, valentin.robert.42, 02/17/2013
- RE: [Coq-Club] Abstracting leads to a term ill-typed… yet well-typed, Georges Gonthier, 02/17/2013
- Re: [Coq-Club] Abstracting leads to a term ill-typed… yet well-typed, Valentin ROBERT, 02/17/2013
- RE: [Coq-Club] Abstracting leads to a term ill-typed… yet well-typed, Georges Gonthier, 02/17/2013
- Re: [Coq-Club] Abstracting leads to a term ill-typed… yet well-typed, Valentin ROBERT, 02/17/2013
- RE: [Coq-Club] Abstracting leads to a term ill-typed… yet well-typed, Georges Gonthier, 02/17/2013
Archive powered by MHonArc 2.6.18.