Module Univ
module Level : sig ... endUniverses.
module LSet : sig ... endSets of universe levels
module Universe : sig ... endval pr_uni : Universe.t -> Pp.tval type0m_univ : Universe.tThe universes hierarchy: Type 0- = Prop <= Type 0 = Set <= Type 1 <= ... Typing of universes: Type 0-, Type 0 : Type 1; Type i : Type (i+1) if i>0
val type0_univ : Universe.tval type1_univ : Universe.tval is_type0_univ : Universe.t -> boolval is_type0m_univ : Universe.t -> boolval is_univ_variable : Universe.t -> boolval is_small_univ : Universe.t -> boolval sup : Universe.t -> Universe.t -> Universe.tval super : Universe.t -> Universe.tval universe_level : Universe.t -> Level.t option
val univ_level_mem : Level.t -> Universe.t -> bool
val univ_level_rem : Level.t -> Universe.t -> Universe.t -> Universe.t
Constraints.
type constraint_type= AcyclicGraph.constraint_type=|Lt|Le|Eqtype univ_constraint= Level.t * constraint_type * Level.t
module Constraint : sig ... endval empty_constraint : Constraint.tval union_constraint : Constraint.t -> Constraint.t -> Constraint.tval eq_constraint : Constraint.t -> Constraint.t -> bool
type 'a constrained= 'a * Constraint.tA value with universe Constraint.t.
val constraints_of : 'a constrained -> Constraint.tConstrained
type 'a constraint_function= 'a -> 'a -> Constraint.t -> Constraint.tEnforcing Constraint.t.
val enforce_eq : Universe.t constraint_functionval enforce_leq : Universe.t constraint_functionval enforce_eq_level : Level.t constraint_functionval enforce_leq_level : Level.t constraint_function
type explanation= (constraint_type * Level.t) listType explanation is used to decorate error messages to provide useful explanation why a given constraint is rejected. It is composed of a path of universes and relation kinds
(r1,u1);..;(rn,un)means .. <(r1) u1 <(r2) ... <(rn) un (where <(ri) is the relation symbol denoted by ri, currently only < and <=). The lowest end of the chain is supposed known (see UniverseInconsistency exn). The upper end may differ from the second univ of UniverseInconsistency because all universes in the path are canonical. Note that each step does not necessarily correspond to an actual constraint, but reflect how the system stores the graph and may result from combination of several Constraint.t...
type univ_inconsistency= constraint_type * Universe.t * Universe.t * explanation Stdlib.Lazy.t option
exceptionUniverseInconsistency of univ_inconsistency
Support for universe polymorphism
module LMap : sig ... endPolymorphic maps from universe levels to 'a
type 'a universe_map= 'a LMap.t
Substitution
type universe_subst_fn= Level.t -> Universe.ttype universe_level_subst_fn= Level.t -> Level.ttype universe_subst= Universe.t universe_mapA full substitution, might involve algebraic universes
type universe_level_subst= Level.t universe_map
module Variance : sig ... endUniverse instances
module Instance : sig ... endval enforce_eq_instances : Instance.t constraint_functionval enforce_eq_variance_instances : Variance.t array -> Instance.t constraint_functionval enforce_leq_variance_instances : Variance.t array -> Instance.t constraint_function
type 'a puniverses= 'a * Instance.t
val out_punivs : 'a puniverses -> 'aval in_punivs : 'a -> 'a puniversesval eq_puniverses : ('a -> 'a -> bool) -> 'a puniverses -> 'a puniverses -> bool
module UContext : sig ... endmodule AUContext : sig ... endtype 'a univ_abstracted={univ_abstracted_value : 'a;univ_abstracted_binder : AUContext.t;}A value with bound universe levels.
val map_univ_abstracted : ('a -> 'b) -> 'a univ_abstracted -> 'b univ_abstracted
module ContextSet : sig ... endtype 'a in_universe_context= 'a * UContext.tA value in a universe context (resp. context set).
type 'a in_universe_context_set= 'a * ContextSet.t
val extend_in_context_set : 'a in_universe_context_set -> ContextSet.t -> 'a in_universe_context_setval empty_level_subst : universe_level_substval is_empty_level_subst : universe_level_subst -> boolval subst_univs_level_level : universe_level_subst -> Level.t -> Level.tSubstitution of universes.
val subst_univs_level_universe : universe_level_subst -> Universe.t -> Universe.tval subst_univs_level_constraints : universe_level_subst -> Constraint.t -> Constraint.tval subst_univs_level_abstract_universe_context : universe_level_subst -> AUContext.t -> AUContext.tval subst_univs_level_instance : universe_level_subst -> Instance.t -> Instance.t
val make_subst : universe_subst -> universe_subst_fnval subst_univs_universe : universe_subst_fn -> Universe.t -> Universe.tOnly user in the kernel is template polymorphism. Ideally we get rid of this code if it goes away.
val subst_instance_instance : Instance.t -> Instance.t -> Instance.tSubstitution of instances
val subst_instance_universe : Instance.t -> Universe.t -> Universe.tval make_instance_subst : Instance.t -> universe_level_substCreates
u(0) ↦ 0; ...; u(n-1) ↦ n - 1out ofu(0); ...; u(n - 1)
val make_inverse_instance_subst : Instance.t -> universe_level_substval abstract_universes : Names.Name.t array -> UContext.t -> Instance.t * AUContext.tTODO: move universe abstraction out of the kernel
val make_abstract_instance : AUContext.t -> Instance.tval compact_univ : Universe.t -> Universe.t * int listcompact_univ uremaps local variables inusuch that their indices become consecutive. It returns the new universe and the mapping. Example: compact_univ(Var 0, i); (Prop, 0); (Var 2; j))=(Var 0,i); (Prop, 0); (Var 1; j),0; 2
Pretty-printing of universes.
val pr_constraint_type : constraint_type -> Pp.tval pr_constraints : (Level.t -> Pp.t) -> Constraint.t -> Pp.tval pr_universe_context : (Level.t -> Pp.t) -> ?variance:Variance.t array -> UContext.t -> Pp.tval pr_abstract_universe_context : (Level.t -> Pp.t) -> ?variance:Variance.t array -> AUContext.t -> Pp.tval pr_universe_context_set : (Level.t -> Pp.t) -> ContextSet.t -> Pp.tval explain_universe_inconsistency : (Level.t -> Pp.t) -> univ_inconsistency -> Pp.tval pr_universe_level_subst : universe_level_subst -> Pp.tval pr_universe_subst : universe_subst -> Pp.t
Hash-consing
val hcons_univ : Universe.t -> Universe.tval hcons_constraints : Constraint.t -> Constraint.tval hcons_universe_set : LSet.t -> LSet.tval hcons_universe_context : UContext.t -> UContext.tval hcons_abstract_universe_context : AUContext.t -> AUContext.tval hcons_universe_context_set : ContextSet.t -> ContextSet.t