~/bend-docscommunity

src/shape/boundary_proofs.bend open laws/TODOs

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

8 imports
import Base
import ./core.bend as Shape
import ./nat_proofs.bend as Nats
import ./broadcast_proofs.bend as Broadcast
import ./coordinate_proofs.bend as Coordinates
import ./projection_proofs.bend as Projection
import ./flat.bend as Flat
import ./LAWS.bend as Laws

Definitions

def fin_of_from source · line 10 · raw

@+bound:Nat -> @+value:Nat -> @fits:{True{} == Nat.is_lt(value, bound) : Bool} -> {0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.fin_of(bound, value) == Some{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/coordinate_proofs.fin_from(bound, value, fits)} : Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Fin(bound)>}

def fin_of_none source · line 21 · raw

@+bound:Nat -> @+value:Nat -> @misses:{False{} == Nat.is_lt(value, bound) : Bool} -> {None{} == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.fin_of(bound, value) : Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Fin(bound)>}

def fin_of_value source · line 30 · raw

@+bound:Nat -> @+index:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Fin(bound) -> {Some{index} == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.fin_of(bound, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Fin.value(bound, index)) : Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Fin(bound)>}

def decode_none source · line 41 · raw

@-dh:Nat -> @-dt:List<&2, Nat> -> @+tail:Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(dt)> -> {None{} == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.decode.step(dh, dt, tail, None{}) : Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(dh <> dt)>}

def decode_fit source · line 48 · raw

@+dims:List<&2, Nat> -> @+values:List<&2, Nat> -> @+fits:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/coordinate_proofs.Fits(dims, values) -> {0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.decode(dims, values) == Some{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/coordinate_proofs.coordinate_of(dims, values, fits)} : Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(dims)>}

def decode_unfit.step source · line 62 · raw

@+dh:Nat -> @+dt:List<&2, Nat> -> @+vh:Nat -> @+vt:List<&2, Nat> -> @+verdict:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.BoolCase<Nat.is_lt(vh, dh)> -> @misses:{False{} == Bool.and(Nat.is_lt(vh, dh), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.fit(dt, vt)) : Bool} -> @rec:(@_:{False{} == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.fit(dt, vt) : Bool} -> {None{} == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.decode(dt, vt) : Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(dt)>}) -> {None{} == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.decode.step(dh, dt, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.decode(dt, vt), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.fin_of(dh, vh)) : Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(dh <> dt)>}

def decode_unfit source · line 71 · raw

@+dims:List<&2, Nat> -> @+values:List<&2, Nat> -> @misses:{False{} == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.fit(dims, values) : Bool} -> {None{} == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.decode(dims, values) : Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(dims)>}

def fit_words_true source · line 82 · raw

@+dims:List<&2, U32> -> @+values:List<&2, U32> -> @equal:{True{} == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.fit_words(dims, values) : Bool} -> {True{} == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.fit(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(dims), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(values)) : Bool}

def fit_words_false source · line 86 · raw

@+dims:List<&2, U32> -> @+values:List<&2, U32> -> @equal:{False{} == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.fit_words(dims, values) : Bool} -> {False{} == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.fit(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(dims), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(values)) : Bool}

def decode_rank source · line 90 · raw

@+dims:List<&2, U32> -> @+values:List<&2, U32> -> @mismatch:{False{} == Nat.is_eq(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.rank_dimensions(dims), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.rank_dimensions(values)) : Bool} -> {None{} == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.decode(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(dims), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(values)) : Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(dims))>}

def decode_indices source · line 102 · raw

@+dims:List<&2, Nat> -> @+coordinate:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(dims) -> {Some{coordinate} == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.decode(dims, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.indices(dims, coordinate)) : Maybe<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(dims)>}

def checked_fit source · line 114 · raw

@+shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+values:List<&2, Nat> -> @+verdict:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.BoolCase<0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.fit_values(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape), values)> -> @ok:{True{} == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.fit(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(shape), values) : Bool} -> {0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.coordinate_result(shape, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.coordinate_checked.finish(shape, values, verdict)) == Some{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.words(values)} : Maybe<&2, List<&2, U32>>}

def checked_indices source · line 121 · raw

@+shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+coordinate:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Coordinate(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(shape)) -> {0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.coordinate_result(shape, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.coordinate_checked.nat(shape, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.indices(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(shape), coordinate))) == Some{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.words(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.indices(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(shape), coordinate))} : Maybe<&2, List<&2, U32>>}

def flat_view source · line 125 · raw

@-shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+index:Nat -> @+verdict:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.BoolCase<Nat.is_lt(index, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.elements(shape))> -> @fits:{True{} == Nat.is_lt(index, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.elements(shape)) : Bool} -> {0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.index_result(shape, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.flat_checked.finish(shape, index, verdict)) == Some{U32.from_nat(index)} : Maybe<&2, U32>}

