annotate src/sym4.agda @ 274:691b2ee844ef

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 26 Jan 2023 01:16:38 +0900
parents 6d1619d9f880
children 77f01da94c4e
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
88
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
3 module sym4 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
88
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
20 open import Data.Fin.Permutation hiding (_∘ₚ_)
68
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21
88
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
22 infixr 200 _∘ₚ_
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
23 _∘ₚ_ = Data.Fin.Permutation._∘ₚ_
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
24
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
25 sym4solvable : solvable (Symmetric 4)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
26 solvable.dervied-length sym4solvable = 3
182
eb94265d2a39 Any based proof computation done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 162
diff changeset
27 solvable.end sym4solvable x d = solved1 x d where
68
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28
70
32004c9a70b1 sym2 done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 69
diff changeset
29 open import Data.List using ( List ; [] ; _∷_ )
88
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
30 open Solvable (Symmetric 4)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
31
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
32 -- Klien
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
33 --
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
34 -- 1 (1,2),(3,4) (1,3),(2,4) (1,4),(2,3)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
35 -- 0 ∷ 1 ∷ 2 ∷ 3 ∷ [] , 1 ∷ 0 ∷ 3 ∷ 2 ∷ [] , 2 ∷ 3 ∷ 0 ∷ 1 ∷ [] , 3 ∷ 2 ∷ 1 ∷ 0 ∷ [] ,
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
36
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
37 a0 = pid {4}
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
38 a1 = pswap (pswap (pid {0}))
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
39 a2 = pid {4} ∘ₚ pins (n≤ 3) ∘ₚ pins (n≤ 3 )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
40 a3 = pins (n≤ 3) ∘ₚ pins (n≤ 2) ∘ₚ pswap (pid {2})
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
41
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
42 k3 = plist (a1 ∘ₚ a2 ) ∷ plist (a1 ∘ₚ a3) ∷ plist (a2 ∘ₚ a1 ) ∷ []
111
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 88
diff changeset
43
153
d880595eae30 FLinsert-mb
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 127
diff changeset
44 open import FLutil
d880595eae30 FLinsert-mb
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 127
diff changeset
45 open import Data.List.Fresh hiding ([_])
d880595eae30 FLinsert-mb
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 127
diff changeset
46 open import Relation.Nary using (⌊_⌋)
d880595eae30 FLinsert-mb
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 127
diff changeset
47
182
eb94265d2a39 Any based proof computation done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 162
diff changeset
48 p0id : FL→perm ((# 0) :: (# 0) :: ((# 0) :: ((# 0 ) :: f0))) =p= pid
111
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 88
diff changeset
49 p0id = pleq _ _ refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 88
diff changeset
50
127
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 111
diff changeset
51
182
eb94265d2a39 Any based proof computation done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 162
diff changeset
52 open import Data.List.Fresh.Relation.Unary.Any
eb94265d2a39 Any based proof computation done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 162
diff changeset
53 open import FLComm
111
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 88
diff changeset
54
182
eb94265d2a39 Any based proof computation done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 162
diff changeset
55 stage3FList : CommFListN 4 3 ≡ cons (zero :: zero :: zero :: zero :: f0) [] (Level.lift tt)
eb94265d2a39 Any based proof computation done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 162
diff changeset
56 stage3FList = refl
251
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
57
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
58 st3 = proj₁ (toList ( CommFListN 4 2 ))
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
59 -- st4 = {!!}
182
eb94265d2a39 Any based proof computation done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 162
diff changeset
60
eb94265d2a39 Any based proof computation done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 162
diff changeset
61 solved1 : (x : Permutation 4 4) → deriving 3 x → x =p= pid
184
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 182
diff changeset
62 solved1 x dr = CommSolved 4 x ( CommFListN 4 3 ) stage3FList p0id solved2 where
182
eb94265d2a39 Any based proof computation done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 162
diff changeset
63 -- p0id : FL→perm ((# 0) :: ((# 0) :: ((# 0 ) :: f0))) =p= pid
eb94265d2a39 Any based proof computation done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 162
diff changeset
64 solved2 : Any (perm→FL x ≡_) ( CommFListN 4 3 )
eb94265d2a39 Any based proof computation done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 162
diff changeset
65 solved2 = CommStage→ 4 3 x dr