| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
open Names |
| 12 |
open Constr |
| 13 |
open Univ |
| 14 |
open PConstraints |
| 15 |
open UVars |
| 16 |
open Declarations |
| 17 |
open Environ |
| 18 |
open CClosure |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
val find_rectype : ?evars:evar_handler -> env -> types -> pinductive * constr list |
| 29 |
val find_inductive : ?evars:evar_handler -> env -> types -> pinductive * constr list |
| 30 |
val find_coinductive : ?evars:evar_handler -> env -> types -> pinductive * constr list |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
val lookup_mind_specif : env -> inductive -> mind_specif |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
val inductive_paramdecls : mutual_inductive_body puniverses -> Constr.rel_context |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
val inductive_nonrec_rec_paramdecls : mutual_inductive_body puniverses -> Constr.rel_context * Constr.rel_context |
| 46 |
|
| 47 |
val inductive_nnonrecparams : mutual_inductive_body -> int |
| 48 |
|
| 49 |
val instantiate_inductive_constraints : |
| 50 |
mutual_inductive_body -> Instance.t -> PConstraints.t |
| 51 |
|
| 52 |
type template_univ = |
| 53 |
| TemplateProp |
| 54 |
| TemplateAboveProp of Sorts.QVar.t * Universe.t |
| 55 |
| TemplateUniv of Universe.t |
| 56 |
|
| 57 |
type param_univs = (default:Sorts.t -> template_univ) list |
| 58 |
|
| 59 |
type template_subst = Sorts.Quality.t Int.Map.t * Universe.t Int.Map.t |
| 60 |
|
| 61 |
val instantiate_template_constraints |
| 62 |
: template_subst |
| 63 |
-> Declarations.template_universes |
| 64 |
-> PConstraints.t |
| 65 |
|
| 66 |
val instantiate_template_universes : mutual_inductive_body -> param_univs -> |
| 67 |
PConstraints.t * rel_context * template_subst |
| 68 |
|
| 69 |
val constrained_type_of_inductive : mind_specif puniverses -> types constrained |
| 70 |
|
| 71 |
val relevance_of_ind_body : one_inductive_body -> UVars.Instance.t -> Sorts.relevance |
| 72 |
|
| 73 |
val relevance_of_inductive : env -> pinductive -> Sorts.relevance |
| 74 |
|
| 75 |
val type_of_inductive : mind_specif puniverses -> types |
| 76 |
|
| 77 |
val type_of_inductive_knowing_parameters : |
| 78 |
mind_specif puniverses -> param_univs -> types constrained |
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
val raw_eliminates_to : Sorts.Quality.t -> Sorts.Quality.t -> bool |
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
val eliminates_to : QGraph.t -> Sorts.Quality.t -> Sorts.Quality.t -> bool |
| 90 |
|
| 91 |
val sort_eliminates_to : QGraph.t -> Sorts.t -> Sorts.t -> bool |
| 92 |
|
| 93 |
type squash = SquashToSet | SquashToQuality of Sorts.Quality.t |
| 94 |
|
| 95 |
type 'a allow_elimination_actions = |
| 96 |
{ not_squashed : 'a |
| 97 |
; squashed_to_set_below : 'a |
| 98 |
; squashed_to_set_above : 'a |
| 99 |
; squashed_to_quality : Sorts.Quality.t -> 'a } |
| 100 |
|
| 101 |
val is_squashed_gen : QGraph.t -> (Sorts.Quality.t -> Sorts.Quality.t) |
| 102 |
-> mind_specif puniverses |
| 103 |
-> squash option |
| 104 |
|
| 105 |
val allowed_elimination_gen : QGraph.t -> (Sorts.Quality.t -> Sorts.Quality.t) |
| 106 |
-> 'b allow_elimination_actions -> mind_specif puniverses -> Sorts.t -> 'b |
| 107 |
|
| 108 |
val is_squashed : env -> mind_specif puniverses -> squash option |
| 109 |
|
| 110 |
val is_allowed_elimination_actions : QGraph.t -> Sorts.t -> bool allow_elimination_actions |
| 111 |
|
| 112 |
val is_allowed_elimination : env -> mind_specif puniverses -> Sorts.t -> bool |
| 113 |
val is_allowed_fixpoint : (Sorts.Quality.t -> Sorts.Quality.t -> bool) |
| 114 |
-> Sorts.t -> Sorts.t -> bool |
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
val is_private : mind_specif -> bool |
| 119 |
val is_primitive_record : mind_specif -> bool |
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
val constrained_type_of_constructor : pconstructor -> mind_specif -> types constrained |
| 124 |
val type_of_constructor : pconstructor -> mind_specif -> types |
| 125 |
val type_of_constructor_knowing_parameters : pconstructor -> mind_specif -> param_univs -> types constrained |
| 126 |
|
| 127 |
|
| 128 |
val arities_of_constructors : pinductive -> mind_specif -> types array |
| 129 |
|
| 130 |
|
| 131 |
val type_of_constructors : pinductive -> mind_specif -> types array |
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
val abstract_constructor_type_relatively_to_inductive_types_context : |
| 139 |
int -> MutInd.t -> types -> types |
| 140 |
|
| 141 |
val inductive_params : mind_specif -> int |
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
val expand_arity : mind_specif -> pinductive -> constr array -> |
| 148 |
Name.t binder_annot array -> rel_context |
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
val expand_branch_contexts : mind_specif -> UVars.Instance.t -> constr array -> |
| 155 |
(Name.t binder_annot array * 'a) array -> rel_context array |
| 156 |
|
| 157 |
type ('constr,'types,'r) pexpanded_case = |
| 158 |
(case_info * ('constr * 'r) * 'constr pcase_invert * 'constr * 'constr array) |
| 159 |
|
| 160 |
type expanded_case = (constr,types,Sorts.relevance) pexpanded_case |
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
val expand_case : env -> case -> expanded_case |
| 166 |
|
| 167 |
val expand_case_specif : mutual_inductive_body -> case -> expanded_case |
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
val contract_case : env -> expanded_case -> case |
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
val instantiate_context : Instance.t -> Vars.substl -> Name.t binder_annot array -> |
| 177 |
rel_context -> rel_context |
| 178 |
|
| 179 |
val build_branches_type : |
| 180 |
pinductive -> mutual_inductive_body * one_inductive_body -> |
| 181 |
constr list -> constr -> types array |
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
val check_case_info : env -> pinductive -> case_info -> unit |
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
val is_primitive_positive_container : env -> Constant.t -> bool |
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
val check_fix : ?evars:evar_handler -> ?elim_to:(Sorts.Quality.t -> Sorts.Quality.t -> bool) -> env -> fixpoint -> unit |
| 199 |
val check_cofix : ?evars:evar_handler -> env -> cofixpoint -> unit |
| 200 |
|
| 201 |
val abstract_mind_lc : int -> int -> MutInd.t -> (rel_context * constr) array -> constr array |
| 202 |
|
| 203 |
module Template : sig |
| 204 |
val bind_kind : Sorts.t -> int option * int option |
| 205 |
val template_subst_sort : template_subst -> Sorts.t -> Sorts.t |
| 206 |
|
| 207 |
|
| 208 |
val max_template_quality : Sorts.Quality.t -> Sorts.Quality.t -> Sorts.Quality.t |
| 209 |
end |