def h.r_eg.c
bend-kit-collections@0.1.4.1 · PROOF.bend:3013
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
3013
3014def h.r_eg.c(
3015 ~K: Data, ~V: Data, ~hash: K -> U32, ~eq: K -> K -> Bool,
3016 ~sound: @x: K -> @y: K -> {eq(x, y) == True{} : Bool} -> {x == y : K},
3017 +o: U32, +es: List<&2, M.Entry<K, V>>, +k: K,
3018 hs: {Laws.hmap_hashed(~K, ~V, ~hash, es, o) == True{} : Bool},
3019 b: Bool, eb: {b == U32.is_eq(o, hash(k)) : Bool}
3020) -> {h.EG(~K, ~V, ~eq, es, k)
3021 == M.HMap.bool(Maybe<&2, V>, b, u => h.EG(~K, ~V, ~eq, es, k), u => None{}) : Maybe<&2, V>}:
3022 match b:
3023 case True{}:
3024 {==}
3025 case False{}:
3026 h.eg_none_hashed(~K, ~V, ~hash, ~eq, ~sound, es, o, k, h.sb(False{}, U32.is_eq(o, hash(k)), eb), hs)