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: command.mli 12187 2009-06-13 19:36:59Z msozeau $ i*)
28
(*s Declaration functions. The following functions take ASTs,
29
transform them into [constr] and then call the corresponding
30
functions of [Declare]; they return an absolute reference to the
33
val get_declare_definition_hook : unit -> (Entries.definition_entry -> unit)
34
val set_declare_definition_hook : (Entries.definition_entry -> unit) -> unit
36
val definition_message : identifier -> unit
37
val assumption_message : identifier -> unit
39
val declare_definition : identifier -> definition_kind ->
40
local_binder list -> red_expr option -> constr_expr ->
41
constr_expr option -> declaration_hook -> unit
43
val syntax_definition : identifier -> identifier list * constr_expr ->
46
val declare_one_assumption : coercion_flag -> assumption_kind -> Term.types ->
47
Impargs.manual_explicitation list ->
48
bool (* implicit *) -> identifier list (* keep *) -> bool (* inline *) -> Names.variable located -> unit
50
val set_declare_assumption_hook : (types -> unit) -> unit
52
val declare_assumption : identifier located list ->
53
coercion_flag -> assumption_kind -> local_binder list -> constr_expr ->
54
bool -> identifier list -> bool -> unit
56
val declare_interning_data : 'a * Constrintern.implicits_env ->
57
string * Topconstr.constr_expr * Topconstr.scope_name option -> unit
59
val compute_interning_datas : Environ.env -> Constrintern.var_internalisation_type ->
61
Term.types list ->Impargs.manual_explicitation list list ->
63
('b * (Constrintern.var_internalisation_type * Names.identifier list * Impargs.implicits_list *
64
Topconstr.scope_name option list))
67
val check_mutuality : Environ.env -> definition_object_kind ->
68
(identifier * types) list -> unit
70
val build_mutual : ((lident * local_binder list * constr_expr option * constructor_expr list) *
71
decl_notation) list -> bool -> unit
73
val declare_mutual_with_eliminations :
74
bool -> Entries.mutual_inductive_entry ->
75
(Impargs.manual_explicitation list *
76
Impargs.manual_explicitation list list) list ->
80
| IsFixpoint of (identifier located option * recursion_order_expr) list
83
type fixpoint_expr = {
84
fix_name : identifier;
85
fix_binders : local_binder list;
86
fix_body : constr_expr;
87
fix_type : constr_expr
90
val recursive_message : definition_object_kind ->
91
int array option -> identifier list -> Pp.std_ppcmds
93
val declare_fix : bool -> definition_object_kind -> identifier ->
94
constr -> types -> Impargs.manual_explicitation list -> global_reference
96
val build_recursive : (Topconstr.fixpoint_expr * decl_notation) list -> bool -> unit
98
val build_corecursive : (Topconstr.cofixpoint_expr * decl_notation) list -> bool -> unit
100
val build_scheme : (identifier located option * scheme ) list -> unit
102
val build_combined_scheme : identifier located -> identifier located list -> unit
104
val generalize_constr_expr : constr_expr -> local_binder list -> constr_expr
106
val abstract_constr_expr : constr_expr -> local_binder list -> constr_expr
108
(* A hook start_proof calls on the type of the definition being started *)
109
val set_start_hook : (types -> unit) -> unit
111
val start_proof : identifier -> goal_kind -> types ->
112
?init_tac:Proof_type.tactic -> ?compute_guard:bool -> declaration_hook -> unit
114
val start_proof_com : goal_kind ->
115
(lident option * (local_binder list * constr_expr)) list ->
116
declaration_hook -> unit
118
(* A hook the next three functions pass to cook_proof *)
119
val set_save_hook : (Refiner.pftreestate -> unit) -> unit
121
(*s [save_named b] saves the current completed proof under the name it
122
was started; boolean [b] tells if the theorem is declared opaque; it
123
fails if the proof is not completed *)
125
val save_named : bool -> unit
127
(* [save_anonymous b name] behaves as [save_named] but declares the theorem
128
under the name [name] and respects the strength of the declaration *)
130
val save_anonymous : bool -> identifier -> unit
132
(* [save_anonymous_with_strength s b name] behaves as [save_anonymous] but
133
declares the theorem under the name [name] and gives it the
134
strength [strength] *)
136
val save_anonymous_with_strength : theorem_kind -> bool -> identifier -> unit
138
(* [admit ()] aborts the current goal and save it as an assmumption *)
140
val admit : unit -> unit
142
(* [get_current_context ()] returns the evar context and env of the
143
current open proof if any, otherwise returns the empty evar context
144
and the current global env *)
146
val get_current_context : unit -> Evd.evar_map * Environ.env