def h.absent_del.c

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

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

2470def h.absent_del.c(
2471  ~K: Data, ~V: Data, ~eq: K -> K -> Bool, +key2: K, +val: V,
2472  +rest: List<&2, M.Entry<K, V>>, +key: K, +k: K, b: Bool,
2473  +ab: {Laws.hmap_absent(~K, ~V, ~eq, M.Entry{key2, val} <> rest, key) == True{} : Bool},
2474  ih: {Laws.hmap_absent(~K, ~V, ~eq, M.HMap.entries.del(~K, ~V, ~eq, rest, k), key) == True{} : Bool}
2475) -> {Laws.hmap_absent(~K, ~V, ~eq, h.edc(~K, ~V, ~eq, b, key2, val, rest, k), key) == True{} : Bool}:
2476  match b:
2477    case True{}:
2478      MBool.eq_true_of_and_right(Bool.not(eq(key, key2)), Laws.hmap_absent(~K, ~V, ~eq, rest, key), ab)
2479    case False{}:
2480      MBool.and_eq_true(Bool.not(eq(key, key2)), Laws.hmap_absent(~K, ~V, ~eq, M.HMap.entries.del(~K, ~V, ~eq, rest, k), key), MBool.eq_true_of_and_left(Bool.not(eq(key, key2)), Laws.hmap_absent(~K, ~V, ~eq, rest, key), ab), ih)

Uses (10)

Used by (1)