Column and row scales, clearing denominator and logarithmic costs
DefinitionOAI_NumberTheory_PiExponent_Approximation_MatrixArithmetic_ScalesCostslinear-algebranumber-theoryopenai-pi-exponent-017
Let be natural denominators and let be natural exponent vectors on coordinates. Put , where the ceiling is natural. Define the column scale, inverse row scale, and common denominator at real height and natural truncation orders by
For the original finite row domain and a column selection , define the logarithmic costs
Here is natural and are real domain parameters; and are the nonconstant coordinates of the row and selected column exponent vectors. All five quantities are real and are defined without positivity assumptions, using the original finite domains. They provide the scaling and cost data for determinant denominator clearing.
Definition code
import Definitions.Def_OAI_NumberTheory_PiExponent_Approximation_MatrixArithmetic_CoreData
namespace OAI.PiExponent.MatrixArithmetic
open scoped BigOperators
noncomputable def columnScale {m : ℕ} (q : Fin m → ℕ) (a : Fin m → ℕ) : ℝ :=
∏ i, (q i : ℝ) ^ a i
noncomputable def rowScale {m : ℕ} (q : Fin m → ℕ) (b : Fin m → ℕ) : ℝ :=
(columnScale q b)⁻¹
noncomputable def denominator {m : ℕ} (q : Fin m → ℕ) (T : Fin m → ℕ) (H : ℝ) : ℝ :=
∏ i, (Nat.lcmUpto (T i) : ℝ) ^ ⌊H / logWeights q i⌋₊
noncomputable def rowCost {m : ℕ} (K : ℕ) (v0 θ : ℝ)
(q : Fin m → ℕ) (H : ℝ) : ℝ :=
∑ ρ : InterpolationMatrix.Row K v0 θ (logWeights q) H,
∑ i, (ρ.2.1 i.succ : ℝ) * Real.log (q i)
noncomputable def columnCost {m : ℕ} {K : ℕ} {w0 v0 θ : ℝ}
(q : Fin m → ℕ) {H : ℝ}
(selection : InterpolationMatrix.Row K v0 θ (logWeights q) H →
InterpolationMatrix.Column w0 (logWeights q) H) : ℝ :=
∑ ρ : InterpolationMatrix.Row K v0 θ (logWeights q) H,
∑ i, ((selection ρ).1 i.succ : ℝ) * Real.log (q i)
end OAI.PiExponent.MatrixArithmetic
Source
OpenAI math, commit adc7f1241b42e322a6451854ab7e4b4c146bf78a: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/NumberTheory/PiExponent/Approximation/MatrixArithmetic.lean#L135-L209