~/bend-docscommunity

src/shape/LAWS.bend open laws/TODOs

raw source on the hub · import bendtorch-core@0.1.0.0/src/shape/LAWS.bend as LAWS

3 imports
import Base
import ./core.bend as Shape
import ./flat.bend as Flat

Laws

law row_major_bounded provedin PROOF.bendsource · line 124 · raw

@+dims:List<&2, Nat> -> @+coordinate:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(dims) -> 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.LT(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.row_major(dims, coordinate), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.numel(dims))

law flatten_unflatten provedin PROOF.bendsource · line 129 · raw

@+dims:List<&2, Nat> -> @+index:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Fin(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.numel(dims)) -> {0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.flatten(dims, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.unflatten(dims, index)) == index : 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Fin(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.numel(dims))}

law unflatten_flatten provedin PROOF.bendsource · line 134 · raw

@+dims:List<&2, Nat> -> @+coordinate:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(dims) -> {0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.unflatten(dims, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.flatten(dims, coordinate)) == coordinate : 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(dims)}

law flatten_row_major provedin PROOF.bendsource · line 139 · raw

@+dims:List<&2, Nat> -> @+coordinate:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(dims) -> {0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Fin.value(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.numel(dims), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.flatten(dims, coordinate)) == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.row_major(dims, coordinate) : Nat}

law broadcast_left_projection provedin PROOF.bendsource · line 144 · raw

@+left:List<&2, Nat> -> @+right:List<&2, Nat> -> @+output:List<&2, Nat> -> @+alignment:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Broadcast<left, right, output> -> @+coordinate:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(output) -> {0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.indices(left, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.project_left(left, right, output, alignment, coordinate)) == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.project_indices(left, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.indices(output, coordinate)) : List<&2, Nat>}

law broadcast_right_projection provedin PROOF.bendsource · line 152 · raw

@+left:List<&2, Nat> -> @+right:List<&2, Nat> -> @+output:List<&2, Nat> -> @+alignment:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Broadcast<left, right, output> -> @+coordinate:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(output) -> {0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.indices(right, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.project_right(left, right, output, alignment, coordinate)) == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.project_indices(right, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.indices(output, coordinate)) : List<&2, Nat>}

law construction_complete provedin PROOF.bendsource · line 160 · raw

@+input:List<&2, U32> -> @rank_bound:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.LE(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.rank_dimensions(input), 4n) -> @capacity_bound:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.LE(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.logical_numel(input), 1048576n) -> {built(input, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.construct(input)) == Some{input} : Maybe<&2, List<&2, U32>>}

law flatten_checked_refines provedin PROOF.bendsource · line 166 · raw

@+shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+values:List<&2, U32> -> {index_result(shape, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.flatten_checked(shape, values)) == flatten_spec(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(shape), decode(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(shape), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(values))) : Maybe<&2, U32>}

law unflatten_checked_refines provedin PROOF.bendsource · line 171 · raw

@+shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+index:U32 -> {coordinate_result(shape, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.unflatten_checked(shape, index)) == unflatten_spec(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(shape), fin_of(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.numel(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(shape)), U32.to_nat(index))) : Maybe<&2, List<&2, U32>>}

law broadcast_output_unique provedin PROOF.bendsource · line 176 · raw

@+left:List<&2, Nat> -> @+right:List<&2, Nat> -> @+output:List<&2, Nat> -> @+other:List<&2, Nat> -> @+first:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Broadcast<left, right, output> -> @+second:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Broadcast<left, right, other> -> {output == other : List<&2, Nat>}

law broadcast_checked_plan provedin PROOF.bendsource · line 185 · raw

@+left:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+right:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> {planned_dimensions(left, right, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.broadcast_checked(left, right)) == (0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(left), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(right)) : Pair(List<&2, U32>, List<&2, U32>)}

law broadcast_checked_complete provedin PROOF.bendsource · line 190 · raw

@+left:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+right:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+output:List<&2, U32> -> @+alignment:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Broadcast<0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(left), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(right), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(output)> -> @+rank_bound:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.LE(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.rank_dimensions(output), 4n) -> @+capacity_bound:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.LE(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.logical_numel(output), 1048576n) -> {broadcast_built(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.broadcast_checked(left, right)) == True{} : Bool}

law project_left_checked_refines provedin PROOF.bendsource · line 199 · raw

@+plan:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.BroadcastPlan -> @+values:List<&2, U32> -> {coordinate_result(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.left_shape(plan), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.project_left_checked(plan, values)) == project_left_spec(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)), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.alignment(plan), decode(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.output_shape(plan)), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(values))) : Maybe<&2, List<&2, U32>>}

law project_right_checked_refines provedin PROOF.bendsource · line 204 · raw

@+plan:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.BroadcastPlan -> @+values:List<&2, U32> -> {coordinate_result(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.right_shape(plan), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.project_right_checked(plan, values)) == project_right_spec(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)), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.alignment(plan), decode(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.output_shape(plan)), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(values))) : Maybe<&2, List<&2, U32>>}

