package rocq-runtime
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=a45280ab4fbaac7540b136a6b073b4a6db15739ec1e149bded43fa6f4fc25f20
doc/rocq-runtime.kernel/UGraph/index.html
Module UGraphSource
Graphs of universes.
When type_in_type, functions adding constraints do not fail and may instead ignore inconsistent constraints.
Checking functions such as check_leq always return true.
Initial universes, but keeping options such as type in type from the argument.
val check_eq_instances :
(Sorts.Quality.t -> Sorts.Quality.t -> bool) ->
t ->
UVars.Instance.t ->
UVars.Instance.t ->
boolCheck equality of instances w.r.t. a universe graph
...
Merge of constraints in a universes graph. The function merge_constraints merges a set of constraints in a given universes graph. It raises the exception UniverseInconsistency if the constraints are not satisfiable.
type univ_inconsistency =
univ_variable_printers option
* (Univ.UnivConstraint.kind * Sorts.t * Sorts.t * explanation option)val check_eq_sort :
(Sorts.Quality.t -> Sorts.Quality.t -> bool) ->
t ->
Sorts.t ->
Sorts.t ->
boolChecks whether (i) the first quality is equal to the second and (ii) that the universe of the first one is equal to the universe of the second one. When type_in_type, only checks relevance.
val check_leq_sort :
(Sorts.Quality.t -> Sorts.Quality.t -> bool) ->
t ->
Sorts.t ->
Sorts.t ->
boolChecks whether (i) the second quality eliminates into the first and (ii) that the universe of the first one is below the universe of the second one. When type_in_type, only checks relevance.
Adds a universe to the graph, ensuring it is >= or > Set.
Check that the universe levels are declared.
constraints_of_universes g returns csts and partition where csts are the non-Eq constraints and partition is the partition of the universes into equivalence classes.
choose p g u picks a universe verifying p and equal to u in g.
constraints_for ~kept g returns the constraints about the universes kept in g up to transitivity.
eg if g is a <= b <= c then constraints_for ~kept:{a, c} g is a <= c.
Known universes
Dumping
type node = | Alias of Univ.Level.t| Node of bool Univ.Level.Map.t(*Nodes v s.t. u < v (true) or u <= v (false)
*)
Pretty-printing of universes.
val explain_universe_inconsistency :
(Sorts.QVar.t -> Pp.t) ->
(Univ.Level.t -> Pp.t) ->
univ_inconsistency ->
Pp.t