package coq
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=13a67c0a4559ae22e9765c8fdb88957b16c2b335a2d5f47e4d6d9b4b8b299926
doc/coq-core.kernel/CClosure/index.html
Module CClosure
Source
...
Delta 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
fconstr
is the type of frozen constr
fconstr
can be accessed by using the function fterm_of
and by matching on type fterm
type fterm =
| FRel of int
| FAtom of Constr.constr
(*Metas and Sorts
*)| FFlex of table_key
| FInd of Names.inductive Univ.puniverses
| FConstruct of Names.constructor Univ.puniverses
| FApp of fconstr * fconstr array
| FProj of Names.Projection.t * fconstr
| FFix of Constr.fixpoint * fconstr Esubst.subs
| FCoFix of Constr.cofixpoint * fconstr Esubst.subs
| FCaseT of Constr.case_info * Univ.Instance.t * Constr.constr array * Constr.case_return * fconstr * Constr.case_branch array * fconstr Esubst.subs
| FCaseInvert of Constr.case_info * Univ.Instance.t * Constr.constr array * Constr.case_return * finvert * fconstr * Constr.case_branch array * fconstr Esubst.subs
| FLambda of int * (Names.Name.t Context.binder_annot * Constr.constr) list * Constr.constr * fconstr Esubst.subs
| FProd of Names.Name.t Context.binder_annot * fconstr * Constr.constr * fconstr Esubst.subs
| FLetIn of Names.Name.t Context.binder_annot * fconstr * fconstr * Constr.constr * fconstr Esubst.subs
| FEvar of Constr.existential * fconstr Esubst.subs
| FInt of Uint63.t
| FFloat of Float64.t
| FArray of Univ.Instance.t * fconstr Parray.t * fconstr
| FLIFT of int * fconstr
| FCLOS of Constr.constr * fconstr Esubst.subs
| FLOCKED
type 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 Esubst.subs
| 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
val get_native_args1 :
CPrimitives.t ->
Constr.pconstant ->
stack ->
fconstr list * fconstr * fconstr next_native_args * stack
val inductive_subst :
Declarations.mutual_inductive_body ->
Univ.Instance.t ->
fconstr array ->
fconstr Esubst.subs
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
mk_atom: prevents a term from being evaluated
val destFLambda :
(fconstr Esubst.subs -> Constr.constr -> fconstr) ->
fconstr ->
Names.Name.t Context.binder_annot * fconstr * fconstr
Global and local constant cache
val create_clos_infos :
?univs:UGraph.t ->
?evars:(Constr.existential -> Constr.constr option) ->
RedFlags.reds ->
Environ.env ->
clos_infos
Reduction function
norm_val
is for strong normalization
whd_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 * stack
eta_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_def
unfold_reference
unfolds references in a fconstr
Hook for Reduction
End of cbn debug section i