Documentation

Complexitylib.Circuits.ExactFourier.Internal.MonomialTools

Exact Fourier circuits: monomial tools #

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

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

theorem Complexity.ExactFourier.MonomialMatrix.tensor {α β : Type} [DecidableEq α] [DecidableEq β] {A : Matrix α α ℂ} {B : Matrix β β ℂ} (hA : MonomialMatrix A) (hB : MonomialMatrix B) :
MonomialMatrix (Matrix.kroneckerMap (fun (x1 x2 : ℂ) => x1 * x2) A B)

A direct sum of signed monomials, indexed in (internal,block) order.

The permutation matrix sending column j to row e j.

Equations
Instances For
    theorem Complexity.ExactFourier.permM_mul_apply {α : Type} [Fintype α] [DecidableEq α] (e : Equiv.Perm α) (X : Matrix α α ℂ) (i j : α) :
    (permM e * X) i j = X ((Equiv.symm e) i) j
    theorem Complexity.ExactFourier.mul_permM_apply {α : Type} [Fintype α] [DecidableEq α] (e : Equiv.Perm α) (X : Matrix α α ℂ) (i j : α) :
    (X * permM e) i j = X i (e j)
    theorem Complexity.ExactFourier.permM_conj_single {α : Type} [Fintype α] [DecidableEq α] (e : Equiv.Perm α) (i j : α) :
    permM e * Matrix.single i j 1 * (permM e)⁻¹ = Matrix.single (e i) (e j) 1
    theorem Complexity.ExactFourier.exists_perm_pair {α : Type} [DecidableEq α] (i j a b : α) (hij : i ≠ j) (hab : a ≠ b) :
    ∃ (e : Equiv.Perm α), e i = a ∧ e j = b
    @[simp]
    theorem Complexity.ExactFourier.Embedded.matrix_coordinates {α β : Type} (e : β ↪ α) (A : Matrix β β ℂ) (i j : β ⊕ complement e) :
    matrix e A ((coordinates e) i) ((coordinates e) j) = Matrix.fromBlocks A 0 0 1 i j
    @[simp]
    theorem Complexity.ExactFourier.Embedded.matrix_on {α β : Type} (e : β ↪ α) (A : Matrix β β ℂ) (i j : β) :
    matrix e A (e i) (e j) = A i j
    theorem Complexity.ExactFourier.Embedded.matrix_off_row {α β : Type} [DecidableEq α] (e : β ↪ α) (A : Matrix β β ℂ) (i j : α) (hi : i ∉ Set.range ⇑e) :
    matrix e A i j = if i = j then 1 else 0
    theorem Complexity.ExactFourier.Embedded.matrix_off_col {α β : Type} [DecidableEq α] (e : β ↪ α) (A : Matrix β β ℂ) (i j : α) (hj : j ∉ Set.range ⇑e) :
    matrix e A i j = if i = j then 1 else 0
    @[simp]
    theorem Complexity.ExactFourier.Embedded.matrix_one {α β : Type} [Fintype α] [Fintype β] [DecidableEq α] [DecidableEq β] (e : β ↪ α) :
    matrix e 1 = 1
    theorem Complexity.ExactFourier.Embedded.matrix_mul {α β : Type} [Fintype α] [Fintype β] [DecidableEq α] [DecidableEq β] (e : β ↪ α) (A B : Matrix β β ℂ) :
    matrix e (A * B) = matrix e A * matrix e B
    theorem Complexity.ExactFourier.Embedded.matrix_comp {α β γ : Type} [Fintype β] [Fintype γ] [DecidableEq α] [DecidableEq β] (e : γ ↪ β) (f : β ↪ α) (A : Matrix γ γ ℂ) :
    matrix f (matrix e A) = matrix (e.trans f) A
    @[simp]
    theorem Complexity.ExactFourier.Embedded.matrix_equiv {α β : Type} (e : β ≃ α) (A : Matrix β β ℂ) :
    theorem Complexity.ExactFourier.MonomialMatrix.blockDiagonal' {π : Type} [DecidableEq π] {β : π → Type} [(i : π) → DecidableEq (β i)] (A : (i : π) → Matrix (β i) (β i) ℂ) (hA : ∀ (i : π), MonomialMatrix (A i)) :

    Exact positive pattern: k forward calls, interleaved with arbitrary monomials.

    Instances For

      Every nonmonomial invertible matrix generates all invertible matrices at one bounded positive length.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem Complexity.ExactFourier.PositiveGeneration.pattern_unit {α : Type} [Fintype α] [DecidableEq α] {A H : Matrix α α ℂ} {k : ℕ} (hA : IsUnit A) (h : Pattern A k H) :
        theorem Complexity.ExactFourier.PositiveGeneration.monomial_of_projectors {α : Type} [Fintype α] [DecidableEq α] (A : Matrix α α ℂ) (hA : IsUnit A) (hp : ∀ (k i j : α), i ≠ j → A i k * A⁻¹ k j = 0) :

        If every column projector is diagonal, the matrix is monomial.

        theorem Complexity.ExactFourier.PositiveGeneration.exists_nondiagonal_projector {α : Type} [Fintype α] [DecidableEq α] (A : Matrix α α ℂ) (hA : IsUnit A) (hn : ¬MonomialMatrix A) :
        ∃ (k : α) (i : α) (j : α), i ≠ j ∧ A i k * A⁻¹ k j ≠ 0

        Negate one selected coordinate and leave every other coordinate unchanged.

        Equations
        Instances For

          Double one selected coordinate and leave every other coordinate unchanged.

          Equations
          Instances For

            Subtract a sign-conjugate to isolate the selected row and column off the diagonal.

            Equations
            Instances For
              theorem Complexity.ExactFourier.PositiveGeneration.cut_apply {α : Type} [Fintype α] [DecidableEq α] (i a b : α) (X : Matrix α α ℂ) :
              cut i X a b = if a = i ∧ b ≠ i ∨ a ≠ i ∧ b = i then 2 * X a b else 0
              theorem Complexity.ExactFourier.PositiveGeneration.double_cut {α : Type} [Fintype α] [DecidableEq α] (i j : α) (hij : i ≠ j) (X : Matrix α α ℂ) :
              cut i (cut j X) = 4 • (X i j • Matrix.single i j 1 + X j i • Matrix.single j i 1)
              theorem Complexity.ExactFourier.PositiveGeneration.isolate_identity {α : Type} [Fintype α] [DecidableEq α] (i j : α) (hij : i ≠ j) (X : Matrix α α ℂ) :
              doubleCoord i * cut i (cut j X) * (doubleCoord i)⁻¹ - (1 / 2) • cut i (cut j X) = (6 * X i j) • Matrix.single i j 1
              theorem Complexity.ExactFourier.PositiveGeneration.single_mem_of_offdiagonal {α : Type} [Fintype α] [DecidableEq α] (V : Submodule ℂ (Matrix α α ℂ)) (hc : ∀ (M : Matrix α α ℂ), MonomialMatrix M → ∀ X ∈ V, M * X * M⁻¹ ∈ V) {X : Matrix α α ℂ} (hX : X ∈ V) (i j : α) (hij : i ≠ j) (hx : X i j ≠ 0) :