Module Evarutil
Metas
val new_meta : unit -> Constr.metavariablenew_metais a generator of unique meta variables
Creating a fresh evar given their type and context
val next_evar_name : Evd.evar_map -> Namegen.intro_pattern_naming_expr -> Names.Id.t option
module VarSet : sig ... endval new_evar : ?src:Evar_kinds.t Loc.located -> ?filter:Evd.Filter.t -> ?relevance:Sorts.relevance -> ?abstract_arguments:Evd.Abstraction.t -> ?candidates:EConstr.constr list -> ?naming:Namegen.intro_pattern_naming_expr -> ?typeclass_candidate:bool -> ?principal:bool -> ?hypnaming:naming_mode -> Environ.env -> Evd.evar_map -> EConstr.types -> Evd.evar_map * EConstr.tval new_pure_evar : ?src:Evar_kinds.t Loc.located -> ?filter:Evd.Filter.t -> ?relevance:Sorts.relevance -> ?abstract_arguments:Evd.Abstraction.t -> ?candidates:EConstr.constr list -> ?name:Names.Id.t -> ?typeclass_candidate:bool -> ?principal:bool -> Environ.named_context_val -> Evd.evar_map -> EConstr.types -> Evd.evar_map * Evar.tAlias of
Evd.new_pure_evar
val new_type_evar : ?src:Evar_kinds.t Loc.located -> ?filter:Evd.Filter.t -> ?naming:Namegen.intro_pattern_naming_expr -> ?principal:bool -> ?hypnaming:naming_mode -> Environ.env -> Evd.evar_map -> Evd.rigid -> Evd.evar_map * (EConstr.constr * EConstr.ESorts.t)Create a new Type existential variable, as we keep track of them during type-checking and unification.
val new_Type : ?rigid:Evd.rigid -> Evd.evar_map -> Evd.evar_map * EConstr.constr
Unification utils
val head_evar : Evd.evar_map -> EConstr.constr -> Evar.tmay raise NoHeadEvar
val whd_head_evar : Evd.evar_map -> EConstr.constr -> EConstr.constrval has_undefined_evars : Evd.evar_map -> EConstr.constr -> boolval is_ground_term : Evd.evar_map -> EConstr.constr -> boolval is_ground_env : Evd.evar_map -> Environ.env -> boolval advance : Evd.evar_map -> Evar.t -> Evar.t optionadvance sigma greturnsSome g'ifg'is undefined and is the current avatar ofg(for instancegwas changed byclearintog'). It returnsNoneifghas been (partially) solved.
val reachable_from_evars : Evd.evar_map -> Evar.Set.t -> Evar.Set.treachable_from_evars sigma seedscomputes the descendents of evars inseedsby restriction or evar-evar unifications insigma.
val undefined_evars_of_term : Evd.evar_map -> EConstr.constr -> Evar.Set.tval undefined_evars_of_named_context : Evd.evar_map -> Constr.named_context -> Evar.Set.t
val create_undefined_evars_cache : unit -> undefined_evars_cacheval filtered_undefined_evars_of_evar_info : ?cache:undefined_evars_cache -> Evd.evar_map -> 'a Evd.evar_info -> Evar.Set.tval occur_evar_upto : Evd.evar_map -> Evar.t -> EConstr.constr -> booloccur_evar_upto sigma k creturnstrueifkappears inc. It looks up recursively insigmafor the value of existential variables.
Value/Type constraints
val judge_of_new_Type : Evd.evar_map -> Evd.evar_map * EConstr.unsafe_judgmentval create_clos_infos : Environ.env -> Evd.evar_map -> RedFlags.reds -> CClosure.clos_infos
val whd_evar : Evd.evar_map -> EConstr.constr -> EConstr.constrval nf_evar : Evd.evar_map -> EConstr.constr -> EConstr.constrval j_nf_evar : Evd.evar_map -> EConstr.unsafe_judgment -> EConstr.unsafe_judgmentval jl_nf_evar : Evd.evar_map -> EConstr.unsafe_judgment list -> EConstr.unsafe_judgment listval jv_nf_evar : Evd.evar_map -> EConstr.unsafe_judgment array -> EConstr.unsafe_judgment arrayval tj_nf_evar : Evd.evar_map -> EConstr.unsafe_type_judgment -> EConstr.unsafe_type_judgmentval nf_named_context_evar : Evd.evar_map -> Constr.named_context -> Constr.named_contextval nf_rel_context_evar : Evd.evar_map -> EConstr.rel_context -> EConstr.rel_contextval nf_env_evar : Evd.evar_map -> Environ.env -> Environ.envval nf_evar_info : Evd.evar_map -> 'a Evd.evar_info -> 'a Evd.evar_infoval nf_evar_map : Evd.evar_map -> Evd.evar_mapval nf_evar_map_undefined : Evd.evar_map -> Evd.evar_mapval nf_relevance : Evd.evar_map -> Sorts.relevance -> Sorts.relevance
val nf_evars_universes : Evd.evar_map -> Constr.constr -> Constr.constr
exceptionUninstantiated_evar of Evar.tReplacing all evars, possibly raising
Uninstantiated_evar
val flush_and_check_evars : Evd.evar_map -> EConstr.constr -> Constr.constrval finalize : ?abort_on_undefined_evars:bool -> Evd.evar_map -> ((EConstr.t -> Constr.t) -> 'a) -> Evd.evar_map * 'afinalize env sigma fcombines universe minimisation, evar-and-universe normalisation and universe restriction.It minimizes universes in
sigma, callsfa normalisation function with respect to the updatedsigmaand restricts the local universes ofsigmato those encountered while runningf.Note that the normalizer passed to
fholds some imperative state in its closure.
Term manipulation up to instantiation
val kind_of_term_upto : Evd.evar_map -> Constr.constr -> (Constr.constr, Constr.types, Sorts.t, UVars.Instance.t) Constr.kind_of_termLike
Constr.kindexcept thatkind_of_term sigma texposestas an evareonly ifeis uninstantiated insigma. Otherwise the value ofeinsigmais (recursively) used.
val eq_constr_univs_test : evd:Evd.evar_map -> extended_evd:Evd.evar_map -> EConstr.constr -> EConstr.constr -> booleq_constr_univs_test ~evd ~extended_evd t utests equality oftanduup to existential variable instantiation and equalisable universes. The termtis interpreted inevdwhileuis interpreted inextended_evd. The universe constraints inextended_evdare assumed to be an extension of those inevd.
val compare_cumulative_instances : Conversion.conv_pb -> UVars.Variance.t array -> UVars.Instance.t -> UVars.Instance.t -> Evd.evar_map -> (Evd.evar_map, UGraph.univ_inconsistency) Util.unioncompare_cumulative_instances cv_pb variance u1 u2 sigmaReturnsInl sigma'wheresigma'issigmaaugmented with universe constraints such thatu1 cv_pb? u2according tovariance. Additionally flexible universes in irrelevant positions are unified if possible. ReturnsInr pwhen the former is impossible.
val compare_constructor_instances : Evd.evar_map -> UVars.Instance.t -> UVars.Instance.t -> (Evd.evar_map, UGraph.univ_inconsistency) Util.unionWe should only compare constructors at convertible types, so this is only an opportunity to unify universes.
But what about qualities?
type unification_pb= Evd.conv_pb * Environ.env * EConstr.constr * EConstr.constrUnification problems
val add_unification_pb : ?tail:bool -> unification_pb -> Evd.evar_map -> Evd.evar_mapadd_unification_pb ?tail pb sigmaAdd a unification problempbtosigma, if not already present. Put it at the end of the list iftailis true, by default it is false.
Removing hyps in evars'context
raise OccurHypInSimpleClause if the removal breaks dependencies
type clear_dependency_error=|OccurHypInSimpleClause of Names.Id.t option|EvarTypingBreak of Constr.existential|NoCandidatesLeft of Evar.t
exceptionClearDependencyError of Names.Id.t * clear_dependency_error * Names.GlobRef.t option
val restrict_evar : Evd.evar_map -> Evar.t -> Evd.Filter.t -> EConstr.constr list option -> Evd.evar_map * Evar.tval clear_hyps_in_evi : Environ.env -> Evd.evar_map -> Environ.named_context_val -> EConstr.types -> Names.Id.Set.t -> Evd.evar_map * Environ.named_context_val * EConstr.typesval clear_hyps2_in_evi : Environ.env -> Evd.evar_map -> Environ.named_context_val -> EConstr.types -> EConstr.types -> Names.Id.Set.t -> Evd.evar_map * Environ.named_context_val * EConstr.types * EConstr.typesval check_and_clear_in_constr : Environ.env -> Evd.evar_map -> clear_dependency_error -> Names.Id.Set.t -> EConstr.constr -> Evd.evar_map
val empty_csubst : csubstval csubst_subst : Evd.evar_map -> csubst -> EConstr.constr -> EConstr.constr
type ext_named_context= csubst * Names.Id.Set.t * Environ.named_context_val
val default_ext_instance : ext_named_context -> EConstr.constr SList.tval push_rel_decl_to_named_context : hypnaming:naming_mode -> Evd.evar_map -> EConstr.rel_declaration -> ext_named_context -> ext_named_contextval push_rel_context_to_named_context : hypnaming:naming_mode -> Environ.env -> Evd.evar_map -> EConstr.types -> Environ.named_context_val * EConstr.types * EConstr.constr SList.t * csubstval generalize_evar_over_rels : Evd.evar_map -> EConstr.existential -> EConstr.types * EConstr.constr listval subterm_source : Evar.t -> ?where:Evar_kinds.subevar_kind -> Evar_kinds.t Loc.located -> Evar_kinds.t Loc.locatedval meta_counter_summary_tag : int Summary.Dyn.tag