package coq-core
Install
Dune Dependency
Authors
Maintainers
Sources
md5=5d1187d5e44ed0163f76fb12dabf012e
sha512=91bc81530fa4f6498961583ad51eac5001f139881788b88e360a866ad8e2a6e2c5bce86d1a580ab4cd4782bf49d48318767df82471ce33ba3ac143e5569ad33c
doc/coq-core.pretyping/Inductiveops/index.html
Module Inductiveops
Source
The following three functions are similar to the ones defined in Inductive, but they expect an env
val e_type_of_inductive :
Environ.env ->
Evd.evar_map ->
Names.inductive EConstr.puniverses ->
EConstr.types
Return type as quoted by the user
val e_type_of_constructor :
Environ.env ->
Evd.evar_map ->
Names.constructor EConstr.puniverses ->
EConstr.types
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 UVars.puniverses * Constr.constr list) ->
inductive_family
val dest_ind_family :
inductive_family ->
Names.inductive UVars.puniverses * Constr.constr list
An inductive type with its parameters and real arguments
val map_inductive_type :
(EConstr.constr -> EConstr.constr) ->
inductive_type ->
inductive_type
val mis_is_recursive :
(Names.inductive
* Declarations.mutual_inductive_body
* Declarations.one_inductive_body) ->
bool
val mis_nf_constructor_type :
Constr.pconstructor ->
(Declarations.mutual_inductive_body * Declarations.one_inductive_body) ->
Constr.constr
Extract information from an inductive name
Extract information from a constructor name
Is there local defs in params or args ?
val is_squashed :
Evd.evar_map ->
(Declarations.mind_specif * UVars.Instance.t) ->
squash option
val is_allowed_elimination :
Evd.evar_map ->
(Declarations.mind_specif * UVars.Instance.t) ->
EConstr.ESorts.t ->
bool
(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.types
Primitive 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_summary
get_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_context
val make_arity :
Environ.env ->
Evd.evar_map ->
bool ->
inductive_family ->
EConstr.ESorts.t ->
EConstr.types
val extract_mrectype :
Evd.evar_map ->
EConstr.t ->
(Names.inductive * EConstr.EInstance.t) * EConstr.constr list
Raise 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 list
val find_mrectype_vect :
Environ.env ->
Evd.evar_map ->
EConstr.types ->
(Names.inductive * EConstr.EInstance.t) * EConstr.constr array
val find_inductive :
Environ.env ->
Evd.evar_map ->
EConstr.types ->
(Names.inductive * EConstr.EInstance.t) * Constr.constr list
val find_coinductive :
Environ.env ->
Evd.evar_map ->
EConstr.types ->
(Names.inductive * EConstr.EInstance.t) * Constr.constr list
val instantiate_constructor_params :
Constr.pconstructor ->
Declarations.mind_specif ->
Constr.constr list ->
Constr.constr
instantiate_constructor_params cstr mind params
instantiates the type of the given constructor with parameters params
val arity_of_case_predicate :
Environ.env ->
inductive_family ->
bool ->
Sorts.t ->
Constr.types
Builds the case predicate arity (dependent or not)
Annotation for cases
val make_case_or_project :
Environ.env ->
Evd.evar_map ->
inductive_type ->
Constr.case_info ->
(EConstr.constr * Sorts.relevance) ->
EConstr.constr ->
EConstr.constr array ->
EConstr.constr
Make 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 * Sorts.relevance) ->
EConstr.case_invert ->
EConstr.constr ->
EConstr.constr array ->
EConstr.constr
Sometimes 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 ->
case_relevance:Sorts.relevance ->
Constr.case_info ->
EConstr.case_invert
val compute_projections :
Environ.env ->
Names.inductive ->
(Constr.constr * Constr.types) array
Given 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 ->
Declarations.mind_specif UVars.puniverses ->
EConstr.types ->
Evd.evar_map * EConstr.types