EConstrtype t = Evd.econstrType of incomplete terms. Essentially a wrapper around Constr.t ensuring that Constr.kind does not observe defined evars.
type types = ttype constr = ttype existential = t Constr.pexistentialtype case_return = t Constr.pcase_returntype case_branch = t Constr.pcase_branchtype 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.ptmodule ESorts : sig ... endmodule EInstance : sig ... endtype case_invert = t Constr.pcase_inverttype case = (t, t, EInstance.t) Constr.pcasetype 'a puniverses = 'a * EInstance.tval kind : Evd.evar_map -> t -> (t, t, ESorts.t, EInstance.t) Constr.kind_of_termSame 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, 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_evars to false.
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 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 |
val kind_of_type : Evd.evar_map -> t -> kind_of_typeval of_kind : (t, t, ESorts.t, EInstance.t) Constr.kind_of_term -> tConstruct a term from a view.
Evar-insensitive versions of the corresponding functions. See the Constr module for more information.
val mkRel : int -> tval mkVar : Names.Id.t -> tval mkMeta : Constr.metavariable -> tval mkEvar : t Constr.pexistential -> 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 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 mkFix : (t, t) Constr.pfixpoint -> tval mkCoFix : (t, t) Constr.pcofixpoint -> tval mkArrow : t -> Sorts.relevance -> t -> tval mkArray : (EInstance.t * t array * t * t) -> tval mkRef : (Names.GlobRef.t * EInstance.t) -> tval type1 : t 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 it_mkProd : t -> (Names.Name.t Context.binder_annot * t) list -> tval it_mkLambda : t -> (Names.Name.t Context.binder_annot * 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 mkProd_wo_LetIn : rel_declaration -> t -> tval mkLambda_wo_LetIn : rel_declaration -> t -> tval it_mkProd_wo_LetIn : t -> rel_context -> tval it_mkLambda_wo_LetIn : t -> rel_context -> tval mkNamedProd : Evd.evar_map -> Names.Id.t Context.binder_annot -> types -> types -> typesval mkNamedLambda : Evd.evar_map -> Names.Id.t Context.binder_annot -> types -> constr -> constrval mkNamedLetIn : Evd.evar_map -> Names.Id.t Context.binder_annot -> constr -> types -> constr -> constrval mkNamedProd_or_LetIn : Evd.evar_map -> named_declaration -> types -> typesval mkNamedLambda_or_LetIn : Evd.evar_map -> named_declaration -> types -> typesval it_mkNamedProd_or_LetIn : Evd.evar_map -> t -> named_context -> tval it_mkNamedLambda_or_LetIn : Evd.evar_map -> t -> named_context -> tval mkNamedProd_wo_LetIn : Evd.evar_map -> named_declaration -> t -> tval it_mkNamedProd_wo_LetIn : Evd.evar_map -> t -> named_context -> tval mkLEvar : Evd.evar_map -> (Evar.t * t list) -> tVariant of mkEvar that removes identity variable instances from its argument.
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 -> booltype arity = rel_context * ESorts.tval 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 -> caseval 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 n lambda abstractions, and pop letins only if needed to expose enough lambdas, skipping casts.
val decompose_lam_n_decls : Evd.evar_map -> int -> t -> rel_context * tPops n lambda abstractions and letins, skipping casts.
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 -> constrval 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 -> ?nargs:int -> t -> t -> UnivProblem.Set.t optionval leq_constr_universes : Environ.env -> Evd.evar_map -> ?nargs:int -> t -> t -> UnivProblem.Set.t optionval eq_existential : Evd.evar_map -> (t -> t -> bool) -> existential -> existential -> boolval eq_constr_universes_proj : Environ.env -> Evd.evar_map -> t -> t -> UnivProblem.Set.t optioneq_constr_universes_proj can equate projections and their eta-expanded constant form.
val compare_constr : Evd.evar_map -> (t -> t -> bool) -> t -> t -> boolval map : Evd.evar_map -> (t -> t) -> t -> tval map_with_binders : Evd.evar_map -> ('a -> 'a) -> ('a -> t -> t) -> 'a -> t -> tval map_branches : (t -> t) -> case_branch array -> case_branch arrayval map_return_predicate : (t -> t) -> case_return -> case_returnval map_existential : Evd.evar_map -> (t -> t) -> existential -> existentialval 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 : Environ.env -> Evd.evar_map -> (rel_declaration -> 'a -> 'a) -> ('a -> t -> unit) -> 'a -> t -> unitval fold : Evd.evar_map -> ('a -> t -> 'a) -> 'a -> t -> 'aval fold_with_binders : Evd.evar_map -> ('a -> 'a) -> ('a -> 'b -> t -> 'b) -> 'a -> 'b -> t -> 'bval universes_of_constr : Evd.evar_map -> t -> Univ.Level.Set.tGather the universes transitively used in the term, including in the type of evars appearing in it.
module Vars : sig ... endSee vars.mli for the documentation of the functions below
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 match_named_context_val : Environ.named_context_val -> (named_declaration * Environ.named_context_val) optionval identity_subst_val : Environ.named_context_val -> t SList.tval 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 -> boolval expand_case : Environ.env -> Evd.evar_map -> case -> Constr.case_info * t * case_invert * t * t arrayval annotate_case : Environ.env -> Evd.evar_map -> case -> Constr.case_info * EInstance.t * t array * (rel_context * t) * case_invert * t * (rel_context * t) arraySame 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_contextGiven a universe instance and parameters for the inductive type, constructs the typed context in which the branch lives.
val contract_case : Environ.env -> Evd.evar_map -> (Constr.case_info * t * case_invert * t * t array) -> caseval 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.ptval of_named_context : Constr.named_context -> named_contextval of_rel_context : Constr.rel_context -> rel_contextval of_case_invert : Constr.case_invert -> case_invertmodule Unsafe : sig ... end