Skip to Content.
Sympa Menu

coq-club - [Coq-Club]Representation question

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club]Representation question


chronological Thread 
  • From: Sean Wilson <sean.wilson AT ed.ac.uk>
  • To: coq-club AT pauillac.inria.fr
  • Subject: [Coq-Club]Representation question
  • Date: Mon, 5 Mar 2007 23:20:52 +0000
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
  • Organization: School of Informatics, The University of Edinburgh

Hi,

Given the usual definition for lists indexed by length:

Inductive vect [A:Set] : nat -> Set :=
| nil : (vect A O)
| cons : (x:A)(n:nat)(vect A n)->(vect A (S n)).

Can anyone explain what the difference is between using terms of this type 
and 
terms of type {x:list A | length = n}, particularly in the domain of writing 
certified programs (e.g. in the specification of a head/tail/take/append 
function)? When and why would you pick one representation over the other? 

Thanks.





Archive powered by MhonArc 2.6.16.

Top of Page