def horner_fits source · line 132 · raw

@+shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+values:List<&2, U32> -> @+fits:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/coordinate_proofs.Fits(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(shape), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(values)) -> {0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.horner(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape), values, 0n) == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.row_major(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(shape), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/coordinate_proofs.coordinate_of(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(shape), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(values), fits)) : Nat}

def horner_below source · line 135 · raw

@+shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+values:List<&2, U32> -> @+fits:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/coordinate_proofs.Fits(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(shape), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(values)) -> {True{} == Nat.is_lt(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.horner(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape), values, 0n), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.elements(shape)) : Bool}

def flatten_fits source · line 141 · raw

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

def flatten_ranked source · line 154 · raw

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

def flatten_checked source · line 162 · raw

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

def unflatten_verdict source · line 165 · raw

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

def unflatten_checked source · line 179 · raw

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

def projected_left source · line 182 · raw

@+left:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+right:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+output:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+alignment:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Broadcast<0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(left), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(right), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(output)> -> @+values:List<&2, U32> -> @+fits:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/coordinate_proofs.Fits(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(output), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(values)) -> {0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.projected_words(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(left), List.drop(&2, U32, values, Nat.sub(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.rank_dimensions(values), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.rank_dimensions(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(left))))) == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.indices(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(left), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.project_left(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(left), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(right), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(output), alignment, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/coordinate_proofs.coordinate_of(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(output), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(values), fits))) : List<&2, Nat>}

def project_left_fits source · line 193 · raw

@+left:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+right:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+output:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+alignment:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Broadcast<0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(left), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(right), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(output)> -> @+values:List<&2, U32> -> @+verdict:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.BoolCase<0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.fit_words(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(output), values)> -> {0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.coordinate_result(left, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.projection_checked.fits(left, output, values, verdict)) == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.project_left_spec(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(left), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(right), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(output), alignment, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.decode(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(output), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(values))) : Maybe<&2, List<&2, U32>>}

def project_left_ranked source · line 207 · raw

@+left:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+right:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+output:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+alignment:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Broadcast<0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(left), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(right), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(output)> -> @+values:List<&2, U32> -> @+same:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.BoolCase<Nat.is_eq(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.rank_dimensions(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(output)), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.rank_dimensions(values))> -> {0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.coordinate_result(left, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.projection_checked.ranked(left, output, values, same)) == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.project_left_spec(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(left), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(right), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(output), alignment, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.decode(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(output), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(values))) : Maybe<&2, List<&2, U32>>}

def project_left_checked source · line 215 · raw

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

def projected_right source · line 220 · raw

@+left:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+right:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+output:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+alignment:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Broadcast<0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(left), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(right), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(output)> -> @+values:List<&2, U32> -> @+fits:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/coordinate_proofs.Fits(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(output), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(values)) -> {0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.projected_words(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(right), List.drop(&2, U32, values, Nat.sub(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.rank_dimensions(values), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.rank_dimensions(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(right))))) == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.indices(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(right), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.project_right(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(left), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(right), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(output), alignment, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/coordinate_proofs.coordinate_of(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(output), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(values), fits))) : List<&2, Nat>}

def project_right_fits source · line 231 · raw

@+left:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+right:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+output:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+alignment:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Broadcast<0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(left), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(right), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(output)> -> @+values:List<&2, U32> -> @+verdict:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.BoolCase<0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.fit_words(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(output), values)> -> {0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.coordinate_result(right, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.projection_checked.fits(right, output, values, verdict)) == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.project_right_spec(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(left), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(right), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(output), alignment, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.decode(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(output), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(values))) : Maybe<&2, List<&2, U32>>}

def project_right_ranked source · line 245 · raw

@+left:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+right:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+output:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+alignment:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Broadcast<0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(left), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(right), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(output)> -> @+values:List<&2, U32> -> @+same:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.BoolCase<Nat.is_eq(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.rank_dimensions(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(output)), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.rank_dimensions(values))> -> {0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.coordinate_result(right, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.projection_checked.ranked(right, output, values, same)) == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.project_right_spec(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(left), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(right), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(output), alignment, 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.decode(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(output), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.naturals(values))) : Maybe<&2, List<&2, U32>>}

def project_right_checked source · line 253 · raw

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

def project_left_index source · line 258 · 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/LAWS.flatten_spec(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.left_shape(plan)), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.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), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.fin_of(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.numel(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.output_shape(plan))), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.position(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.output_shape(plan), index)))) : Maybe<&2, U32>}

def project_right_index source · line 278 · 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))} == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.flatten_spec(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.right_shape(plan)), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.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), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.fin_of(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.numel(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.extents(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.output_shape(plan))), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/LAWS.position(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.output_shape(plan), index)))) : Maybe<&2, U32>}