Debian Codegraph @

src/Relation/Nullary/Construct/Add/Extrema.agda

raw
1 ------------------------------------------------------------------------
2 -- The Agda standard library
3 --
4 -- Notation for freely adding extrema to any set
5 ------------------------------------------------------------------------
6
7 {-# OPTIONS --cubical-compatible --safe #-}
8
9 module Relation.Nullary.Construct.Add.Extrema where
10
11 open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl)
12 open import Relation.Nullary.Construct.Add.Infimum as Infimum using (_₋)
13 open import Relation.Nullary.Construct.Add.Supremum as Supremum using (_⁺)
14
15 ------------------------------------------------------------------------
16 -- Definition
17
18 _± : ∀ {a} → Set a → Set a
19 A ± = A ₋ ⁺
20
21 pattern ⊥± = Supremum.[ Infimum.⊥₋ ]
22 pattern [_] k = Supremum.[ Infimum.[ k ] ]
23 pattern ⊤± = Supremum.⊤⁺
24
25 ------------------------------------------------------------------------
26 -- Properties
27
28 [_]-injective : ∀ {a} {A : Set a} {k l : A} → [ k ] ≡ [ l ] → k ≡ l
29 [_]-injective refl = refl