Skip to content

Conversation

@Taneb
Copy link
Member

@Taneb Taneb commented Oct 31, 2025

Builds off #2852, continuing towards #2729 in bitesize chunks.

@Taneb Taneb marked this pull request as draft October 31, 2025 06:42
Copy link
Contributor

@jamesmckinna jamesmckinna left a comment

Choose a reason for hiding this comment

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

This all looks great. I've made suggestions, but nothing is a deal-breaker.

Comment on lines +29 to +31
private
module N = NormalSubgroup N
open NormalSubgroup N using (ι; module ι; conjugate; normal)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can simplify this to:

Suggested change
private
module N = NormalSubgroup N
open NormalSubgroup N using (ι; module ι; conjugate; normal)
private
open module N = NormalSubgroup N using (ι; module ι; conjugate; normal)

Comment on lines 114 to 115
project-isHomomorphism : IsGroupHomomorphism rawGroup (Group.rawGroup quotientGroup) project
project-isHomomorphism = record
Copy link
Contributor

Choose a reason for hiding this comment

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

Naming?

Suggested change
project-isHomomorphism : IsGroupHomomorphism rawGroup (Group.rawGroup quotientGroup) project
project-isHomomorphism = record
project-isGroupHomomorphism : IsGroupHomomorphism rawGroup (Group.rawGroup quotientGroup) project
project-isGroupHomomorphism = record

Twofold reasons:

  • Subsequently, for Ring R / Ideal I, you also define project-isHomomorphism : IsRingHomomorphism, and maybe that's enough (let the X path context of the algebra determine what kind of IsXHomomorphism is defined
  • BUT, for Ring, what you actually need is to separate out the isMonoidHomomorphism field, so why not also isGroupHomomorphism?

open import Algebra.Morphism.Structures using (IsGroupHomomorphism)
open import Algebra.Properties.Monoid monoid
open import Algebra.Properties.Group G using (⁻¹-anti-homo-∙)
open import Algebra.Structures using (IsGroup)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this import? Cf. #2391 and see below.

}

quotientGroup : Group c (c ⊔ ℓ ⊔ c′)
quotientGroup = record { isGroup = quotientIsGroup }
Copy link
Contributor

Choose a reason for hiding this comment

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

And now inline the definition above?

Suggested change
quotientGroup = record { isGroup = quotientIsGroup }
quotientGroup = record
{ isGroup = ...
}

jamesmckinna added a commit to jamesmckinna/agda-stdlib that referenced this pull request Nov 5, 2025
jamesmckinna added a commit to jamesmckinna/agda-stdlib that referenced this pull request Nov 5, 2025
jamesmckinna added a commit to jamesmckinna/agda-stdlib that referenced this pull request Nov 5, 2025
@jamesmckinna
Copy link
Contributor

jamesmckinna commented Nov 6, 2025

In lieu of any further review comments, please see #2859 (purely!) as a comparison point, and feel free to grab anything from there which you might find useful... it just seemed the easiest way to encapsulate all the thoughts I had had about your groups-rings-modules development

@Taneb Taneb changed the base branch from subgroups to master November 10, 2025 09:02
@Taneb Taneb marked this pull request as ready for review November 10, 2025 09:02
infix 0 _by_

data _≋_ (x y : Carrier) : Set (c ⊔ ℓ ⊔ c′) where
_by_ : g ι g ∙ x ≈ y x ≋ y
Copy link
Member Author

Choose a reason for hiding this comment

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

If this is instead _by_ : ∀ g → x ∙ ι g ≈ y → x ≋ y some things line up nicer when we get to integers (in particular it matches Data.Integer.DivMod.a≡a%n+[a/n]*n)

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, so be it, but be careful of having a tail wag the dog. It wouldn't be the first time that existing stdlib modules expose argument order/definitional inconsistency when exposed to new additions/refactoriings (the saga of Algebra.Properties.*.Divisibility and Data.Nat.DivMod.* being a case in point)...

Copy link
Member Author

Choose a reason for hiding this comment

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

The alternative here would be putting more lemmas in Data.Integer.DivMod, which I want to do anyway

@jamesmckinna
Copy link
Contributor

jamesmckinna commented Nov 10, 2025

FTR, if you don't feel like augmenting this with the Sub.AbelianGroup additions (plus their consequences for NormalSubgroups and Quotient.AbelianGroup in #2859 , I'll be sure to post a follow-up PR ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants