From 066861f9cdde4ded6c5442508bef1a27576c68d7 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Tue, 17 Dec 2013 08:22:12 +0100 Subject: update bff implementation to use delete In the presence of shape-changing updates, bff needs to shrink one of the mappings before unifying them. As long the shape does not change, the union becomes a disjoint union. With this insight we can adapt the proof of theorem-1 using the adapted lemma-disjoint-union. Unfortunately theorem-2 requires more work and assoc-enough becomes non-trivial due to the introduction of mapMV. --- Precond.agda | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Precond.agda') diff --git a/Precond.agda b/Precond.agda index e4699dc..16e452b 100644 --- a/Precond.agda +++ b/Precond.agda @@ -28,11 +28,13 @@ import Bidir open BFF.VecBFF Carrier deq using (get-type ; assoc ; enumerate ; denumerate ; bff) +{- assoc-enough : {getlen : ℕ → ℕ} (get : get-type getlen) → {m : ℕ} → (s : Vec Carrier m) → (v : Vec Carrier (getlen m)) → ∃ (λ h → assoc (get (enumerate s)) v ≡ just h) → ∃ λ u → bff get s v ≡ just u assoc-enough get s v (h , p) = u , cong (_<$>_ (flip map s′ ∘ flip lookup) ∘ (_<$>_ (flip union g))) p where s′ = enumerate s g = fromFunc (denumerate s) u = map (flip lookup (union h g)) s′ +-} data All-different {A : Set} : List A → Set where different-[] : All-different [] -- cgit v1.2.3