~/bend-docscommunity

src/tensor/projection_PROOF.bend checks

raw source on the hub · import bendtorch-core@0.1.0.0/src/tensor/projection_PROOF.bend as Projection_PROOF

10 imports
import Base
import ../shape/core.bend as Shape
import ../shape/flat.bend as Flat
import ../shape/LAWS.bend as ShapeLaws
import ../shape/PROOF.bend as ShapeProof
import ../shape/boundary_proofs.bend as Boundary
import ../shape/coordinate_proofs.bend as Coordinates
import ./core.bend as Core
import ./elementwise.bend as Elementwise
import ./projection_LAWS.bend as Laws

Definitions

def projected_pair source · line 12 · raw

@+plan:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.BroadcastPlan -> @+map:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Index<0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.left_shape(plan)), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.right_shape(plan)), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.output_shape(plan))> -> @+index:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.FlatIndex<0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.output_shape(plan)> -> {Some{(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.index_value(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.left_shape(plan), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/flat.project_left_index(plan, map, index)), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.index_value(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.right_shape(plan), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/flat.project_right_index(plan, map, index)))} == 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/projection_LAWS.offset_spec(plan, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.position(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.output_shape(plan), index)) : Maybe<&1, Pair(U32, U32)>}

def checked_projection source · line 34 · raw

@+plan:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.BroadcastPlan -> @+position:Nat -> @decision:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.BoolCase<Nat.is_lt(position, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.elements(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.output_shape(plan)))> -> {0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/projection_LAWS.indices_result(0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/elementwise.flat_input_indices(plan, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.flat_checked.finish(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.output_shape(plan), position, decision))) == 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/projection_LAWS.offset_spec(plan, position) : Maybe<&1, Pair(U32, U32)>}

def checked_acceptance source · line 58 · raw

@+plan:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.BroadcastPlan -> @+position:Nat -> @decision:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.BoolCase<Nat.is_lt(position, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.elements(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.output_shape(plan)))> -> {0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/projection_LAWS.indices_accepted(0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/elementwise.flat_input_indices(plan, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.flat_checked.finish(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.output_shape(plan), position, decision))) == Nat.is_lt(position, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.numel(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.output_shape(plan)))) : Bool}

def expected_indices_view source · line 73 · raw

@+operation:0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/elementwise.Operation -> @-left:0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Dynamic -> @-right:0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Dynamic -> @result:Result<&2, &1, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Error, Pair(U32, U32)> -> {0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/elementwise.expected_indices(operation, left, right, result) == 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/projection_LAWS.specified_expected(operation, left, right, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/projection_LAWS.indices_result(result)) : Maybe<&2, F32>}