| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Instances of algebraic structures where the carrier is ⊤. In |
| 5 |
-- mathematics, this is usually called 0 (1 in the case of Monoid, Group). |
| 6 |
-- |
| 7 |
-- From monoids up, these are are zero-objects – i.e, both the initial |
| 8 |
-- and the terminal object in the relevant category. |
| 9 |
-- |
| 10 |
-- For structures without an identity element, the terminal algebra is |
| 11 |
-- *not* initial, because there is an instance of such a structure |
| 12 |
-- with an empty Carrier. Accordingly, such definitions are now deprecated |
| 13 |
-- in favour of those defined in `Algebra.Construct.Terminal`. |
| 14 |
------------------------------------------------------------------------ |
| 15 |
|
| 16 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 17 |
|
| 18 |
open import Level using (Level) |
| 19 |
|
| 20 |
module Algebra.Construct.Zero {c ℓ : Level} where |
| 21 |
|
| 22 |
open import Algebra.Bundles.Raw using (RawMagma) |
| 23 |
open import Algebra.Bundles using (Magma; Semigroup; Band) |
| 24 |
|
| 25 |
------------------------------------------------------------------------ |
| 26 |
-- Re-export those algebras which are both initial and terminal |
| 27 |
|
| 28 |
open import Algebra.Construct.Terminal public |
| 29 |
hiding (rawMagma; magma; semigroup; band) |
| 30 |
|
| 31 |
------------------------------------------------------------------------ |
| 32 |
-- DEPRECATED |
| 33 |
------------------------------------------------------------------------ |
| 34 |
-- Please use the new definitions re-exported from |
| 35 |
-- `Algebra.Construct.Terminal` as continuing support for the below is |
| 36 |
-- not guaranteed. |
| 37 |
|
| 38 |
-- Version 2.0 |
| 39 |
|
| 40 |
rawMagma : RawMagma c ℓ |
| 41 |
rawMagma = Algebra.Construct.Terminal.rawMagma |
| 42 |
|
| 43 |
{-# WARNING_ON_USAGE rawMagma |
| 44 |
"Warning: rawMagma was deprecated in v2.0. |
| 45 |
Please use Algebra.Construct.Terminal.rawMagma instead." |
| 46 |
#-} |
| 47 |
|
| 48 |
magma : Magma c ℓ |
| 49 |
magma = Algebra.Construct.Terminal.magma |
| 50 |
{-# WARNING_ON_USAGE magma |
| 51 |
"Warning: magma was deprecated in v2.0. |
| 52 |
Please use Algebra.Construct.Terminal.magma instead." |
| 53 |
#-} |
| 54 |
|
| 55 |
semigroup : Semigroup c ℓ |
| 56 |
semigroup = Algebra.Construct.Terminal.semigroup |
| 57 |
{-# WARNING_ON_USAGE semigroup |
| 58 |
"Warning: semigroup was deprecated in v2.0. |
| 59 |
Please use Algebra.Construct.Terminal.semigroup instead." |
| 60 |
#-} |
| 61 |
|
| 62 |
band : Band c ℓ |
| 63 |
band = Algebra.Construct.Terminal.band |
| 64 |
{-# WARNING_ON_USAGE semigroup |
| 65 |
"Warning: semigroup was deprecated in v2.0. |
| 66 |
Please use Algebra.Construct.Terminal.semigroup instead." |
| 67 |
#-} |