law project_left_index_refines provedin PROOF.bendsource · line 209 · 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))} == flatten_spec(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.left_shape(plan)), project_left_coordinate(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)), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.alignment(plan), fin_of(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.numel(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.output_shape(plan))), position(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.output_shape(plan), index)))) : Maybe<&2, U32>}

law project_right_index_refines provedin PROOF.bendsource · line 215 · 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.right_shape(plan), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/flat.project_right_index(plan, map, index))} == flatten_spec(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.right_shape(plan)), project_right_coordinate(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)), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.alignment(plan), fin_of(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.numel(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.output_shape(plan))), position(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.output_shape(plan), index)))) : Maybe<&2, U32>}

law flatten_rank_error provedin PROOF.bendsource · line 224 · raw

@+shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+values:List<&2, U32> -> @differ:(@_:{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.rank_dimensions(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape)) == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.rank_dimensions(values) : Nat} -> Empty) -> {0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.flatten_checked(shape, values) == Fail{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.CoordinateRankMismatch{}} : Result<&2, &2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Error, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.FlatIndex<shape>>}

A coordinate whose rank differs from the shape's fails with CoordinateRankMismatch, checked before any bound: [9] on [2, 3] is a rank error, not an out-of-bounds error.

law flatten_bounds_error provedin PROOF.bendsource · line 232 · raw

@+shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+values:List<&2, U32> -> @same:{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.rank_dimensions(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape)) == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.rank_dimensions(values) : Nat} -> @outside:{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.fit_words(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape), values) == False{} : Bool} -> {0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.flatten_checked(shape, values) == Fail{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.CoordinateOutOfBounds{}} : Result<&2, &2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Error, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.FlatIndex<shape>>}

A coordinate of the shape's rank with a component outside its extent fails with CoordinateOutOfBounds.

Definitions

def built source · line 5 · raw

@-input:List<&2, U32> -> @result:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.ConstructResult<input> -> Maybe<&2, List<&2, U32>>

def index_result source · line 12 · raw

@-shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @result:Result<&2, &2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Error, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.FlatIndex<shape>> -> Maybe<&2, U32>

def coordinate_result source · line 19 · raw

@-shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @result:Result<&2, &2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Error, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.CheckedCoordinate<shape>> -> Maybe<&2, List<&2, U32>>

def planned_dimensions source · line 26 · raw

@left:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @right:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @result:Result<&2, &2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Error, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.BroadcastPlan> -> Pair(List<&2, U32>, List<&2, U32>)

def broadcast_built source · line 33 · raw

@result:Result<&2, &2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Error, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.BroadcastPlan> -> Bool

def fin_of.next source · line 40 · raw

@-bound:Nat -> @index:Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Fin(bound)> -> Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Fin(1n+bound)>

def fin_of source · line 47 · raw

@+bound:Nat -> @+value:Nat -> Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Fin(bound)>

def decode.step source · line 56 · raw

@-dh:Nat -> @-dt:List<&2, Nat> -> @tail:Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(dt)> -> @head:Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Fin(dh)> -> Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(dh <> dt)>

def decode source · line 67 · raw

@+dims:List<&2, Nat> -> @+values:List<&2, Nat> -> Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(dims)>

def flatten_spec source · line 78 · raw

@+dims:List<&2, Nat> -> @coordinate:Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(dims)> -> Maybe<&2, U32>

def unflatten_spec source · line 85 · raw

@+dims:List<&2, Nat> -> @index:Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Fin(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.numel(dims))> -> Maybe<&2, List<&2, U32>>

def project_left_spec source · line 92 · raw

@+left:List<&2, Nat> -> @+right:List<&2, Nat> -> @+output:List<&2, Nat> -> @+alignment:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Broadcast<left, right, output> -> @coordinate:Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(output)> -> Maybe<&2, List<&2, U32>>

def project_right_spec source · line 99 · raw

@+left:List<&2, Nat> -> @+right:List<&2, Nat> -> @+output:List<&2, Nat> -> @+alignment:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Broadcast<left, right, output> -> @coordinate:Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(output)> -> Maybe<&2, List<&2, U32>>

def position source · line 106 · raw

@-shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @index:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.FlatIndex<shape> -> Nat

def project_left_coordinate source · line 110 · raw

@+left:List<&2, Nat> -> @+right:List<&2, Nat> -> @+output:List<&2, Nat> -> @+alignment:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Broadcast<left, right, output> -> @index:Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Fin(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.numel(output))> -> Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(left)>

def project_right_coordinate source · line 117 · raw

@+left:List<&2, Nat> -> @+right:List<&2, Nat> -> @+output:List<&2, Nat> -> @+alignment:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Broadcast<left, right, output> -> @index:Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Fin(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.numel(output))> -> Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(right)>