def h.distinct_del

bend-kit-collections@0.1.4.1 · PROOF.bend:2508

import bend-kit-collections@0.1.4.1/PROOF.bend as PROOF
import Base
import bend-mathlib@0.7.4.0/bool.bend as MBool
import bend-kit-collections@0.1.4.1/LAWS.bend as Laws
import bend-kit-collections@0.1.4.1/hmap.bend as M

2508def h.distinct_del(
2509  ~K: Data, ~V: Data, ~eq: K -> K -> Bool, xs: List<&2, M.Entry<K, V>>, +k: K,
2510  ds: {Laws.hmap_distinct(~K, ~V, ~eq, xs) == True{} : Bool}
2511) -> {Laws.hmap_distinct(~K, ~V, ~eq, M.HMap.entries.del(~K, ~V, ~eq, xs, k)) == True{} : Bool}:
2512  match xs:
2513    case Nil{}:
2514      {==}
2515    case Con{M.Entry{+key, +val}, +rest}:
2516      +ds = ds
2517      h.distinct_del.c(~K, ~V, ~eq, key, val, rest, k, eq(k, key), ds,
2518        h.distinct_del(~K, ~V, ~eq, rest, k,
2519          MBool.eq_true_of_and_right(Laws.hmap_absent(~K, ~V, ~eq, rest, key), Laws.hmap_distinct(~K, ~V, ~eq, rest), ds)))

Uses (8)

Used by (2)