def h.wf_del.lf

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

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

3820def h.wf_del.lf(
3821  ~K: Data, ~V: Data, ~hash: K -> U32, ~eq: K -> K -> Bool, +p: Nat, +o: U32,
3822  +es: List<&2, M.Entry<K, V>>, +k: K,
3823  +hs: {Laws.hmap_hashed(~K, ~V, ~hash, es, o) == True{} : Bool},
3824  +ds: {Laws.hmap_distinct(~K, ~V, ~eq, es) == True{} : Bool}, b: Bool
3825) -> {h.WF(~K, ~V, ~hash, ~eq, 1n+p, h.dl(~K, ~V, ~eq, b, o, es, k)) == True{} : Bool}:
3826  match b:
3827    case True{}:
3828      h.wf_leaf(~K, ~V, ~hash, ~eq, 1n+p, o, M.HMap.entries.del(~K, ~V, ~eq, es, k),
3829        MBool.and_eq_true(Laws.hmap_hashed(~K, ~V, ~hash, M.HMap.entries.del(~K, ~V, ~eq, es, k), o), Laws.hmap_distinct(~K, ~V, ~eq, M.HMap.entries.del(~K, ~V, ~eq, es, k)), h.hashed_del(~K, ~V, ~hash, ~eq, es, o, k, hs), h.distinct_del(~K, ~V, ~eq, es, k, ds)))
3830    case False{}:
3831      MBool.and_eq_true(Laws.hmap_hashed(~K, ~V, ~hash, es, o), Laws.hmap_distinct(~K, ~V, ~eq, es), hs, ds)

Uses (14)

Used by (1)