def h.split_wf.b

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

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

3722def h.split_wf.b(
3723  ~K: Data, ~V: Data, ~hash: K -> U32, ~eq: K -> K -> Bool, +p: Nat, +mask: U32, +o: U32,
3724  +es: List<&2, M.Entry<K, V>>, +k: K, +v: V,
3725  +hs: {Laws.hmap_hashed(~K, ~V, ~hash, es, o) == True{} : Bool},
3726  +ds: {Laws.hmap_distinct(~K, ~V, ~eq, es) == True{} : Bool},
3727  b1: Bool, b2: Bool,
3728  ih: {h.WF(~K, ~V, ~hash, ~eq, p, h.S(~K, ~V, ~eq, p, (mask << 1n : U32), o, es, hash(k), k, v)) == True{} : Bool}
3729) -> {h.WF(~K, ~V, ~hash, ~eq, 1n+p, h.sp(~K, ~V, ~eq, b1, b2, p, mask, o, es, hash(k), k, v)) == True{} : Bool}:
3730  match b1 b2:
3731    case True{} True{}:
3732      MBool.and_eq_true(h.WF(~K, ~V, ~hash, ~eq, p, h.S(~K, ~V, ~eq, p, (mask << 1n : U32), o, es, hash(k), k, v)), h.WF(~K, ~V, ~hash, ~eq, p, M.HNil{}), ih, h.wf_nil(~K, ~V, ~hash, ~eq, p))
3733    case True{} False{}:
3734      MBool.and_eq_true(h.WF(~K, ~V, ~hash, ~eq, p, M.HNil{}), h.WF(~K, ~V, ~hash, ~eq, p, h.S(~K, ~V, ~eq, p, (mask << 1n : U32), o, es, hash(k), k, v)), h.wf_nil(~K, ~V, ~hash, ~eq, p), ih)
3735    case False{} True{}:
3736      MBool.and_eq_true(h.WF(~K, ~V, ~hash, ~eq, p, M.HLeaf{o, es}), h.WF(~K, ~V, ~hash, ~eq, p, M.HLeaf{hash(k), [M.Entry{k, v}]}), h.wf_leaf_o(~K, ~V, ~hash, ~eq, p, o, es, hs, ds), h.wf_fresh(~K, ~V, ~hash, ~eq, p, k, v))
3737    case False{} False{}:
3738      MBool.and_eq_true(h.WF(~K, ~V, ~hash, ~eq, p, M.HLeaf{hash(k), [M.Entry{k, v}]}), h.WF(~K, ~V, ~hash, ~eq, p, M.HLeaf{o, es}), h.wf_fresh(~K, ~V, ~hash, ~eq, p, k, v), h.wf_leaf_o(~K, ~V, ~hash, ~eq, p, o, es, hs, ds))

Uses (16)

Used by (1)