Skip to content

Commit 669ccc7

Browse files
committed
Adds Algebra.Morphism.Construct.DirectProduct
1 parent 9bf80c4 commit 669ccc7

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ New modules
155155

156156
* `Algebra.Module.Properties.{Bimodule|LeftModule|RightModule}`.
157157

158+
* `Algebra.Morphism.Construct.DirectProduct`.
159+
158160
* `Data.List.Base.{and|or|any|all}` have been lifted out into `Data.Bool.ListAction`.
159161

160162
* `Data.List.Base.{sum|product}` and their properties have been lifted out into `Data.Nat.ListAction` and `Data.Nat.ListAction.Properties`.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
------------------------------------------------------------------------
2+
-- The Agda standard library
3+
--
4+
-- The projection morphisms for alegraic structures arising from the
5+
-- direct product construction
6+
------------------------------------------------------------------------
7+
8+
{-# OPTIONS --safe --cubical-compatible #-}
9+
10+
module Algebra.Morphism.Construct.DirectProduct where
11+
12+
open import Algebra.Bundles
13+
open import Algebra.Morphism.Structures
14+
using ( module MagmaMorphisms
15+
; module MonoidMorphisms
16+
)
17+
open import Data.Product
18+
open import Level using (Level)
19+
open import Relation.Binary.Definitions using (Reflexive)
20+
open import Algebra.Construct.DirectProduct
21+
22+
private
23+
variable
24+
c ℓ : Level
25+
26+
------------------------------------------------------------------------
27+
-- Magmas
28+
29+
module _ (M N : RawMagma c ℓ) (open RawMagma M) (refl : Reflexive _≈_) where
30+
open MagmaMorphisms (rawMagma M N) M
31+
32+
isMagmaHomomorphism-proj₁ : IsMagmaHomomorphism proj₁
33+
isMagmaHomomorphism-proj₁ = record
34+
{ isRelHomomorphism = record { cong = λ {x} {y} z z .proj₁ }
35+
; homo = λ _ _ refl
36+
}
37+
38+
module _ (M N : RawMagma c ℓ) (open RawMagma N) (refl : Reflexive _≈_) where
39+
open MagmaMorphisms (rawMagma M N) N
40+
41+
isMagmaHomomorphism-proj₂ : IsMagmaHomomorphism proj₂
42+
isMagmaHomomorphism-proj₂ = record
43+
{ isRelHomomorphism = record { cong = λ {x} {y} z z .proj₂ }
44+
; homo = λ _ _ refl
45+
}
46+
47+
------------------------------------------------------------------------
48+
-- Monoids
49+
50+
module _ (M N : RawMonoid c ℓ) (open RawMonoid M) (refl : Reflexive _≈_) where
51+
open MonoidMorphisms (rawMonoid M N) M
52+
53+
isMonoidHomomorphism-proj₁ : IsMonoidHomomorphism proj₁
54+
isMonoidHomomorphism-proj₁ = record
55+
{ isMagmaHomomorphism = isMagmaHomomorphism-proj₁ _ _ refl
56+
; ε-homo = refl
57+
}
58+
59+
module _ (M N : RawMonoid c ℓ) (open RawMonoid N) (refl : Reflexive _≈_) where
60+
open MonoidMorphisms (rawMonoid M N) N
61+
62+
isMonoidHomomorphism-proj₂ : IsMonoidHomomorphism proj₂
63+
isMonoidHomomorphism-proj₂ = record
64+
{ isMagmaHomomorphism = isMagmaHomomorphism-proj₂ _ _ refl
65+
; ε-homo = refl
66+
}

0 commit comments

Comments
 (0)