package rocq-runtime
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=a45280ab4fbaac7540b136a6b073b4a6db15739ec1e149bded43fa6f4fc25f20
doc/rocq-runtime.tactics/AllScheme/index.html
Module AllSchemeSource
Strictly Positive Uniform Parameters
val compute_params_rec_strpos :
Environ.env ->
Names.MutInd.t ->
Declarations.mutual_inductive_body ->
bool listComputes which uniform parameters are strictly positive in a mutual inductive body
Lookup All Predicate and its Theorem
val compute_positive_uparams_and_suffix :
Environ.env ->
Names.MutInd.t ->
Declarations.mutual_inductive_body ->
Names.Id.t list option ->
bool list * (string * string) * (string * string)Compute the default positivity of the uniform parameters, and generates the suffix for naming the all predicate, and its predicate, as well as the key for registering. If a positivity specification is given by users bool list option, it is checked to be included in the default one, and the suffix are modified accordingly.
val lookup_all_theorem :
Names.inductive ->
Names.inductive ->
bool list ->
(bool * Names.GlobRef.t * Names.GlobRef.t) optionLookup the partial all predicate and its theorem for ind_nested for args_are_nested. If they are not found, lookup the general all predicate and its theorem. Returns if the partial all was found, and the global references. Raise a warning if none is found.
Instantiate the All Predicate and its Theorem
val make_all_predicate :
partial_nesting:bool ->
Names.GlobRef.t ->
bool list ->
EConstr.constr array ->
EConstr.constr option array ->
EConstr.constr array ->
EConstr.constr ->
EConstr.constr LibBinding.State.tMake the all predicate for a fresh instance and using Typing.checked_appvect, given:
- whether the
allpredicate is the partial one, or the general onepartial_nesting:bool - the positivity of each uniform parameter
bool list - the instantiation of the uniform parameter of the inductive type
constr array - the instation of the fresh predicate
constr option array, usingfun ... => Trueif the values are none, andallis the general predicate - the instantiation of the non-uniform parameters and indices
- the argument to apply it to
val make_all_theorem :
partial_nesting:bool ->
Names.GlobRef.t ->
bool list ->
EConstr.constr array ->
EConstr.constr option array ->
EConstr.constr option array ->
EConstr.constr array ->
EConstr.constr ->
EConstr.constr LibBinding.State.tMake the theorem for the all predicate for a fresh instance and using Typing.checked_appvect, given:
- whether the
allpredicate is the partial one, or the general onepartial_nesting:bool - the positivity of each uniform parameter
bool list - the instantiation of the uniform parameter of the inductive type
constr array - the instation of the fresh predicate and the proofs they hold
constr option array, usingfun ... => Trueandfun _ => Iif the values are none, andallis the general predicate - the instantiation of the non-uniform parameters and indices
- the argument to apply it to
View for Arguments
type head_argument = | ArgIsSPUparam of int * EConstr.constr array(*constant context, position of the uniform parameter, args
*)| ArgIsInd of int * EConstr.constr array * EConstr.constr array(*constant context, position of the one_inductive body, inst_nuparams inst_indices
*)| ArgIsNested of Names.MutInd.t * int * Declarations.mutual_inductive_body * bool list * Declarations.one_inductive_body * EConstr.constr array * EConstr.constr array(*constant context, ind_nested, mutual and one body, strictly positivity of its uniform parameters, instantiation uniform paramerters, and of both non_uniform parameters and indices
*)| ArgIsCst
View to decompose arguments as forall locs, X where X is further decomposed as a uniform parameter, the inductive, a nested argument or a constant.
val view_argument :
Names.MutInd.t ->
Declarations.mutual_inductive_body ->
LibBinding.State.access_key list ->
bool list ->
EConstr.constr ->
argument LibBinding.State.tDecompose the argument in it_Prod_or_LetIn local, X where X is a uniform parameter, Ind, nested or a constant
Generate All Predicate
val generate_all_predicate :
Environ.env ->
Evd.evar_map ->
Names.MutInd.t ->
Evd.einstance ->
Declarations.mutual_inductive_body ->
bool list ->
string ->
UState.t * Entries.mutual_inductive_entryGenerate the Theorem for the All Predicate
val generate_all_theorem :
Environ.env ->
Evd.evar_map ->
Names.MutInd.t ->
Names.MutInd.t ->
int ->
Evd.einstance ->
Declarations.mutual_inductive_body ->
bool list ->
Evd.evar_map * EConstr.constr