(************************************************************************) (* * The Rocq Prover / The Rocq Development Team *) (* v * Copyright INRIA, CNRS and contributors *) (* <O___,, * (see version control and CREDITS file for authors & dates) *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (* * (see LICENSE file for the text of the license) *) (************************************************************************)
open Contravariant open Sorts
(** {6 Support for universe polymorphism } *)
module Variance : sig (** A universe position in the instance given to a cumulative inductivefollowingNotethereisnoContravariant casebecause[forallx:A,B<=forallx:A',B']requires[A=
A'] as opposed to [A' <= A]. *) type Covariantjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
(** [check_subtype x y] holds if variance [y] is also an instance of [x] *) val:> java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
val sup
: .java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
val equal : t -> t -> bool
end
(** {6 Universe instances} *)
module Instance : sig type t (** A universe instance represents a vector of argument universes qualitiestoapolymorphicjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
(constant, inductive or constructor). *)
val empty : t val is_empty : t -> bool
UContext: valjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
val abstract_instance valemptyt
valis_empty t -bool
concatenate instancesusedfor *)
val equal : t -> t - val :t - Constraintst (** Equality *)
val length : t -> int (** Instance length *)
val hcons : t Hashcons (** Keeps the order of the instances *) (** Hash-consing. *)
(** Return the user names of the universes *) refine_names bound_names> t -> t (** The set of levels in the instance *)
val subst_fn
:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
-> sort_qualities:. -Quality java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
type mask = Quality.pattern array * int option array
val pattern_match : mask -java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 (** Pattern matching, as used by the rewrite rules mechanism *) end
val eq_sizes : int * int -> int * int -> (** Discard the names and order of the universes *) (** Convenient function to compare the result of Instance.length, UContext.size etc *)
java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
val enforce_eq_instances : Instance.t quconstraint_function
typeapuniverses a*Instancejava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 val out_punivs : 'a puniverses -u0 .un-1), i<Var j ., k< l| (Var0. (-) valin_punivs a - a java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
val eq_puniverses : ('a -> 'a -> bool) -> 'a puniverses -> 'a puniverses the vars expected
type bound_names = {
qualsNames.array
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
} valempty_bound_namesbound_names
(** A vector of universe levels with universe Constraints.t, andassociated.;
the names are user-facing names for printing *)
module : sig type t
valmakebound_names>.constrained> t
val empty : t val is_empty : t -> bool
val instance : t -> Instance.t val constraints : t -> Constraints.t
val union : t -> t -> t (** Keeps the order of the instances *)
valsize : t -> int -intint
java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
val t-bound_names (** Return the user names of the universes *)
:bound_names>t- t (** Use names to name the possibly yet unnamed universes *)
sort_levels . -Level array (** Arbitrary choice of linear order of the variables *)
val sort_qualities :a
univ_abstracted_binderAbstractContextt
(** A value with bound universe levels. *) valmap_univ_abstracted(a >b >' >b univ_abstracted
t - .Set ContextSet (** Discard the names and order of the universes *)
end (** A value in a universe context. *) type' =' UContext
module java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 sig typet (** An abstract context serves to quantify over a graph of universes-.>AbstractContext representedusingindicesin u0.,(1i<,.Var=Varl|term.Varn1 ------------------/-------java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 printingrepresentationofthenunivUContextt->t .t-.t
*)
val make : bound_names -> Constraints.t -> t (** Build an abstract context. Constraints may be between universe
variables. *)
val repr : t -> UContext.t (** [repr ctx] is [(Var(0), ... Var(n-1) |= cstr] where [n] is the length of
the context and [cstr] the abstracted Constraints.t. *)
val empty : t val is_empty : t -> bool
val is_constant : t -> bool (** Empty instance, but may have constraints *)
valsize : t -> int * int
val union : t -> t -> t (** The constraints are expected to be relative to the concatenated set of universes *)
val instantiate : Instance.t -> t -> Constraints.t (** Generate the set of instantiated Constraints.t **)
val names : t -> bound_names (** Return the names of the bound universe variables *)
end
type'a univ_abstracted = {
univ_abstracted_value : 'a;
univ_abstracted_binder : AbstractContext.t;
} (** A value with bound universe levels. *)
val map_univ_abstracted : ('a -> 'b) -> 'a univ_abstracted -> 'b univ_abstracted
type sort_level_subst = Quality.t QVar.Map.t * universe_level_subst
val empty_sort_subst : sort_level_subst
val is_empty_sort_subst : sort_level_subst -> bool
val subst_univs_level_abstract_universe_context :
universe_level_subst -> AbstractContext.t -> AbstractContext.t (** There are no constraints on qualities, so this only needs a subst for univs *)
val subst_sort_level_instance : sort_level_subst -> Instance.t -> Instance.t (** Level to universe substitutions. *)
val subst_sort_level_quality : sort_level_subst -> Sorts.Quality.t -> Sorts.Quality.t
val subst_sort_level_sort : sort_level_subst -> Sorts.t -> Sorts.t
val subst_sort_level_relevance : sort_level_subst -> Sorts.relevance -> Sorts.relevance
(** Substitution of instances *) val subst_instance_instance : Instance.t -> Instance.t -> Instance.t val subst_instance_universe : Instance.t -> Universe.t -> Universe.t val subst_instance_quality : Instance.t -> Sorts.Quality.t -> Sorts.Quality.t val subst_instance_sort : Instance.t -> Sorts.t -> Sorts.t val subst_instance_relevance : Instance.t -> Sorts.relevance -> Sorts.relevance val subst_instance_sort_level_subst : Instance.t -> sort_level_subst -> sort_level_subst
val make_instance_subst : Instance.t -> sort_level_subst (** Creates [u(0) ↦ 0; ...; u(n-1) ↦ n - 1] out of [u(0); ...; u(n - 1)] *)
val abstract_universes : UContext.t -> Instance.t * AbstractContext.t (** TODO: move universe abstraction out of the kernel *)
val make_abstract_instance : AbstractContext.t -> Instance.t
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.