src/ZF/ex/listn.ML
changeset 279 7738aed3f84d
parent 85 914270f33f2d
equal deleted inserted replaced
278:523518f44286 279:7738aed3f84d
     8 See Ch. Paulin-Mohring, Inductive Definitions in the System Coq.
     8 See Ch. Paulin-Mohring, Inductive Definitions in the System Coq.
     9 Research Report 92-49, LIP, ENS Lyon.  Dec 1992.
     9 Research Report 92-49, LIP, ENS Lyon.  Dec 1992.
    10 *)
    10 *)
    11 
    11 
    12 structure ListN = Inductive_Fun
    12 structure ListN = Inductive_Fun
    13  (val thy = ListFn.thy addconsts [(["listn"],"i=>i")];
    13  (val thy        = ListFn.thy addconsts [(["listn"],"i=>i")]
    14   val rec_doms = [("listn", "nat*list(A)")];
    14   val rec_doms   = [("listn", "nat*list(A)")]
    15   val sintrs = 
    15   val sintrs     = 
    16       ["<0,Nil> : listn(A)",
    16           ["<0,Nil> : listn(A)",
    17        "[| a: A;  <n,l> : listn(A) |] ==> <succ(n), Cons(a,l)> : listn(A)"];
    17            "[| a: A;  <n,l> : listn(A) |] ==> <succ(n), Cons(a,l)> : listn(A)"]
    18   val monos = [];
    18   val monos      = []
    19   val con_defs = [];
    19   val con_defs   = []
    20   val type_intrs = nat_typechecks@List.intrs@[SigmaI]
    20   val type_intrs = nat_typechecks @ List.intrs @ [SigmaI]
    21   val type_elims = [SigmaE2]);
    21   val type_elims = [SigmaE2]);
    22 
    22 
    23 val listn_induct = standard 
    23 val listn_induct = standard 
    24     (ListN.mutual_induct RS spec RS spec RSN (2,rev_mp));
    24     (ListN.mutual_induct RS spec RS spec RSN (2,rev_mp));
    25 
    25