BinaryBuildProof.written: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/contracts/binary_build_proof.bend as BinaryBuildProof Lines 60-75 of bendtorch-core@0.1.0.0/src/tensor/contracts/binary_build_proof.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/contracts/binary_build_proof.bend&start_line=60&end_line=75 import Base import bendtorch-core@0.1.0.0/src/storage/api.bend as Api # Every write in the history lands below `n`: `Api.Valid` as a Bool, so a # proof of it can be used many times. def written(+n: Nat, +history: List<&2, Api.Effect>) -> Bool: match history: case Nil{}: True{} case +effect <> +past: match effect: case Api.Wrote{+i, w}: Bool.and(Nat.is_lt(U32.to_nat(i), n), written(n, past)) case Api.Kept{i}: written(n, past) case Api.Left{}: written(n, past) case Api.Right{}: written(n, past) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/api.bend&name=Effect