| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Properties of a monomorphism between semimodules |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --safe --cubical-compatible #-} |
| 8 |
|
| 9 |
open import Algebra.Module.Bundles.Raw using (RawSemimodule) |
| 10 |
open import Algebra.Module.Morphism.Structures using (IsSemimoduleMonomorphism) |
| 11 |
|
| 12 |
module Algebra.Module.Morphism.SemimoduleMonomorphism |
| 13 |
{r a b ℓ₁ ℓ₂} {R : Set r} {M : RawSemimodule R a ℓ₁} {N : RawSemimodule R b ℓ₂} {⟦_⟧} |
| 14 |
(isSemimoduleMonomorphism : IsSemimoduleMonomorphism M N ⟦_⟧) |
| 15 |
where |
| 16 |
|
| 17 |
open IsSemimoduleMonomorphism isSemimoduleMonomorphism |
| 18 |
private |
| 19 |
module M = RawSemimodule M |
| 20 |
module N = RawSemimodule N |
| 21 |
|
| 22 |
open import Algebra.Bundles using (CommutativeSemiring) |
| 23 |
open import Algebra.Core using (Op₂) |
| 24 |
import Algebra.Module.Definitions.Bi.Simultaneous as SimulDefs |
| 25 |
open import Algebra.Module.Structures using (IsSemimodule) |
| 26 |
open import Algebra.Structures using (IsCommutativeSemiring; IsMagma) |
| 27 |
open import Function.Base using (flip; _$_) |
| 28 |
open import Relation.Binary.Core using (Rel) |
| 29 |
import Relation.Binary.Reasoning.Setoid as SetoidReasoning |
| 30 |
|
| 31 |
------------------------------------------------------------------------ |
| 32 |
-- Re-exports |
| 33 |
|
| 34 |
open import Algebra.Module.Morphism.BisemimoduleMonomorphism isBisemimoduleMonomorphism public |
| 35 |
|
| 36 |
------------------------------------------------------------------------ |
| 37 |
-- Properties |
| 38 |
|
| 39 |
module _ (+ᴹ-isMagma : IsMagma N._≈ᴹ_ N._+ᴹ_) where |
| 40 |
open IsMagma +ᴹ-isMagma |
| 41 |
using (setoid) |
| 42 |
renaming (∙-cong to +ᴹ-cong) |
| 43 |
open SetoidReasoning setoid |
| 44 |
|
| 45 |
private |
| 46 |
module MDefs = SimulDefs R M._≈ᴹ_ |
| 47 |
module NDefs = SimulDefs R N._≈ᴹ_ |
| 48 |
|
| 49 |
*ₗ-*ᵣ-coincident : NDefs.Coincident N._*ₗ_ N._*ᵣ_ → MDefs.Coincident M._*ₗ_ M._*ᵣ_ |
| 50 |
*ₗ-*ᵣ-coincident *ₗ-*ᵣ-coincident x m = injective $ begin |
| 51 |
⟦ x M.*ₗ m ⟧ ≈⟨ *ₗ-homo x m ⟩ |
| 52 |
x N.*ₗ ⟦ m ⟧ ≈⟨ *ₗ-*ᵣ-coincident x ⟦ m ⟧ ⟩ |
| 53 |
⟦ m ⟧ N.*ᵣ x ≈˘⟨ *ᵣ-homo x m ⟩ |
| 54 |
⟦ m M.*ᵣ x ⟧ ∎ |
| 55 |
|
| 56 |
------------------------------------------------------------------------ |
| 57 |
-- Structures |
| 58 |
|
| 59 |
module _ {ℓr} {_≈_ : Rel R ℓr} {_+_ _*_ 0# 1#} (R-isCommutativeSemiring : IsCommutativeSemiring _≈_ _+_ _*_ 0# 1#) where |
| 60 |
|
| 61 |
private |
| 62 |
R-commutativeSemiring : CommutativeSemiring _ _ |
| 63 |
R-commutativeSemiring = record { isCommutativeSemiring = R-isCommutativeSemiring } |
| 64 |
|
| 65 |
open IsCommutativeSemiring R-isCommutativeSemiring |
| 66 |
|
| 67 |
isSemimodule |
| 68 |
: IsSemimodule R-commutativeSemiring N._≈ᴹ_ N._+ᴹ_ N.0ᴹ N._*ₗ_ N._*ᵣ_ |
| 69 |
→ IsSemimodule R-commutativeSemiring M._≈ᴹ_ M._+ᴹ_ M.0ᴹ M._*ₗ_ M._*ᵣ_ |
| 70 |
isSemimodule isSemimodule = record |
| 71 |
{ isBisemimodule = isBisemimodule isSemiring isSemiring NN.isBisemimodule |
| 72 |
; *ₗ-*ᵣ-coincident = *ₗ-*ᵣ-coincident NN.+ᴹ-isMagma NN.*ₗ-*ᵣ-coincident |
| 73 |
} |
| 74 |
where |
| 75 |
module NN = IsSemimodule isSemimodule |