| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Properties of polymorphic versions of standard definitions in |
| 5 |
-- Relation.Unary |
| 6 |
------------------------------------------------------------------------ |
| 7 |
|
| 8 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 9 |
|
| 10 |
module Relation.Unary.Polymorphic.Properties where |
| 11 |
|
| 12 |
open import Data.Unit.Polymorphic.Base using (tt) |
| 13 |
open import Level using (Level) |
| 14 |
open import Relation.Binary.Definitions hiding (Decidable; Universal; Empty) |
| 15 |
open import Relation.Nullary.Decidable.Core using (yes; no) |
| 16 |
open import Relation.Unary hiding (∅; U) |
| 17 |
open import Relation.Unary.Polymorphic using (∅; U) |
| 18 |
|
| 19 |
private |
| 20 |
variable |
| 21 |
a ℓ ℓ₁ ℓ₂ : Level |
| 22 |
A : Set a |
| 23 |
|
| 24 |
------------------------------------------------------------------------ |
| 25 |
-- The empty set |
| 26 |
|
| 27 |
∅? : Decidable {A = A} {ℓ} ∅ |
| 28 |
∅? _ = no λ() |
| 29 |
|
| 30 |
∅-Empty : Empty {A = A} {ℓ} ∅ |
| 31 |
∅-Empty _ () |
| 32 |
|
| 33 |
∁∅-Universal : Universal {A = A} {ℓ} (∁ ∅) |
| 34 |
∁∅-Universal _ () |
| 35 |
|
| 36 |
------------------------------------------------------------------------ |
| 37 |
-- The universe |
| 38 |
|
| 39 |
U? : Decidable {A = A} {ℓ} U |
| 40 |
U? _ = yes tt |
| 41 |
|
| 42 |
U-Universal : Universal {A = A} {ℓ} U |
| 43 |
U-Universal _ = _ |
| 44 |
|
| 45 |
∁U-Empty : Empty {A = A} {ℓ} (∁ U) |
| 46 |
∁U-Empty _ x∈∁U = x∈∁U _ |
| 47 |
|
| 48 |
------------------------------------------------------------------------ |
| 49 |
-- Subset properties |
| 50 |
|
| 51 |
∅-⊆ : (P : Pred A ℓ₁) → ∅ {ℓ = ℓ₂} ⊆ P |
| 52 |
∅-⊆ _ () |
| 53 |
|
| 54 |
⊆-U : (P : Pred A ℓ₁) → P ⊆ U {ℓ = ℓ₂} |
| 55 |
⊆-U _ _ = _ |
| 56 |
|
| 57 |
⊆-min : Min {A = Pred A ℓ₁} {B = Pred A ℓ₂} _⊆_ ∅ |
| 58 |
⊆-min = ∅-⊆ |
| 59 |
|
| 60 |
⊆-max : Max {A = Pred A ℓ₁} {B = Pred A ℓ₂} _⊆_ U |
| 61 |
⊆-max = ⊆-U |
| 62 |
|
| 63 |
∅-⊆′ : (P : Pred A ℓ₁) → ∅ {ℓ = ℓ₂} ⊆′ P |
| 64 |
∅-⊆′ _ _ = λ () |
| 65 |
|
| 66 |
⊆′-U : (P : Pred A ℓ₁) → P ⊆′ U {ℓ = ℓ₂} |
| 67 |
⊆′-U _ _ _ = _ |
| 68 |
|
| 69 |
⊆′-min : Min {A = Pred A ℓ₁} {B = Pred A ℓ₂} _⊆′_ ∅ |
| 70 |
⊆′-min = ∅-⊆′ |
| 71 |
|
| 72 |
⊆′-max : Max {A = Pred A ℓ₁} {B = Pred A ℓ₂} _⊆′_ U |
| 73 |
⊆′-max = ⊆′-U |