Skip to content

Commit 78404b8

Browse files
committed
refactor: make less visible!
1 parent b50f1d1 commit 78404b8

File tree

2 files changed

+37
-40
lines changed

2 files changed

+37
-40
lines changed

src/Algebra/Construct/Centre/Group.agda

Lines changed: 36 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,27 @@ open import Algebra.Core using (Op₁; Op₂)
1414
open import Algebra.Definitions using (Commutative)
1515
open import Function.Base using (id; const; _$_; _on_)
1616
open import Level using (_⊔_)
17-
open import Relation.Unary using (Pred)
1817
open import Relation.Binary.Core using (Rel)
1918
import Relation.Binary.Reasoning.Setoid as ≈-Reasoning
2019

2120
open import Algebra.Construct.Sub.Group G using (Subgroup)
22-
open import Algebra.Construct.Sub.Group.Normal G using (IsNormal; NormalSubgroup)
21+
open import Algebra.Construct.Sub.Group.Normal G using (NormalSubgroup)
2322
open import Algebra.Properties.Group G using (∙-cancelʳ)
2423

24+
------------------------------------------------------------------------
25+
-- Definition
26+
2527
private
2628
module G = Group G
2729

28-
29-
CommutesWith : Pred G.Carrier _
30-
CommutesWith g = k g G.∙ k G.≈ k G.∙ g
31-
32-
private
3330
open ≈-Reasoning G.setoid
3431

3532
record Carrier : Set (c ⊔ ℓ) where
3633
field
3734
commuter : G.Carrier
38-
commutes : CommutesWith commuter
35+
commutes : k commuter G.∙ k G.≈ k G.∙ commuter
3936

40-
open Carrier
37+
open Carrier using (commuter; commutes)
4138

4239
_≈_ : Rel Carrier _
4340
_≈_ = G._≈_ on commuter
@@ -77,45 +74,45 @@ private
7774
∙-comm : Commutative _≈_ _∙_
7875
∙-comm g h = commutes g $ commuter h
7976

80-
81-
open Carrier public using (commuter; commutes)
82-
83-
centre : NormalSubgroup _ _
84-
centre = record
85-
{ subgroup = record
86-
{ domain = record
87-
{ _≈_ = _≈_
88-
; _∙_ = _∙_
89-
; ε = ε
90-
; _⁻¹ = _⁻¹
91-
}
92-
; ι = commuter
93-
; ι-monomorphism = record
94-
{ isGroupHomomorphism = record
95-
{ isMonoidHomomorphism = record
96-
{ isMagmaHomomorphism = record
97-
{ isRelHomomorphism = record { cong = id }
98-
; homo = λ _ _ G.refl
77+
centre : NormalSubgroup _ _
78+
centre = record
79+
{ subgroup = record
80+
{ domain = record
81+
{ _≈_ = _≈_
82+
; _∙_ = _∙_
83+
; ε = ε
84+
; _⁻¹ = _⁻¹
85+
}
86+
; ι = commuter
87+
; ι-monomorphism = record
88+
{ isGroupHomomorphism = record
89+
{ isMonoidHomomorphism = record
90+
{ isMagmaHomomorphism = record
91+
{ isRelHomomorphism = record { cong = id }
92+
; homo = λ _ _ G.refl
93+
}
94+
; ε-homo = G.refl
9995
}
100-
; ε-homo = G.refl
101-
}
102-
; ⁻¹-homo = λ _ G.refl
96+
; ⁻¹-homo = λ _ G.refl
97+
}
98+
; injective = id
10399
}
104-
; injective = id
105100
}
101+
; isNormal = record { conjugate = const ; normal = commutes }
106102
}
107-
; isNormal = record { conjugate = const ; normal = commutes }
108-
}
103+
104+
105+
------------------------------------------------------------------------
106+
-- Public exports
109107

110108
open NormalSubgroup centre public
111109

112110
abelianGroup : AbelianGroup _ _
113111
abelianGroup = record
114-
{
115-
isAbelianGroup = record { isGroup = isGroup ; comm = ∙-comm }
112+
{ isAbelianGroup = record
113+
{ isGroup = isGroup
114+
; comm = ∙-comm
115+
}
116116
}
117117

118-
-- Public export
119-
120118
Z[_] = centre
121-

src/Algebra/Construct/Sub/Group/Normal.agda

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
open import Algebra.Bundles using (Group)
1010

11-
module Algebra.Construct.Sub.Group.Normal {c ℓ} (G : Group c ℓ) where
11+
module Algebra.Construct.Sub.Group.Normal {c ℓ} (G : Group c ℓ) where
1212

1313
open import Algebra.Construct.Sub.Group G using (Subgroup)
1414
open import Level using (suc; _⊔_)

0 commit comments

Comments
 (0)