1
(************************************************************************)
2
(* v * The Coq Proof Assistant / The Coq Development Team *)
3
(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
4
(* \VV/ **************************************************************)
5
(* // * This file is distributed under the terms of the *)
6
(* * GNU Lesser General Public License Version 2.1 *)
7
(************************************************************************)
9
(*i $Id: indrec.mli 11562 2008-11-09 11:30:10Z herbelin $ i*)
20
(* Errors related to recursors building *)
22
type recursion_scheme_error =
23
| NotAllowedCaseAnalysis of (*isrec:*) bool * sorts * inductive
24
| NotMutualInScheme of inductive * inductive
26
exception RecursionSchemeError of recursion_scheme_error
30
(* These functions build elimination predicate for Case tactic *)
32
val make_case_dep : env -> evar_map -> inductive -> sorts_family -> constr
33
val make_case_nodep : env -> evar_map -> inductive -> sorts_family -> constr
34
val make_case_gen : env -> evar_map -> inductive -> sorts_family -> constr
36
(* This builds an elimination scheme associated (using the own arity
39
val build_indrec : env -> evar_map -> inductive -> constr
40
val instantiate_indrec_scheme : sorts -> int -> constr -> constr
41
val instantiate_type_indrec_scheme : sorts -> int -> constr -> types ->
44
(** Complex recursion schemes [Scheme] *)
46
val build_mutual_indrec :
48
(inductive * mutual_inductive_body * one_inductive_body
49
* bool * sorts_family) list
52
(** Old Case/Match typing *)
54
val type_rec_branches : bool -> env -> evar_map -> inductive_type
55
-> constr -> constr -> constr array * constr
56
val make_rec_branch_arg :
58
int * ('b * constr) option array * int ->
59
constr -> constructor_summary -> wf_paths list -> constr
61
(** Recursor names utilities *)
63
val lookup_eliminator : inductive -> sorts_family -> constr
64
val elimination_suffix : sorts_family -> string
65
val make_elimination_ident : identifier -> sorts_family -> identifier