CorePROOF.prefix_previous: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/core_PROOF.bend as CorePROOF Lines 757-783 of bendtorch-core@0.1.0.0/src/tensor/core_PROOF.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/core_PROOF.bend&start_line=757&end_line=783 import Base import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core import bendtorch-core@0.1.0.0/src/tensor/elementwise.bend as Elementwise def prefix_previous(+operation: Elementwise.Operation, +plan: Shape.BroadcastPlan, -original_left: Core.Dynamic, -original_right: Core.Dynamic, +cursor: Nat, +index: U32, -before: Core.Tensor, -after: Core.Tensor, converted: {U32.to_nat(index) == cursor : Nat}, prefix: Elementwise.PrefixInvariant(operation, plan, original_left, original_right, cursor, Core.Packed{Shape.output_shape(plan), before}), frame: @+other: U32 -> @checked: Core.ObservationChecked(Core.Packed{Shape.output_shape(plan), before}, other) -> @different: {Nat.is_eq(U32.to_nat(index), U32.to_nat(other)) == False{} : Bool} -> Core.ObservationChecked(Core.Packed{Shape.output_shape(plan), after}, other) & {Core.observe(Shape.output_shape(plan), after, other) == Core.observe(Shape.output_shape(plan), before, other) : Maybe<&2, F32>}, +other: U32, +earlier: Shape.LT(U32.to_nat(other), cursor)) -> Core.ObservationChecked(Core.Packed{Shape.output_shape(plan), after}, other) & {Core.observe(Shape.output_shape(plan), after, other) == Elementwise.expected(operation, plan, original_left, original_right, other) : Maybe<&2, F32>}: {\{Tuple: before_checked => before_equal => {\{Tuple: after_checked => after_equal => (after_checked, Equal.trans(Maybe<&2, F32>, Core.observe(Shape.output_shape(plan), after, other), Core.observe(Shape.output_shape(plan), before, other), Elementwise.expected(operation, plan, original_left, original_right, other), after_equal, before_equal))} : (Core.ObservationChecked(Core.Packed{Shape.output_shape(plan), after}, other) & {Core.observe(Shape.output_shape(plan), after, other) == Core.observe(Shape.output_shape(plan), before, other) : Maybe<&2, F32>}) -> (Core.ObservationChecked(Core.Packed{Shape.output_shape(plan), after}, other) & {Core.observe(Shape.output_shape(plan), after, other) == Elementwise.expected(operation, plan, original_left, original_right, other) : Maybe<&2, F32>})}(frame(other)(before_checked)( %Equal.sym(Nat, U32.to_nat(index), cursor, converted) : {Nat.is_eq(_, U32.to_nat(other)) == False{} : Bool} lt_big_small_different(U32.to_nat(other), cursor, earlier))) } : (Core.ObservationChecked(Core.Packed{Shape.output_shape(plan), before}, other) & {Core.observe(Shape.output_shape(plan), before, other) == Elementwise.expected(operation, plan, original_left, original_right, other) : Maybe<&2, F32>}) -> (Core.ObservationChecked(Core.Packed{Shape.output_shape(plan), after}, other) & {Core.observe(Shape.output_shape(plan), after, other) == Elementwise.expected(operation, plan, original_left, original_right, other) : Maybe<&2, F32>})}(prefix(other)(earlier)) Uses (22): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.trans https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe 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_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 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/shape/core.bend&name=BroadcastPlan https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=LT https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=output_shape https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core.bend&name=Dynamic https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core.bend&name=ObservationChecked https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core.bend&name=Tensor https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core.bend&name=observe https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core_PROOF.bend&name=lt_big_small_different https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&name=Operation https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&name=PrefixInvariant https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&name=expected