Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ New modules

* `Algebra.Ideal` for the definition of (two sided) ideals of rings.

* `Algebra.Ideal.Construct.Principal` for ideals generated by a single element of a commutative ring.

* `Algebra.Module.Construct.Sub.Bimodule` for the definition of subbimodules.

* `Algebra.NormalSubgroup` for the definition of normal subgroups.
Expand Down
54 changes: 54 additions & 0 deletions src/Algebra/Ideal/Construct/Principal.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
------------------------------------------------------------------------
-- The Agda standard library
--
-- Ideals generated by a single element of a commutative ring
------------------------------------------------------------------------

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

open import Algebra.Bundles using (CommutativeRing)

module Algebra.Ideal.Construct.Principal {c ℓ} (R : CommutativeRing c ℓ) where

open import Function.Base using (id; _on_)

open CommutativeRing R

open import Algebra.Ideal ring
open import Algebra.Properties.CommutativeSemigroup *-commutativeSemigroup
open import Algebra.Properties.Ring ring

⟨_⟩ : Carrier → Ideal c ℓ
⟨ a ⟩ = record
{ subbimodule = record
{ domain = record
{ Carrierᴹ = Carrier
; _≈ᴹ_ = _≈_ on a *_
; _+ᴹ_ = _+_
; _*ₗ_ = _*_
; _*ᵣ_ = _*_
; 0ᴹ = 0#
; -ᴹ_ = -_
Comment on lines +27 to +31
Copy link
Contributor

@jamesmckinna jamesmckinna Nov 5, 2025

Choose a reason for hiding this comment

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

Can these be recreated by record { RawBimodule rawBimodule hiding (_≈ᴹ_); _≈ᴹ_ = _≈_ on a *_ }, with rawBimodule brought into scope by the opening of subbimodule in Ideal?

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we even lift out the definition ι = a *_ in a where clause, so that this could 'just' be _≈ᴹ_ = _≈_ on ι ?

}
; ι = a *_
Copy link
Contributor

Choose a reason for hiding this comment

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

... and here?

; ι-monomorphism = record
{ isBimoduleHomomorphism = record
{ +ᴹ-isGroupHomomorphism = record
{ isMonoidHomomorphism = record
{ isMagmaHomomorphism = record
{ isRelHomomorphism = record
{ cong = id
}
; homo = distribˡ a
}
; ε-homo = zeroʳ a
}
; ⁻¹-homo = λ x → sym (-‿distribʳ-* a x)
}
; *ₗ-homo = x∙yz≈y∙xz a
; *ᵣ-homo = λ r x → sym (*-assoc a x r)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there nothing under Algebra.Properties.(Commutative)Semigroup that could be deployed here, as on the previous line, mentioning only a?

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 don't think so, and certainly not with this argument order

}
; injective = id
}
}
}