From ce4ea63db5e11b150058894f98b4a36a3003c95a Mon Sep 17 00:00:00 2001 From: Jacques Comeaux Date: Tue, 23 Apr 2024 17:45:31 -0500 Subject: Add merge and unmerge properties --- FinMerge/Properties.agda | 145 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 139 insertions(+), 6 deletions(-) (limited to 'FinMerge') diff --git a/FinMerge/Properties.agda b/FinMerge/Properties.agda index 9123460..c250abb 100644 --- a/FinMerge/Properties.agda +++ b/FinMerge/Properties.agda @@ -9,12 +9,12 @@ open import Data.Nat.Properties using (≤-trans; <⇒≢) open import Data.Product using (_,_; proj₁; proj₂; Σ-syntax) open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong; cong-app; sym; _≢_) open import Relation.Binary.PropositionalEquality.Properties using (module ≡-Reasoning) -open import Data.Maybe.Base using (Maybe; nothing; just; fromMaybe) +open import Data.Maybe.Base using (Maybe; map; nothing; just; fromMaybe) open import Function using (id;  _∘_) open import Util using (_<_<_; _<_≤_; toℕ<; Ordering; less; equal; greater; compare) -open import FinMerge using (merge; pluck; glue-once; glue-unglue-once; glue-iter) +open import FinMerge using (merge; unmerge; pluck; glue-once; glue-unglue-once; glue-iter) private @@ -29,14 +29,14 @@ pluck-< → (m≤n : m ≤ n) → (x + : {i j : Fin (ℕ.suc n)} + → {k : Fin n} + → ((i (i + : {i j : Fin (ℕ.suc n)} + → {k : Fin n} + → ((i {ℕ.suc n} {Fin.zero} {Fin.suc Fin.zero} {Fin.suc k} (s≤s z≤n , s≤s z≤n) (s≤s j {ℕ.suc n} {Fin.zero} {Fin.suc (Fin.suc j)} {Fin.suc k} (s≤s z≤n , s≤s j≤n) (s≤s j (s≤s z≤n , j≤n) j {ℕ.suc n} {Fin.suc i} {Fin.suc j} {Fin.suc k} (s≤s i (i + : {i j k : Fin (ℕ.suc n)} + → (i {n} {i} {j} {Fin.suc k} i i i i