Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ Deprecated names
New modules
-----------

* `Algebra.Construct.Sub.Group` for the definition of subgroups.

* `Algebra.Module.Construct.Sub.Module` for the definition of submodules.

* `Algebra.Properties.BooleanRing`.

* `Algebra.Properties.BooleanSemiring`.
Expand Down
40 changes: 40 additions & 0 deletions src/Algebra/Construct/Sub/Group.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
------------------------------------------------------------------------
-- The Agda standard library
--
-- Definition of subgroups
------------------------------------------------------------------------

{-# OPTIONS --safe --cubical-compatible #-}

open import Algebra.Bundles using (Group; RawGroup)

module Algebra.Construct.Sub.Group {c ℓ} (G : Group c ℓ) where

private
module G = Group G

open import Algebra.Structures using (IsGroup)
open import Algebra.Morphism.Structures using (IsGroupMonomorphism)
import Algebra.Morphism.GroupMonomorphism as GroupMonomorphism
open import Level using (suc; _⊔_)

record Subgroup c′ ℓ′ : Set (c ⊔ ℓ ⊔ suc (c′ ⊔ ℓ′)) where
field
Sub : RawGroup c′ ℓ′
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the name Algebra.Construct.Sub.* is fine, even good. I think the name Sub as a field name is not.

group ? Because it is a group, it has an independent existing as a group, and acquires a new one when inserted into this record.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm willing to change the name but I don't like the name group - there's already another group lurking in the background and I'm worried they'll be confused

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair. I'll try to come up with other suggestions. (I did not propose rawgroup because I dislike that quite a bit myself.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking what I actually wrote, I use group for the embellishment of Sub with laws


private
module Sub = RawGroup Sub

field
ι : Sub.Carrier → G.Carrier
ι-monomorphism : IsGroupMonomorphism Sub G.rawGroup ι

module ι = IsGroupMonomorphism ι-monomorphism

isGroup : IsGroup Sub._≈_ Sub._∙_ Sub.ε Sub._⁻¹
isGroup = GroupMonomorphism.isGroup ι-monomorphism G.isGroup

group : Group _ _
group = record { isGroup = isGroup }

open Group group public hiding (isGroup)
50 changes: 50 additions & 0 deletions src/Algebra/Module/Construct/Sub/Module.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
------------------------------------------------------------------------
-- The Agda standard library
--
-- Definition of submodules
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}

open import Algebra.Bundles using (CommutativeRing)
open import Algebra.Module.Bundles using (Module; RawModule)

module Algebra.Module.Construct.Sub.Module {c ℓ cm ℓm} {R : CommutativeRing c ℓ} (M : Module R cm ℓm) where
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've realised that later on in my development of modular arithmetic, I don't want sub modules per se, but sub R-R-bimodules (I don't want to assume that R is commutative). Or possibly sub left (eq. right) modules.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm... but that could be added downstream, or else (easily?) as part of this one?


private
module R = CommutativeRing R
module M = Module M

open import Algebra.Construct.Sub.Group M.+ᴹ-group
open import Algebra.Module.Structures using (IsModule)
open import Algebra.Module.Morphism.Structures using (IsModuleMonomorphism)
import Algebra.Module.Morphism.ModuleMonomorphism as ModuleMonomorphism
open import Level using (suc; _⊔_)

record Submodule cm′ ℓm′ : Set (c ⊔ cm ⊔ ℓm ⊔ suc (cm′ ⊔ ℓm′)) where
field
Sub : RawModule R.Carrier cm′ ℓm′
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in a similar vein, I would want module, but that can't work. moduleOn, since it is parametrized?


private
module Sub = RawModule Sub

field
ι : Sub.Carrierᴹ → M.Carrierᴹ
ι-monomorphism : IsModuleMonomorphism Sub M.rawModule ι

module ι = IsModuleMonomorphism ι-monomorphism

isModule : IsModule R Sub._≈ᴹ_ Sub._+ᴹ_ Sub.0ᴹ Sub.-ᴹ_ Sub._*ₗ_ Sub._*ᵣ_
isModule = ModuleMonomorphism.isModule ι-monomorphism R.isCommutativeRing M.isModule

⟨module⟩ : Module R _ _
⟨module⟩ = record { isModule = isModule }

open Module ⟨module⟩ public hiding (isModule)

subgroup : Subgroup cm′ ℓm′
subgroup = record
{ Sub = Sub.+ᴹ-rawGroup
; ι = ι
; ι-monomorphism = ι.+ᴹ-isGroupMonomorphism
}