Documentation

LeanPool.MatrixMultiplicationAllFields.LinearAlgebra.MatrixMultiplication.Model

Matrix multiplication: Model #

inductive MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Gate (F : Type u_1) (Input : Type u_2) (Register : Type u_3) :
Type (max (max u_1 u_2) u_3)

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
    inductive MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Program (F : Type u_1) (Input : Type u_2) :
    ℕ → Type (max u_1 u_2)

    A division-free straight-line program indexed by its number of allocated registers.

    Instances For
      def MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.Program.eval {F : Type u_1} {Input : Type u_2} [Field F] {r : ℕ} :
      Program F Input r → (Input → F) → Fin r → F

      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
          @[reducible, inline]

          Disjoint entry positions of the left and right rectangular matrix inputs.

          Equations
          Instances For
            def MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.matrixInputs {F : Type u_1} {a b c : ℕ} (A : Matrix (Fin a) (Fin b) F) (B : Matrix (Fin b) (Fin c) F) :
            MatrixInput a b c → F

            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.

              • output : Fin a → Fin c → Fin self.registers

                Register location of each output matrix entry.

              Instances For
                def MatrixMultiplicationAllFields.MatrixMultiplication.Arithmetic.MatrixAlgorithm.eval {F : Type u_1} [Field F] {a b c : ℕ} (P : MatrixAlgorithm F a b c) (A : Matrix (Fin a) (Fin b) F) (B : Matrix (Fin b) (Fin c) F) :
                Matrix (Fin a) (Fin c) F

                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.

                    Equations
                    Instances For

                      Positive slack, one uniform constant, and a correct program at every size.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      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 dual exponent is a supremum of exact exponent-two rectangular shapes.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For