Documentation

Complexitylib.Circuits.ExactFourier.Internal.PortMatrices

Exact Fourier circuits: port matrices #

Adapted from OpenAI's formalization at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a. Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Computability/FourierCircuit/PortMatrices.lean

Imports, namespaces, module visibility, documentation, and formatting are adapted for complexitylib. The source theorem statements and mathematical arguments are retained.

theorem Complexity.ExactFourier.Reindexed.unit {ι : Type u_1} {κ : Type u_2} [Fintype ι] [Fintype κ] [DecidableEq ι] [DecidableEq κ] (e : ι ≃ κ) (A : Matrix ι ι ℂ) (hA : IsUnit A) :
theorem Complexity.ExactFourier.Reindexed.mul {ι : Type u_1} {κ : Type u_2} [Fintype ι] [Fintype κ] [DecidableEq ι] [DecidableEq κ] (e : ι ≃ κ) (A B : Matrix ι ι ℂ) :
(Matrix.reindex e e) (A * B) = (Matrix.reindex e e) A * (Matrix.reindex e e) B
theorem Complexity.ExactFourier.Reindexed.symm_apply_apply {ι : Type fourierU1} {κ : Type fourierU2} (e : ι ≃ κ) (A : Matrix ι ι ℂ) :
theorem Complexity.ExactFourier.Reindexed.apply_symm_apply {ι : Type fourierU1} {κ : Type fourierU2} (e : ι ≃ κ) (A : Matrix κ κ ℂ) :
def Complexity.ExactFourier.OnePort.splitRight (ι : Type u_1) (κ : Type u_2) :
ι × (PUnit.{u_3 + 1} ⊕ κ) ≃ ι ⊕ ι × κ

The shared coordinate is explicitly a single PUnit port, not an unspecified padding block.

Equations
Instances For
    def Complexity.ExactFourier.OnePort.splitLeft (ι : Type u_1) (κ : Type u_2) :
    (ι ⊕ PUnit.{u_3 + 1}) × κ ≃ ι × κ ⊕ κ

    Distribute a product over a sum whose distinguished left factor is a singleton.

    Equations
    Instances For

      Apply the first matrix on the selected singleton port and fix the remaining block.

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

        Apply copies of the first matrix away from the selected singleton port.

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

          Apply the second matrix on the selected singleton port of the first factor.

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

            Apply copies of the second matrix away from the first factor's selected port.

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

              The selected row and column have one shared coordinate. Their complement is exactly the Cartesian product of the two unshared data sets.

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

                Extend the first port matrix by the identity on the second matrix's remaining coordinates.

                Equations
                Instances For

                  Extend the second port matrix by the identity on the first matrix's remaining coordinates.

                  Equations
                  Instances For

                    Apply the first and then the second matrix on their union with one shared port.

                    Equations
                    Instances For
                      theorem Complexity.ExactFourier.OnePort.price {α β : Type} [Fintype α] [Fintype β] [DecidableEq α] [DecidableEq β] (p : MatrixPrice) (A : Matrix (α ⊕ PUnit.{1}) (α ⊕ PUnit.{1}) ℂ) (B : Matrix (PUnit.{1} ⊕ β) (PUnit.{1} ⊕ β) ℂ) (hA : IsUnit A) (hB : IsUnit B) :
                      p.value (product A B) = p.value A + p.value B
                      noncomputable def Complexity.ExactFourier.rectangularShear {ι : Type u_1} {κ : Type u_2} [DecidableEq ι] [DecidableEq κ] (G : Matrix ι κ ℂ) :
                      Matrix (ι ⊕ κ) (ι ⊕ κ) ℂ

                      The upper block shear with identity diagonal and off-diagonal block G.

                      Equations
                      Instances For

                        Move the dirty gate memory into a literal identity summand.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          theorem Complexity.ExactFourier.MatrixPrice.rectangularShear_bound (p : MatrixPrice) {n a : ℕ} (C : LinearDAG n a) (G : Matrix (Fin a) (Fin n) ℂ) (hG : ∀ (x : Fin n → ℂ), C.eval x = G.mulVec x) :
                          p.value (rectangularShear G) ≤ 8 * ↑C.size + 2 * ↑a
                          noncomputable def Complexity.ExactFourier.lowerShear {ι : Type u_1} {κ : Type u_2} [DecidableEq ι] [DecidableEq κ] (G : Matrix κ ι ℂ) :
                          Matrix (ι ⊕ κ) (ι ⊕ κ) ℂ

                          The lower block shear with identity diagonal and off-diagonal block G.

                          Equations
                          Instances For
                            theorem Complexity.ExactFourier.lowerShear_unit {ι : Type u_1} {κ : Type u_2} [Fintype ι] [Fintype κ] [DecidableEq ι] [DecidableEq κ] (G : Matrix κ ι ℂ) :

                            Necessary pre-corner price bound: both the forward and inverse circuits are charged.