Mercurial > hg > Members > kono > Proof > galois
annotate src/sym3.agda @ 331:ee6b8f4cbf4c default tip
safe mode
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 08 Jul 2024 16:48:09 +0900 |
parents | e9de2bfef88d |
children |
rev | line source |
---|---|
331 | 1 {-# OPTIONS --cubical-compatible --safe #-} |
318
fff18d4a063b
use stdlib-2.0 and safe-mode
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
255
diff
changeset
|
2 |
68 | 3 open import Level hiding ( suc ; zero ) |
4 open import Algebra | |
70 | 5 module sym3 where |
68 | 6 |
7 open import Symmetric | |
8 open import Data.Unit | |
9 open import Function.Inverse as Inverse using (_↔_; Inverse; _InverseOf_) | |
10 open import Function | |
11 open import Data.Nat hiding (_⊔_) -- using (ℕ; suc; zero) | |
12 open import Relation.Nullary | |
13 open import Data.Empty | |
14 open import Data.Product | |
15 | |
16 open import Gutil | |
17 open import Putil | |
162 | 18 open import FLutil |
68 | 19 open import Solvable using (solvable) |
20 open import Relation.Binary.PropositionalEquality hiding ( [_] ) | |
21 | |
22 open import Data.Fin | |
121 | 23 open import Data.Fin.Permutation hiding (_∘ₚ_) |
24 | |
25 infixr 200 _∘ₚ_ | |
26 _∘ₚ_ = Data.Fin.Permutation._∘ₚ_ | |
27 | |
68 | 28 |
70 | 29 sym3solvable : solvable (Symmetric 3) |
30 solvable.dervied-length sym3solvable = 2 | |
31 solvable.end sym3solvable x d = solved1 x d where | |
68 | 32 |
70 | 33 open import Data.List using ( List ; [] ; _∷_ ) |
34 | |
35 open Solvable (Symmetric 3) | |
111 | 36 |
37 p0id : FL→perm ((# 0) :: ((# 0) :: ((# 0 ) :: f0))) =p= pid | |
38 p0id = pleq _ _ refl | |
68 | 39 |
111 | 40 p0 = FL→perm ((# 0) :: ((# 0) :: ((# 0 ) :: f0))) |
41 p1 = FL→perm ((# 0) :: ((# 1) :: ((# 0 ) :: f0))) | |
42 p2 = FL→perm ((# 1) :: ((# 0) :: ((# 0 ) :: f0))) | |
43 p3 = FL→perm ((# 1) :: ((# 1) :: ((# 0 ) :: f0))) | |
44 p4 = FL→perm ((# 2) :: ((# 0) :: ((# 0 ) :: f0))) | |
45 p5 = FL→perm ((# 2) :: ((# 1) :: ((# 0 ) :: f0))) | |
46 t0 = plist p0 ∷ plist p1 ∷ plist p2 ∷ plist p3 ∷ plist p4 ∷ plist p5 ∷ [] | |
88 | 47 |
125 | 48 t1 = plist [ p0 , p0 ] ∷ plist [ p1 , p0 ] ∷ plist [ p2 , p0 ] ∷ plist [ p3 , p0 ] ∷ plist [ p4 , p0 ] ∷ plist [ p5 , p1 ] ∷ |
49 plist [ p0 , p1 ] ∷ plist [ p1 , p1 ] ∷ plist [ p2 , p1 ] ∷ plist [ p3 , p1 ] ∷ plist [ p4 , p1 ] ∷ plist [ p5 , p1 ] ∷ | |
50 plist [ p0 , p2 ] ∷ plist [ p1 , p2 ] ∷ plist [ p2 , p2 ] ∷ plist [ p3 , p2 ] ∷ plist [ p4 , p2 ] ∷ plist [ p5 , p2 ] ∷ | |
51 plist [ p0 , p3 ] ∷ plist [ p1 , p3 ] ∷ plist [ p3 , p3 ] ∷ plist [ p3 , p3 ] ∷ plist [ p4 , p3 ] ∷ plist [ p5 , p3 ] ∷ | |
52 plist [ p0 , p4 ] ∷ plist [ p1 , p4 ] ∷ plist [ p3 , p4 ] ∷ plist [ p3 , p4 ] ∷ plist [ p4 , p4 ] ∷ plist [ p5 , p4 ] ∷ | |
53 plist [ p0 , p5 ] ∷ plist [ p1 , p5 ] ∷ plist [ p3 , p5 ] ∷ plist [ p3 , p5 ] ∷ plist [ p4 , p4 ] ∷ plist [ p5 , p5 ] ∷ | |
54 [] | |
119 | 55 |
70 | 56 open _=p=_ |
57 | |
119 | 58 stage1 : (x : Permutation 3 3) → Set (Level.suc Level.zero) |
59 stage1 x = Commutator (λ x₂ → Lift (Level.suc Level.zero) ⊤) x | |
60 | |
61 open import logic | |
121 | 62 |
63 p33=4 : ( p3 ∘ₚ p3 ) =p= p4 | |
64 p33=4 = pleq _ _ refl | |
65 | |
66 p44=3 : ( p4 ∘ₚ p4 ) =p= p3 | |
67 p44=3 = pleq _ _ refl | |
68 | |
69 p34=0 : ( p3 ∘ₚ p4 ) =p= pid | |
70 p34=0 = pleq _ _ refl | |
71 | |
72 p43=0 : ( p4 ∘ₚ p3 ) =p= pid | |
73 p43=0 = pleq _ _ refl | |
74 | |
123 | 75 com33 : [ p3 , p3 ] =p= pid |
76 com33 = pleq _ _ refl | |
77 | |
78 com44 : [ p4 , p4 ] =p= pid | |
79 com44 = pleq _ _ refl | |
80 | |
81 com34 : [ p3 , p4 ] =p= pid | |
82 com34 = pleq _ _ refl | |
83 | |
84 com43 : [ p4 , p3 ] =p= pid | |
85 com43 = pleq _ _ refl | |
86 | |
87 | |
122 | 88 pFL : ( g : Permutation 3 3) → { x : FL 3 } → perm→FL g ≡ x → g =p= FL→perm x |
89 pFL g {x} refl = ptrans (psym (FL←iso g)) ( FL-inject refl ) | |
90 | |
121 | 91 open ≡-Reasoning |
92 | |
125 | 93 st00 = perm→FL [ FL→perm ((suc zero) :: (suc zero :: (zero :: f0 ))) , FL→perm ((suc (suc zero)) :: (suc zero) :: (zero :: f0)) ] |
94 | |
121 | 95 st02 : ( g h : Permutation 3 3) → ([ g , h ] =p= pid) ∨ ([ g , h ] =p= p3) ∨ ([ g , h ] =p= p4) |
328 | 96 st02 g h with perm→FL g in ge | perm→FL h in he |
97 ... | (zero :: (zero :: (zero :: f0))) | t = case1 (ptrans (comm-resp {g} {h} {pid} (FL-inject ge ) prefl ) (idcomtl h) ) | |
98 ... | (zero :: (suc zero) :: (zero :: f0 )) | (zero :: (suc zero) :: (zero :: f0 )) = | |
124 | 99 case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ) |
328 | 100 ... | (suc zero) :: (zero :: (zero :: f0 )) | (suc zero) :: (zero :: (zero :: f0 )) = |
124 | 101 case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ) |
328 | 102 ... | (suc zero) :: (suc zero :: (zero :: f0 )) | (suc zero) :: (suc zero :: (zero :: f0 )) = |
124 | 103 case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ) |
328 | 104 ... | (suc (suc zero)) :: (zero :: (zero :: f0 )) | (suc (suc zero)) :: (zero :: (zero :: f0 )) = |
124 | 105 case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ) |
328 | 106 ... | (suc (suc zero)) :: (suc zero) :: (zero :: f0) | (suc (suc zero)) :: (suc zero) :: (zero :: f0) = |
124 | 107 case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ) |
125 | 108 |
328 | 109 ... | (zero :: (suc zero) :: (zero :: f0 )) | ((suc zero) :: (zero :: (zero :: f0 ))) = |
125 | 110 case2 (case2 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )) |
328 | 111 ... | (zero :: (suc zero) :: (zero :: f0 )) | (suc zero) :: (suc zero :: (zero :: f0 )) = |
125 | 112 case2 (case2 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )) |
328 | 113 ... | (zero :: (suc zero) :: (zero :: f0 )) | (suc (suc zero)) :: (zero :: (zero :: f0 ))= |
125 | 114 case2 (case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )) |
328 | 115 ... | (zero :: (suc zero) :: (zero :: f0 )) | ((suc (suc zero)) :: (suc zero) :: (zero :: f0))= |
125 | 116 case2 (case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )) |
328 | 117 ... | ((suc zero) :: (zero :: (zero :: f0 ))) | (zero :: (suc zero) :: (zero :: f0 )) = |
162 | 118 case2 (case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )) |
328 | 119 ... | ((suc zero) :: (zero :: (zero :: f0 ))) | (suc zero) :: (suc zero :: (zero :: f0 )) = |
125 | 120 case2 (case2 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )) |
328 | 121 ... | ((suc zero) :: (zero :: (zero :: f0 ))) | ((suc (suc zero)) :: (zero :: (zero :: f0 )))= |
125 | 122 case2 (case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )) |
328 | 123 ... | ((suc zero) :: (zero :: (zero :: f0 ))) | (suc (suc zero)) :: (suc zero) :: (zero :: f0) = |
125 | 124 case2 (case2 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )) |
328 | 125 ... | (suc zero) :: (suc zero :: (zero :: f0 )) | (zero :: (suc zero) :: (zero :: f0 )) = |
125 | 126 case2 (case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )) |
328 | 127 ... | (suc zero) :: (suc zero :: (zero :: f0 )) | ((suc zero) :: (zero :: (zero :: f0 ))) = |
125 | 128 case2 (case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )) |
328 | 129 ... | (suc zero) :: (suc zero :: (zero :: f0 )) | ((suc (suc zero)) :: (zero :: (zero :: f0 ))) = |
125 | 130 case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ) |
328 | 131 ... | (suc zero) :: (suc zero :: (zero :: f0 )) | ((suc (suc zero)) :: (suc zero) :: (zero :: f0)) = |
125 | 132 case2 (case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )) |
328 | 133 ... | (suc (suc zero)) :: (zero :: (zero :: f0 )) | ((zero :: (suc zero) :: (zero :: f0 )) ) = |
125 | 134 case2 (case2 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )) |
328 | 135 ... | (suc (suc zero)) :: (zero :: (zero :: f0 )) | ((suc zero) :: (zero :: (zero :: f0 ))) = |
125 | 136 case2 (case2 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )) |
328 | 137 ... | (suc (suc zero)) :: (zero :: (zero :: f0 )) | ((suc zero) :: (suc zero :: (zero :: f0 ))) = |
125 | 138 case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) ) |
328 | 139 ... | (suc (suc zero)) :: (zero :: (zero :: f0 )) | ((suc (suc zero)) :: (suc zero) :: (zero :: f0)) = |
125 | 140 case2 (case2 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )) |
328 | 141 ... | ((suc (suc zero)) :: (suc zero) :: (zero :: f0)) | ((zero :: (suc zero) :: (zero :: f0 )) ) = |
125 | 142 case2 (case2 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )) |
328 | 143 ... | ((suc (suc zero)) :: (suc zero) :: (zero :: f0)) | ((suc zero) :: (zero :: (zero :: f0 ))) = |
125 | 144 case2 (case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )) |
328 | 145 ... | ((suc (suc zero)) :: (suc zero) :: (zero :: f0)) | ((suc zero) :: (suc zero :: (zero :: f0 ))) = |
125 | 146 case2 (case2 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )) |
328 | 147 ... | ((suc (suc zero)) :: (suc zero) :: (zero :: f0)) | (suc (suc zero)) :: (zero :: (zero :: f0 )) = |
125 | 148 case2 (case1 (ptrans (comm-resp (pFL g ge) (pFL h he)) (FL-inject refl) )) |
119 | 149 |
150 stage12 : (x : Permutation 3 3) → stage1 x → ( x =p= pid ) ∨ ( x =p= p3 ) ∨ ( x =p= p4 ) | |
331 | 151 stage12 x (comm {g} {h} x1 y1 eq ) = st02 g h |
119 | 152 |
70 | 153 solved1 : (x : Permutation 3 3) → Commutator (λ x₁ → Commutator (λ x₂ → Lift (Level.suc Level.zero) ⊤) x₁) x → x =p= pid |
331 | 154 solved1 _ (comm {g} {h} x y eq) with stage12 g x | stage12 h y |
125 | 155 ... | case1 t | case1 s = ptrans (comm-resp t s) (comm-refl {pid} prefl) |
156 ... | case1 t | case2 s = ptrans (comm-resp {g} {h} {pid} t prefl) (idcomtl h) | |
157 ... | case2 t | case1 s = ptrans (comm-resp {g} {h} {_} {pid} prefl s) (idcomtr g) | |
158 ... | case2 (case1 t) | case2 (case1 s) = record { peq = λ q → trans ( peq ( comm-resp {g} {h} t s ) q ) (peq com33 q) } | |
159 ... | case2 (case2 t) | case2 (case2 s) = record { peq = λ q → trans ( peq ( comm-resp {g} {h} t s ) q ) (peq com44 q) } | |
160 ... | case2 (case1 t) | case2 (case2 s) = record { peq = λ q → trans ( peq ( comm-resp {g} {h} t s ) q ) (peq com34 q) } | |
161 ... | case2 (case2 t) | case2 (case1 s) = record { peq = λ q → trans ( peq ( comm-resp {g} {h} t s ) q ) (peq com43 q) } | |
123 | 162 |