Matrix multiplication: Model #
Arithmetic gates over a field with explicit input and register references.
- literal {F : Type u_1} {Input : Type u_2} {Register : Type u_3} : F → Gate F Input Register
- input {F : Type u_1} {Input : Type u_2} {Register : Type u_3} : Input → Gate F Input Register
- add {F : Type u_1} {Input : Type u_2} {Register : Type u_3} : Register → Register → Gate F Input Register
- sub {F : Type u_1} {Input : Type u_2} {Register : Type u_3} : Register → Register → Gate F Input Register
- mul {F : Type u_1} {Input : Type u_2} {Register : Type u_3} : Register → Register → Gate F Input Register
Instances For
Interpret a gate using the current input values and register contents.
Equations
- MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Gate.eval inputs registers (MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Gate.literal z) = z
- MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Gate.eval inputs registers (MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Gate.input i) = inputs i
- MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Gate.eval inputs registers (MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Gate.add i j) = registers i + registers j
- MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Gate.eval inputs registers (MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Gate.sub i j) = registers i - registers j
- MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Gate.eval inputs registers (MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Gate.mul i j) = registers i * registers j
Instances For
Charge one operation for arithmetic gates and none for input or literal loading.
Equations
- (MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Gate.literal z).cost = 0
- (MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Gate.input i).cost = 0
- (MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Gate.add i j).cost = 1
- (MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Gate.sub i j).cost = 1
- (MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Gate.mul i j).cost = 1
Instances For
A division-free straight-line program indexed by its number of allocated registers.
- nil {F : Type u_1} {Input : Type u_2} : Program F Input 0
- step {F : Type u_1} {Input : Type u_2} {r : ℕ} : Program F Input r → Gate F Input (Fin r) → Program F Input (r + 1)
Instances For
Evaluate every register of a field-valued straight-line program.
Equations
Instances For
Total number of arithmetic operations in a straight-line program.
Equations
Instances For
Disjoint entry positions of the left and right rectangular matrix inputs.
Equations
Instances For
Assemble the two matrices into the program's disjoint input space.
Equations
Instances For
A straight-line program with designated registers for rectangular matrix-product entries.
- registers : ℕ
Number of registers used by the matrix multiplication program.
- program : Program F (MatrixInput a b c) self.registers
The straight-line program underlying the matrix algorithm.
Register location of each output matrix entry.
Instances For
Evaluate the algorithm's output matrix on its two input matrices.
Equations
Instances For
The program computes the matrix product for every pair of inputs.
Equations
Instances For
Arithmetic operation count of the matrix multiplication program.
Instances For
The infimum of admissible arithmetic matrix multiplication exponents over the given field.
Equations
Instances For
The inner dimension of an n × n^k by n^k × n multiplication.
Equations
Instances For
Uniform arithmetic cost bounds for n by ceil(n^k) by n multiplication, with positive slack.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The infimum of admissible arithmetic exponents at a fixed rectangular shape.
Equations
Instances For
The dual exponent is a supremum of exact exponent-two rectangular shapes.
Equations
- One or more equations did not get rendered due to their size.