package coq
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=73466e61f229b23b4daffdd964be72bd7a110963b9d84bd4a86bb05c5dc19ef3
doc/coq-core.pretyping/Inductiveops/index.html
Module InductiveopsSource
The following three functions are similar to the ones defined in Inductive, but they expect an env
Return type as quoted by the user
Return constructor types in normal form
An inductive type with its parameters (transparently supports reasoning either with only recursively uniform parameters or with all parameters including the recursively non-uniform ones
val make_ind_family :
(Names.inductive Univ.puniverses * Constr.constr list) ->
inductive_familyval dest_ind_family :
inductive_family ->
Names.inductive Univ.puniverses * Constr.constr listAn inductive type with its parameters and real arguments
val map_inductive_type :
(EConstr.constr -> EConstr.constr) ->
inductive_type ->
inductive_typeval mis_is_recursive :
(Names.inductive
* Declarations.mutual_inductive_body
* Declarations.one_inductive_body) ->
boolval mis_nf_constructor_type :
(Constr.pinductive
* Declarations.mutual_inductive_body
* Declarations.one_inductive_body) ->
int ->
Constr.constrExtract information from an inductive name
Extract information from a constructor name
Is there local defs in params or args ?
(Co)Inductive records with primitive projections do not have eta-conversion, hence no dependent elimination.
val type_of_projection_knowing_arg :
Environ.env ->
Evd.evar_map ->
Names.Projection.t ->
EConstr.t ->
EConstr.types ->
Constr.typesPrimitive projections
Extract information from an inductive family
type constructor_summary = {cs_cstr : Constr.pconstructor;cs_params : Constr.constr list;cs_nargs : int;cs_args : Constr.rel_context;cs_concl_realargs : Constr.constr array;
}val get_constructor :
(Constr.pinductive
* Declarations.mutual_inductive_body
* Declarations.one_inductive_body
* Constr.constr list) ->
int ->
constructor_summaryget_arity returns the arity of the inductive family instantiated with the parameters; if recursively non-uniform parameters are not part of the inductive family, they appears in the arity
val make_arity_signature :
Environ.env ->
Evd.evar_map ->
bool ->
inductive_family ->
EConstr.rel_contextval make_arity :
Environ.env ->
Evd.evar_map ->
bool ->
inductive_family ->
Sorts.t ->
EConstr.typesval build_branch_type :
Environ.env ->
Evd.evar_map ->
bool ->
Constr.constr ->
constructor_summary ->
Constr.typesval extract_mrectype :
Evd.evar_map ->
EConstr.t ->
(Names.inductive * EConstr.EInstance.t) * EConstr.constr listRaise Not_found if not given a valid inductive type
val find_mrectype :
Environ.env ->
Evd.evar_map ->
EConstr.types ->
(Names.inductive * EConstr.EInstance.t) * EConstr.constr listval find_mrectype_vect :
Environ.env ->
Evd.evar_map ->
EConstr.types ->
(Names.inductive * EConstr.EInstance.t) * EConstr.constr arrayval find_inductive :
Environ.env ->
Evd.evar_map ->
EConstr.types ->
(Names.inductive * EConstr.EInstance.t) * Constr.constr listval find_coinductive :
Environ.env ->
Evd.evar_map ->
EConstr.types ->
(Names.inductive * EConstr.EInstance.t) * Constr.constr listval arity_of_case_predicate :
Environ.env ->
inductive_family ->
bool ->
Sorts.t ->
Constr.typesBuilds the case predicate arity (dependent or not)
val type_case_branches_with_names :
Environ.env ->
Evd.evar_map ->
(Constr.pinductive * EConstr.constr list) ->
Constr.constr ->
Constr.constr ->
EConstr.types array * Constr.typesval make_case_info :
Environ.env ->
Names.inductive ->
Sorts.relevance ->
Constr.case_style ->
Constr.case_infoAnnotation for cases
val make_case_or_project :
Environ.env ->
Evd.evar_map ->
inductive_type ->
Constr.case_info ->
EConstr.constr ->
EConstr.constr ->
EConstr.constr array ->
EConstr.constrMake a case or substitute projections if the inductive type is a record with primitive projections. Fail with an error if the elimination is dependent while the inductive type does not allow dependent elimination.
val simple_make_case_or_project :
Environ.env ->
Evd.evar_map ->
Constr.case_info ->
EConstr.constr ->
EConstr.case_invert ->
EConstr.constr ->
EConstr.constr array ->
EConstr.constrSometimes make_case_or_project is nicer to call with a pre-built case_invert than inductive_type.
val make_case_invert :
Environ.env ->
inductive_type ->
Constr.case_info ->
EConstr.case_invertval compute_projections :
Environ.env ->
Names.inductive ->
(Constr.constr * Constr.types) arrayGiven a primitive record type, for every field computes the eta-expanded projection and its type.
val type_of_inductive_knowing_conclusion :
Environ.env ->
Evd.evar_map ->
Inductive.mind_specif Univ.puniverses ->
EConstr.types ->
Evd.evar_map * EConstr.types