diff options
author | Chloe Brown <chloe.brown.00@outlook.com> | 2022-01-05 19:09:36 +0000 |
---|---|---|
committer | Chloe Brown <chloe.brown.00@outlook.com> | 2022-01-05 19:09:36 +0000 |
commit | 8dd4b315a849aacc4d63d466edb3b634daf300cc (patch) | |
tree | 6b2956f972ddf2484e888de536db48681e2db1ac | |
parent | 8f22ef8cccdbd2da07e889a4e53fc8b7c1ec6fdc (diff) |
misc: define OfPreorder category
-rw-r--r-- | src/CatTheory/Category/Instance/Of/Preorder.agda | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/CatTheory/Category/Instance/Of/Preorder.agda b/src/CatTheory/Category/Instance/Of/Preorder.agda new file mode 100644 index 0000000..3e65f20 --- /dev/null +++ b/src/CatTheory/Category/Instance/Of/Preorder.agda @@ -0,0 +1,30 @@ +{-# OPTIONS --without-K --safe #-} + +open import Relation.Binary.Bundles using (Preorder) + +module CatTheory.Category.Instance.Of.Preorder + {a l₁ l₂} + (P : Preorder a l₁ l₂) + where + +open import Categories.Category using (Category) +open import Data.Unit using (⊤) +open import Function using (flip) +open import Level using (0ℓ) +open Preorder P + +OfPreorder : Category a l₂ 0ℓ +OfPreorder = record + { Obj = Carrier + ; _⇒_ = _∼_ + ; _≈_ = λ _ _ → ⊤ + ; id = refl + ; _∘_ = flip trans + ; assoc = _ + ; sym-assoc = _ + ; identityˡ = _ + ; identityʳ = _ + ; identity² = _ + ; equiv = _ + ; ∘-resp-≈ = _ + } |