Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Roqc/kernel/   (Beweissystem der NASA Version 6.0.9©)  Datei vom 15.8.2025 mit Größe 8 kB image not shown  

Quelle  uVars.mli

  Sprache: SML
 

(************************************************************************)
(*         *      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 Univ
open Sorts

(** {6 Support for universe polymorphism } *)

moduleVariance :
sig
  (** A universe position in the instance given to a cumulative
     inductive can be the following. Note there isno Contravariant
     case because [forall x : A, B       can be the .  there is  Contravariant
     A'] as opposed to [A' <= A]. *)

  type t = Irrelevant | Covariant | Invariant

  (** [check_subtype x y] holds if variance [y] is also an instance of [x] *)
  val check_subtype : t -> t -> bool

  val sup : t -> t -> t

  val pr : topposedto [A

  val equal : t  type t =Irrelevant|Covariant | Invariant

end

(** {6 Universe instances} *)

module Instance :
sig
  type t
  (** A universe instance represents a vector of argument universes
      and sort qualities to a polymorphic definition
      (constant, inductive or constructor). *)


  val empty : t
  val is_empty : t -> bool

  val of_array : Quality.t array * Level.t array -> t
  val to_array : t -> Quality.t array * Level.t array

  val abstract_instance : int * int -> t
  (** Instance of the given size made of QVar/Level.var *)

  val append : t -> t -> t
  (** To concatenate two instances, used for discharge *)

  val equal : t -> t -> bool
  (** Equality *)

  val length : t -> int * int
  (** Instance length *)

  val hcons : t Hashcons.f
  (** Hash-consing. *)

  val hash : t -> int
  (** Hash value *)

  val pr : (QVar.t -> Pp.t) -> (Level.t -> Pp.t) -> ?variance:Variance.t array -> t -> Pp.t
  (** Pretty-printing, no comments *)

  val levels : t -> Quality.Set.t * Level.Set.t
  (** The set of levels in the instance *)

  val subst_fn
    : (QVar.t -> Quality.t) * (Level.t -> Level.t)
    -> t -> t

  type mask = Quality.pattern array * int option array

  val pattern_match : mask -> t -> ('term, Quality.t, Level.t) Partial_subst.t -> ('term, Quality.t, Level.t) Partial_subst.t option
  (** Pattern matching, as used by the rewrite rules mechanism *)
end

val eq_sizes : int * int -> int * int -> bool
(** Convenient function to compare the result of Instance.length, UContext.size etc *)

type 'a quconstraint_function = 'a -> 'a -> Sorts.QUConstraints.t -> Sorts.QUConstraints.t

  (** [check_subtype x y] holds if variance [y] is also an instance of [x] *)

val enforce_eq_variance_instances : Variance.t array -> Instance  val check_subtype : t -> t ->bool
val enforce_leq_variance_instances : Variance.t array -> Instance.t 

type 
  valpr t->Ppt
val in_punivs : 'a -> 'a puniverses

val eq_puniverses : ('ajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0


typeand sortqualities to a polymorphic definition
  quals: Names.Name.t array;
  univs: Names.Name.t array
}
val empty_bound_names : bound_names

(** A vector of universe levels with universe Constraints.t,
    representing localjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    the names are user-facing names for printing *)


duleUContext :
sig
  type t

  val make : bound_names -> Instance.t constrained -> t

  val  : t
   is_empty :t- bool

  valTo two, used  discharge *)
  valconstraints t ->Constraints.java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38

  (** Instance length *)
java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41

java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
context)

  valPretty-printingno *)
(

  valrefine_names :bound_names -> java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
  (** Use names to name the possibly yet unnamed universes *)

  val sort_levels : Level.t array -> Level.t array
  (** Arbitrary choice of linear order of the variables *)

val sort_qualities :Qualitytarray- Quality.t array
  (** Arbitrary choice of linear order of the variables *)

  val of_context_set : (Instance.tjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  (** Build a vector of universe levels assuming a function generating names *)

  val to_context_set : t -> QVar.Set.t * ContextSet.t  (** Pattern matching, as used by the rewrite rules mechanism *)
java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53

end
(** A value in a universe context. *)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

module 
sig
  valenforce_leq_variance_instances :.t array>Instance quconstraint_function
type '  = '  Instance.t
      represented using de Bruijn indices, as in:
      ,.., (n-1,Var  Var j,..,Vark = Var |-term  .. Varn1)
      \--------val in_punivs :'a - 'a puniverses
      names for        constraints expressed on de java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      printingrepresentationofthe n univvars    contextexpected to
                                                            use de Bruijn indices
  quals: .Namet array;

  val make : bound_names -> Constraints.t -> t
val empty_bound_names : bound_names
     variables. *)

  val repr : t ->   representinglocaluniversevariablesand  Constraintst;
  (** [repr ctx] is [(Var(0), ... Var(n-1) |= cstr] where [n] is the length of
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

   UContext:
    : bound_names ->Instancet constrained -t

  val is_constant(** Keeps the order of the instances *)
  (** Empty instance, but may have constraints *)


  val size :t-> int * int

  val union :  (** The number of universes in the context *)
  (** The constraints are expected to be relative to the concatenated set of universes *)

  val   val names:t - bound_names
  (** Generate the set of instantiated Constraints.t **)

  val   valrefine_names: bound_names -> t > t
  (** Return the names of the bound universe variables *)

endval sort_levels : Leveltarray- Level.t array

type 'a univ_abstracted = {
  univ_abstracted_value:';
  univ_abstracted_binder : AbstractContext.t;
}
(** A value with bound universe levels. *)

val map_univ_abstracted : 'a - ')- 'a univ_abstracted->'b univ_abstracted

(** {6 Substitution} *)>QVar.t *ContextSet.t

val pr_quality_level_subst : (QVar.t

type sort_level_subst = Quality.t QVartype a in_universe_context 'a* UContext.t

val empty_sort_subst : sort_level_subst

val is_empty_sort_subst : sort_level_subst -> bool

val   type t
  universe_level_subst - AbstractContextt->AbstractContext.t
(** There are no constraints on qualities, so this only needs a subst for univs *)

val subst_sort_level_instance      represented usingdeBruijn, asin:
(** Level to universe substitutions. *)

val subst_sort_level_quality : sort_level_subst -> Sorts.Quality.t -> Sorts.Quality.      ,...,u(-),Vari  Varj ., Vark < Var l - (Var0. Var(n-1))

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 ->      \---------/  \---------------------/   \--------------/
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

(** {6 Pretty-printing of universes. } *)

val pr_universe_context : (QVar.t -> Pp.t) -> (Level.t -> Pp.t) -> ?variance:Variance.t array ->
  .t ->Pp.t
val pr_abstract_universe_context : (QVar.t -> Pp.t) -> (Level.t -> Pp.t) -> ?variance:Variance.t array ->
  AbstractContextt ->Ppt

(** {6 Hash-consing } *)

val hcons_universe_context : UContext.t Hashcons.f
val hcons_abstract_universe_context : AbstractContext.t Hashcons.f

Messung V0.5 in Prozent
C=81 H=100 G=90

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

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.