PROOF.rhs.wb: def of bend-kit-collections@0.1.4.1 Import: import bend-kit-collections@0.1.4.1/PROOF.bend as PROOF Lines 1343-1366 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=1343&end_line=1366 import Base import bend-kit-collections@0.1.4.1/omap.bend as O import bend-kit-collections@0.1.4.1/nat_order.bend as Ord # Rotations toward hi, after lo grew or hi shrank by one. def rhs.wb( -K: Data, -V: Data, +k: K, +v: V, +lk: K, +lv: V, +ll: O.OMap, +lh: O.OMap, +hi: O.OMap, +wbl: {WB(K, V, O.OBin{0, lk, lv, ll, lh}) == True{} : Bool}, wbh: {WB(K, V, hi) == True{} : Bool}, +heavy: Ord.LE(1n+Nat.mul(3n, W(K, V, hi)), Nat.add(W(K, V, ll), W(K, V, lh))), +alm: Ord.LE(Nat.add(W(K, V, ll), W(K, V, lh)), Nat.add(3n, Nat.mul(3n, W(K, V, hi)))), +hs: Ord.LE(1n+W(K, V, lh), Nat.mul(2n, W(K, V, ll))) ) -> {WB(K, V, O.OMap.bin(K, V, lk, lv, ll, O.OMap.bin(K, V, k, v, lh, hi))) == True{} : Bool}: +l = W(K, V, hi) +a = W(K, V, lh) +b = W(K, V, ll) +okl = wb.ok(K, V, lk, lv, ll, lh, wbl) +h1 = Ord.wok_l(b, a, okl) +h2 = Ord.wok_r(b, a, okl) +pl = w_pos(K, V, hi) +pa = w_pos(K, V, lh) +pb = w_pos(K, V, ll) wb.i(K, V, lk, lv, ll, O.OMap.bin(K, V, k, v, lh, hi), Ord.rhs.w0(l, a, b, h1, h2, heavy, alm, hs, pl, pa, pb), wb.l(K, V, lk, lv, ll, lh, wbl), wb.i(K, V, k, v, lh, hi, Ord.rhs.w1(l, a, b, h1, h2, heavy, alm, hs, pl, pa, pb), wb.h(K, V, lk, lv, ll, lh, wbl), wbh)) Uses (18): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=W https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=WB https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=w_pos https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=wb.h https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=wb.i https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=wb.l https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/PROOF.bend&name=wb.ok https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/nat_order.bend&name=LE https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/nat_order.bend&name=rhs.w0 https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/nat_order.bend&name=rhs.w1 https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/nat_order.bend&name=wok_l https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/nat_order.bend&name=wok_r 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.bin