# HG changeset patch # User Shinji KONO # Date 1597928362 -32400 # Node ID 9ce6141ef479ddae091052aad757ea0ddedd00f9 # Parent 84c84695de9458017dcd8d2cbcba8b80fc8f8b41 start again diff -r 84c84695de94 -r 9ce6141ef479 Symmetric.agda --- a/Symmetric.agda Thu Aug 20 14:13:08 2020 +0900 +++ b/Symmetric.agda Thu Aug 20 21:59:22 2020 +0900 @@ -14,7 +14,7 @@ open import Data.Nat -- using (ℕ; suc; zero; s≤s ; z≤n ) open import Data.Nat.Properties -- using (<-trans) open import Relation.Binary.PropositionalEquality -open import Data.List using (List; []; _∷_ ; length ; _++_ ) +open import Data.List using (List; []; _∷_ ; length ; _++_ ) renaming (reverse to rev ) open import nat fid : {p : ℕ } → Fin p → Fin p @@ -122,61 +122,11 @@ piso→ (suc zero) = refl piso→ (suc (suc x)) = cong (λ k → suc (suc k) ) (inverseʳ perm) -Finnm : {n m : ℕ } → Fin (n + m) ≡ Fin (m + n) -Finnm {n} {m} = cong (λ k → Fin k ) (+-comm n _ ) - -Finnmconv : {n m : ℕ } → Fin (m + n) → Fin (n + m) -Finnmconv {n} {m} x = subst (λ k → Fin k ) (+-comm m _) x - -m+n→n : {n m : ℕ } → (x : Fin (n + m)) → toℕ x < n → Fin n -m+n→n x x ¬a ¬b c = m→m+n (q ⟨$⟩ˡ (m+n→m x (≤to< c) )) - - p← : Fin (n + m) → Fin (n + m) - p← x with <-cmp (toℕ x ) n - p← x | tri< a ¬b ¬c = n→m+n (p ⟨$⟩ʳ (m+n→n x a )) - p← x | tri≈ ¬a b ¬c = m→m+n (q ⟨$⟩ʳ (m+n→m x (lem00 (sym b)))) - p← x | tri> ¬a ¬b c = m→m+n (q ⟨$⟩ʳ (m+n→m x (≤to< c)) ) - - piso← : (x : Fin (n + m) ) → p→ ( p← x ) ≡ x - piso← x with <-cmp (toℕ x ) n - piso← x | tri< a ¬b ¬c = ? - piso← x | tri≈ ¬a b ¬c = ? - piso← x | tri> ¬a ¬b c = ? - - piso→ : (x : Fin (n + m) ) → p← ( p→ x ) ≡ x - piso→ = {!!} - - -- enumeration -psawpn : {n m : ℕ} → suc m < n → Permutation n n -psawpn {suc zero} {m} (s≤s ()) -psawpn {suc n} {m} (s≤s (s≤s x)) = pswap pid +psawpn : {n : ℕ} → 1 < n → Permutation n n +psawpn {suc zero} (s≤s ()) +psawpn {suc n} (s≤s (s≤s x)) = pswap pid pfill : { n m : ℕ } → m ≤ n → Permutation m m → Permutation n n pfill {n} {m} m≤n perm = pfill1 (n - m) (n-m