type ProductCell

bendtorch-core@0.1.0.0 · src/tensor/matmul_LAWS.bend:60

import bendtorch-core@0.1.0.0/src/tensor/matmul_LAWS.bend as MatmulLAWS
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/dot_fold.bend as DotFold

60type ProductCell<-inner: U32, -left: Shape.Shape, -right: Shape.Shape, -a: Core.Tensor<left>, -b: Core.Tensor<right>,
61  -output: Shape.Shape, -out: Core.Tensor<output>, -position: Nat> is Data:
62  ProductCell{-row: U32, -column: U32, -coordinate: Shape.CheckedCoordinate<output>,
63    -decoded: {Shape.unflatten_checked(output, U32.from_nat(position)) == Done{coordinate} : Result<&2, &2, Shape.Error, Shape.CheckedCoordinate<output>>},
64    -coordinates: {Shape.coordinate_values(output, coordinate) == [row, column] : List<&2, U32>},
65    -word_exact: {U32.to_nat(U32.from_nat(position)) == position : Nat},
66    -factors: List<&2, DotFold.Factors>, -logical: LogicalDot(U32.to_nat(inner), left, right, a, b, row, column, 0n, factors),
67    -value: F32, -fold: {value == DotFold.dot_fold(factors, 0.0) : F32},
68    -checked: Core.ObservationChecked(Core.Packed{output, out}, U32.from_nat(position)),
69    -observed: {Core.checked_observe(output, out, U32.from_nat(position)) == Some{value} : Maybe<&2, F32>}}

Uses (20)

Used by (9)