package coq
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=583471c8ed4f227cb374ee8a13a769c46579313d407db67a82d202ee48300e4b
doc/coq-core.kernel/Univ/index.html
Module Univ
Source
univ_level_mem l u
Is l is mentioned in u ?
univ_level_rem u v min
removes u
from v
, resulting in min
if v
was exactly u
.
Constraints.
A value with universe Constraints.t.
Constrained
Enforcing Constraints.t.
Type 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 Constraints.t...
Support for universe polymorphism
Universe instances
A vector of universe levels with universe Constraints.t, representing local universe variables and associated Constraints.t; the names are user-facing names for printing
type 'a univ_abstracted = {
univ_abstracted_value : 'a;
univ_abstracted_binder : AbstractContext.t;
}
A value with bound universe levels.
Universe contexts (as sets)
A set of universes with universe Constraints.t. We linearize the set to a list after typechecking. Beware, representation could change.
A value in a universe context (resp. context set).
val extend_in_context_set :
'a in_universe_context_set ->
ContextSet.t ->
'a in_universe_context_set
Substitution
Substitution of universes.
val subst_univs_level_abstract_universe_context :
universe_level_subst ->
AbstractContext.t ->
AbstractContext.t
Level to universe substitutions.
Substitution of instances
Creates u(0) ↦ 0; ...; u(n-1) ↦ n - 1
out of u(0); ...; u(n - 1)
TODO: move universe abstraction out of the kernel
compact_univ u
remaps local variables in u
such 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_universe_context :
(Level.t -> Pp.t) ->
?variance:Variance.t array ->
UContext.t ->
Pp.t
val pr_abstract_universe_context :
(Level.t -> Pp.t) ->
?variance:Variance.t array ->
AbstractContext.t ->
Pp.t