def plan_output_status

bendtorch-core@0.1.0.0 · src/tensor/matmul_PROOF.bend:1016

import bendtorch-core@0.1.0.0/src/tensor/matmul_PROOF.bend as MatmulPROOF
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/matmul.bend as Matrix
import bendtorch-core@0.1.0.0/src/shape/LAWS.bend as ShapeLaws
import bendtorch-core@0.1.0.0/src/storage/arith.bend as Arith

1016def plan_output_status(+left: Shape.Shape, +right: Shape.Shape, +rows: U32, +inner: U32, +right_inner: U32, +columns: U32,
1017  result: Shape.ConstructResult<[rows, columns]>,
1018  -le: {Shape.dimensions(left) == [rows, inner] : List<&2, U32>}, -re: {Shape.dimensions(right) == [right_inner, columns] : List<&2, U32>},
1019  -compatible: {U32.to_nat(inner) == U32.to_nat(right_inner) : Nat},
1020  -built: {ShapeLaws.built([rows, columns], result) == Some{[rows, columns]} : Maybe<&2, List<&2, U32>>}) ->
1021  PlanStatus<left, right, Matrix.plan_output(left, right, rows, inner, right_inner, columns, le, re, compatible, result)>:
1022  match result:
1023    case Shape.SError{error}:
1024      PlanStatus{Empty.absurd({False{} == True{} : Bool}, Arith.clash(Equal.cong(Maybe<&2, List<&2, U32>>, Bool,
1025        value => Maybe.is_some(&2, List<&2, U32>, value), None{}, Some{[rows, columns]}, built)))}
1026    case Shape.SBuilt{shape, preserved}:
1027      PlanStatus{{==}}

Uses (16)

Used by (1)