annotate src/Gutil0.agda @ 274:691b2ee844ef

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 26 Jan 2023 01:16:38 +0900
parents c209aebeab2a
children 386ece574509
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
257
d500309866da fundamental theorem on homomorphisms
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 open import Level hiding ( suc ; zero )
264
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
2 module Gutil0 where
257
d500309866da fundamental theorem on homomorphisms
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
d500309866da fundamental theorem on homomorphisms
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 open import Algebra
d500309866da fundamental theorem on homomorphisms
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 open import Algebra.Structures
d500309866da fundamental theorem on homomorphisms
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 open import Algebra.Definitions
d500309866da fundamental theorem on homomorphisms
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 open import Data.Product
d500309866da fundamental theorem on homomorphisms
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 open import Relation.Binary.PropositionalEquality
d500309866da fundamental theorem on homomorphisms
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 open import Algebra.Morphism.Structures
264
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
10 open import Data.Empty
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
11 open import Relation.Nullary
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
12
257
d500309866da fundamental theorem on homomorphisms
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 open GroupMorphisms
d500309866da fundamental theorem on homomorphisms
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14
264
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
15 GR : {c l : Level } → Group c l → RawGroup c l
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
16 GR G = record {
257
d500309866da fundamental theorem on homomorphisms
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 Carrier = Carrier G
d500309866da fundamental theorem on homomorphisms
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 ; _≈_ = _≈_ G
d500309866da fundamental theorem on homomorphisms
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 ; _∙_ = _∙_ G
d500309866da fundamental theorem on homomorphisms
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 ; ε = ε G
d500309866da fundamental theorem on homomorphisms
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 ; _⁻¹ = _⁻¹ G
d500309866da fundamental theorem on homomorphisms
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 } where open Group
d500309866da fundamental theorem on homomorphisms
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
264
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
24 record GAxiom {c l : Level } (G : Group c l) : Set ( c Level.⊔ l ) where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
25 open Group G
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
26 field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
27 ∙-cong : {x y u v : Carrier } → x ≈ y → u ≈ v → x ∙ u ≈ y ∙ v
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
28 assoc : (x y z : Carrier ) → x ∙ y ∙ z ≈ x ∙ ( y ∙ z )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
29 identity : ((y : Carrier) → ε ∙ y ≈ y ) × ((y : Carrier) → y ∙ ε ≈ y )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
30 inverse : ((y : Carrier) → y ⁻¹ ∙ y ≈ ε ) × ((y : Carrier) → y ∙ y ⁻¹ ≈ ε )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
31 ⁻¹-cong : {x y : Carrier } → x ≈ y → x ⁻¹ ≈ y ⁻¹
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
32
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
33 GA : {c l : Level } → (G : Group c l) → GAxiom G
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
34 GA G = record {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
35 ∙-cong = IsMagma.∙-cong ( IsSemigroup.isMagma ( IsMonoid.isSemigroup ( IsGroup.isMonoid isGroup)))
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
36 ; assoc = IsSemigroup.assoc ( IsMonoid.isSemigroup ( IsGroup.isMonoid isGroup))
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
37 ; identity = IsMonoid.identity ( IsGroup.isMonoid isGroup)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
38 ; inverse = IsGroup.inverse isGroup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
39 ; ⁻¹-cong = IsGroup.⁻¹-cong isGroup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
40 } where open Group G
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
41
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
42 open import Relation.Binary.Structures
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
43
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
44 Eq : {c l : Level } → (G : Group c l) → IsEquivalence _
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
45 Eq G = IsMagma.isEquivalence (IsSemigroup.isMagma (IsMonoid.isSemigroup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
46 (IsGroup.isMonoid (Group.isGroup G ))) )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
47
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
48 grefl : {c l : Level } → (G : Group c l ) → {x : Group.Carrier G} → Group._≈_ G x x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
49 grefl G = IsGroup.refl ( Group.isGroup G )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
50
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
51 gsym : {c l : Level } → (G : Group c l ) → {x y : Group.Carrier G} → Group._≈_ G x y → Group._≈_ G y x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
52 gsym G = IsGroup.sym ( Group.isGroup G )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
53
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
54 gtrans : {c l : Level } → (G : Group c l ) → {x y z : Group.Carrier G} → Group._≈_ G x y → Group._≈_ G y z → Group._≈_ G x z
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
55 gtrans G = IsGroup.trans ( Group.isGroup G )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
56
271
c209aebeab2a Fundamental again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 264
diff changeset
57 -- record NormalSubGroup {c l : Level } ( G : Group c l ) : Set ( c Level.⊔ l ) where
c209aebeab2a Fundamental again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 264
diff changeset
58 -- open Group G
c209aebeab2a Fundamental again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 264
diff changeset
59 -- field
c209aebeab2a Fundamental again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 264
diff changeset
60 -- sub : Carrier → Carrier
c209aebeab2a Fundamental again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 264
diff changeset
61 -- s-homo : IsGroupHomomorphism (GR G) (GR G) sub
c209aebeab2a Fundamental again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 264
diff changeset
62 -- commute : ( g n : Carrier ) → g ∙ sub n ≈ sub n ∙ g
c209aebeab2a Fundamental again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 264
diff changeset
63 -- -- it has at least one element other than ε
c209aebeab2a Fundamental again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 264
diff changeset
64 -- -- anElement : Carrier
c209aebeab2a Fundamental again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 264
diff changeset
65 -- -- notE : ¬ ( Group._≈_ G anElement (Group.ε G) )
259
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 258
diff changeset
66
264
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
67 -- open import Relation.Binary.Morphism.Structures
259
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 258
diff changeset
68
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 258
diff changeset
69 import Relation.Binary.Reasoning.Setoid as EqReasoning
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 258
diff changeset
70
271
c209aebeab2a Fundamental again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 264
diff changeset
71 -- record HomoMorphism {c l : Level } (G : Group c l) (f : Group.Carrier G → Group.Carrier G) : Set ( c Level.⊔ l ) where
c209aebeab2a Fundamental again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 264
diff changeset
72 -- open Group G
c209aebeab2a Fundamental again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 264
diff changeset
73 -- field
c209aebeab2a Fundamental again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 264
diff changeset
74 -- f-cong : {x y : Carrier } → x ≈ y → f x ≈ f y
c209aebeab2a Fundamental again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 264
diff changeset
75 -- f-homo : (x y : Carrier ) → f ( x ∙ y ) ≈ f x ∙ f y
c209aebeab2a Fundamental again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 264
diff changeset
76 -- f-ε : f ( ε ) ≈ ε
c209aebeab2a Fundamental again
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 264
diff changeset
77 -- f-inv : (x : Carrier) → f ( x ⁻¹ ) ≈ (f x ) ⁻¹
259
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 258
diff changeset
78
264
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
79 -- HM : {c l : Level } → (G : Group c l ) → (f : Group.Carrier G → Group.Carrier G )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
80 -- → IsGroupHomomorphism (GR G) (GR G) f → HomoMorphism G f
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
81 -- HM G f homo = record {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
82 -- f-cong = λ eq → IsRelHomomorphism.cong ( IsMagmaHomomorphism.isRelHomomorphism
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
83 -- ( IsMonoidHomomorphism.isMagmaHomomorphism ( IsGroupHomomorphism.isMonoidHomomorphism homo))) eq
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
84 -- ; f-homo = IsMagmaHomomorphism.homo (IsMonoidHomomorphism.isMagmaHomomorphism ( IsGroupHomomorphism.isMonoidHomomorphism homo))
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
85 -- ; f-ε = IsMonoidHomomorphism.ε-homo ( IsGroupHomomorphism.isMonoidHomomorphism homo)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
86 -- ; f-inv = IsGroupHomomorphism.⁻¹-homo homo
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
87 -- }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
88 --
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
89 -- open HomoMorphism
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
90 --
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
91 -- hm : {c l : Level } → (G : Group c l ) → (f : Group.Carrier G → Group.Carrier G )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
92 -- → HomoMorphism G f
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
93 -- → IsGroupHomomorphism (GR G) (GR G) f
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
94 -- hm G f hm = record { isMonoidHomomorphism = record { isMagmaHomomorphism = record {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
95 -- isRelHomomorphism = record { cong = λ {x} {y} eq → f-cong hm {x} {y} eq }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
96 -- ; homo = f-homo hm } ; ε-homo = f-ε hm } ; ⁻¹-homo = f-inv hm
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
97 -- }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 263
diff changeset
98 --