| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Universe levels |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 8 |
|
| 9 |
module Level where |
| 10 |
|
| 11 |
-- Levels. |
| 12 |
|
| 13 |
open import Agda.Primitive as Prim public |
| 14 |
using (Level; _⊔_; Setω) |
| 15 |
renaming (lzero to zero; lsuc to suc) |
| 16 |
|
| 17 |
-- Lifting. |
| 18 |
|
| 19 |
record Lift {a} ℓ (A : Set a) : Set (a ⊔ ℓ) where |
| 20 |
constructor lift |
| 21 |
field lower : A |
| 22 |
|
| 23 |
open Lift public |
| 24 |
|
| 25 |
-- Synonyms |
| 26 |
|
| 27 |
0ℓ : Level |
| 28 |
0ℓ = zero |
| 29 |
|
| 30 |
levelOfType : ∀ {a} → Set a → Level |
| 31 |
levelOfType {a} _ = a |
| 32 |
|
| 33 |
levelOfTerm : ∀ {a} {A : Set a} → A → Level |
| 34 |
levelOfTerm {a} _ = a |