annotate sym3.agda @ 134:98c54cb6ee4f

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Sep 2020 11:07:27 +0900
parents 11ccc9fe91c3
children 047efc82be47 57d475583f74
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
68
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 open import Level hiding ( suc ; zero )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 open import Algebra
70
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 69
diff changeset
3 module sym3 where
68
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 open import Symmetric
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 open import Data.Unit
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 open import Function.Inverse as Inverse using (_↔_; Inverse; _InverseOf_)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 open import Function
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 open import Data.Nat hiding (_⊔_) -- using (ℕ; suc; zero)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 open import Relation.Nullary
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 open import Data.Empty
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 open import Data.Product
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 open import Gutil
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 open import Putil
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 open import Solvable using (solvable)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 open import Relation.Binary.PropositionalEquality hiding ( [_] )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 open import Data.Fin
121
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
20 open import Data.Fin.Permutation hiding (_∘ₚ_)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
21
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
22 infixr 200 _∘ₚ_
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
23 _∘ₚ_ = Data.Fin.Permutation._∘ₚ_
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
24
68
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
70
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 69
diff changeset
26 sym3solvable : solvable (Symmetric 3)
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 69
diff changeset
27 solvable.dervied-length sym3solvable = 2
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 69
diff changeset
28 solvable.end sym3solvable x d = solved1 x d where
68
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29
70
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 69
diff changeset
30 open import Data.List using ( List ; [] ; _∷_ )
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 69
diff changeset
31
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 69
diff changeset
32 open Solvable (Symmetric 3)
111
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 88
diff changeset
33
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 88
diff changeset
34 p0id : FL→perm ((# 0) :: ((# 0) :: ((# 0 ) :: f0))) =p= pid
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 88
diff changeset
35 p0id = pleq _ _ refl
68
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36
111
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 88
diff changeset
37 p0 = FL→perm ((# 0) :: ((# 0) :: ((# 0 ) :: f0)))
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 88
diff changeset
38 p1 = FL→perm ((# 0) :: ((# 1) :: ((# 0 ) :: f0)))
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 88
diff changeset
39 p2 = FL→perm ((# 1) :: ((# 0) :: ((# 0 ) :: f0)))
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 88
diff changeset
40 p3 = FL→perm ((# 1) :: ((# 1) :: ((# 0 ) :: f0)))
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 88
diff changeset
41 p4 = FL→perm ((# 2) :: ((# 0) :: ((# 0 ) :: f0)))
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 88
diff changeset
42 p5 = FL→perm ((# 2) :: ((# 1) :: ((# 0 ) :: f0)))
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 88
diff changeset
43 t0 = plist p0 ∷ plist p1 ∷ plist p2 ∷ plist p3 ∷ plist p4 ∷ plist p5 ∷ []
88
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
44
125
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
45 t1 = plist [ p0 , p0 ] ∷ plist [ p1 , p0 ] ∷ plist [ p2 , p0 ] ∷ plist [ p3 , p0 ] ∷ plist [ p4 , p0 ] ∷ plist [ p5 , p1 ] ∷
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
46 plist [ p0 , p1 ] ∷ plist [ p1 , p1 ] ∷ plist [ p2 , p1 ] ∷ plist [ p3 , p1 ] ∷ plist [ p4 , p1 ] ∷ plist [ p5 , p1 ] ∷
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
47 plist [ p0 , p2 ] ∷ plist [ p1 , p2 ] ∷ plist [ p2 , p2 ] ∷ plist [ p3 , p2 ] ∷ plist [ p4 , p2 ] ∷ plist [ p5 , p2 ] ∷
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
48 plist [ p0 , p3 ] ∷ plist [ p1 , p3 ] ∷ plist [ p3 , p3 ] ∷ plist [ p3 , p3 ] ∷ plist [ p4 , p3 ] ∷ plist [ p5 , p3 ] ∷
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
49 plist [ p0 , p4 ] ∷ plist [ p1 , p4 ] ∷ plist [ p3 , p4 ] ∷ plist [ p3 , p4 ] ∷ plist [ p4 , p4 ] ∷ plist [ p5 , p4 ] ∷
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
50 plist [ p0 , p5 ] ∷ plist [ p1 , p5 ] ∷ plist [ p3 , p5 ] ∷ plist [ p3 , p5 ] ∷ plist [ p4 , p4 ] ∷ plist [ p5 , p5 ] ∷
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
51 []
119
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 111
diff changeset
52
70
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 69
diff changeset
53 open _=p=_
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 69
diff changeset
54
119
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 111
diff changeset
55 stage1 : (x : Permutation 3 3) → Set (Level.suc Level.zero)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 111
diff changeset
56 stage1 x = Commutator (λ x₂ → Lift (Level.suc Level.zero) ⊤) x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 111
diff changeset
57
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 111
diff changeset
58 open import logic
121
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
59
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
60 p33=4 : ( p3 ∘ₚ p3 ) =p= p4
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
61 p33=4 = pleq _ _ refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
62
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
63 p44=3 : ( p4 ∘ₚ p4 ) =p= p3
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
64 p44=3 = pleq _ _ refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
65
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
66 p34=0 : ( p3 ∘ₚ p4 ) =p= pid
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
67 p34=0 = pleq _ _ refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
68
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
69 p43=0 : ( p4 ∘ₚ p3 ) =p= pid
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
70 p43=0 = pleq _ _ refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
71
123
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
72 com33 : [ p3 , p3 ] =p= pid
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
73 com33 = pleq _ _ refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
74
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
75 com44 : [ p4 , p4 ] =p= pid
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
76 com44 = pleq _ _ refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
77
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
78 com34 : [ p3 , p4 ] =p= pid
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
79 com34 = pleq _ _ refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
80
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
81 com43 : [ p4 , p3 ] =p= pid
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
82 com43 = pleq _ _ refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
83
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
84
122
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
85 pFL : ( g : Permutation 3 3) → { x : FL 3 } → perm→FL g ≡ x → g =p= FL→perm x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
86 pFL g {x} refl = ptrans (psym (FL←iso g)) ( FL-inject refl )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
87
121
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
88 open ≡-Reasoning
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
89
123
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
90 -- st01 : ( x y : Permutation 3 3) → x =p= p3 → y =p= p3 → x ∘ₚ y =p= p4
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
91 -- st01 x y s t = record { peq = λ q → ( begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
92 -- (x ∘ₚ y) ⟨$⟩ʳ q
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
93 -- ≡⟨ peq ( presp s t ) q ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
94 -- ( p3 ∘ₚ p3 ) ⟨$⟩ʳ q
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
95 -- ≡⟨ peq p33=4 q ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
96 -- p4 ⟨$⟩ʳ q
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
97 -- ∎ ) }
121
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
98
125
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
99 st00 = perm→FL [ FL→perm ((suc zero) :: (suc zero :: (zero :: f0 ))) , FL→perm ((suc (suc zero)) :: (suc zero) :: (zero :: f0)) ]
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
100
121
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 120
diff changeset
101 st02 : ( g h : Permutation 3 3) → ([ g , h ] =p= pid) ∨ ([ g , h ] =p= p3) ∨ ([ g , h ] =p= p4)
124
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 123
diff changeset
102 st02 g h with perm→FL g | perm→FL h | inspect perm→FL g | inspect perm→FL h
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 123
diff changeset
103 ... | (zero :: (zero :: (zero :: f0))) | t | record { eq = ge } | te = case1 (ptrans (comm-resp {g} {h} {pid} (FL-inject ge ) prefl ) (idcomtl h) )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 123
diff changeset
104 ... | s | (zero :: (zero :: (zero :: f0))) | se | record { eq = he } = case1 (ptrans (comm-resp {g} {h} {_} {pid} prefl (FL-inject he ))(idcomtr g) )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 123
diff changeset
105 ... | (zero :: (suc zero) :: (zero :: f0 )) | (zero :: (suc zero) :: (zero :: f0 )) | record { eq = ge } | record { eq = he } =
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 123
diff changeset
106 case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 123
diff changeset
107 ... | (suc zero) :: (zero :: (zero :: f0 )) | (suc zero) :: (zero :: (zero :: f0 )) | record { eq = ge } | record { eq = he } =
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 123
diff changeset
108 case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 123
diff changeset
109 ... | (suc zero) :: (suc zero :: (zero :: f0 )) | (suc zero) :: (suc zero :: (zero :: f0 )) | record { eq = ge } | record { eq = he } =
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 123
diff changeset
110 case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 123
diff changeset
111 ... | (suc (suc zero)) :: (zero :: (zero :: f0 )) | (suc (suc zero)) :: (zero :: (zero :: f0 )) | record { eq = ge } | record { eq = he } =
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 123
diff changeset
112 case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 123
diff changeset
113 ... | (suc (suc zero)) :: (suc zero) :: (zero :: f0) | (suc (suc zero)) :: (suc zero) :: (zero :: f0) | record { eq = ge } | record { eq = he } =
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 123
diff changeset
114 case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )
125
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
115
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
116 ... | (zero :: (suc zero) :: (zero :: f0 )) | ((suc zero) :: (zero :: (zero :: f0 ))) | record { eq = ge } | record { eq = he } =
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
117 case2 (case2 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
118 ... | (zero :: (suc zero) :: (zero :: f0 )) | (suc zero) :: (suc zero :: (zero :: f0 )) | record { eq = ge } | record { eq = he } =
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
119 case2 (case2 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
120 ... | (zero :: (suc zero) :: (zero :: f0 )) | (suc (suc zero)) :: (zero :: (zero :: f0 ))| record { eq = ge } | record { eq = he } =
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
121 case2 (case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
122 ... | (zero :: (suc zero) :: (zero :: f0 )) | ((suc (suc zero)) :: (suc zero) :: (zero :: f0))| record { eq = ge } | record { eq = he } =
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
123 case2 (case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
124 ... | ((suc zero) :: (zero :: (zero :: f0 ))) | (zero :: (suc zero) :: (zero :: f0 )) | record { eq = ge } | record { eq = he } =
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
125 case2 (case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
126 ... | ((suc zero) :: (zero :: (zero :: f0 ))) | (suc zero) :: (suc zero :: (zero :: f0 )) | record { eq = ge } | record { eq = he } =
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
127 case2 (case2 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
128 ... | ((suc zero) :: (zero :: (zero :: f0 ))) | ((suc (suc zero)) :: (zero :: (zero :: f0 )))| record { eq = ge } | record { eq = he } =
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
129 case2 (case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
130 ... | ((suc zero) :: (zero :: (zero :: f0 ))) | (suc (suc zero)) :: (suc zero) :: (zero :: f0) | record { eq = ge } | record { eq = he } =
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
131 case2 (case2 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
132 ... | (suc zero) :: (suc zero :: (zero :: f0 )) | (zero :: (suc zero) :: (zero :: f0 )) | record { eq = ge } | record { eq = he } =
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
133 case2 (case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
134 ... | (suc zero) :: (suc zero :: (zero :: f0 )) | ((suc zero) :: (zero :: (zero :: f0 ))) | record { eq = ge } | record { eq = he } =
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
135 case2 (case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
136 ... | (suc zero) :: (suc zero :: (zero :: f0 )) | ((suc (suc zero)) :: (zero :: (zero :: f0 ))) | record { eq = ge } | record { eq = he } =
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
137 case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
138 ... | (suc zero) :: (suc zero :: (zero :: f0 )) | ((suc (suc zero)) :: (suc zero) :: (zero :: f0)) | record { eq = ge } | record { eq = he } =
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
139 case2 (case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
140 ... | (suc (suc zero)) :: (zero :: (zero :: f0 )) | ((zero :: (suc zero) :: (zero :: f0 )) ) | record { eq = ge } | record { eq = he } =
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
141 case2 (case2 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
142 ... | (suc (suc zero)) :: (zero :: (zero :: f0 )) | ((suc zero) :: (zero :: (zero :: f0 ))) | record { eq = ge } | record { eq = he } =
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
143 case2 (case2 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
144 ... | (suc (suc zero)) :: (zero :: (zero :: f0 )) | ((suc zero) :: (suc zero :: (zero :: f0 ))) | record { eq = ge } | record { eq = he } =
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
145 case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
146 ... | (suc (suc zero)) :: (zero :: (zero :: f0 )) | ((suc (suc zero)) :: (suc zero) :: (zero :: f0)) | record { eq = ge } | record { eq = he } =
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
147 case2 (case2 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
148 ... | ((suc (suc zero)) :: (suc zero) :: (zero :: f0)) | ((zero :: (suc zero) :: (zero :: f0 )) ) | record { eq = ge } | record { eq = he } =
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
149 case2 (case2 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
150 ... | ((suc (suc zero)) :: (suc zero) :: (zero :: f0)) | ((suc zero) :: (zero :: (zero :: f0 ))) | record { eq = ge } | record { eq = he } =
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
151 case2 (case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
152 ... | ((suc (suc zero)) :: (suc zero) :: (zero :: f0)) | ((suc zero) :: (suc zero :: (zero :: f0 ))) | record { eq = ge } | record { eq = he } =
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
153 case2 (case2 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
154 ... | ((suc (suc zero)) :: (suc zero) :: (zero :: f0)) | (suc (suc zero)) :: (zero :: (zero :: f0 )) | record { eq = ge } | record { eq = he } =
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
155 case2 (case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ))
119
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 111
diff changeset
156
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 111
diff changeset
157 stage12 : (x : Permutation 3 3) → stage1 x → ( x =p= pid ) ∨ ( x =p= p3 ) ∨ ( x =p= p4 )
125
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
158 stage12 x uni = case1 prefl
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
159 stage12 x (comm {g} {h} x1 y1 ) = st02 g h
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
160 stage12 _ (gen {x} {y} sx sy) with stage12 x sx | stage12 y sy
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
161 ... | case1 t | case1 s = case1 ( record { peq = λ q → peq (presp t s) q} )
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
162 ... | case1 t | case2 (case1 s) = case2 (case1 ( record { peq = λ q → peq (presp t s ) q } ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
163 ... | case1 t | case2 (case2 s) = case2 (case2 ( record { peq = λ q → peq (presp t s ) q } ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
164 ... | case2 (case1 t) | case1 s = case2 (case1 ( record { peq = λ q → peq (presp t s ) q } ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
165 ... | case2 (case2 t) | case1 s = case2 (case2 ( record { peq = λ q → peq (presp t s ) q } ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
166 ... | case2 (case1 s) | case2 (case1 t) = case2 (case2 record { peq = λ q → trans (peq ( presp s t ) q) ( peq p33=4 q) } )
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
167 ... | case2 (case1 s) | case2 (case2 t) = case1 record { peq = λ q → trans (peq ( presp s t ) q) ( peq p34=0 q) }
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
168 ... | case2 (case2 s) | case2 (case1 t) = case1 record { peq = λ q → trans (peq ( presp s t ) q) ( peq p43=0 q) }
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
169 ... | case2 (case2 s) | case2 (case2 t) = case2 (case1 record { peq = λ q → trans (peq ( presp s t ) q) ( peq p44=3 q) } )
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
170 stage12 _ (ccong {y} x=y sx) with stage12 y sx
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
171 ... | case1 id = case1 ( ptrans (psym x=y ) id )
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
172 ... | case2 (case1 x₁) = case2 (case1 ( ptrans (psym x=y ) x₁ ))
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
173 ... | case2 (case2 x₁) = case2 (case2 ( ptrans (psym x=y ) x₁ ))
123
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
174
119
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 111
diff changeset
175
70
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 69
diff changeset
176 solved1 : (x : Permutation 3 3) → Commutator (λ x₁ → Commutator (λ x₂ → Lift (Level.suc Level.zero) ⊤) x₁) x → x =p= pid
123
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
177 solved1 _ uni = prefl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
178 solved1 x (gen {f} {g} d d₁) with solved1 f d | solved1 g d₁
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
179 ... | record { peq = f=e } | record { peq = g=e } = record { peq = λ q → genlem q } where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
180 genlem : ( q : Fin 3 ) → g ⟨$⟩ʳ ( f ⟨$⟩ʳ q ) ≡ q
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
181 genlem q = begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
182 g ⟨$⟩ʳ ( f ⟨$⟩ʳ q )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
183 ≡⟨ g=e ( f ⟨$⟩ʳ q ) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
184 f ⟨$⟩ʳ q
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
185 ≡⟨ f=e q ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
186 q
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
187
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
188 solved1 x (ccong {f} {g} (record {peq = f=g}) d) with solved1 f d
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
189 ... | record { peq = f=e } = record { peq = λ q → cc q } where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
190 cc : ( q : Fin 3 ) → x ⟨$⟩ʳ q ≡ q
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
191 cc q = begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
192 x ⟨$⟩ʳ q
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
193 ≡⟨ sym (f=g q) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
194 f ⟨$⟩ʳ q
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
195 ≡⟨ f=e q ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
196 q
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
197
125
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
198 solved1 _ (comm {g} {h} x y) with stage12 g x | stage12 h y
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
199 ... | case1 t | case1 s = ptrans (comm-resp t s) (comm-refl {pid} prefl)
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
200 ... | case1 t | case2 s = ptrans (comm-resp {g} {h} {pid} t prefl) (idcomtl h)
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
201 ... | case2 t | case1 s = ptrans (comm-resp {g} {h} {_} {pid} prefl s) (idcomtr g)
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
202 ... | case2 (case1 t) | case2 (case1 s) = record { peq = λ q → trans ( peq ( comm-resp {g} {h} t s ) q ) (peq com33 q) }
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
203 ... | case2 (case2 t) | case2 (case2 s) = record { peq = λ q → trans ( peq ( comm-resp {g} {h} t s ) q ) (peq com44 q) }
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
204 ... | case2 (case1 t) | case2 (case2 s) = record { peq = λ q → trans ( peq ( comm-resp {g} {h} t s ) q ) (peq com34 q) }
11ccc9fe91c3 sym3 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 124
diff changeset
205 ... | case2 (case2 t) | case2 (case1 s) = record { peq = λ q → trans ( peq ( comm-resp {g} {h} t s ) q ) (peq com43 q) }
123
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 122
diff changeset
206