src/ZF/ex/ListN.thy
author paulson
Thu, 31 May 2001 18:28:23 +0200
changeset 11354 9b80fe19407f
parent 11316 b4e71bd751e4
permissions -rw-r--r--
examples files start from Main instead of various ZF theories

(*  Title:      ZF/ex/ListN
    ID:         $Id$
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    Copyright   1994  University of Cambridge

Inductive definition of lists of n elements

See Ch. Paulin-Mohring, Inductive Definitions in the System Coq.
Research Report 92-49, LIP, ENS Lyon.  Dec 1992.
*)

ListN = Main +

consts  listn ::i=>i
inductive
  domains   "listn(A)" <= "nat*list(A)"
  intrs
    NilI  "<0,Nil> \\<in> listn(A)"
    ConsI "[| a \\<in> A; <n,l> \\<in> listn(A) |] ==> <succ(n), Cons(a,l)> \\<in> listn(A)"
  type_intrs "nat_typechecks @ list.intrs"

end