def AP.of_list_set.go

bend-osdev-array@0.1.0.1 · PROOF.bend:1529

import bend-osdev-array@0.1.0.1/PROOF.bend as PROOF
import Base
import bend-osdev-array@0.1.0.1/array.bend as A

1529def AP.of_list_set.go(-T: Data, +d: Nat, +xs: List<&2, T>, +f: T, +hl: {List.length(&2, T, xs) == A.Arrays.slots(d) : Nat}, +hd: {Nat.is_lt(d, 32n) == True{} : Bool}, +i: U32, +v: T) -> {Array.set(T, A.Arrays.of_list(T, d, xs, f), i, v) == A.Arrays.of_list(T, d, List.set(&2, T, xs, A.Arrays.index(d, i), v), f) : Array<T>}:
1530  +t = AP.tof(T, d, xs, f)
1531  +k = A.Arrays.index(d, i)
1532  +t2 = AP.set_top(T, t, i, v)
1533  +l2 = List.set(&2, T, xs, k, v)
1534  +el = AP.tof_leaves(T, d, xs, f, hl)
1535  +hp = AP.tof_perf(T, d, xs, f)
1536  +el2 = Equal.trans(List<&2, T>, A.Arrays.leaves(T, AP.build(T, t2)), List.set(&2, T, A.Arrays.leaves(T, AP.build(T, t)), k, v), l2, AP.tree_set(T, d, t, hp, hd, i, v), Equal.cong(List<&2, T>, List<&2, T>, ys => List.set(&2, T, ys, k, v), A.Arrays.leaves(T, AP.build(T, t)), xs, el))
1537  %AP.ol_sym(T, d, xs, f) : {Array.set(T, _, i, v) == A.Arrays.of_list(T, d, l2, f) : Array<T>}
1538  %Equal.sym(Array<T>, Array.set(T, AP.build(T, t), i, v), AP.build(T, t2), AP.set_top_eq(T, t, i, v)) : {_ == A.Arrays.of_list(T, d, l2, f) : Array<T>}
1539  %AP.ol_sym(T, d, l2, f) : {AP.build(T, t2) == _ : Array<T>}
1540  %el2 : {AP.build(T, t2) == AP.build(T, AP.tof(T, d, _, f)) : Array<T>}
1541  AP.tree_ext(T, d, t2, f, AP.tree_perf(T, d, t, i, v, hp))

Uses (26)

Used by (1)