diff options
author | Helmut Grohne <grohne@cs.uni-bonn.de> | 2014-01-27 13:46:47 +0100 |
---|---|---|
committer | Helmut Grohne <grohne@cs.uni-bonn.de> | 2014-01-27 13:46:47 +0100 |
commit | 09cf8a92e03a4cebffdf9bb58aaf1b01b55e73a3 (patch) | |
tree | d4087f8e162c52a706e07ec3aa9623c9d637984f /BFF.agda | |
parent | 00e60d0339d3e0044abfb06b8f77e9f7a3ffdcfb (diff) | |
parent | 71025b5f1d0a11b0cf373192210b293a77d45c04 (diff) | |
download | bidiragda-09cf8a92e03a4cebffdf9bb58aaf1b01b55e73a3.tar.gz |
Merge branch feature-delete
Most conflicts stem from varying imports or added functions and a
take-both approach merges them. A notable exception is theorem-2, where
a new result sequence-cong was required. Apart from that, theorem-2
could be taken almost verbatim from feature-delete albeit its type
coming from feature-decsetoid.
Conflicts:
Bidir.agda
FinMap.agda
Generic.agda
Precond.agda
Diffstat (limited to 'BFF.agda')
-rw-r--r-- | BFF.agda | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -14,6 +14,7 @@ open import Function using (id ; _∘_ ; flip) open import Relation.Binary using (DecSetoid ; module DecSetoid) open import FinMap +open import Generic using (mapMV) import CheckInsert import FreeTheorems @@ -34,7 +35,9 @@ module VecBFF (A : DecSetoid ℓ₀ ℓ₀) where bff : {getlen : ℕ → ℕ} → (get-type getlen) → ({n : ℕ} → Vec Carrier n → Vec Carrier (getlen n) → Maybe (Vec Carrier n)) bff get s v = let s′ = enumerate s + t′ = get s′ g = fromFunc (denumerate s) - h = assoc (get s′) v - h′ = (flip union g) <$> h - in (flip mapV s′ ∘ flip lookupV) <$> h′ + g′ = delete-many t′ g + h = assoc t′ v + h′ = (flip union g′) <$> h + in h′ >>= flip mapMV s′ ∘ flip lookupV |