def invariant_prefix
bendtorch-core@0.1.0.0 · src/tensor/core_PROOF.bend:833
import bendtorch-core@0.1.0.0/src/tensor/core_PROOF.bend as CorePROOF
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
833def invariant_prefix(-operation: Elementwise.Operation, -plan: Shape.BroadcastPlan, -original_left: Core.Dynamic, -original_right: Core.Dynamic,
834 -cursor: Nat, -left: Core.Dynamic, -right: Core.Dynamic, -output: Core.Tensor<Shape.output_shape(plan)>,
835 invariant: Elementwise.StateInvariant(operation, plan, original_left, original_right, cursor, Elementwise.State{left, right, output})) ->
836 Elementwise.PrefixInvariant(operation, plan, original_left, original_right, cursor, Core.Packed{Shape.output_shape(plan), output}):
837 (same, rest) = invariant
838 (right_same, prefix) = rest
839 prefix