Api.new_size: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/storage/api.bend as Api Lines 704-716 of bendtorch-core@0.1.0.0/src/storage/api.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/storage/api.bend&start_line=704&end_line=716 import Base import bendtorch-core@0.1.0.0/src/storage/model.bend as Model import bendtorch-core@0.1.0.0/src/storage/main.bend as Storage import bendtorch-core@0.1.0.0/src/storage/LAWS.bend as Laws import bendtorch-core@0.1.0.0/src/storage/arith.bend as Arith def new_size(+n: Nat, +value: F32, allowed: Bool, +ops: List<&2, Laws.Op>, yes: {True{} == allowed : Bool}, +limit: {Nat.is_le(n, Model.capacity(20n)) == True{} : Bool}) -> {Laws.size(Laws.replay(ops, Laws.created.of(Storage.new_checked(n, value, allowed)))) == n : Nat}: match n: case 0n: replay_size_empty(ops) case 1n+p: match allowed: case True{}: meta_size(1n+p, value, Storage.depth_seek(20n, 1n+p, 0n, 1n, Nat.is_le(1n+p, 1n)), ops, seek(1n+p, limit, {==})) case False{}: Empty.absurd({Laws.size(Laws.replay(ops, Laws.created.of(Storage.new_checked(1n+p, value, False{})))) == 1n+p : Nat}, Arith.clash_true(yes)) Uses (17): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Empty.absurd https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 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_le https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/LAWS.bend&name=Op https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/LAWS.bend&name=created.of https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/LAWS.bend&name=replay https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/LAWS.bend&name=size https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/api.bend&name=meta_size https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/api.bend&name=replay_size_empty https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/api.bend&name=seek https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/arith.bend&name=clash_true https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/main.bend&name=depth_seek https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/main.bend&name=new_checked https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/model.bend&name=capacity