annotate src/Solvable.agda @ 274:691b2ee844ef

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 26 Jan 2023 01:16:38 +0900
parents 6d1619d9f880
children 386ece574509
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
dc677bac3c54 Permutation group
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 open import Level hiding ( suc ; zero )
dc677bac3c54 Permutation group
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 open import Algebra
4
121213cfc85a add Solvable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
3 module Solvable {n m : Level} (G : Group n m ) where
0
dc677bac3c54 Permutation group
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
4
121213cfc85a add Solvable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
5 open import Data.Unit
121213cfc85a add Solvable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
6 open import Function.Inverse as Inverse using (_↔_; Inverse; _InverseOf_)
6
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
7 open import Function
7
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 6
diff changeset
8 open import Data.Nat hiding (_⊔_) -- using (ℕ; suc; zero)
4
121213cfc85a add Solvable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
9 open import Relation.Nullary
121213cfc85a add Solvable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
10 open import Data.Empty
5
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
11 open import Data.Product
70
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
12 open import Relation.Binary.PropositionalEquality hiding ( [_] ; sym )
5
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
13
0
dc677bac3c54 Permutation group
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14
4
121213cfc85a add Solvable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
15 open Group G
14
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
16 open import Gutil G
0
dc677bac3c54 Permutation group
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17
4
121213cfc85a add Solvable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
18 [_,_] : Carrier → Carrier → Carrier
121213cfc85a add Solvable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
19 [ g , h ] = g ⁻¹ ∙ h ⁻¹ ∙ g ∙ h
0
dc677bac3c54 Permutation group
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20
5
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
21 data Commutator (P : Carrier → Set (Level.suc n ⊔ m)) : (f : Carrier) → Set (Level.suc n ⊔ m) where
6
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
22 comm : {g h : Carrier} → P g → P h → Commutator P [ g , h ]
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
23 ccong : {f g : Carrier} → f ≈ g → Commutator P f → Commutator P g
5
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
24
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
25 deriving : ( i : ℕ ) → Carrier → Set (Level.suc n ⊔ m)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
26 deriving 0 x = Lift (Level.suc n ⊔ m) ⊤
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
27 deriving (suc i) x = Commutator (deriving i) x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
28
116
6022d00a0690 check termination problem remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 75
diff changeset
29 open import Relation.Binary.HeterogeneousEquality as HE using (_≅_ )
6022d00a0690 check termination problem remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 75
diff changeset
30
6022d00a0690 check termination problem remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 75
diff changeset
31 deriving-subst : { i : ℕ } → {x y : Carrier } → x ≈ y → (dx : deriving i x ) → deriving i y
6022d00a0690 check termination problem remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 75
diff changeset
32 deriving-subst {zero} {x} {y} x=y dx = lift tt
6022d00a0690 check termination problem remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 75
diff changeset
33 deriving-subst {suc i} {x} {y} x=y dx = ccong x=y dx
6022d00a0690 check termination problem remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 75
diff changeset
34
68
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
35 record solvable : Set (Level.suc n ⊔ m) where
4
121213cfc85a add Solvable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
36 field
121213cfc85a add Solvable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
37 dervied-length : ℕ
121213cfc85a add Solvable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
38 end : (x : Carrier ) → deriving dervied-length x → x ≈ ε
6
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
39
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
40 -- deriving stage is closed on multiplication and inversion
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
41
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
42 import Relation.Binary.Reasoning.Setoid as EqReasoning
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
43
122
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
44 open EqReasoning (Algebra.Group.setoid G)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
45
8
4e275f918e63 deriving-inv done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
46 lemma4 : (g h : Carrier ) → [ h , g ] ≈ [ g , h ] ⁻¹
4e275f918e63 deriving-inv done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
47 lemma4 g h = begin
4e275f918e63 deriving-inv done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
48 [ h , g ] ≈⟨ grefl ⟩
4e275f918e63 deriving-inv done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
49 (h ⁻¹ ∙ g ⁻¹ ∙ h ) ∙ g ≈⟨ assoc _ _ _ ⟩
4e275f918e63 deriving-inv done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
50 h ⁻¹ ∙ g ⁻¹ ∙ (h ∙ g) ≈⟨ ∙-cong grefl (gsym (∙-cong lemma6 lemma6)) ⟩
4e275f918e63 deriving-inv done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
51 h ⁻¹ ∙ g ⁻¹ ∙ ((h ⁻¹) ⁻¹ ∙ (g ⁻¹) ⁻¹) ≈⟨ ∙-cong grefl (lemma5 _ _ ) ⟩
4e275f918e63 deriving-inv done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
52 h ⁻¹ ∙ g ⁻¹ ∙ (g ⁻¹ ∙ h ⁻¹) ⁻¹ ≈⟨ assoc _ _ _ ⟩
4e275f918e63 deriving-inv done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
53 h ⁻¹ ∙ (g ⁻¹ ∙ (g ⁻¹ ∙ h ⁻¹) ⁻¹) ≈⟨ ∙-cong grefl (lemma5 (g ⁻¹ ∙ h ⁻¹ ) g ) ⟩
4e275f918e63 deriving-inv done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
54 h ⁻¹ ∙ (g ⁻¹ ∙ h ⁻¹ ∙ g) ⁻¹ ≈⟨ lemma5 (g ⁻¹ ∙ h ⁻¹ ∙ g) h ⟩
4e275f918e63 deriving-inv done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
55 (g ⁻¹ ∙ h ⁻¹ ∙ g ∙ h) ⁻¹ ≈⟨ grefl ⟩
4e275f918e63 deriving-inv done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
56 [ g , h ] ⁻¹
122
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
57
6
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
58
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
59 deriving-inv : { i : ℕ } → { x : Carrier } → deriving i x → deriving i ( x ⁻¹ )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
60 deriving-inv {zero} {x} (lift tt) = lift tt
75
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
61 deriving-inv {suc i} {_} (comm x x₁ ) = ccong (lemma4 _ _) (comm x₁ x)
6
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
62 deriving-inv {suc i} {x} (ccong eq ix ) = ccong (⁻¹-cong eq) ( deriving-inv ix )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
63
70
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
64 idcomtr : (g : Carrier ) → [ g , ε ] ≈ ε
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
65 idcomtr g = begin
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
66 (g ⁻¹ ∙ ε ⁻¹ ∙ g ∙ ε ) ≈⟨ ∙-cong (∙-cong (∙-cong grefl (sym lemma3 )) grefl ) grefl ⟩
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
67 (g ⁻¹ ∙ ε ∙ g ∙ ε ) ≈⟨ ∙-cong (∙-cong (proj₂ identity _) grefl) grefl ⟩
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
68 (g ⁻¹ ∙ g ∙ ε ) ≈⟨ ∙-cong (proj₁ inverse _ ) grefl ⟩
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
69 ( ε ∙ ε ) ≈⟨ proj₂ identity _ ⟩
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
70 ε
122
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
71
70
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
72
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
73 idcomtl : (g : Carrier ) → [ ε , g ] ≈ ε
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
74 idcomtl g = begin
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
75 (ε ⁻¹ ∙ g ⁻¹ ∙ ε ∙ g ) ≈⟨ ∙-cong (proj₂ identity _) grefl ⟩
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
76 (ε ⁻¹ ∙ g ⁻¹ ∙ g ) ≈⟨ ∙-cong (∙-cong (sym lemma3 ) grefl ) grefl ⟩
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
77 (ε ∙ g ⁻¹ ∙ g ) ≈⟨ ∙-cong (proj₁ identity _) grefl ⟩
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
78 (g ⁻¹ ∙ g ) ≈⟨ proj₁ inverse _ ⟩
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
79 ε
122
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
80
121
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 116
diff changeset
81
186
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
82 deriving-ε : { i : ℕ } → deriving i ε
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
83 deriving-ε {zero} = lift tt
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
84 deriving-ε {suc i} = ccong (idcomtr ε) (comm deriving-ε deriving-ε)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
85
122
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
86 comm-refl : {f g : Carrier } → f ≈ g → [ f , g ] ≈ ε
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
87 comm-refl {f} {g} f=g = begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
88 f ⁻¹ ∙ g ⁻¹ ∙ f ∙ g
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
89 ≈⟨ ∙-cong (∙-cong (∙-cong (⁻¹-cong f=g ) grefl ) f=g ) grefl ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
90 g ⁻¹ ∙ g ⁻¹ ∙ g ∙ g
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
91 ≈⟨ ∙-cong (assoc _ _ _ ) grefl ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
92 g ⁻¹ ∙ (g ⁻¹ ∙ g ) ∙ g
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
93 ≈⟨ ∙-cong (∙-cong grefl (proj₁ inverse _) ) grefl ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
94 g ⁻¹ ∙ ε ∙ g
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
95 ≈⟨ ∙-cong (proj₂ identity _) grefl ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
96 g ⁻¹ ∙ g
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
97 ≈⟨ proj₁ inverse _ ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
98 ε
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
99
121
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 116
diff changeset
100
122
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
101 comm-resp : {g h g1 h1 : Carrier } → g ≈ g1 → h ≈ h1 → [ g , h ] ≈ [ g1 , h1 ]
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
102 comm-resp {g} {h} {g1} {h1} g=g1 h=h1 = ∙-cong (∙-cong (∙-cong (⁻¹-cong g=g1 ) (⁻¹-cong h=h1 )) g=g1 ) h=h1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
103