Skip to content

Commit c05773b

Browse files
committed
add: Ideals and quotients of Rings
1 parent d3d6797 commit c05773b

File tree

3 files changed

+104
-0
lines changed

3 files changed

+104
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ New modules
8585

8686
* `Algebra.Construct.Sub.Group.Normal` for the definition of normal subgroups.
8787

88+
* `Algebra.Construct.Sub.Ring.Ideal` for the definition of ideals of a ring.
89+
8890
* `Algebra.Module.Construct.Sub.Bimodule` for the definition of sub-bimodules.
8991

9092
* `Algebra.Properties.BooleanRing`.
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
------------------------------------------------------------------------
2+
-- The Agda standard library
3+
--
4+
-- Quotient rings
5+
------------------------------------------------------------------------
6+
7+
{-# OPTIONS --safe --cubical-compatible #-}
8+
9+
open import Algebra.Bundles using (AbelianGroup; Ring; RawRing)
10+
open import Algebra.Construct.Sub.Ring.Ideal using (Ideal)
11+
12+
module Algebra.Construct.Quotient.Ring
13+
{c ℓ} (R : Ring c ℓ) {c′ ℓ′} (I : Ideal R c′ ℓ′)
14+
where
15+
16+
open import Algebra.Morphism.Structures using (IsRingHomomorphism)
17+
open import Data.Product.Base using (_,_)
18+
open import Function.Base using (_∘_)
19+
open import Level using (_⊔_)
20+
21+
import Algebra.Construct.Quotient.AbelianGroup as Quotient
22+
23+
private
24+
module R = Ring R
25+
module I = Ideal I
26+
module R/I = Quotient R.+-abelianGroup I.subgroup
27+
28+
29+
open R/I public
30+
using (_≋_; _by_; ≋-refl; ≈⇒≋
31+
; quotientAbelianGroup
32+
; π; π-isMonoidHomomorphism; π-surjective
33+
)
34+
35+
open import Algebra.Definitions _≋_ using (Congruent₂)
36+
37+
≋-*-cong : Congruent₂ R._*_
38+
≋-*-cong {x} {y} {u} {v} (j by ιj+x≈y) (k by ιk+u≈v) = ι j *ₗ k +ᴹ j *ᵣ u +ᴹ x *ₗ k by begin
39+
ι (ι j *ₗ k +ᴹ j *ᵣ u +ᴹ x *ₗ k) + x * u ≈⟨ +-congʳ (ι.+ᴹ-homo (ι j *ₗ k +ᴹ j *ᵣ u) (x *ₗ k)) ⟩
40+
ι (ι j *ₗ k +ᴹ j *ᵣ u) + ι (x *ₗ k) + x * u ≈⟨ +-congʳ (+-congʳ (ι.+ᴹ-homo (ι j *ₗ k) (j *ᵣ u))) ⟩
41+
ι (ι j *ₗ k) + ι (j *ᵣ u) + ι (x *ₗ k) + x * u ≈⟨ +-congʳ (+-cong (+-cong (ι.*ₗ-homo (ι j) k) (ι.*ᵣ-homo u j)) (ι.*ₗ-homo x k)) ⟩
42+
ι j * ι k + ι j * u + x * ι k + x * u ≈⟨ binomial-expansion (ι j) x (ι k) u ⟨
43+
(ι j + x) * (ι k + u) ≈⟨ *-cong ιj+x≈y ιk+u≈v ⟩
44+
y * v ∎
45+
where
46+
open R using (_+_; _*_; +-congʳ ;+-cong; *-cong)
47+
open import Algebra.Properties.Semiring R.semiring using (binomial-expansion)
48+
open import Relation.Binary.Reasoning.Setoid R.setoid
49+
open I using (ι; _*ₗ_; _*ᵣ_; _+ᴹ_)
50+
51+
quotientRawRing : RawRing c (c ⊔ ℓ ⊔ c′)
52+
quotientRawRing = record { RawRing R.rawRing hiding (_≈_) ; _≈_ = _≋_ }
53+
54+
quotientRing : Ring c (c ⊔ ℓ ⊔ c′)
55+
quotientRing = record
56+
{ isRing = record
57+
{ +-isAbelianGroup = isAbelianGroup
58+
; *-cong = ≋-*-cong
59+
; *-assoc = λ x y z ≈⇒≋ (R.*-assoc x y z)
60+
; *-identity = ≈⇒≋ ∘ R.*-identityˡ , ≈⇒≋ ∘ R.*-identityʳ
61+
; distrib = (λ x y z ≈⇒≋ (R.distribˡ x y z)) , (λ x y z ≈⇒≋ (R.distribʳ x y z))
62+
}
63+
} where open AbelianGroup quotientAbelianGroup using (isAbelianGroup)
64+
65+
π-isRingHomomorphism : IsRingHomomorphism R.rawRing quotientRawRing π
66+
π-isRingHomomorphism = record
67+
{ isSemiringHomomorphism = record
68+
{ isNearSemiringHomomorphism = record
69+
{ +-isMonoidHomomorphism = π-isMonoidHomomorphism
70+
; *-homo = λ _ _ ≋-refl
71+
}
72+
; 1#-homo = ≋-refl
73+
}
74+
; -‿homo = λ _ ≋-refl
75+
}
76+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
------------------------------------------------------------------------
2+
-- The Agda standard library
3+
--
4+
-- Ideals of a ring
5+
------------------------------------------------------------------------
6+
7+
{-# OPTIONS --safe --cubical-compatible #-}
8+
9+
open import Algebra.Bundles using (Ring)
10+
11+
module Algebra.Construct.Sub.Ring.Ideal {c ℓ} (R : Ring c ℓ) where
12+
13+
open import Algebra.Module.Construct.Sub.Bimodule using (Subbimodule)
14+
open import Algebra.Module.Construct.TensorUnit using (bimodule)
15+
open import Level
16+
17+
------------------------------------------------------------------------
18+
-- Definition
19+
-- a (two sided) ideal is exactly a subbimodule of R considered as a bimodule over itself
20+
21+
record Ideal c′ ℓ′ : Set (c ⊔ ℓ ⊔ suc (c′ ⊔ ℓ′)) where
22+
field
23+
24+
subbimodule : Subbimodule {R = R} bimodule c′ ℓ′
25+
26+
open Subbimodule subbimodule public

0 commit comments

Comments
 (0)