Division-free arithmetic programs over a field and their operation counts.
Relabel a gate's register references without changing its input wires.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Locate an earlier program's registers after appending a second program.
Equations
Instances For
Locate the appended program's registers in the combined register space.
Equations
Instances For
Concatenate independent programs, relabelling the second program's register references.
Equations
- One or more equations did not get rendered due to their size.
- p.append MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Program.nil = p
Instances For
Division-free arithmetic expressions built from inputs, scalars, addition, subtraction and multiplication.
- literal {F : Type u_2} {Input : Type u_3} : F → Expression F Input
- input {F : Type u_2} {Input : Type u_3} : Input → Expression F Input
- add {F : Type u_2} {Input : Type u_3} : Expression F Input → Expression F Input → Expression F Input
- sub {F : Type u_2} {Input : Type u_3} : Expression F Input → Expression F Input → Expression F Input
- mul {F : Type u_2} {Input : Type u_3} : Expression F Input → Expression F Input → Expression F Input
Instances For
Interpret an arithmetic expression at the supplied input values.
Equations
- One or more equations did not get rendered due to their size.
- MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Expression.eval inputs (MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Expression.literal z) = z
- MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Expression.eval inputs (MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Expression.input i) = inputs i
Instances For
Count arithmetic operations, treating input and literal loading as free.
Equations
Instances For
A compiled expression with certified semantics and exact operation count.
- registers : ℕ
Number of registers allocated for the compiled expression.
The straight-line program computing the expression.
Register containing the expression's value.
Instances For
Compile an expression while certifying its evaluation and operation count.
Equations
- One or more equations did not get rendered due to their size.