annotate Solvable.agda @ 14:b45ebc91a8d1

Gutil
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 17 Aug 2020 15:24:58 +0900
parents e0d16960d10d
children c184003e517d
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
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
12 open import Relation.Binary.PropositionalEquality hiding ( [_] )
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 uni : Commutator P ε
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
23 comm : {g h : Carrier} → P g → P h → Commutator P [ g , h ]
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
24 gen : {f g : Carrier} → Commutator P f → Commutator P g → Commutator P ( f ∙ g )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
25 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
26
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
27 deriving : ( i : ℕ ) → Carrier → Set (Level.suc n ⊔ m)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
28 deriving 0 x = Lift (Level.suc n ⊔ m) ⊤
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
29 deriving (suc i) x = Commutator (deriving i) x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
30
4
121213cfc85a add Solvable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
31 record Solvable : Set (Level.suc n ⊔ m) where
121213cfc85a add Solvable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
32 field
121213cfc85a add Solvable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
33 dervied-length : ℕ
121213cfc85a add Solvable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
34 end : (x : Carrier ) → deriving dervied-length x → x ≈ ε
6
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
35
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
36 -- deriving stage is closed on multiplication and inversion
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
37
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
38 import Relation.Binary.Reasoning.Setoid as EqReasoning
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
39
8
4e275f918e63 deriving-inv done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
40 lemma4 : (g h : Carrier ) → [ h , g ] ≈ [ g , h ] ⁻¹
4e275f918e63 deriving-inv done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
41 lemma4 g h = begin
4e275f918e63 deriving-inv done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
42 [ h , g ] ≈⟨ grefl ⟩
4e275f918e63 deriving-inv done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
43 (h ⁻¹ ∙ g ⁻¹ ∙ h ) ∙ g ≈⟨ assoc _ _ _ ⟩
4e275f918e63 deriving-inv done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
44 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
45 h ⁻¹ ∙ g ⁻¹ ∙ ((h ⁻¹) ⁻¹ ∙ (g ⁻¹) ⁻¹) ≈⟨ ∙-cong grefl (lemma5 _ _ ) ⟩
4e275f918e63 deriving-inv done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
46 h ⁻¹ ∙ g ⁻¹ ∙ (g ⁻¹ ∙ h ⁻¹) ⁻¹ ≈⟨ assoc _ _ _ ⟩
4e275f918e63 deriving-inv done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
47 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
48 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
49 (g ⁻¹ ∙ h ⁻¹ ∙ g ∙ h) ⁻¹ ≈⟨ grefl ⟩
4e275f918e63 deriving-inv done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
50 [ g , h ] ⁻¹
4e275f918e63 deriving-inv done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
51 ∎ where open EqReasoning (Algebra.Group.setoid G)
6
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
52
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
53 deriving-mul : { i : ℕ } → { x y : Carrier } → deriving i x → deriving i y → deriving i ( x ∙ y )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
54 deriving-mul {zero} {x} {y} _ _ = lift tt
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
55 deriving-mul {suc i} {x} {y} ix iy = gen ix iy
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
56
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
57 deriving-inv : { i : ℕ } → { x : Carrier } → deriving i x → deriving i ( x ⁻¹ )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
58 deriving-inv {zero} {x} (lift tt) = lift tt
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
59 deriving-inv {suc i} {ε} uni = ccong lemma3 uni
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
60 deriving-inv {suc i} {_} (comm x x₁ ) = ccong (lemma4 _ _) (comm x₁ x) where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
61 deriving-inv {suc i} {_} (gen x x₁ ) = ccong (lemma5 _ _ ) ( gen (deriving-inv x₁) (deriving-inv x)) where
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