-
Notifications
You must be signed in to change notification settings - Fork 270
Expand file tree
/
Copy pathInitial.agda
More file actions
65 lines (47 loc) · 1.78 KB
/
Copy pathInitial.agda
File metadata and controls
65 lines (47 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
------------------------------------------------------------------------
-- The Agda standard library
--
-- The unique morphism from the initial object,
-- for each of the relevant categories. Since
-- `Semigroup` and `Band` are simply `Magma`s
-- satisfying additional properties, it suffices to
-- define the morphism on the underlying `RawMagma`.
------------------------------------------------------------------------
{-# OPTIONS --cubical-compatible --safe #-}
open import Level using (Level)
module Algebra.Morphism.Construct.Initial {c ℓ : Level} where
open import Algebra.Bundles.Raw using (RawMagma)
open import Algebra.Morphism.Structures
using (IsMagmaHomomorphism; IsMagmaMonomorphism)
open import Function.Definitions using (Congruent; Injective)
open import Relation.Binary.Core using (Rel)
open import Algebra.Construct.Initial {c} {ℓ}
private
variable
a m ℓm : Level
A : Set a
------------------------------------------------------------------------
-- The unique morphism
zero : ℤero.Carrier → A
zero ()
------------------------------------------------------------------------
-- Basic properties
module _ (≈ : Rel A ℓm) where
cong : Congruent ℤero._≈_ ≈ zero
cong {x = ()}
injective : Injective ℤero._≈_ ≈ zero
injective {x = ()}
------------------------------------------------------------------------
-- Morphism structures
module _ (M : RawMagma m ℓm) where
open RawMagma M using (_≈_)
isMagmaHomomorphism : IsMagmaHomomorphism rawMagma M zero
isMagmaHomomorphism = record
{ isRelHomomorphism = record { cong = cong _≈_ }
; homo = λ()
}
isMagmaMonomorphism : IsMagmaMonomorphism rawMagma M zero
isMagmaMonomorphism = record
{ isMagmaHomomorphism = isMagmaHomomorphism
; injective = injective _≈_
}