Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Induction with type constraints

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Induction with type constraints


chronological Thread 
  • From: Adam Chlipala <adamc AT csail.mit.edu>
  • To: Eric Finster <ericfinster AT gmail.com>
  • Cc: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Induction with type constraints
  • Date: Sat, 26 Nov 2011 09:48:06 -0500

Eric Finster wrote:
I'm trying to do a case analysis over an inductive type where the
allowed constructors are restricted by the type of a term.  It
essentially equivalent to the following setup with indexed lists:

Inductive Vect (A : Type) : nat → Type :=
| VNil : Vect A 0
| VCons : forall n : nat, A → Vect A n → Vect A (S n).

Lemma zero_len_is_nil (A : Type) (v : Vect A 0) : v = VNil A.

This precise type family, and some functions and theorems closely related to your question, are considered in detail in Chapters 8 and 9 of CPDT:
    http://adam.chlipala.net/cpdt/



Archive powered by MhonArc 2.6.16.

Top of Page