|
| 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