Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] decidable eq on a well-specified type

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] decidable eq on a well-specified type


chronological Thread 
  • From: robert dockins <robdockins AT fastmail.fm>
  • To: Haixing Hu <Haixing.Hu AT imag.fr>, coq-club AT pauillac.inria.fr
  • Subject: Re: [Coq-Club] decidable eq on a well-specified type
  • Date: Wed, 27 Apr 2005 10:15:17 -0400
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

This lemma is a consequence of dependent equality. In module Eqdep from the standard library, the following lemma is proven:

Lemma UIP : forall (U:Type) (x y:U) (p1 p2:x = y), p1 = p2.



Haixing Hu wrote:
This is an interesting problem. There is another simplified version: how to
proof the floowing lemma?

Lemma single_eq_proof : forall (A : Type) (x : A) (p1 p2 : x = x), p1 = p2.


Quoting robert dockins 
<robdockins AT fastmail.fm>:


I'm playing around with well-specified types and tried to prove something like the following :

Parameter limit:nat.
Definition nat_subset := { n:nat | n < limit }.
Lemma eq_nat_subset_dec : forall x y:nat_subset, {x=y}+{x<>y}.


I've had great difficulties, however. The problem comes down to showing that two proofs of (x<limit) are equivalent. From the definition of 'le' it seems pretty clear that this is the case. However I run into problems with second-order unification and the restrictions between the Prop and Set universes with all the techniques I have tried. Is it possible to prove a goal like this one without resorting to classic (and hence proof irrelevance)?





Archive powered by MhonArc 2.6.16.

Top of Page