def h.distinct_del.c

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

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

2495def h.distinct_del.c(
2496  ~K: Data, ~V: Data, ~eq: K -> K -> Bool, +key: K, +val: V,
2497  +rest: List<&2, M.Entry<K, V>>, +k: K, b: Bool,
2498  +ds: {Laws.hmap_distinct(~K, ~V, ~eq, M.Entry{key, val} <> rest) == True{} : Bool},
2499  ih: {Laws.hmap_distinct(~K, ~V, ~eq, M.HMap.entries.del(~K, ~V, ~eq, rest, k)) == True{} : Bool}
2500) -> {Laws.hmap_distinct(~K, ~V, ~eq, h.edc(~K, ~V, ~eq, b, key, val, rest, k)) == True{} : Bool}:
2501  match b:
2502    case True{}:
2503      MBool.eq_true_of_and_right(Laws.hmap_absent(~K, ~V, ~eq, rest, key), Laws.hmap_distinct(~K, ~V, ~eq, rest), ds)
2504    case False{}:
2505      MBool.and_eq_true(Laws.hmap_absent(~K, ~V, ~eq, M.HMap.entries.del(~K, ~V, ~eq, rest, k), key), Laws.hmap_distinct(~K, ~V, ~eq, M.HMap.entries.del(~K, ~V, ~eq, rest, k)), h.absent_del(~K, ~V, ~eq, rest, key, k,
2506          MBool.eq_true_of_and_left(Laws.hmap_absent(~K, ~V, ~eq, rest, key), Laws.hmap_distinct(~K, ~V, ~eq, rest), ds)), ih)

Uses (11)

Used by (1)