def AP.get_eq
bend-osdev-array@0.1.0.1 · PROOF.bend:623
import bend-osdev-array@0.1.0.1/PROOF.bend as PROOF
import Base
623def AP.get_eq(-T: Data, t: AP.Tree<T>, n: U32, +i: U32, z: Bool) -> {Array.get.go(T, AP.build(T, t), n, i, z) == (AP.build(T, t), AP.get_v(T, t, n, i, z)) : Array<T> & T}:
624 match t z:
625 case APLeaf{x} _:
626 {==}
627 case APNode{xs, ys} True{}:
628 +h = U32.shr(n)
629 +z1 = U32.is_lt(i, U32.shr(h))
630 %Equal.sym(Array<T> & T, Array.get.go(T, AP.build(T, xs), h, i, z1), (AP.build(T, xs), AP.get_v(T, xs, h, i, z1)), AP.get_eq(T, xs, h, i, z1)) : {Array.swap.lo(T, AP.build(T, ys), _) == (ANode{AP.build(T, xs), AP.build(T, ys)}, AP.get_v(T, xs, h, i, z1)) : Array<T> & T}
631 {==}
632 case APNode{xs, ys} False{}:
633 +h = U32.shr(n)
634 +j = U32.sub(i, h)
635 +z1 = U32.is_lt(j, U32.shr(h))
636 %Equal.sym(Array<T> & T, Array.get.go(T, AP.build(T, ys), h, j, z1), (AP.build(T, ys), AP.get_v(T, ys, h, j, z1)), AP.get_eq(T, ys, h, j, z1)) : {Array.swap.hi(T, AP.build(T, xs), _) == (ANode{AP.build(T, xs), AP.build(T, ys)}, AP.get_v(T, ys, h, j, z1)) : Array<T> & T}
637 {==}