Skip to content

Commit 3628383

Browse files
authored
Add subgroups and submodules (#2852)
* Add subgroups and submodules * Let Agda fill in a record for me * Try different names for the underlying structure * Bimodule rather than module * style
1 parent e19a083 commit 3628383

File tree

3 files changed

+94
-0
lines changed

3 files changed

+94
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ Deprecated names
7979
New modules
8080
-----------
8181

82+
* `Algebra.Construct.Sub.Group` for the definition of subgroups.
83+
84+
* `Algebra.Module.Construct.Sub.Bimodule` for the definition of subbimodules.
85+
8286
* `Algebra.Properties.BooleanRing`.
8387

8488
* `Algebra.Properties.BooleanSemiring`.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
------------------------------------------------------------------------
2+
-- The Agda standard library
3+
--
4+
-- Definition of subgroups
5+
------------------------------------------------------------------------
6+
7+
{-# OPTIONS --safe --cubical-compatible #-}
8+
9+
open import Algebra.Bundles using (Group; RawGroup)
10+
11+
module Algebra.Construct.Sub.Group {c ℓ} (G : Group c ℓ) where
12+
13+
open import Algebra.Structures using (IsGroup)
14+
open import Algebra.Morphism.Structures using (IsGroupMonomorphism)
15+
import Algebra.Morphism.GroupMonomorphism as GroupMonomorphism
16+
open import Level using (suc; _⊔_)
17+
18+
private
19+
module G = Group G
20+
21+
record Subgroup c′ ℓ′ : Set (c ⊔ ℓ ⊔ suc (c′ ⊔ ℓ′)) where
22+
field
23+
domain : RawGroup c′ ℓ′
24+
25+
private
26+
module H = RawGroup domain
27+
28+
field
29+
ι : H.Carrier G.Carrier
30+
ι-monomorphism : IsGroupMonomorphism domain G.rawGroup ι
31+
32+
module ι = IsGroupMonomorphism ι-monomorphism
33+
34+
isGroup : IsGroup H._≈_ H._∙_ H.ε H._⁻¹
35+
isGroup = GroupMonomorphism.isGroup ι-monomorphism G.isGroup
36+
37+
group : Group _ _
38+
group = record { isGroup = isGroup }
39+
40+
open Group group public hiding (isGroup)
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
------------------------------------------------------------------------
2+
-- The Agda standard library
3+
--
4+
-- Definition of submodules
5+
------------------------------------------------------------------------
6+
7+
{-# OPTIONS --cubical-compatible --safe #-}
8+
9+
open import Algebra.Bundles using (Ring)
10+
open import Algebra.Module.Bundles using (Bimodule; RawBimodule)
11+
12+
module Algebra.Module.Construct.Sub.Bimodule
13+
{cr ℓr cs ℓs cm ℓm} {R : Ring cr ℓr} {S : Ring cs ℓs} (M : Bimodule R S cm ℓm)
14+
where
15+
16+
open import Algebra.Module.Structures using (IsBimodule)
17+
open import Algebra.Module.Morphism.Structures using (IsBimoduleMonomorphism)
18+
import Algebra.Module.Morphism.BimoduleMonomorphism as BimoduleMonomorphism
19+
open import Level using (suc; _⊔_)
20+
21+
private
22+
module R = Ring R
23+
module S = Ring S
24+
module M = Bimodule M
25+
26+
open import Algebra.Construct.Sub.Group M.+ᴹ-group
27+
28+
record Subbimodule cm′ ℓm′ : Set (cr ⊔ cs ⊔ cm ⊔ ℓm ⊔ suc (cm′ ⊔ ℓm′)) where
29+
field
30+
domain : RawBimodule R.Carrier S.Carrier cm′ ℓm′
31+
32+
private
33+
module N = RawBimodule domain
34+
35+
field
36+
ι : N.Carrierᴹ M.Carrierᴹ
37+
ι-monomorphism : IsBimoduleMonomorphism domain M.rawBimodule ι
38+
39+
module ι = IsBimoduleMonomorphism ι-monomorphism
40+
41+
isBimodule : IsBimodule R S N._≈ᴹ_ N._+ᴹ_ N.0ᴹ N.-ᴹ_ N._*ₗ_ N._*ᵣ_
42+
isBimodule = BimoduleMonomorphism.isBimodule ι-monomorphism R.isRing S.isRing M.isBimodule
43+
44+
bimodule : Bimodule R S _ _
45+
bimodule = record { isBimodule = isBimodule }
46+
47+
open Bimodule bimodule public hiding (isBimodule)
48+
49+
subgroup : Subgroup cm′ ℓm′
50+
subgroup = record { ι-monomorphism = ι.+ᴹ-isGroupMonomorphism }

0 commit comments

Comments
 (0)