Debian Codegraph @

engine/univProblem.mli

raw symbols SCIP
1 (************************************************************************)
2 (* * The Rocq Prover / The Rocq Development Team *)
3 (* v * Copyright INRIA, CNRS and contributors *)
4 (* <O___,, * (see version control and CREDITS file for authors & dates) *)
5 (* \VV/ **************************************************************)
6 (* // * This file is distributed under the terms of the *)
7 (* * GNU Lesser General Public License Version 2.1 *)
8 (* * (see LICENSE file for the text of the license) *)
9 (************************************************************************)
10
11 open Univ
12 open UVars
13
14 (** {6 Constraints for type inference}
15
16 When doing conversion of universes, not only do we have =/<= constraints but
17 also Lub constraints which correspond to unification of two levels which might
18 not be necessary if unfolding is performed.
19
20 UWeak constraints come from irrelevant universes in cumulative polymorphism.
21 *)
22
23 type t =
24 | QEq of Sorts.Quality.t * Sorts.Quality.t
25 | QLeq of Sorts.Quality.t * Sorts.Quality.t
26 | QElimTo of Sorts.Quality.t * Sorts.Quality.t
27 | ULe of Sorts.t * Sorts.t
28 | UEq of Sorts.t * Sorts.t
29 | ULub of Level.t * Level.t
30 | UWeak of Level.t * Level.t
31
32 val is_trivial : t -> bool
33
34 (** Wrapper around the UGraph function to handle Prop *)
35 val check_eq_level : UGraph.t -> Level.t -> Level.t -> bool
36
37 module Set : sig
38 include Set.S with type elt = t
39
40 val pr : t -> Pp.t
41
42 (** Replace ULub constraints by UEq *)
43 val force : t -> t
44 end
45
46 type 'a constraint_function = 'a -> 'a -> Set.t -> Set.t
47
48 val enforce_eq_instances_univs : bool -> Instance.t constraint_function
49
50 val enforce_eq_qualities : Sorts.Quality.t array constraint_function
51
52 val compare_cumulative_instances : Conversion.conv_pb -> Variance.t array -> Instance.t constraint_function