Module EConstr
type t= Evd.econstrType of incomplete terms. Essentially a wrapper around
Constr.tensuring thatConstr.kinddoes not observe defined evars.
type types= ttype constr= ttype existential= t Constr.pexistentialtype fixpoint= (t, t) Constr.pfixpointtype cofixpoint= (t, t) Constr.pcofixpointtype unsafe_judgment= (constr, types) Environ.punsafe_judgmenttype unsafe_type_judgment= types Environ.punsafe_type_judgmenttype named_declaration= (constr, types) Context.Named.Declaration.pttype rel_declaration= (constr, types) Context.Rel.Declaration.pttype named_context= (constr, types) Context.Named.pttype rel_context= (constr, types) Context.Rel.pt
Universe variables
module ESorts : sig ... endmodule EInstance : sig ... endtype 'a puniverses= 'a * EInstance.t
Destructors
val kind : Evd.evar_map -> t -> (t, t, ESorts.t, EInstance.t) Constr.kind_of_termSame as
Constr.kindexcept that it expands evars and normalizes universes on the fly.
val kind_upto : Evd.evar_map -> Constr.t -> (Constr.t, Constr.t, Sorts.t, Univ.Instance.t) Constr.kind_of_termval to_constr : ?abort_on_undefined_evars:bool -> Evd.evar_map -> t -> Constr.tReturns 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_evarstofalse.For getting the evar-normal form of a term with evars see
Evarutil.nf_evar.
val to_constr_opt : Evd.evar_map -> t -> Constr.t optionSame as
to_constr, but returnsNoneif 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
val kind_of_type : Evd.evar_map -> t -> kind_of_type
Constructors
val of_kind : (t, t, ESorts.t, EInstance.t) Constr.kind_of_term -> tConstruct a term from a view.
Insensitive primitives
Evar-insensitive versions of the corresponding functions. See the Constr module for more information.
Constructors
val mkRel : int -> tval mkVar : Names.Id.t -> tval mkMeta : Constr.metavariable -> tval mkEvar : t Constr.pexistential -> tval mkSort : Sorts.t -> tval mkSProp : tval mkProp : tval mkSet : tval mkType : Univ.Universe.t -> tval mkCast : (t * Constr.cast_kind * t) -> tval mkProd : (Names.Name.t Context.binder_annot * t * t) -> tval mkLambda : (Names.Name.t Context.binder_annot * t * t) -> tval mkLetIn : (Names.Name.t Context.binder_annot * t * t * t) -> tval mkApp : (t * t array) -> tval mkConst : Names.Constant.t -> tval mkConstU : (Names.Constant.t * EInstance.t) -> tval mkProj : (Names.Projection.t * t) -> tval mkInd : Names.inductive -> tval mkIndU : (Names.inductive * EInstance.t) -> tval mkConstruct : Names.constructor -> tval mkConstructU : (Names.constructor * EInstance.t) -> tval mkConstructUi : ((Names.inductive * EInstance.t) * int) -> tval mkCase : (Constr.case_info * t * t * t array) -> tval mkFix : (t, t) Constr.pfixpoint -> tval mkCoFix : (t, t) Constr.pcofixpoint -> tval mkArrow : t -> Sorts.relevance -> t -> tval mkArrowR : t -> t -> tval mkInt : Uint63.t -> tval mkFloat : Float64.t -> tval mkRef : (Names.GlobRef.t * EInstance.t) -> tval type1 : tval applist : (t * t list) -> tval applistc : t -> t list -> tval mkProd_or_LetIn : rel_declaration -> t -> tval mkLambda_or_LetIn : rel_declaration -> t -> tval it_mkProd_or_LetIn : t -> rel_context -> tval it_mkLambda_or_LetIn : t -> rel_context -> tval mkNamedLambda : Names.Id.t Context.binder_annot -> types -> constr -> constrval mkNamedLetIn : Names.Id.t Context.binder_annot -> constr -> types -> constr -> constrval mkNamedProd : Names.Id.t Context.binder_annot -> types -> types -> typesval mkNamedLambda_or_LetIn : named_declaration -> types -> typesval mkNamedProd_or_LetIn : named_declaration -> types -> types
Simple case analysis
val isRel : Evd.evar_map -> t -> boolval isVar : Evd.evar_map -> t -> boolval isInd : Evd.evar_map -> t -> boolval isRef : Evd.evar_map -> t -> boolval isEvar : Evd.evar_map -> t -> boolval isMeta : Evd.evar_map -> t -> boolval isSort : Evd.evar_map -> t -> boolval isCast : Evd.evar_map -> t -> boolval isApp : Evd.evar_map -> t -> boolval isLambda : Evd.evar_map -> t -> boolval isLetIn : Evd.evar_map -> t -> boolval isProd : Evd.evar_map -> t -> boolval isConst : Evd.evar_map -> t -> boolval isConstruct : Evd.evar_map -> t -> boolval isFix : Evd.evar_map -> t -> boolval isCoFix : Evd.evar_map -> t -> boolval isCase : Evd.evar_map -> t -> boolval isProj : Evd.evar_map -> t -> boolval isType : Evd.evar_map -> constr -> bool
type arity= rel_context * ESorts.t
val destArity : Evd.evar_map -> types -> arityval isArity : Evd.evar_map -> t -> boolval isVarId : Evd.evar_map -> Names.Id.t -> t -> boolval isRelN : Evd.evar_map -> int -> t -> boolval isRefX : Evd.evar_map -> Names.GlobRef.t -> t -> boolval destRel : Evd.evar_map -> t -> intval destMeta : Evd.evar_map -> t -> Constr.metavariableval destVar : Evd.evar_map -> t -> Names.Id.tval destSort : Evd.evar_map -> t -> ESorts.tval destCast : Evd.evar_map -> t -> t * Constr.cast_kind * tval destProd : Evd.evar_map -> t -> Names.Name.t Context.binder_annot * types * typesval destLambda : Evd.evar_map -> t -> Names.Name.t Context.binder_annot * types * tval destLetIn : Evd.evar_map -> t -> Names.Name.t Context.binder_annot * t * types * tval destApp : Evd.evar_map -> t -> t * t arrayval destConst : Evd.evar_map -> t -> Names.Constant.t * EInstance.tval destEvar : Evd.evar_map -> t -> t Constr.pexistentialval destInd : Evd.evar_map -> t -> Names.inductive * EInstance.tval destConstruct : Evd.evar_map -> t -> Names.constructor * EInstance.tval destCase : Evd.evar_map -> t -> Constr.case_info * t * t * t arrayval destProj : Evd.evar_map -> t -> Names.Projection.t * tval destFix : Evd.evar_map -> t -> (t, t) Constr.pfixpointval destCoFix : Evd.evar_map -> t -> (t, t) Constr.pcofixpointval destRef : Evd.evar_map -> t -> Names.GlobRef.t * EInstance.tval decompose_app : Evd.evar_map -> t -> t * t listval decompose_lam : Evd.evar_map -> t -> (Names.Name.t Context.binder_annot * t) list * tPops lambda abstractions until there are no more, skipping casts.
val decompose_lam_assum : Evd.evar_map -> t -> rel_context * tPops lambda abstractions and letins until there are no more, skipping casts.
val decompose_lam_n_assum : Evd.evar_map -> int -> t -> rel_context * tPops
nlambda abstractions, and pop letins only if needed to expose enough lambdas, skipping casts.- raises UserError
if the term doesn't have enough lambdas.
val decompose_lam_n_decls : Evd.evar_map -> int -> t -> rel_context * tPops
nlambda abstractions and letins, skipping casts.- raises UserError
if the term doesn't have enough lambdas/letins.
val compose_lam : (Names.Name.t Context.binder_annot * t) list -> t -> tval to_lambda : Evd.evar_map -> int -> t -> tval decompose_prod : Evd.evar_map -> t -> (Names.Name.t Context.binder_annot * t) list * tval decompose_prod_assum : Evd.evar_map -> t -> rel_context * tval decompose_prod_n_assum : Evd.evar_map -> int -> t -> rel_context * tval existential_type : Evd.evar_map -> existential -> typesval whd_evar : Evd.evar_map -> constr -> constr
Equality
val eq_constr : Evd.evar_map -> t -> t -> boolval eq_constr_nounivs : Evd.evar_map -> t -> t -> boolval eq_constr_universes : Environ.env -> Evd.evar_map -> t -> t -> UnivProblem.Set.t optionval leq_constr_universes : Environ.env -> Evd.evar_map -> t -> t -> UnivProblem.Set.t optionval eq_constr_universes_proj : Environ.env -> Evd.evar_map -> t -> t -> UnivProblem.Set.t optioneq_constr_universes_projcan equate projections and their eta-expanded constant form.
val compare_constr : Evd.evar_map -> (t -> t -> bool) -> t -> t -> bool
Iterators
val map : Evd.evar_map -> (t -> t) -> t -> tval map_user_view : Evd.evar_map -> (t -> t) -> t -> tval map_with_binders : Evd.evar_map -> ('a -> 'a) -> ('a -> t -> t) -> 'a -> t -> tval map_under_context : (t -> t) -> int -> t -> tval map_branches : (t -> t) -> Constr.case_info -> t array -> t arrayval map_return_predicate : (t -> t) -> Constr.case_info -> t -> tval iter : Evd.evar_map -> (t -> unit) -> t -> unitval iter_with_binders : Evd.evar_map -> ('a -> 'a) -> ('a -> t -> unit) -> 'a -> t -> unitval iter_with_full_binders : Evd.evar_map -> (rel_declaration -> 'a -> 'a) -> ('a -> t -> unit) -> 'a -> t -> unitval fold : Evd.evar_map -> ('a -> t -> 'a) -> 'a -> t -> 'aval universes_of_constr : Evd.evar_map -> t -> Univ.LSet.tGather the universes transitively used in the term, including in the type of evars appearing in it.
Substitutions
module Vars : sig ... endEnvironment handling
val push_rel : rel_declaration -> Environ.env -> Environ.envval push_rel_context : rel_context -> Environ.env -> Environ.envval push_rec_types : (t, t) Constr.prec_declaration -> Environ.env -> Environ.envval push_named : named_declaration -> Environ.env -> Environ.envval push_named_context : named_context -> Environ.env -> Environ.envval push_named_context_val : named_declaration -> Environ.named_context_val -> Environ.named_context_valval rel_context : Environ.env -> rel_contextval named_context : Environ.env -> named_contextval val_of_named_context : named_context -> Environ.named_context_valval named_context_of_val : Environ.named_context_val -> named_contextval lookup_rel : int -> Environ.env -> rel_declarationval lookup_named : Names.variable -> Environ.env -> named_declarationval lookup_named_val : Names.variable -> Environ.named_context_val -> named_declarationval map_rel_context_in_env : (Environ.env -> constr -> constr) -> Environ.env -> rel_context -> rel_contextval fresh_global : ?loc:Loc.t -> ?rigid:Evd.rigid -> ?names:Univ.Instance.t -> Environ.env -> Evd.evar_map -> Names.GlobRef.t -> Evd.evar_map * tval is_global : Evd.evar_map -> Names.GlobRef.t -> t -> bool
Extra
val of_existential : Constr.existential -> existentialval of_named_decl : (Constr.t, Constr.types) Context.Named.Declaration.pt -> (t, types) Context.Named.Declaration.ptval of_rel_decl : (Constr.t, Constr.types) Context.Rel.Declaration.pt -> (t, types) Context.Rel.Declaration.ptval to_rel_decl : Evd.evar_map -> (t, types) Context.Rel.Declaration.pt -> (Constr.t, Constr.types) Context.Rel.Declaration.pt
Unsafe operations
module Unsafe : sig ... end