def got_kept

bendtorch-core@0.1.0.0 · src/tensor/contracts/binary_build_proof.bend:93

import bendtorch-core@0.1.0.0/src/tensor/contracts/binary_build_proof.bend as BinaryBuildProof
import Base
import bendtorch-core@0.1.0.0/src/storage/refinement.bend as Refinement
import bendtorch-core@0.1.0.0/src/storage/api.bend as Api

93# A read of `arr(h)` keeps the array and returns the word `current` names.
94def got_kept(+d: Nat, +h: List<&2, Api.Effect>, +f: F32, +i: U32, -pair: Array<F32> & F32,
95  exact: {pair == Array.get(F32, Api.arr(h, d, f), i) : Array<F32> & F32}) ->
96  {Refinement.first(F32, pair) == Api.arr(h, d, f) : Array<F32>}:
97  Equal.trans(Array<F32>, Refinement.first(F32, pair), Refinement.first(F32, Array.get(F32, Api.arr(h, d, f), i)), Api.arr(h, d, f),
98    Equal.cong(Array<F32> & F32, Array<F32>, p => Refinement.first(F32, p), pair, Array.get(F32, Api.arr(h, d, f), i), exact),
99    Refinement.law_get_retains(F32, d, Api.arr(h, d, f), i, Api.bal(h, d, f)))

Uses (14)

Used by (18)