CClosureDelta implies all consts (both global (= by kernel_name) and local (= by Rel or Var)), all evars, and letin's. Rem: reduction of a Rel/Var bound to a term is Delta, but reduction of a LetIn expression is Letin reduction
module RedFlags : sig ... endSets of reduction kinds.
val all : RedFlags.redsval allnolet : RedFlags.redsval beta : RedFlags.redsval betadeltazeta : RedFlags.redsval betaiota : RedFlags.redsval betaiotazeta : RedFlags.redsval betazeta : RedFlags.redsval delta : RedFlags.redsval zeta : RedFlags.redsval nored : RedFlags.redstype table_key = Names.Constant.t Univ.puniverses Names.tableKeyfconstr is the type of frozen constr
type 'a usubs = 'a Esubst.subs Univ.puniversestype fterm = type 'a next_native_args = (CPrimitives.arg_kind * 'a) listtype stack_member = | Zapp of fconstr array |
| ZcaseT of Constr.case_info * Univ.Instance.t * Constr.constr array * Constr.case_return * Constr.case_branch array * fconstr usubs |
| Zproj of Names.Projection.Repr.t |
| Zfix of fconstr * stack |
| Zprimitive of CPrimitives.t * Constr.pconstant * fconstr list * fconstr next_native_args |
| Zshift of int |
| Zupdate of fconstr |
and stack = stack_member listval empty_stack : stackval check_native_args : CPrimitives.t -> stack -> boolval get_native_args1 : CPrimitives.t -> Constr.pconstant -> stack -> fconstr list * fconstr * fconstr next_native_args * stackval stack_args_size : stack -> intval eta_expand_stack : Names.Name.t Context.binder_annot -> stack -> stackval inductive_subst : Declarations.mutual_inductive_body -> Univ.Instance.t -> fconstr array -> fconstr usubsval usubst_instance : 'a Univ.puniverses -> Univ.Instance.t -> Univ.Instance.tidentity if the first instance is empty
To lazy reduce a constr, create a clos_infos with create_clos_infos, inject the term to reduce with inject; then use a reduction function
val inject : Constr.constr -> fconstrval mk_atom : Constr.constr -> fconstrmk_atom: prevents a term from being evaluated
val term_of_fconstr : fconstr -> Constr.constrval destFLambda : (fconstr usubs -> Constr.constr -> fconstr) -> fconstr -> Names.Name.t Context.binder_annot * fconstr * fconstrval create_conv_infos : ?univs:UGraph.t -> ?evars:Constr.constr Constr.evar_handler -> RedFlags.reds -> Environ.env -> clos_infosval create_clos_infos : ?univs:UGraph.t -> ?evars:Constr.constr Constr.evar_handler -> RedFlags.reds -> Environ.env -> clos_infosval oracle_of_infos : clos_infos -> Conv_oracle.oracleval create_tab : unit -> clos_tabval info_env : clos_infos -> Environ.envval info_flags : clos_infos -> RedFlags.redsval info_univs : clos_infos -> UGraph.tval unfold_projection : clos_infos -> Names.Projection.t -> stack_member optionval push_relevance : clos_infos -> 'b Context.binder_annot -> clos_infosval push_relevances : clos_infos -> 'b Context.binder_annot array -> clos_infosval set_info_relevances : clos_infos -> Sorts.relevance Range.t -> clos_infosval info_relevances : clos_infos -> Sorts.relevance Range.tval infos_with_reds : clos_infos -> RedFlags.reds -> clos_infosReduction function
val norm_val : clos_infos -> clos_tab -> fconstr -> Constr.constrnorm_val is for strong normalization
val norm_term : clos_infos -> clos_tab -> fconstr usubs -> Constr.constr -> Constr.constrSame as norm_val but for terms
val whd_val : clos_infos -> clos_tab -> fconstr -> Constr.constrwhd_val is for weak head normalization
whd_stack performs weak head normalization in a given stack. It stops whenever a reduction is blocked.
val eta_expand_ind_stack : Environ.env -> Names.inductive -> fconstr -> stack -> (fconstr * stack) -> stack * stacketa_expand_ind_stack env ind c s t computes stacks corresponding to the conversion of the eta expansion of t, considered as an inhabitant of ind, and the Constructor c of this inductive type applied to arguments s. Assumes t is a rigid term, and not a constructor. ind is the inductive of the constructor term c
Conversion auxiliary functions to do step by step normalisation
val unfold_reference : Environ.env -> TransparentState.t -> clos_tab -> table_key -> (fconstr, Util.Empty.t) Declarations.constant_defunfold_reference unfolds references in a fconstr. Produces a FIrrelevant when the reference is irrelevant.
Like unfold_reference, but handles primitives: if there are not enough arguments, return None. Otherwise return Some with ZPrimitive added to the stack. Produces a FIrrelevant when the reference is irrelevant and the infos was created with create_conv_infos.
val set_conv : (clos_infos -> clos_tab -> fconstr -> fconstr -> bool) -> unitHook for Reduction
val mk_clos : fconstr usubs -> Constr.constr -> fconstrval mk_clos_vect : fconstr usubs -> Constr.constr array -> fconstr arrayval kl : clos_infos -> clos_tab -> fconstr -> Constr.constrval term_of_process : fconstr -> stack -> Constr.constrval to_constr : Esubst.lift Univ.puniverses -> fconstr -> Constr.constrEnd of cbn debug section i