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: Roland Zumkeller <Roland.Zumkeller AT polytechnique.fr>
  • To: robert dockins <robdockins AT fastmail.fm>
  • Cc: Coq Club <coq-club AT pauillac.inria.fr>
  • Subject: Re: [Coq-Club] decidable eq on a well-specified type
  • Date: Mon, 2 May 2005 12:43:14 +0200
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Hi,

The problem comes down to showing that two proofs of (x<limit) are equivalent.

If you "compile" the the inductive predicate "le" into a computational definition this becomes rather easy.

Fixpoint le (a b : nat) { struct a } : Prop :=
match a, b with
| S a, S b => le a b
| S _, O => False
| O, _ => True
end.

The proof is then:

Goal forall a b (p1 p2 : le a b), p1 = p2.
induction a; simpl; intros.
exact(match p1 as p1', p2 as p2' return p1'=p2' with I,I => refl_equal _ end).
  destruct b.
    exact (False_ind _ p1).
    apply IHa.
Qed.

I would be happy to see practical or philosophical arguments against this approach:
What is the advantage of defining "le" inductively?

Best,

Roland





Archive powered by MhonArc 2.6.16.

Top of Page