@@ -5,6 +5,17 @@ open import Cubical.Foundations.Prelude
5
5
6
6
open import Cubical.Algebra.AbGroup.Base
7
7
open import Cubical.Algebra.Group
8
+ open import Cubical.Algebra.Group.Morphisms
9
+ open import Cubical.Algebra.Group.MorphismProperties
10
+ open import Cubical.Algebra.Group.QuotientGroup
11
+ open import Cubical.Algebra.Group.Subgroup
12
+ open import Cubical.Algebra.Group.ZAction
13
+
14
+ open import Cubical.HITs.SetQuotients as SQ hiding (_/_)
15
+
16
+ open import Cubical.Data.Int using (ℤ ; pos ; negsuc)
17
+ open import Cubical.Data.Nat hiding (_+_)
18
+ open import Cubical.Data.Sigma
8
19
9
20
private variable
10
21
ℓ : Level
@@ -24,3 +35,86 @@ module AbGroupTheory (A : AbGroup ℓ) where
24
35
25
36
implicitInverse : ∀ {a b} → a + b ≡ 0g → b ≡ - a
26
37
implicitInverse b+a≡0 = invUniqueR b+a≡0
38
+
39
+ addGroupHom : (A B : AbGroup ℓ) (ϕ ψ : AbGroupHom A B) → AbGroupHom A B
40
+ fst (addGroupHom A B ϕ ψ) x = AbGroupStr._+_ (snd B) (ϕ .fst x) (ψ .fst x)
41
+ snd (addGroupHom A B ϕ ψ) = makeIsGroupHom
42
+ λ x y → cong₂ (AbGroupStr._+_ (snd B))
43
+ (IsGroupHom.pres· (snd ϕ) x y)
44
+ (IsGroupHom.pres· (snd ψ) x y)
45
+ ∙ AbGroupTheory.comm-4 B (fst ϕ x) (fst ϕ y) (fst ψ x) (fst ψ y)
46
+
47
+ negGroupHom : (A B : AbGroup ℓ) (ϕ : AbGroupHom A B) → AbGroupHom A B
48
+ fst (negGroupHom A B ϕ) x = AbGroupStr.-_ (snd B) (ϕ .fst x)
49
+ snd (negGroupHom A B ϕ) =
50
+ makeIsGroupHom λ x y
51
+ → sym (IsGroupHom.presinv (snd ϕ) (AbGroupStr._+_ (snd A) x y))
52
+ ∙ cong (fst ϕ) (GroupTheory.invDistr (AbGroup→Group A) x y
53
+ ∙ AbGroupStr.+Comm (snd A) _ _)
54
+ ∙ IsGroupHom.pres· (snd ϕ) _ _
55
+ ∙ cong₂ (AbGroupStr._+_ (snd B))
56
+ (IsGroupHom.presinv (snd ϕ) x)
57
+ (IsGroupHom.presinv (snd ϕ) y)
58
+
59
+ subtrGroupHom : (A B : AbGroup ℓ) (ϕ ψ : AbGroupHom A B) → AbGroupHom A B
60
+ subtrGroupHom A B ϕ ψ = addGroupHom A B ϕ (negGroupHom A B ψ)
61
+
62
+
63
+
64
+ -- ℤ-multiplication defines a homomorphism for abelian groups
65
+ private module _ (G : AbGroup ℓ) where
66
+ ℤ·isHom-pos : (n : ℕ) (x y : fst G)
67
+ → (pos n ℤ[ (AbGroup→Group G) ]· (AbGroupStr._+_ (snd G) x y))
68
+ ≡ AbGroupStr._+_ (snd G) ((pos n) ℤ[ (AbGroup→Group G) ]· x)
69
+ ((pos n) ℤ[ (AbGroup→Group G) ]· y)
70
+ ℤ·isHom-pos zero x y =
71
+ sym (AbGroupStr.+IdR (snd G) (AbGroupStr.0g (snd G)))
72
+ ℤ·isHom-pos (suc n) x y =
73
+ cong₂ (AbGroupStr._+_ (snd G))
74
+ refl
75
+ (ℤ·isHom-pos n x y)
76
+ ∙ AbGroupTheory.comm-4 G _ _ _ _
77
+
78
+ ℤ·isHom-neg : (n : ℕ) (x y : fst G)
79
+ → (negsuc n ℤ[ (AbGroup→Group G) ]· (AbGroupStr._+_ (snd G) x y))
80
+ ≡ AbGroupStr._+_ (snd G) ((negsuc n) ℤ[ (AbGroup→Group G) ]· x)
81
+ ((negsuc n) ℤ[ (AbGroup→Group G) ]· y)
82
+ ℤ·isHom-neg zero x y =
83
+ GroupTheory.invDistr (AbGroup→Group G) _ _
84
+ ∙ AbGroupStr.+Comm (snd G) _ _
85
+ ℤ·isHom-neg (suc n) x y =
86
+ cong₂ (AbGroupStr._+_ (snd G))
87
+ (GroupTheory.invDistr (AbGroup→Group G) _ _
88
+ ∙ AbGroupStr.+Comm (snd G) _ _)
89
+ (ℤ·isHom-neg n x y)
90
+ ∙ AbGroupTheory.comm-4 G _ _ _ _
91
+
92
+ ℤ·isHom : (n : ℤ) (G : AbGroup ℓ) (x y : fst G)
93
+ → (n ℤ[ (AbGroup→Group G) ]· (AbGroupStr._+_ (snd G) x y))
94
+ ≡ AbGroupStr._+_ (snd G) (n ℤ[ (AbGroup→Group G) ]· x)
95
+ (n ℤ[ (AbGroup→Group G) ]· y)
96
+ ℤ·isHom (pos n) G = ℤ·isHom-pos G n
97
+ ℤ·isHom (negsuc n) G = ℤ·isHom-neg G n
98
+
99
+ -- left multiplication as a group homomorphism
100
+ multₗHom : (G : AbGroup ℓ) (n : ℤ) → AbGroupHom G G
101
+ fst (multₗHom G n) g = n ℤ[ (AbGroup→Group G) ]· g
102
+ snd (multₗHom G n) = makeIsGroupHom (ℤ·isHom n G)
103
+
104
+ -- Abelian groups quotiented by a natural number
105
+ _/^_ : (G : AbGroup ℓ) (n : ℕ) → AbGroup ℓ
106
+ G /^ n =
107
+ Group→AbGroup
108
+ ((AbGroup→Group G)
109
+ / (imSubgroup (multₗHom G (pos n))
110
+ , isNormalIm (multₗHom G (pos n)) (AbGroupStr.+Comm (snd G))))
111
+ (SQ.elimProp2 (λ _ _ → squash/ _ _)
112
+ λ a b → cong [_] (AbGroupStr.+Comm (snd G) a b))
113
+
114
+ -- Torsion subgrous
115
+ _[_]ₜ : (G : AbGroup ℓ) (n : ℕ) → AbGroup ℓ
116
+ G [ n ]ₜ =
117
+ Group→AbGroup (Subgroup→Group (AbGroup→Group G)
118
+ (kerSubgroup (multₗHom G (pos n))))
119
+ λ {(x , p) (y , q) → Σ≡Prop (λ _ → isPropIsInKer (multₗHom G (pos n)) _)
120
+ (AbGroupStr.+Comm (snd G) _ _)}
0 commit comments