package coq-core
Install
Dune Dependency
Authors
Maintainers
Sources
md5=13d2793fc6413aac5168822313e4864e
sha512=ec8379df34ba6e72bcf0218c66fef248b0e4c5c436fb3f2d7dd83a2c5f349dd0874a67484fcf9c0df3e5d5937d7ae2b2a79274725595b4b0065a381f70769b42
doc/coq-core.engine/EConstr/index.html
Module EConstr
Source
Type of incomplete terms. Essentially a wrapper around Constr.t
ensuring that Constr.kind
does not observe defined evars.
Universe variables
Destructors
Same as Constr.kind
except that it expands evars and normalizes universes on the fly.
val kind_upto :
Evd.evar_map ->
Constr.t ->
(Constr.t, Constr.t, Sorts.t, UVars.Instance.t) Constr.kind_of_term
Returns the evar-normal form of the argument. Note that this function is supposed to be called when the original term has not more free-evars anymore. If you need compatibility with the old semantics, set abort_on_undefined_evars
to false
.
For getting the evar-normal form of a term with evars see Evarutil.nf_evar
.
Same as to_constr
, but returns None
if some unresolved evars remain
type kind_of_type =
| SortType of ESorts.t
| CastType of types * t
| ProdType of Names.Name.t Context.binder_annot * t * t
| LetInType of Names.Name.t Context.binder_annot * t * t * t
| AtomicType of t * t array
Constructors
Construct a term from a view.
Insensitive primitives
Evar-insensitive versions of the corresponding functions. See the Constr
module for more information.
Constructors
Abstracting/generalizing over binders
it = iterated or_LetIn = turn a local definition into a LetIn wo_LetIn = inlines local definitions (i.e. substitute them in the body) Named = binding is by name and the combinators turn it into a binding by index (complexity is nb(binders) * size(term))
val mkNamedLambda :
Evd.evar_map ->
Names.Id.t Context.binder_annot ->
types ->
constr ->
constr
val mkNamedLetIn :
Evd.evar_map ->
Names.Id.t Context.binder_annot ->
constr ->
types ->
constr ->
constr
Variant of mkEvar
that removes identity variable instances from its argument.
Simple case analysis
The string is interpreted by Coqlib.lib_ref
. If it is not registered, return false
.
Pops lambda abstractions until there are no more, skipping casts.
Pops lambda abstractions and letins until there are no more, skipping casts.
Pops n
lambda abstractions, and pop letins only if needed to expose enough lambdas, skipping casts.
Pops n
lambda abstractions and letins, skipping casts.
Equality
val eq_constr_universes :
Environ.env ->
Evd.evar_map ->
?nargs:int ->
t ->
t ->
UnivProblem.Set.t option
val leq_constr_universes :
Environ.env ->
Evd.evar_map ->
?nargs:int ->
t ->
t ->
UnivProblem.Set.t option
val eq_constr_universes_proj :
Environ.env ->
Evd.evar_map ->
t ->
t ->
UnivProblem.Set.t option
eq_constr_universes_proj
can equate projections and their eta-expanded constant form.
Iterators
val iter_with_full_binders :
Environ.env ->
Evd.evar_map ->
(rel_declaration -> 'a -> 'a) ->
('a -> t -> unit) ->
'a ->
t ->
unit
val fold_with_binders :
Evd.evar_map ->
('a -> 'a) ->
('a -> 'b -> t -> 'b) ->
'a ->
'b ->
t ->
'b
Gather the universes transitively used in the term, including in the type of evars appearing in it.
Substitutions
Environment handling
val push_named_context_val :
named_declaration ->
Environ.named_context_val ->
Environ.named_context_val
val map_rel_context_in_env :
(Environ.env -> constr -> constr) ->
Environ.env ->
rel_context ->
rel_context
val match_named_context_val :
Environ.named_context_val ->
(named_declaration * Environ.named_context_val) option
val fresh_global :
?loc:Loc.t ->
?rigid:Evd.rigid ->
?names:UVars.Instance.t ->
Environ.env ->
Evd.evar_map ->
Names.GlobRef.t ->
Evd.evar_map * t
val annotate_case :
Environ.env ->
Evd.evar_map ->
case ->
Constr.case_info
* EInstance.t
* t array
* ((rel_context * t) * Sorts.relevance)
* case_invert
* t
* (rel_context * t) array
Same as above, but doesn't turn contexts into binders
val expand_branch :
Environ.env ->
Evd.evar_map ->
EInstance.t ->
t array ->
Names.constructor ->
case_branch ->
rel_context
Given a universe instance and parameters for the inductive type, constructs the typed context in which the branch lives.
Extra
val of_named_decl :
(Constr.t, Constr.types) Context.Named.Declaration.pt ->
(t, types) Context.Named.Declaration.pt
val of_rel_decl :
(Constr.t, Constr.types) Context.Rel.Declaration.pt ->
(t, types) Context.Rel.Declaration.pt
val to_rel_decl :
Evd.evar_map ->
(t, types) Context.Rel.Declaration.pt ->
(Constr.t, Constr.types) Context.Rel.Declaration.pt
Unsafe operations
Deprecated