def h.split_wf

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

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

3740def h.split_wf(
3741  ~K: Data, ~V: Data, ~hash: K -> U32, ~eq: K -> K -> Bool, ~refl: @x: K -> {eq(x, x) == True{} : Bool},
3742  ~sound: @x: K -> @y: K -> {eq(x, y) == True{} : Bool} -> {x == y : K},
3743  n: Nat, +mask: U32, +o: U32, +es: List<&2, M.Entry<K, V>>, +k: K, +v: V,
3744  +hs: {Laws.hmap_hashed(~K, ~V, ~hash, es, o) == True{} : Bool},
3745  +ds: {Laws.hmap_distinct(~K, ~V, ~eq, es) == True{} : Bool}
3746) -> {h.WF(~K, ~V, ~hash, ~eq, n, h.S(~K, ~V, ~eq, n, mask, o, es, hash(k), k, v)) == True{} : Bool}:
3747  match n:
3748    case 0n:
3749      h.distinct_put(~K, ~V, ~eq, ~refl, ~sound, es, k, v, ds)
3750    case 1n+(+p):
3751      h.split_wf.b(~K, ~V, ~hash, ~eq, p, mask, o, es, k, v, hs, ds,
3752        U32.is_eq((o .&. mask : U32), (hash(k) .&. mask : U32)), U32.is_eq((o .&. mask : U32), 0),
3753        h.split_wf(~K, ~V, ~hash, ~eq, ~refl, ~sound, p, (mask << 1n : U32), o, es, k, v, hs, ds))

Uses (14)

Used by (1)