annotate src/sym5a.agda @ 274:691b2ee844ef

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 26 Jan 2023 01:16:38 +0900
parents 6d1619d9f880
children f59a9f4cfd78
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
251
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
3 module sym5a 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
75
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
6 open import Data.Unit using (⊤ ; tt )
68
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 open import Function.Inverse as Inverse using (_↔_; Inverse; _InverseOf_)
75
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
8 open import Function hiding (flip)
68
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 open import Data.Nat hiding (_⊔_) -- using (ℕ; suc; zero)
75
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
10 open import Data.Nat.Properties
68
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 open import Relation.Nullary
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 open import Data.Empty
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 open import Data.Product
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 open import Gutil
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 open import Putil
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 open import Solvable using (solvable)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 open import Relation.Binary.PropositionalEquality hiding ( [_] )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19
75
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
20 open import Data.Fin hiding (_<_ ; _≤_ ; lift )
116
6022d00a0690 check termination problem remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 115
diff changeset
21 open import Data.Fin.Permutation hiding (_∘ₚ_)
6022d00a0690 check termination problem remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 115
diff changeset
22
6022d00a0690 check termination problem remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 115
diff changeset
23 infixr 200 _∘ₚ_
6022d00a0690 check termination problem remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 115
diff changeset
24 _∘ₚ_ = Data.Fin.Permutation._∘ₚ_
6022d00a0690 check termination problem remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 115
diff changeset
25
73
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
26 open import Data.List hiding ( [_] )
75
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
27 open import nat
77
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 76
diff changeset
28 open import fin
84
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
29 open import logic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
30
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
31 open _∧_
68
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 ¬sym5solvable : ¬ ( solvable (Symmetric 5) )
251
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
34 ¬sym5solvable sol = counter-example (end5 (abc 0<3 0<4 ) (any3de (dervied-length sol) 3rot 0<3 0<4 ) ) where
73
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
35 --
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
36 -- dba 1320 d → b → a → d
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
37 -- (dba)⁻¹ 3021 a → b → d → a
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
38 -- aec 21430
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
39 -- (aec)⁻¹ 41032
113
d8a21c5db0e0 sym5 done but agda won'y stop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 112
diff changeset
40 -- [ dba , aec ] = (abd)(cea)(dba)(aec) = abc
d8a21c5db0e0 sym5 done but agda won'y stop
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 112
diff changeset
41 -- so commutator always contains abc, dba and aec
73
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
42
112
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 111
diff changeset
43 open ≡-Reasoning
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 111
diff changeset
44
73
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
45 open solvable
112
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 111
diff changeset
46 open Solvable ( Symmetric 5)
73
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
47 end5 : (x : Permutation 5 5) → deriving (dervied-length sol) x → x =p= pid
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
48 end5 x der = end sol x der
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 70
diff changeset
49
74
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
50 0<4 : 0 < 4
75
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
51 0<4 = s≤s z≤n
74
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
52
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
53 0<3 : 0 < 3
75
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
54 0<3 = s≤s z≤n
74
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
55
79
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 78
diff changeset
56 --- 1 ∷ 2 ∷ 0 ∷ [] abc
74
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
57 3rot : Permutation 3 3
79
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 78
diff changeset
58 3rot = pid {3} ∘ₚ pins (n≤ 2)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 78
diff changeset
59
85
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 84
diff changeset
60 save2 : {i j : ℕ } → (i ≤ 3 ) → ( j ≤ 4 ) → Permutation 5 5
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 84
diff changeset
61 save2 i<3 j<4 = flip (pins (s≤s i<3)) ∘ₚ flip (pins j<4)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 84
diff changeset
62
251
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
63 -- Permutation 5 5 include any Permutation 3 3
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
64 any3 : {i j : ℕ } → Permutation 3 3 → (i ≤ 3 ) → ( j ≤ 4 ) → Permutation 5 5
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
65 any3 abc i<3 j<4 = (save2 i<3 j<4 ∘ₚ (pprep (pprep abc))) ∘ₚ flip (save2 i<3 j<4 )
74
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
66
251
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
67 any3cong : {i j : ℕ } → {x y : Permutation 3 3 } → {i<3 : i ≤ 3 } → {j<4 : j ≤ 4 } → x =p= y → any3 x i<3 j<4 =p= any3 y i<3 j<4
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
68 any3cong {i} {j} {x} {y} {i<3} {j<4} x=y = presp {5} {save2 i<3 j<4 ∘ₚ (pprep (pprep x))} {_} {flip (save2 i<3 j<4 )}
116
6022d00a0690 check termination problem remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 115
diff changeset
69 (presp {5} {save2 i<3 j<4} prefl (pprep-cong (pprep-cong x=y)) ) prefl
112
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 111
diff changeset
70
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 111
diff changeset
71 open _=p=_
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 111
diff changeset
72
251
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
73 -- derving n includes any Permutation 3 3,
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
74 any3de : {i j : ℕ } → (n : ℕ) → (abc : Permutation 3 3) → (i<3 : i ≤ 3 ) → (j<4 : j ≤ 4 ) → deriving n (any3 abc i<3 j<4)
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
75 any3de {i} {j} zero abc i<3 j<4 = Level.lift tt
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
76 any3de {i} {j} (suc n) abc i<3 j<4 = ccong abc-from-comm (comm (any3de n (abc ∘ₚ abc) i<3 j0<4 ) (any3de n (abc ∘ₚ abc) i0<3 j<4 )) where
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
77 i0 : ℕ
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
78 i0 = ?
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
79 j0 : ℕ
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
80 j0 = ?
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
81 i0<3 : i0 ≤ 3
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
82 i0<3 = {!!}
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
83 j0<4 : j0 ≤ 4
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
84 j0<4 = {!!}
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
85 abc-from-comm : [ any3 (abc ∘ₚ abc) i<3 j0<4 , any3 (abc ∘ₚ abc) i0<3 j<4 ] =p= any3 abc i<3 j<4
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
86 abc-from-comm = {!!}
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
87
75
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 74
diff changeset
88 abc : {i j : ℕ } → (i ≤ 3 ) → ( j ≤ 4 ) → Permutation 5 5
251
d782dd481a26 compile
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 184
diff changeset
89 abc i<3 j<4 = any3 3rot i<3 j<4
74
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
90
184
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 118
diff changeset
91 counter-example : ¬ (abc 0<3 0<4 =p= pid )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 118
diff changeset
92 counter-example eq with ←pleq _ _ eq
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 118
diff changeset
93 ... | ()
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 118
diff changeset
94