Exact Fourier circuits: prices #
Adapted from OpenAI's formalization at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a.
Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Computability/FourierCircuit/Prices.lean
Imports, namespaces, module visibility, documentation, and formatting are adapted for complexitylib. The source theorem statements and mathematical arguments are retained.
The designated outputs are individual reads, not uncharged arbitrary linear maps.
Inverting the output-read word subtracts exactly the same reads.
Forward/read/reverse on arbitrary memory. This is a word identity, not an assumption that dirty scratch starts at zero.
The operational shears above are the ordinary elementary matrices.
The matrix representing execution of a list of elementary shears in order.
Equations
Instances For
Jam the arbitrary dirty memory in an identity summand. The lower-left block is the designated rectangular map extended by zero on dirty scratch.
Equations
- Complexity.ExactFourier.replayMatrix G = Matrix.fromBlocks 1 0 (G.fromCols 0) 1
Instances For
Literal permutation-times-invertible-diagonal form on a finite index type.
Equations
Instances For
An abstract nonnegative matrix cost obeying the stated invariance and composition laws.
The real-valued cost assigned to a finite square complex matrix.
- zero_iff {ι : Type} [Fintype ι] [DecidableEq ι] (A : Matrix ι ι ℂ) : IsUnit A → (self.value A = 0 ↔ MonomialMatrix A)
- reindex {ι κ : Type} [Fintype ι] [Fintype κ] [DecidableEq ι] [DecidableEq κ] (e : ι ≃ κ) (A : Matrix ι ι ℂ) : IsUnit A → self.value ((Matrix.reindex e e) A) = self.value A
- monomial {ι : Type} [Fintype ι] [DecidableEq ι] (A L R : Matrix ι ι ℂ) : IsUnit A → MonomialMatrix L → MonomialMatrix R → self.value (L * A * R) = self.value A
- tensor {ι κ : Type} [Fintype ι] [Fintype κ] [DecidableEq ι] [DecidableEq κ] (A : Matrix ι ι ℂ) (B : Matrix κ κ ℂ) : IsUnit A → IsUnit B → self.value (Matrix.kroneckerMap (fun (x1 x2 : ℂ) => x1 * x2) A B) = ↑(Fintype.card κ) * self.value A + ↑(Fintype.card ι) * self.value B
Instances For
Diagonal conjugation varies the shear coefficient, including all complex values.
An ordered pair and its untouched complement, used for exact identity padding.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Every coordinate shear is a single two-coordinate shear, with literal identity padding.
Every literal shear in an implementing word is charged.
Inverse symmetry and subadditivity control a relative transformation in both directions.