88
99module Algebra.Module.Morphism.Construct.Composition where
1010
11- open import Algebra.Bundles
12- open import Algebra.Module.Bundles
11+ open import Algebra.Module.Bundles.Raw
1312open import Algebra.Module.Morphism.Structures
1413open import Algebra.Morphism.Construct.Composition
1514open import Function.Base using (_∘_)
1615import Function.Construct.Composition as Func
1716open import Level using (Level)
17+ open import Relation.Binary.Definitions using (Transitive)
1818
1919private
2020 variable
21- r ℓr s ℓs m₁ ℓm₁ m₂ ℓm₂ m₃ ℓm₃ : Level
21+ r s m₁ ℓm₁ m₂ ℓm₂ m₃ ℓm₃ : Level
2222
2323module _
24- {semiring : Semiring r ℓr}
25- {M₁ : LeftSemimodule semiring m₁ ℓm₁}
26- {M₂ : LeftSemimodule semiring m₂ ℓm₂}
27- {M₃ : LeftSemimodule semiring m₃ ℓm₃}
28- (open LeftSemimodule )
24+ {R : Set r}
25+ {M₁ : RawLeftSemimodule R m₁ ℓm₁}
26+ {M₂ : RawLeftSemimodule R m₂ ℓm₂}
27+ {M₃ : RawLeftSemimodule R m₃ ℓm₃}
28+ (open RawLeftSemimodule )
29+ (≈ᴹ₃-trans : Transitive (_≈ᴹ_ M₃))
2930 {f : Carrierᴹ M₁ → Carrierᴹ M₂}
3031 {g : Carrierᴹ M₂ → Carrierᴹ M₃}
3132 where
@@ -34,8 +35,8 @@ module _
3435 IsLeftSemimoduleHomomorphism M₂ M₃ g →
3536 IsLeftSemimoduleHomomorphism M₁ M₃ (g ∘ f)
3637 isLeftSemimoduleHomomorphism f-homo g-homo = record
37- { +ᴹ-isMonoidHomomorphism = isMonoidHomomorphism (≈ᴹ -trans M₃) F.+ᴹ-isMonoidHomomorphism G.+ᴹ-isMonoidHomomorphism
38- ; *ₗ-homo = λ r x → ≈ᴹ-trans M₃ (G.⟦⟧-cong (F.*ₗ-homo r x)) (G.*ₗ-homo r (f x))
38+ { +ᴹ-isMonoidHomomorphism = isMonoidHomomorphism ≈ᴹ₃ -trans F.+ᴹ-isMonoidHomomorphism G.+ᴹ-isMonoidHomomorphism
39+ ; *ₗ-homo = λ r x → ≈ᴹ₃ -trans (G.⟦⟧-cong (F.*ₗ-homo r x)) (G.*ₗ-homo r (f x))
3940 } where module F = IsLeftSemimoduleHomomorphism f-homo; module G = IsLeftSemimoduleHomomorphism g-homo
4041
4142 isLeftSemimoduleMonomorphism : IsLeftSemimoduleMonomorphism M₁ M₂ f →
@@ -55,11 +56,12 @@ module _
5556 } where module F = IsLeftSemimoduleIsomorphism f-iso; module G = IsLeftSemimoduleIsomorphism g-iso
5657
5758module _
58- {ring : Ring r ℓr}
59- {M₁ : LeftModule ring m₁ ℓm₁}
60- {M₂ : LeftModule ring m₂ ℓm₂}
61- {M₃ : LeftModule ring m₃ ℓm₃}
62- (open LeftModule )
59+ {R : Set r}
60+ {M₁ : RawLeftModule R m₁ ℓm₁}
61+ {M₂ : RawLeftModule R m₂ ℓm₂}
62+ {M₃ : RawLeftModule R m₃ ℓm₃}
63+ (open RawLeftModule )
64+ (≈ᴹ₃-trans : Transitive (_≈ᴹ_ M₃))
6365 {f : Carrierᴹ M₁ → Carrierᴹ M₂}
6466 {g : Carrierᴹ M₂ → Carrierᴹ M₃}
6567 where
@@ -68,8 +70,8 @@ module _
6870 IsLeftModuleHomomorphism M₂ M₃ g →
6971 IsLeftModuleHomomorphism M₁ M₃ (g ∘ f)
7072 isLeftModuleHomomorphism f-homo g-homo = record
71- { +ᴹ-isGroupHomomorphism = isGroupHomomorphism (≈ᴹ -trans M₃) F.+ᴹ-isGroupHomomorphism G.+ᴹ-isGroupHomomorphism
72- ; *ₗ-homo = λ r x → ≈ᴹ-trans M₃ (G.⟦⟧-cong (F.*ₗ-homo r x)) (G.*ₗ-homo r (f x))
73+ { +ᴹ-isGroupHomomorphism = isGroupHomomorphism ≈ᴹ₃ -trans F.+ᴹ-isGroupHomomorphism G.+ᴹ-isGroupHomomorphism
74+ ; *ₗ-homo = λ r x → ≈ᴹ₃ -trans (G.⟦⟧-cong (F.*ₗ-homo r x)) (G.*ₗ-homo r (f x))
7375 } where module F = IsLeftModuleHomomorphism f-homo; module G = IsLeftModuleHomomorphism g-homo
7476
7577 isLeftModuleMonomorphism : IsLeftModuleMonomorphism M₁ M₂ f →
@@ -89,11 +91,12 @@ module _
8991 } where module F = IsLeftModuleIsomorphism f-iso; module G = IsLeftModuleIsomorphism g-iso
9092
9193module _
92- {semiring : Semiring r ℓr}
93- {M₁ : RightSemimodule semiring m₁ ℓm₁}
94- {M₂ : RightSemimodule semiring m₂ ℓm₂}
95- {M₃ : RightSemimodule semiring m₃ ℓm₃}
96- (open RightSemimodule )
94+ {R : Set r}
95+ {M₁ : RawRightSemimodule R m₁ ℓm₁}
96+ {M₂ : RawRightSemimodule R m₂ ℓm₂}
97+ {M₃ : RawRightSemimodule R m₃ ℓm₃}
98+ (open RawRightSemimodule )
99+ (≈ᴹ₃-trans : Transitive (_≈ᴹ_ M₃))
97100 {f : Carrierᴹ M₁ → Carrierᴹ M₂}
98101 {g : Carrierᴹ M₂ → Carrierᴹ M₃}
99102 where
@@ -102,8 +105,8 @@ module _
102105 IsRightSemimoduleHomomorphism M₂ M₃ g →
103106 IsRightSemimoduleHomomorphism M₁ M₃ (g ∘ f)
104107 isRightSemimoduleHomomorphism f-homo g-homo = record
105- { +ᴹ-isMonoidHomomorphism = isMonoidHomomorphism (≈ᴹ -trans M₃) F.+ᴹ-isMonoidHomomorphism G.+ᴹ-isMonoidHomomorphism
106- ; *ᵣ-homo = λ r x → ≈ᴹ-trans M₃ (G.⟦⟧-cong (F.*ᵣ-homo r x)) (G.*ᵣ-homo r (f x))
108+ { +ᴹ-isMonoidHomomorphism = isMonoidHomomorphism ≈ᴹ₃ -trans F.+ᴹ-isMonoidHomomorphism G.+ᴹ-isMonoidHomomorphism
109+ ; *ᵣ-homo = λ r x → ≈ᴹ₃ -trans (G.⟦⟧-cong (F.*ᵣ-homo r x)) (G.*ᵣ-homo r (f x))
107110 } where module F = IsRightSemimoduleHomomorphism f-homo; module G = IsRightSemimoduleHomomorphism g-homo
108111
109112 isRightSemimoduleMonomorphism : IsRightSemimoduleMonomorphism M₁ M₂ f →
@@ -123,11 +126,12 @@ module _
123126 } where module F = IsRightSemimoduleIsomorphism f-iso; module G = IsRightSemimoduleIsomorphism g-iso
124127
125128module _
126- {ring : Ring r ℓr}
127- {M₁ : RightModule ring m₁ ℓm₁}
128- {M₂ : RightModule ring m₂ ℓm₂}
129- {M₃ : RightModule ring m₃ ℓm₃}
130- (open RightModule )
129+ {R : Set r}
130+ {M₁ : RawRightModule R m₁ ℓm₁}
131+ {M₂ : RawRightModule R m₂ ℓm₂}
132+ {M₃ : RawRightModule R m₃ ℓm₃}
133+ (open RawRightModule )
134+ (≈ᴹ₃-trans : Transitive (_≈ᴹ_ M₃))
131135 {f : Carrierᴹ M₁ → Carrierᴹ M₂}
132136 {g : Carrierᴹ M₂ → Carrierᴹ M₃}
133137 where
@@ -136,8 +140,8 @@ module _
136140 IsRightModuleHomomorphism M₂ M₃ g →
137141 IsRightModuleHomomorphism M₁ M₃ (g ∘ f)
138142 isRightModuleHomomorphism f-homo g-homo = record
139- { +ᴹ-isGroupHomomorphism = isGroupHomomorphism (≈ᴹ -trans M₃) F.+ᴹ-isGroupHomomorphism G.+ᴹ-isGroupHomomorphism
140- ; *ᵣ-homo = λ r x → ≈ᴹ-trans M₃ (G.⟦⟧-cong (F.*ᵣ-homo r x)) (G.*ᵣ-homo r (f x))
143+ { +ᴹ-isGroupHomomorphism = isGroupHomomorphism ≈ᴹ₃ -trans F.+ᴹ-isGroupHomomorphism G.+ᴹ-isGroupHomomorphism
144+ ; *ᵣ-homo = λ r x → ≈ᴹ₃ -trans (G.⟦⟧-cong (F.*ᵣ-homo r x)) (G.*ᵣ-homo r (f x))
141145 } where module F = IsRightModuleHomomorphism f-homo; module G = IsRightModuleHomomorphism g-homo
142146
143147 isRightModuleMonomorphism : IsRightModuleMonomorphism M₁ M₂ f →
@@ -157,12 +161,13 @@ module _
157161 } where module F = IsRightModuleIsomorphism f-iso; module G = IsRightModuleIsomorphism g-iso
158162
159163module _
160- {R-semiring : Semiring r ℓr}
161- {S-semiring : Semiring s ℓs}
162- {M₁ : Bisemimodule R-semiring S-semiring m₁ ℓm₁}
163- {M₂ : Bisemimodule R-semiring S-semiring m₂ ℓm₂}
164- {M₃ : Bisemimodule R-semiring S-semiring m₃ ℓm₃}
165- (open Bisemimodule )
164+ {R : Set r}
165+ {S : Set s}
166+ {M₁ : RawBisemimodule R S m₁ ℓm₁}
167+ {M₂ : RawBisemimodule R S m₂ ℓm₂}
168+ {M₃ : RawBisemimodule R S m₃ ℓm₃}
169+ (open RawBisemimodule )
170+ (≈ᴹ₃-trans : Transitive (_≈ᴹ_ M₃))
166171 {f : Carrierᴹ M₁ → Carrierᴹ M₂}
167172 {g : Carrierᴹ M₂ → Carrierᴹ M₃}
168173 where
@@ -171,9 +176,9 @@ module _
171176 IsBisemimoduleHomomorphism M₂ M₃ g →
172177 IsBisemimoduleHomomorphism M₁ M₃ (g ∘ f)
173178 isBisemimoduleHomomorphism f-homo g-homo = record
174- { +ᴹ-isMonoidHomomorphism = isMonoidHomomorphism (≈ᴹ -trans M₃) F.+ᴹ-isMonoidHomomorphism G.+ᴹ-isMonoidHomomorphism
175- ; *ₗ-homo = λ r x → ≈ᴹ-trans M₃ (G.⟦⟧-cong (F.*ₗ-homo r x)) (G.*ₗ-homo r (f x))
176- ; *ᵣ-homo = λ r x → ≈ᴹ-trans M₃ (G.⟦⟧-cong (F.*ᵣ-homo r x)) (G.*ᵣ-homo r (f x))
179+ { +ᴹ-isMonoidHomomorphism = isMonoidHomomorphism ≈ᴹ₃ -trans F.+ᴹ-isMonoidHomomorphism G.+ᴹ-isMonoidHomomorphism
180+ ; *ₗ-homo = λ r x → ≈ᴹ₃ -trans (G.⟦⟧-cong (F.*ₗ-homo r x)) (G.*ₗ-homo r (f x))
181+ ; *ᵣ-homo = λ r x → ≈ᴹ₃ -trans (G.⟦⟧-cong (F.*ᵣ-homo r x)) (G.*ᵣ-homo r (f x))
177182 } where module F = IsBisemimoduleHomomorphism f-homo; module G = IsBisemimoduleHomomorphism g-homo
178183
179184 isBisemimoduleMonomorphism : IsBisemimoduleMonomorphism M₁ M₂ f →
@@ -193,12 +198,13 @@ module _
193198 } where module F = IsBisemimoduleIsomorphism f-iso; module G = IsBisemimoduleIsomorphism g-iso
194199
195200module _
196- {R-ring : Ring r ℓr}
197- {S-ring : Ring s ℓs}
198- {M₁ : Bimodule R-ring S-ring m₁ ℓm₁}
199- {M₂ : Bimodule R-ring S-ring m₂ ℓm₂}
200- {M₃ : Bimodule R-ring S-ring m₃ ℓm₃}
201- (open Bimodule )
201+ {R : Set r}
202+ {S : Set s}
203+ {M₁ : RawBimodule R S m₁ ℓm₁}
204+ {M₂ : RawBimodule R S m₂ ℓm₂}
205+ {M₃ : RawBimodule R S m₃ ℓm₃}
206+ (open RawBimodule )
207+ (≈ᴹ₃-trans : Transitive (_≈ᴹ_ M₃))
202208 {f : Carrierᴹ M₁ → Carrierᴹ M₂}
203209 {g : Carrierᴹ M₂ → Carrierᴹ M₃}
204210 where
@@ -207,9 +213,9 @@ module _
207213 IsBimoduleHomomorphism M₂ M₃ g →
208214 IsBimoduleHomomorphism M₁ M₃ (g ∘ f)
209215 isBimoduleHomomorphism f-homo g-homo = record
210- { +ᴹ-isGroupHomomorphism = isGroupHomomorphism (≈ᴹ -trans M₃) F.+ᴹ-isGroupHomomorphism G.+ᴹ-isGroupHomomorphism
211- ; *ₗ-homo = λ r x → ≈ᴹ-trans M₃ (G.⟦⟧-cong (F.*ₗ-homo r x)) (G.*ₗ-homo r (f x))
212- ; *ᵣ-homo = λ r x → ≈ᴹ-trans M₃ (G.⟦⟧-cong (F.*ᵣ-homo r x)) (G.*ᵣ-homo r (f x))
216+ { +ᴹ-isGroupHomomorphism = isGroupHomomorphism ≈ᴹ₃ -trans F.+ᴹ-isGroupHomomorphism G.+ᴹ-isGroupHomomorphism
217+ ; *ₗ-homo = λ r x → ≈ᴹ₃ -trans (G.⟦⟧-cong (F.*ₗ-homo r x)) (G.*ₗ-homo r (f x))
218+ ; *ᵣ-homo = λ r x → ≈ᴹ₃ -trans (G.⟦⟧-cong (F.*ᵣ-homo r x)) (G.*ᵣ-homo r (f x))
213219 } where module F = IsBimoduleHomomorphism f-homo; module G = IsBimoduleHomomorphism g-homo
214220
215221 isBimoduleMonomorphism : IsBimoduleMonomorphism M₁ M₂ f →
@@ -229,11 +235,12 @@ module _
229235 } where module F = IsBimoduleIsomorphism f-iso; module G = IsBimoduleIsomorphism g-iso
230236
231237module _
232- {commutativeSemiring : CommutativeSemiring r ℓr}
233- {M₁ : Semimodule commutativeSemiring m₁ ℓm₁}
234- {M₂ : Semimodule commutativeSemiring m₂ ℓm₂}
235- {M₃ : Semimodule commutativeSemiring m₃ ℓm₃}
236- (open Semimodule )
238+ {R : Set r}
239+ {M₁ : RawSemimodule R m₁ ℓm₁}
240+ {M₂ : RawSemimodule R m₂ ℓm₂}
241+ {M₃ : RawSemimodule R m₃ ℓm₃}
242+ (open RawSemimodule )
243+ (≈ᴹ₃-trans : Transitive (_≈ᴹ_ M₃))
237244 {f : Carrierᴹ M₁ → Carrierᴹ M₂}
238245 {g : Carrierᴹ M₂ → Carrierᴹ M₃}
239246 where
@@ -242,7 +249,7 @@ module _
242249 IsSemimoduleHomomorphism M₂ M₃ g →
243250 IsSemimoduleHomomorphism M₁ M₃ (g ∘ f)
244251 isSemimoduleHomomorphism f-homo g-homo = record
245- { isBisemimoduleHomomorphism = isBisemimoduleHomomorphism F.isBisemimoduleHomomorphism G.isBisemimoduleHomomorphism
252+ { isBisemimoduleHomomorphism = isBisemimoduleHomomorphism ≈ᴹ₃-trans F.isBisemimoduleHomomorphism G.isBisemimoduleHomomorphism
246253 } where module F = IsSemimoduleHomomorphism f-homo; module G = IsSemimoduleHomomorphism g-homo
247254
248255 isSemimoduleMonomorphism : IsSemimoduleMonomorphism M₁ M₂ f →
@@ -262,11 +269,12 @@ module _
262269 } where module F = IsSemimoduleIsomorphism f-iso; module G = IsSemimoduleIsomorphism g-iso
263270
264271module _
265- {commutativeRing : CommutativeRing r ℓr}
266- {M₁ : Module commutativeRing m₁ ℓm₁}
267- {M₂ : Module commutativeRing m₂ ℓm₂}
268- {M₃ : Module commutativeRing m₃ ℓm₃}
269- (open Module )
272+ {R : Set r}
273+ {M₁ : RawModule R m₁ ℓm₁}
274+ {M₂ : RawModule R m₂ ℓm₂}
275+ {M₃ : RawModule R m₃ ℓm₃}
276+ (open RawModule )
277+ (≈ᴹ₃-trans : Transitive (_≈ᴹ_ M₃))
270278 {f : Carrierᴹ M₁ → Carrierᴹ M₂}
271279 {g : Carrierᴹ M₂ → Carrierᴹ M₃}
272280 where
@@ -275,7 +283,7 @@ module _
275283 IsModuleHomomorphism M₂ M₃ g →
276284 IsModuleHomomorphism M₁ M₃ (g ∘ f)
277285 isModuleHomomorphism f-homo g-homo = record
278- { isBimoduleHomomorphism = isBimoduleHomomorphism F.isBimoduleHomomorphism G.isBimoduleHomomorphism
286+ { isBimoduleHomomorphism = isBimoduleHomomorphism ≈ᴹ₃-trans F.isBimoduleHomomorphism G.isBimoduleHomomorphism
279287 } where module F = IsModuleHomomorphism f-homo; module G = IsModuleHomomorphism g-homo
280288
281289 isModuleMonomorphism : IsModuleMonomorphism M₁ M₂ f →
0 commit comments