Documentation

Complexitylib.Algebraic.LowerBound.Cutwidth.MultiOutput.MatMul.Defs

Matrix multiplication in coordinates: definition #

The product C = A B of two n × n matrices, as a map with 2 n² inputs and n² outputs. The input coordinates are Fin (n * n + n * n): the entry A i j of the first factor sits at matMulLeft n i j, among the first n * n coordinates, and the entry B j k of the second factor at matMulRight n j k, among the last n * n. The output C i k sits at matMulOutput n i k. Pairs of indices are numbered row by row through finProdFinEquiv.

def Algebraic.Cutwidth.MultiOutput.matMulLeft (n : ℕ) (i j : Fin n) :
Fin (n * n + n * n)

The input coordinate of the entry A i j of the first factor.

Equations
Instances For
    def Algebraic.Cutwidth.MultiOutput.matMulRight (n : ℕ) (j k : Fin n) :
    Fin (n * n + n * n)

    The input coordinate of the entry B j k of the second factor.

    Equations
    Instances For

      The output coordinate of the entry C i k of the product.

      Equations
      Instances For
        def Algebraic.Cutwidth.MultiOutput.matMul {R : Type u_1} [Semiring R] (n : ℕ) (z : Fin (n * n + n * n) → R) :
        Fin (n * n) → R

        Matrix multiplication in coordinates. The output C i k is ∑ j, A i j * B j k, where A i j = z (matMulLeft n i j) and B j k = z (matMulRight n j k).

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          def Algebraic.Cutwidth.MultiOutput.matMulInput {R : Type u_1} {n : ℕ} (A B : Matrix (Fin n) (Fin n) R) :
          Fin (n * n + n * n) → R

          The input holding the matrices A and B.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            def Algebraic.Cutwidth.MultiOutput.matMulTermC {n s : ℕ} (out : Fin (n * n) → Wire (n * n + n * n) s) (q : Fin n × Fin n) :
            Wire (n * n + n * n) s

            The wire carrying the output C i k, among the output wires out.

            Equations
            Instances For