LAWS.hmap_collision_get: law of bend-kit-collections@0.1.4.1 Import: import bend-kit-collections@0.1.4.1/LAWS.bend as LAWS Lines 672-690 of bend-kit-collections@0.1.4.1/LAWS.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-collections@0.1.4.1/LAWS.bend&start_line=672&end_line=690 import Base import bend-kit-collections@0.1.4.1/hmap.bend as M # Two distinct keys with one hash share a bucket; both stay reachable. law hmap_collision_get: for ~K: Data for ~V: Data for ~hash: K -> U32 for ~eq: K -> K -> Bool for ~refl: @x: K -> {eq(x, x) == True{} : Bool} for ~sound: @x: K -> @y: K -> {eq(x, y) == True{} : Bool} -> {x == y : K} for +m: M.HMap for +wf: {hmap_wf(~K, ~V, ~hash, ~eq, m) == True{} : Bool} for +k1: K for +k2: K for ne: {k2 != k1 : K} for same: {hash(k1) == hash(k2) : U32} for +v1: V for +v2: V {M.HMap.get(~K, ~V, ~hash, ~eq, M.HMap.put(~K, ~V, ~hash, ~eq, M.HMap.put(~K, ~V, ~hash, ~eq, m, k1, v1), k2, v2), k1) == Some{v1} : Maybe<&2, V>} Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Empty https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.trans https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/LAWS.bend&name=hmap_wf https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=h.gp_other https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=h.gp_same https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=h.ne_f https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=h.wf_put https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/hmap.bend&name=HMap https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/hmap.bend&name=HMap.get https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/hmap.bend&name=HMap.put