-
Notifications
You must be signed in to change notification settings - Fork 260
[ add ] Centre of a Group etc.
#2863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
e2ff677
refactor: alternative to #2852 and #2854
jamesmckinna f702f82
refactor: alternative to #2852 and #2854
jamesmckinna bd5cfee
add: sub-`Bimodule`s
jamesmckinna d3d6797
fix: whitespace
jamesmckinna c05773b
add: `Ideal`s and quotients of `Ring`s
jamesmckinna b707d83
fix: tidy up
jamesmckinna 7ad2b22
add: `Center` of a `Group`
jamesmckinna b50f1d1
add: `Center` defines a `NormalSubgroup`
jamesmckinna 78404b8
refactor: make less visible!
jamesmckinna e321650
fix: layout of `record`s
jamesmckinna c29e7d7
fix: tighten imports
jamesmckinna b9e725a
refactor: simplify throughout, making clear the relationship with `No…
jamesmckinna f09f35f
add: definition of `Central`
jamesmckinna 03c7324
refactor: use `Central`; tweak exports
jamesmckinna cc09919
add: `Semigroup`
jamesmckinna a34d9dc
add: `Magma` and `Monoid`
jamesmckinna 6acb547
refactor: via the hierarchy
jamesmckinna bd7f7ca
tidy up
jamesmckinna 9eb49f1
fix: `Quotient`s by appropriate objects
jamesmckinna 806b220
fix: improve import/export?
jamesmckinna 2222d28
fix: improve export structure; isolate `∙-comm` at the bootom of the …
jamesmckinna e5f176e
fix: header comments
jamesmckinna dcbdf8e
move: `∙-comm` to `Magma`
jamesmckinna d3cac94
reconsider: public exports
jamesmckinna e6bd8ea
reconsider: public exports
jamesmckinna File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| ------------------------------------------------------------------------ | ||
| -- The Agda standard library | ||
| -- | ||
| -- Definition of Z[ G ] the centre of a Group G | ||
| ------------------------------------------------------------------------ | ||
|
|
||
| {-# OPTIONS --safe --cubical-compatible #-} | ||
|
|
||
| open import Algebra.Bundles using (AbelianGroup; Group; RawGroup; RawMonoid) | ||
|
|
||
| module Algebra.Construct.Centre.Group {c ℓ} (G : Group c ℓ) where | ||
|
|
||
| import Algebra.Construct.Centre.Monoid as Centre | ||
| open import Algebra.Core using (Op₁) | ||
| open import Algebra.Morphism.Structures using (IsGroupMonomorphism) | ||
| open import Function.Base using (id; _∘_; const; _$_) | ||
| import Relation.Binary.Reasoning.Setoid as ≈-Reasoning | ||
|
|
||
| open import Algebra.Construct.Sub.Group.Normal G using (NormalSubgroup) | ||
| open import Algebra.Properties.Group G using (∙-cancelʳ) | ||
|
|
||
| private | ||
| module G = Group G | ||
| module Z = Centre G.monoid | ||
|
|
||
|
|
||
| ------------------------------------------------------------------------ | ||
| -- Definition | ||
|
|
||
| open Z public | ||
| using (Center; ι; central; ∙-comm) | ||
| hiding (module ι) | ||
|
|
||
| _⁻¹ : Op₁ Center | ||
| g ⁻¹ = record | ||
| { ι = ι g G.⁻¹ | ||
| ; central = λ k → ∙-cancelʳ (ι g) _ _ $ begin | ||
| (ι g G.⁻¹ G.∙ k) G.∙ (ι g) ≈⟨ G.assoc _ _ _ ⟩ | ||
| ι g G.⁻¹ G.∙ (k G.∙ ι g) ≈⟨ G.∙-congˡ $ central g k ⟨ | ||
| ι g G.⁻¹ G.∙ (ι g G.∙ k) ≈⟨ G.assoc _ _ _ ⟨ | ||
| (ι g G.⁻¹ G.∙ ι g) G.∙ k ≈⟨ G.∙-congʳ $ G.inverseˡ _ ⟩ | ||
| G.ε G.∙ k ≈⟨ central Z.ε k ⟩ | ||
| k G.∙ G.ε ≈⟨ G.∙-congˡ $ G.inverseˡ _ ⟨ | ||
| k G.∙ (ι g G.⁻¹ G.∙ ι g) ≈⟨ G.assoc _ _ _ ⟨ | ||
| (k G.∙ ι g G.⁻¹) G.∙ (ι g) ∎ | ||
| } where open ≈-Reasoning G.setoid | ||
|
|
||
| domain : RawGroup _ _ | ||
| domain = record { RawMonoid Z.domain; _⁻¹ = _⁻¹ } | ||
|
|
||
| ι-isGroupMonomorphism : IsGroupMonomorphism domain _ _ | ||
| ι-isGroupMonomorphism = record | ||
| { isGroupHomomorphism = record | ||
| { isMonoidHomomorphism = Z.ι.isMonoidHomomorphism | ||
| ; ⁻¹-homo = λ _ → G.refl | ||
| } | ||
| ; injective = id | ||
| } | ||
|
|
||
|
|
||
| ------------------------------------------------------------------------ | ||
| -- Public exports | ||
|
|
||
| module ι = IsGroupMonomorphism ι-isGroupMonomorphism | ||
|
|
||
| normalSubgroup : NormalSubgroup _ _ | ||
| normalSubgroup = record | ||
| { subgroup = record { ι-monomorphism = ι-isGroupMonomorphism } | ||
| ; isNormal = record | ||
| { conjugate = const | ||
| ; normal = central | ||
| } | ||
| } | ||
|
|
||
| open NormalSubgroup normalSubgroup public | ||
| using (group) | ||
|
|
||
| abelianGroup : AbelianGroup _ _ | ||
| abelianGroup = record | ||
| { isAbelianGroup = record | ||
| { isGroup = isGroup | ||
| ; comm = ∙-comm | ||
| } | ||
| } where open Group group using (isGroup) | ||
|
|
||
| Z[_] = abelianGroup | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| ------------------------------------------------------------------------ | ||
| -- The Agda standard library | ||
| -- | ||
| -- Definition of the centre of a Magma | ||
| -- | ||
| -- NB this doesn't make sense a priori, because in the absence of | ||
| -- associativity, it's not possible to define even a Magma operation | ||
| -- on the Center type defined below, as underlying Carrier. | ||
| -- | ||
| -- Yet a Magma *is* sufficient to define such a type, and thus can be | ||
| -- inherited up through the whole `Algebra.Construct.Centre.X` hierarchy. | ||
| ------------------------------------------------------------------------ | ||
|
|
||
| {-# OPTIONS --safe --cubical-compatible #-} | ||
|
|
||
| open import Algebra.Bundles using (Magma) | ||
|
|
||
| module Algebra.Construct.Centre.Magma {c ℓ} (G : Magma c ℓ) where | ||
|
|
||
| open import Algebra.Core using (Op₂) | ||
| open import Algebra.Definitions using (Central) | ||
| open import Function.Base using (id; _on_) | ||
| open import Level using (_⊔_) | ||
| open import Relation.Binary.Core using (Rel) | ||
| open import Relation.Binary.Morphism.Structures | ||
| using (IsRelHomomorphism; IsRelMonomorphism) | ||
|
|
||
| private | ||
| module G = Magma G | ||
|
|
||
|
|
||
| ------------------------------------------------------------------------ | ||
| -- Definition | ||
|
|
||
| record Center : Set (c ⊔ ℓ) where | ||
| field | ||
| ι : G.Carrier | ||
| central : Central G._≈_ G._∙_ ι | ||
|
|
||
| open Center public | ||
|
|
||
| _≈_ : Rel Center _ | ||
| _≈_ = G._≈_ on ι | ||
|
|
||
| ι-isRelHomomorphism : IsRelHomomorphism _≈_ G._≈_ ι | ||
| ι-isRelHomomorphism = record { cong = id } | ||
|
|
||
| ι-isRelMonomorphism : IsRelMonomorphism _≈_ _ _ | ||
| ι-isRelMonomorphism = record | ||
| { isHomomorphism = ι-isRelHomomorphism | ||
| ; injective = id | ||
| } | ||
|
|
||
| module ι = IsRelMonomorphism ι-isRelMonomorphism | ||
|
|
||
| ∙-comm : ∀ g h → ι g G.∙ ι h G.≈ ι h G.∙ ι g | ||
| ∙-comm g h = central g (ι h) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| ------------------------------------------------------------------------ | ||
| -- The Agda standard library | ||
| -- | ||
| -- Definition of Z[ G ] the centre of a Monoid G | ||
| ------------------------------------------------------------------------ | ||
|
|
||
| {-# OPTIONS --safe --cubical-compatible #-} | ||
|
|
||
| open import Algebra.Bundles | ||
| using (CommutativeMonoid; Monoid; RawMonoid; RawMagma) | ||
|
|
||
| module Algebra.Construct.Centre.Monoid {c ℓ} (G : Monoid c ℓ) where | ||
jamesmckinna marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| open import Algebra.Morphism.Structures using (IsMonoidMonomorphism) | ||
| open import Function.Base using (id; _∘_) | ||
|
|
||
| import Algebra.Construct.Centre.Semigroup as Centre | ||
| open import Algebra.Construct.Sub.Monoid G using (Submonoid) | ||
|
|
||
| private | ||
| module G = Monoid G | ||
| module Z = Centre G.semigroup | ||
|
|
||
|
|
||
| ------------------------------------------------------------------------ | ||
| -- Definition | ||
|
|
||
| open Z public | ||
| using (Center; ι; central; ∙-comm) | ||
| hiding (module ι) | ||
|
|
||
| ε : Center | ||
| ε = record | ||
| { ι = G.ε | ||
| ; central = λ k → G.trans (G.identityˡ k) (G.sym (G.identityʳ k)) | ||
| } | ||
|
|
||
| domain : RawMonoid _ _ | ||
| domain = record { RawMagma Z.domain ; ε = ε } | ||
|
|
||
| ι-isMonoidMonomorphism : IsMonoidMonomorphism domain _ _ | ||
| ι-isMonoidMonomorphism = record | ||
| { isMonoidHomomorphism = record | ||
| { isMagmaHomomorphism = Z.ι.isMagmaHomomorphism | ||
| ; ε-homo = G.refl | ||
| } | ||
| ; injective = id | ||
| } | ||
|
|
||
| monoid : Monoid _ _ | ||
| monoid = Submonoid.monoid record { ι-monomorphism = ι-isMonoidMonomorphism } | ||
|
|
||
| commutativeMonoid : CommutativeMonoid _ _ | ||
| commutativeMonoid = record | ||
| { isCommutativeMonoid = record | ||
| { isMonoid = isMonoid | ||
| ; comm = ∙-comm | ||
| } | ||
| } where open Monoid monoid using (isMonoid) | ||
|
|
||
|
|
||
| ------------------------------------------------------------------------ | ||
| -- Public exports | ||
|
|
||
| module ι = IsMonoidMonomorphism ι-isMonoidMonomorphism | ||
|
|
||
| Z[_] = commutativeMonoid | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| ------------------------------------------------------------------------ | ||
| -- The Agda standard library | ||
| -- | ||
| -- Definition of Z[ G ] the centre of a Semigroup | ||
| ------------------------------------------------------------------------ | ||
|
|
||
| {-# OPTIONS --safe --cubical-compatible #-} | ||
|
|
||
| open import Algebra.Bundles using (CommutativeSemigroup; Semigroup; RawMagma) | ||
|
|
||
| module Algebra.Construct.Centre.Semigroup {c ℓ} (G : Semigroup c ℓ) where | ||
|
|
||
| import Algebra.Construct.Centre.Magma as Centre | ||
| open import Algebra.Core using (Op₂) | ||
| open import Algebra.Definitions using (Commutative) | ||
| open import Algebra.Morphism.Structures using (IsMagmaMonomorphism) | ||
| open import Function.Base using (id; _∘_; const; _$_; _on_) | ||
| open import Level using (_⊔_) | ||
| import Relation.Binary.Reasoning.Setoid as ≈-Reasoning | ||
|
|
||
| import Algebra.Construct.Sub.Semigroup G as Subsemigroup | ||
|
|
||
| private | ||
| module G = Semigroup G | ||
| module Z = Centre G.magma | ||
|
|
||
|
|
||
| ------------------------------------------------------------------------ | ||
| -- Definition | ||
|
|
||
| open Z public | ||
| using (Center; ι; central; ∙-comm) | ||
| hiding (module ι) | ||
|
|
||
| _∙_ : Op₂ Center | ||
| ι (g ∙ h) = ι g G.∙ ι h | ||
| central (g ∙ h) = λ k → begin | ||
| (ι g G.∙ ι h) G.∙ k ≈⟨ G.assoc _ _ _ ⟩ | ||
| ι g G.∙ (ι h G.∙ k) ≈⟨ G.∙-congˡ $ central h k ⟩ | ||
| ι g G.∙ (k G.∙ ι h) ≈⟨ G.assoc _ _ _ ⟨ | ||
| ι g G.∙ k G.∙ ι h ≈⟨ G.∙-congʳ $ central g k ⟩ | ||
| k G.∙ ι g G.∙ ι h ≈⟨ G.assoc _ _ _ ⟩ | ||
| k G.∙ (ι g G.∙ ι h) ∎ | ||
| where open ≈-Reasoning G.setoid | ||
|
|
||
| domain : RawMagma _ _ | ||
| domain = record { _≈_ = Z._≈_; _∙_ = _∙_ } | ||
|
|
||
| ι-isMagmaMonomorphism : IsMagmaMonomorphism domain _ _ | ||
| ι-isMagmaMonomorphism = record | ||
| { isMagmaHomomorphism = record | ||
| { isRelHomomorphism = Z.ι.isHomomorphism | ||
| ; homo = λ _ _ → G.refl | ||
| } | ||
| ; injective = id | ||
| } | ||
|
|
||
| submagma : Subsemigroup.Submagma _ _ | ||
| submagma = record { ι-monomorphism = ι-isMagmaMonomorphism } | ||
|
|
||
| semigroup : Semigroup _ _ | ||
| semigroup = Subsemigroup.semigroup submagma | ||
|
|
||
| commutativeSemigroup : CommutativeSemigroup _ _ | ||
| commutativeSemigroup = record | ||
| { isCommutativeSemigroup = record | ||
| { isSemigroup = isSemigroup | ||
| ; comm = ∙-comm | ||
| } | ||
| } where open Semigroup semigroup using (isSemigroup) | ||
|
|
||
|
|
||
| ------------------------------------------------------------------------ | ||
| -- Public exports | ||
|
|
||
| module ι = IsMagmaMonomorphism ι-isMagmaMonomorphism | ||
|
|
||
| Z[_] = commutativeSemigroup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| ------------------------------------------------------------------------ | ||
| -- The Agda standard library | ||
| -- | ||
| -- Quotient of an Abelian group by a subgroup | ||
| ------------------------------------------------------------------------ | ||
|
|
||
| {-# OPTIONS --safe --cubical-compatible #-} | ||
|
|
||
| open import Algebra.Bundles using (Group; AbelianGroup) | ||
| import Algebra.Construct.Sub.AbelianGroup as AbelianSubgroup | ||
|
|
||
| module Algebra.Construct.Quotient.AbelianGroup | ||
| {c ℓ} (G : AbelianGroup c ℓ) | ||
| (open AbelianSubgroup G using (Subgroup; normalSubgroup)) | ||
| {c′ ℓ′} (N : Subgroup c′ ℓ′) | ||
| where | ||
|
|
||
| private | ||
| module G = AbelianGroup G | ||
|
|
||
| -- Re-export the quotient group | ||
|
|
||
| open import Algebra.Construct.Quotient.Group G.group (normalSubgroup N) public | ||
|
|
||
| -- With its additional bundle | ||
|
|
||
| quotientAbelianGroup : AbelianGroup c _ | ||
| quotientAbelianGroup = record | ||
| { isAbelianGroup = record | ||
| { isGroup = isGroup | ||
| ; comm = λ g h → ≈⇒≋ (G.comm g h) | ||
| } | ||
| } where open Group quotientGroup | ||
|
|
||
| -- Public re-exports, as needed? |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
semi-facetiously:
MagmaorRawSemigroup?But actually: one has the data of the equivalence being a congruence, the other does not. So if you're going to go 'minimal', maybe
RawMagmarather thanMagma?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, OK... I dithered a lot about whether to even have an entry at this level of the hierarchy... but it seemed the best place to 'hide' the definition of
Center, so that it is never subsequently explicit referred to except via itsι; central; ι-isXMonomorphisminterface.But in the absence of associativity, it is ridiculous at some level to have this. Above
Magma(ieSemigroupand beyond), we do needassoc, so it doesn't really make sense to avoid alsocongetc.? But maybe we should consider 'central' notions only wrt the underlyingRawstructure throughout? is that what you're suggesting?As for
RawSemigroup, well we don't have it, because that just 'is' (would be)RawMagma(as in theIsXHomomorphismhierarchy, which only usesIsRawXstructures to drive the definitions, and rightly so).But, yes:
draft, so come back at me down the road!