Module Reductionops
Reduction Functions.
module ReductionBehaviour : sig ... end
Machinery to customize the behavior of the reduction
Support for reduction effects
val declare_reduction_effect : effect_name -> (Environ.env -> Evd.evar_map -> Constr.constr -> unit) -> unit
val set_reduction_effect : Names.Constant.t -> effect_name -> unit
val reduction_effect_hook : Environ.env -> Evd.evar_map -> Names.Constant.t -> Constr.constr Stdlib.Lazy.t -> unit
module Cst_stack : sig ... end
module Stack : sig ... end
type state
= EConstr.constr * EConstr.constr Stack.t
type contextual_reduction_function
= Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.constr
type reduction_function
= contextual_reduction_function
type local_reduction_function
= Evd.evar_map -> EConstr.constr -> EConstr.constr
type e_reduction_function
= Environ.env -> Evd.evar_map -> EConstr.constr -> Evd.evar_map * EConstr.constr
type contextual_stack_reduction_function
= Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.constr * EConstr.constr list
type stack_reduction_function
= contextual_stack_reduction_function
type local_stack_reduction_function
= Evd.evar_map -> EConstr.constr -> EConstr.constr * EConstr.constr list
type contextual_state_reduction_function
= Environ.env -> Evd.evar_map -> state -> state
type state_reduction_function
= contextual_state_reduction_function
type local_state_reduction_function
= Evd.evar_map -> state -> state
val pr_state : Environ.env -> Evd.evar_map -> state -> Pp.t
Reduction Function Operators
val strong_with_flags : (CClosure.RedFlags.reds -> reduction_function) -> CClosure.RedFlags.reds -> reduction_function
val strong : reduction_function -> reduction_function
val local_strong : local_reduction_function -> local_reduction_function
val strong_prodspine : local_reduction_function -> local_reduction_function
val stacklam : (state -> 'a) -> EConstr.constr list -> Evd.evar_map -> EConstr.constr -> EConstr.constr Stack.t -> 'a
val whd_state_gen : ?csts:Cst_stack.t -> refold:bool -> tactic_mode:bool -> CClosure.RedFlags.reds -> Environ.env -> Evd.evar_map -> state -> state * Cst_stack.t
val iterate_whd_gen : bool -> CClosure.RedFlags.reds -> Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.constr
Generic Optimized Reduction Function using Closures
val clos_norm_flags : CClosure.RedFlags.reds -> reduction_function
val clos_whd_flags : CClosure.RedFlags.reds -> reduction_function
val nf_beta : reduction_function
Same as
(strong whd_beta[delta][iota])
, but much faster on big terms
val nf_betaiota : reduction_function
val nf_betaiotazeta : reduction_function
val nf_zeta : reduction_function
val nf_all : reduction_function
val nf_evar : Evd.evar_map -> EConstr.constr -> EConstr.constr
val whd_evar : Evd.evar_map -> EConstr.constr -> EConstr.constr
val whd_nored : local_reduction_function
val whd_beta : local_reduction_function
val whd_betaiota : local_reduction_function
val whd_betaiotazeta : local_reduction_function
val whd_all : contextual_reduction_function
val whd_allnolet : contextual_reduction_function
val whd_betalet : local_reduction_function
val whd_nored_stack : local_stack_reduction_function
Removes cast and put into applicative form
val whd_beta_stack : local_stack_reduction_function
val whd_betaiota_stack : local_stack_reduction_function
val whd_betaiotazeta_stack : local_stack_reduction_function
val whd_all_stack : contextual_stack_reduction_function
val whd_allnolet_stack : contextual_stack_reduction_function
val whd_betalet_stack : local_stack_reduction_function
val whd_nored_state : local_state_reduction_function
val whd_beta_state : local_state_reduction_function
val whd_betaiota_state : local_state_reduction_function
val whd_betaiotazeta_state : local_state_reduction_function
val whd_all_state : contextual_state_reduction_function
val whd_allnolet_state : contextual_state_reduction_function
val whd_betalet_state : local_state_reduction_function
Head normal forms
val whd_delta_stack : stack_reduction_function
val whd_delta_state : state_reduction_function
val whd_delta : reduction_function
val whd_betadeltazeta_stack : stack_reduction_function
val whd_betadeltazeta_state : state_reduction_function
val whd_betadeltazeta : reduction_function
val whd_zeta_stack : local_stack_reduction_function
val whd_zeta_state : local_state_reduction_function
val whd_zeta : local_reduction_function
val shrink_eta : EConstr.constr -> EConstr.constr
val safe_evar_value : Evd.evar_map -> Constr.existential -> Constr.constr option
val beta_applist : Evd.evar_map -> (EConstr.constr * EConstr.constr list) -> EConstr.constr
val hnf_prod_app : Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.constr -> EConstr.constr
val hnf_prod_appvect : Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.constr array -> EConstr.constr
val hnf_prod_applist : Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.constr list -> EConstr.constr
val hnf_lam_app : Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.constr -> EConstr.constr
val hnf_lam_appvect : Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.constr array -> EConstr.constr
val hnf_lam_applist : Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.constr list -> EConstr.constr
val splay_prod : Environ.env -> Evd.evar_map -> EConstr.constr -> (Names.Name.t Context.binder_annot * EConstr.constr) list * EConstr.constr
val splay_lam : Environ.env -> Evd.evar_map -> EConstr.constr -> (Names.Name.t Context.binder_annot * EConstr.constr) list * EConstr.constr
val splay_arity : Environ.env -> Evd.evar_map -> EConstr.constr -> (Names.Name.t Context.binder_annot * EConstr.constr) list * EConstr.ESorts.t
val sort_of_arity : Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.ESorts.t
val splay_prod_n : Environ.env -> Evd.evar_map -> int -> EConstr.constr -> EConstr.rel_context * EConstr.constr
val splay_lam_n : Environ.env -> Evd.evar_map -> int -> EConstr.constr -> EConstr.rel_context * EConstr.constr
val splay_prod_assum : Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.rel_context * EConstr.constr
type 'a miota_args
=
{
mP : EConstr.constr;
the result type
mconstr : EConstr.constr;
the constructor
mci : Constr.case_info;
special info to re-build pattern
mcargs : 'a list;
the constructor's arguments
mlf : 'a array;
}
the branch code vector
val reducible_mind_case : Evd.evar_map -> EConstr.constr -> bool
val reduce_mind_case : Evd.evar_map -> EConstr.constr miota_args -> EConstr.constr
val find_conclusion : Environ.env -> Evd.evar_map -> EConstr.constr -> (EConstr.constr, EConstr.constr, EConstr.ESorts.t, EConstr.EInstance.t) Constr.kind_of_term
val is_arity : Environ.env -> Evd.evar_map -> EConstr.constr -> bool
val is_sort : Environ.env -> Evd.evar_map -> EConstr.types -> bool
val contract_fix : ?env:Environ.env -> Evd.evar_map -> ?reference:Names.Constant.t -> EConstr.fixpoint -> EConstr.constr
val fix_recarg : ('a, 'a) Constr.pfixpoint -> 'b Stack.t -> (int * 'b) option
val is_transparent : Environ.env -> Names.Constant.t Names.tableKey -> bool
Querying the kernel conversion oracle: opaque/transparent constants
Conversion Functions (uses closures, lazy strategy)
type conversion_test
= Univ.Constraint.t -> Univ.Constraint.t
val pb_is_equal : Evd.conv_pb -> bool
val pb_equal : Evd.conv_pb -> Evd.conv_pb
val is_conv : ?reds:TransparentState.t -> Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.constr -> bool
val is_conv_leq : ?reds:TransparentState.t -> Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.constr -> bool
val is_fconv : ?reds:TransparentState.t -> Evd.conv_pb -> Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.constr -> bool
val check_conv : ?pb:Evd.conv_pb -> ?ts:TransparentState.t -> Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.constr -> bool
check_conv
Checks universe constraints only. pb defaults to CUMUL and ts to a full transparent state.
val infer_conv : ?catch_incon:bool -> ?pb:Evd.conv_pb -> ?ts:TransparentState.t -> Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.constr -> Evd.evar_map option
infer_conv
Adds necessary universe constraints to the evar map. pb defaults to CUMUL and ts to a full transparent state.- raises UniverseInconsistency
iff catch_incon is set to false, otherwise returns false in that case.
val set_vm_infer_conv : (?pb:Evd.conv_pb -> Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.constr -> Evd.evar_map option) -> unit
Conversion with inference of universe constraints
val vm_infer_conv : ?pb:Evd.conv_pb -> Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.constr -> Evd.evar_map option
val infer_conv_gen : (Evd.conv_pb -> l2r:bool -> Evd.evar_map -> TransparentState.t -> (Constr.constr, Evd.evar_map) Reduction.generic_conversion_function) -> ?catch_incon:bool -> ?pb:Evd.conv_pb -> ?ts:TransparentState.t -> Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.constr -> Evd.evar_map option
infer_conv_gen
behaves likeinfer_conv
but is parametrized by a conversion function. Used to pretype vm and native casts.
Special-Purpose Reduction Functions
val whd_meta : local_reduction_function
val plain_instance : Evd.evar_map -> EConstr.constr Evd.Metamap.t -> EConstr.constr -> EConstr.constr
val instance : Evd.evar_map -> EConstr.constr Evd.Metamap.t -> EConstr.constr -> EConstr.constr
val betazetaevar_applist : Evd.evar_map -> int -> EConstr.constr -> EConstr.constr list -> EConstr.constr
Heuristic for Conversion with Evar
val whd_betaiota_deltazeta_for_iota_state : TransparentState.t -> Environ.env -> Evd.evar_map -> state -> state
val meta_instance : Evd.evar_map -> EConstr.constr Evd.freelisted -> EConstr.constr
Meta-related reduction functions
val nf_meta : Evd.evar_map -> EConstr.constr -> EConstr.constr
val meta_reducible_instance : Evd.evar_map -> EConstr.constr Evd.freelisted -> EConstr.constr