PROOF.put.bnd: def of bend-kit-collections@0.1.4.1 Import: import bend-kit-collections@0.1.4.1/PROOF.bend as PROOF Lines 517-547 of bend-kit-collections@0.1.4.1/PROOF.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&start_line=517&end_line=547 import Base import bend-kit-collections@0.1.4.1/LAWS.bend as Laws import bend-kit-collections@0.1.4.1/omap.bend as O def put.bnd( ~K: Data, ~V: Data, ~cmp: K -> K -> Cmp, ~flip: Flip(~K, ~cmp), ~trans: Trans(~K, ~cmp), t: O.OMap, +lb: Maybe<&2, K>, +ub: Maybe<&2, K>, +k: K, +v: V, +bt: {Laws.bounded(~K, ~V, ~cmp, t, lb, ub) == True{} : Bool}, +ea: {Laws.above(~K, ~cmp, lb, k) == True{} : Bool}, +eb: {Laws.below(~K, ~cmp, ub, k) == True{} : Bool} ) -> {Laws.bounded(~K, ~V, ~cmp, O.OMap.put(~K, ~V, ~cmp, t, k, v), lb, ub) == True{} : Bool}: match t: case O.OTip{}: bn.i(~K, ~V, ~cmp, lb, ub, k, v, O.OTip{}, O.OTip{}, ea, eb, {==}, {==}) case O.OBin{+s, +key, +val, +lo, +hi}: +b_a = bn.a(~K, ~V, ~cmp, lb, ub, key, val, lo, hi, bt) +b_b = bn.b(~K, ~V, ~cmp, lb, ub, key, val, lo, hi, bt) +b_l = bn.l(~K, ~V, ~cmp, lb, ub, key, val, lo, hi, bt) +b_h = bn.h(~K, ~V, ~cmp, lb, ub, key, val, lo, hi, bt) cmp.split(O.OMap, Bool, x => Laws.bounded(~K, ~V, ~cmp, x, lb, ub), True{}, cmp(k, key), u => O.OMap.balance(K, V, key, val, O.OMap.put(~K, ~V, ~cmp, lo, k, v), hi), u => O.OBin{s, key, v, lo, hi}, u => O.OMap.balance(K, V, key, val, lo, O.OMap.put(~K, ~V, ~cmp, hi, k, v)), e => balance.bnd(~K, ~V, ~cmp, ~trans, lb, ub, key, val, O.OMap.put(~K, ~V, ~cmp, lo, k, v), hi, b_a, b_b, put.bnd(~K, ~V, ~cmp, ~flip, ~trans, lo, lb, Some{key}, k, v, b_l, ea, lt_true(cmp(k, key), e)), b_h), e => bt, e => balance.bnd(~K, ~V, ~cmp, ~trans, lb, ub, key, val, lo, O.OMap.put(~K, ~V, ~cmp, hi, k, v), b_a, b_b, b_l, put.bnd(~K, ~V, ~cmp, ~flip, ~trans, hi, Some{key}, ub, k, v, b_h, lt_true(cmp(key, k), gt_flip(~K, ~cmp, ~flip, k, key, e)), eb))) Uses (20): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Cmp https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/LAWS.bend&name=above https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/LAWS.bend&name=below https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/LAWS.bend&name=bounded https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=Flip https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=Trans https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=balance.bnd https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=bn.a https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=bn.b https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=bn.h https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=bn.i https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=bn.l https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=cmp.split https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=gt_flip https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=lt_true https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/omap.bend&name=OMap https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/omap.bend&name=OMap.balance https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/omap.bend&name=OMap.put