Documentation

Complexitylib.Circuits.ExactFourier.Internal.SignedPrice

Exact Fourier circuits: signed price #

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

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

@[instance_reducible]

Use the next bit-string order on the sum representation of longer bit strings.

Equations
Instances For
    @[instance_reducible]

    Use the strict order induced by the next bit-string order.

    Equations
    Instances For

      The input-side block factor retaining the previous signed-bit transformation.

      Equations
      Instances For

        Apply the previous signed-bit transformation on the first block alone.

        Equations
        Instances For
          noncomputable def Complexity.ExactFourier.SignedBits.transition (m : ℕ) :
          Matrix (Bits (m + 1)) (Bits (m + 1)) ℂ

          The transition matrix comparing the old input and output block factorizations.

          Equations
          Instances For

            The coordinates in the lower half of the recursive bit-string representation.

            Equations
            Instances For

              The diagonal matrix that is positive on the first half and negative on the second.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                theorem Complexity.ExactFourier.SignedBits.J_sign (m : ℕ) (b : Bool) :
                ∃ (s : ℂ), s * s = 1 ∧ (J m b).transpose = s • J m b

                The signed-bit involution with diagonal blocks D m and -D m.

                Equations
                Instances For
                  theorem Complexity.ExactFourier.SignedBits.D_star (m : ℕ) (i j : Bits m) :
                  star (D m i j) = D m i j
                  theorem Complexity.ExactFourier.SignedBits.J_star (m : ℕ) (b : Bool) (i j : Bits m) :
                  star (J m b i j) = J m b i j
                  theorem Complexity.ExactFourier.SignedBits.Gamma_star (m : ℕ) (i j : Bits (m + 1)) :
                  star (Gamma m i j) = Gamma m i j
                  noncomputable def Complexity.ExactFourier.support {α β : Type} [Fintype α] [Fintype β] (A : Matrix α β ℂ) :
                  Finset (α × β)

                  The finite set of matrix positions with nonzero entries.

                  Equations
                  Instances For
                    noncomputable def Complexity.ExactFourier.nnz {α β : Type} [Fintype α] [Fintype β] (A : Matrix α β ℂ) :

                    The number of nonzero entries in a finite matrix.

                    Equations
                    Instances For
                      @[simp]
                      theorem Complexity.ExactFourier.mem_support {α β : Type} [Fintype α] [Fintype β] (A : Matrix α β ℂ) (ij : α × β) :
                      ij ∈ support A ↔ A ij.1 ij.2 ≠ 0
                      @[simp]
                      theorem Complexity.ExactFourier.nnz_zero {α β : Type} [Fintype α] [Fintype β] :
                      nnz 0 = 0
                      @[simp]
                      theorem Complexity.ExactFourier.nnz_neg {α β : Type} [Fintype α] [Fintype β] (A : Matrix α β ℂ) :
                      nnz (-A) = nnz A
                      theorem Complexity.ExactFourier.nnz_add_le {α β : Type} [Fintype α] [Fintype β] [DecidableEq α] [DecidableEq β] (A B : Matrix α β ℂ) :
                      nnz (A + B) ≤ nnz A + nnz B
                      theorem Complexity.ExactFourier.nnz_sub_le {α β : Type} [Fintype α] [Fintype β] [DecidableEq α] [DecidableEq β] (A B : Matrix α β ℂ) :
                      nnz (A - B) ≤ nnz A + nnz B
                      theorem Complexity.ExactFourier.nnz_kronecker {α β : Type} [Fintype α] [Fintype β] (A : Matrix α α ℂ) (B : Matrix β β ℂ) :
                      nnz (Matrix.kroneckerMap (fun (x1 x2 : ℂ) => x1 * x2) A B) = nnz A * nnz B
                      theorem Complexity.ExactFourier.nnz_monomial_mul {α : Type} [Fintype α] [DecidableEq α] (A B : Matrix α α ℂ) (hA : MonomialMatrix A) :
                      nnz (A * B) = nnz B
                      theorem Complexity.ExactFourier.nnz_sum {α β : Type} [Fintype α] [Fintype β] (A : Matrix α β ℂ) :
                      nnz A = ∑ i : α, ∑ j : β, if A i j = 0 then 0 else 1
                      theorem Complexity.ExactFourier.nnz_fromBlocks {α β : Type} [Fintype α] [Fintype β] (A : Matrix α α ℂ) (B : Matrix α β ℂ) (C : Matrix β α ℂ) (D : Matrix β β ℂ) :
                      nnz (Matrix.fromBlocks A B C D) = nnz A + nnz B + nnz C + nnz D
                      noncomputable def Complexity.ExactFourier.Similarity.conj {α : Type} [Fintype α] [DecidableEq α] (U A : Matrix α α ℂ) :
                      Matrix α α ℂ

                      Conjugate a matrix by U, using the nonsingular matrix inverse.

                      Equations
                      Instances For
                        theorem Complexity.ExactFourier.Similarity.one {α : Type} [Fintype α] [DecidableEq α] (U : Matrix α α ℂ) (hU : IsUnit U) :
                        conj U 1 = 1
                        theorem Complexity.ExactFourier.Similarity.add {α : Type} [Fintype α] [DecidableEq α] (U A B : Matrix α α ℂ) :
                        conj U (A + B) = conj U A + conj U B
                        theorem Complexity.ExactFourier.Similarity.sub {α : Type} [Fintype α] [DecidableEq α] (U A B : Matrix α α ℂ) :
                        conj U (A - B) = conj U A - conj U B
                        theorem Complexity.ExactFourier.Similarity.smul {α : Type} [Fintype α] [DecidableEq α] (U A : Matrix α α ℂ) (c : ℂ) :
                        conj U (c • A) = c • conj U A
                        theorem Complexity.ExactFourier.Similarity.mul {α : Type} [Fintype α] [DecidableEq α] (U A B : Matrix α α ℂ) (hU : IsUnit U) :
                        conj U A * conj U B = conj U (A * B)
                        theorem Complexity.ExactFourier.Similarity.unit {α : Type} [Fintype α] [DecidableEq α] (U A : Matrix α α ℂ) (hU : IsUnit U) (hA : IsUnit A) :
                        IsUnit (conj U A)
                        theorem Complexity.ExactFourier.Similarity.diagonal_linear {α : Type} [Fintype α] [DecidableEq α] (U : Matrix α α ℂ) (hU : IsUnit U) (a : α → ℂ) (t : ℂ) :
                        1 + t • conj U (Matrix.diagonal a) = conj U (Matrix.diagonal fun (i : α) => 1 + t * a i)
                        theorem Complexity.ExactFourier.Similarity.diagonal_linear_sub {α : Type} [Fintype α] [DecidableEq α] (U : Matrix α α ℂ) (hU : IsUnit U) (a : α → ℂ) (t : ℂ) :
                        1 - t • conj U (Matrix.diagonal a) = conj U (Matrix.diagonal fun (i : α) => 1 - t * a i)

                        View a real matrix as a complex matrix by embedding each entry.

                        Equations
                        Instances For
                          @[simp]
                          theorem Complexity.ExactFourier.RealMatrix.map_diagonal {α : Type} [DecidableEq α] (d : α → ℝ) :
                          complex (Matrix.diagonal d) = Matrix.diagonal fun (i : α) => ↑(d i)
                          @[simp]
                          @[simp]
                          theorem Complexity.ExactFourier.RealMatrix.diagonalization {α : Type} [Fintype α] [DecidableEq α] (A : Matrix α α ℝ) (hA : A.IsSymm) :
                          ∃ (U : Matrix α α ℝ) (a : α → ℝ), IsUnit U ∧ U⁻¹ = U.transpose ∧ A = U * Matrix.diagonal a * U⁻¹
                          theorem Complexity.ExactFourier.RealMatrix.complex_re {α : Type} (A : Matrix α α ℂ) (hA : ∀ (i j : α), star (A i j) = A i j) :