def h.hashed_put.c
bend-kit-collections@0.1.4.1 · PROOF.bend:2442
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
2442def h.hashed_put.c(
2443 ~K: Data, ~V: Data, ~hash: K -> U32, ~eq: K -> K -> Bool, +key: K, +val: V,
2444 +rest: List<&2, M.Entry<K, V>>, +o: U32, +k: K, +v: V, b: Bool,
2445 +hs: {Laws.hmap_hashed(~K, ~V, ~hash, M.Entry{key, val} <> rest, o) == True{} : Bool},
2446 ih: {Laws.hmap_hashed(~K, ~V, ~hash, M.HMap.entries.put(~K, ~V, ~eq, rest, k, v), o) == True{} : Bool}
2447) -> {Laws.hmap_hashed(~K, ~V, ~hash, h.epc(~K, ~V, ~eq, b, key, val, rest, k, v), o) == True{} : Bool}:
2448 match b:
2449 case True{}:
2450 hs
2451 case False{}:
2452 MBool.and_eq_true(U32.is_eq(o, hash(key)), Laws.hmap_hashed(~K, ~V, ~hash, M.HMap.entries.put(~K, ~V, ~eq, rest, k, v), o), MBool.eq_true_of_and_left(U32.is_eq(o, hash(key)), Laws.hmap_hashed(~K, ~V, ~hash, rest, o), hs), ih)