-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit also contains a slight refactor of `EmptySet`. There is no need for this type to depend on the unit.
- Loading branch information
Showing
9 changed files
with
59 additions
and
85 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,6 @@ | ||
{-# OPTIONS --without-K --safe #-} | ||
|
||
open import Level | ||
module Categories.Category.Instance.Zero {o ℓ e} where | ||
|
||
-- ⊥ is Initial | ||
|
||
module Categories.Category.Instance.Zero where | ||
|
||
open import Data.Empty using (⊥; ⊥-elim) | ||
open import Function renaming (id to idf) | ||
|
||
open import Categories.Category | ||
open import Categories.Functor | ||
open import Categories.Category.Instance.Cats | ||
import Categories.Object.Initial as Init | ||
|
||
-- Unlike for ⊤ being Terminal, Agda can't deduce these, need to be explicit | ||
module _ {o ℓ e : Level} where | ||
open Init (Cats o ℓ e) | ||
|
||
Zero : Category o ℓ e | ||
Zero = record | ||
{ Obj = Lift o ⊥ | ||
; _⇒_ = λ _ _ → Lift ℓ ⊥ | ||
; _≈_ = λ _ _ → Lift e ⊥ | ||
; id = λ { { lift () } } | ||
; _∘_ = λ a _ → a -- left-biased rather than strict | ||
; assoc = λ { {lift () } } | ||
; sym-assoc = λ { {lift () } } | ||
; identityˡ = λ { {()} } | ||
; identityʳ = λ { {()} } | ||
; identity² = λ { {()} } | ||
; ∘-resp-≈ = λ { () } | ||
; equiv = record | ||
{ refl = λ { {()} } | ||
; sym = idf | ||
; trans = λ a _ → a | ||
} | ||
} | ||
|
||
Zero-⊥ : Initial | ||
Zero-⊥ = record | ||
{ ⊥ = Zero | ||
; ⊥-is-initial = record | ||
{ ! = record | ||
{ F₀ = λ { (lift x) → ⊥-elim x } | ||
; F₁ = λ { (lift ()) } | ||
; identity = λ { {lift ()} } | ||
; homomorphism = λ { {lift ()} } | ||
; F-resp-≈ = λ { () } | ||
} | ||
; !-unique = λ f → record | ||
{ F⇒G = record { η = λ { () } ; commute = λ { () } ; sym-commute = λ { () } } | ||
; F⇐G = record { η = λ { () } ; commute = λ { () } ; sym-commute = λ { () } } | ||
; iso = λ { (lift ()) } | ||
} | ||
} | ||
} | ||
open import Categories.Category.Instance.Zero.Core {o} {ℓ} {e} public | ||
open import Categories.Category.Instance.Zero.Properties {o} {ℓ} {e} public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{-# OPTIONS --without-K --safe #-} | ||
|
||
module Categories.Category.Instance.Zero.Core {o ℓ e} where | ||
|
||
open import Categories.Category.Core using (Category) | ||
open import Data.Empty.Polymorphic using (⊥) | ||
|
||
open Category | ||
|
||
-- A level-polymorphic empty category | ||
Zero : Category o ℓ e | ||
Zero .Obj = ⊥ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{-# OPTIONS --without-K --safe #-} | ||
|
||
module Categories.Category.Instance.Zero.Properties {o ℓ e} where | ||
|
||
open import Data.Empty.Polymorphic using (⊥-elim) | ||
|
||
open import Categories.Category using (Category) | ||
open import Categories.Functor using (Functor) | ||
open import Categories.Category.Instance.Cats using (Cats) | ||
open import Categories.Category.Instance.Zero.Core using (Zero) | ||
open import Categories.NaturalTransformation.NaturalIsomorphism using (niHelper) | ||
open import Categories.Object.Initial (Cats o ℓ e) using (Initial; IsInitial) | ||
|
||
open Initial | ||
open IsInitial | ||
open Functor | ||
|
||
-- Unlike for ⊤ being Terminal, Agda can't deduce these, need to be explicit | ||
Zero-⊥ : Initial | ||
Zero-⊥ .⊥ = Zero | ||
Zero-⊥ .⊥-is-initial .! .F₀ () | ||
Zero-⊥ .⊥-is-initial .!-unique f = niHelper record | ||
{ η = λ() | ||
; η⁻¹ = λ() | ||
; commute = λ{ {()} } | ||
; iso = λ() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters