Quantitative rational linear algebra #
This file was automatically generated by Codex.
This module proves uniform height and Euclidean operator-norm estimates for rational matrices, nonsingular inverses, pivot right inverses on their ranges, and orthogonal projections and their complements. It also counts matrices of bounded height and selects bounded-height bases without a spanning-list cost. The proof clears denominators and uses determinant and adjugate formulas. All statements and supporting definitions use only Mathlib and this module.
Source: blueprint/formalization_blueprint.tex, lem:rational-linear,
lines 416–420. Verified library references are
Mathlib.Data.Rat.Lemmas (reduced numerator and denominator),
Mathlib.LinearAlgebra.Matrix.Adjugate (Cramer's rule),
Mathlib.LinearAlgebra.Matrix.Rank (row and column rank), and
Mathlib.Analysis.InnerProductSpace.Projection.Basic (orthogonal projection).
The rational height convention agrees with Rat.mulHeight₁_eq_max in
Mathlib.NumberTheory.Height.NumberField.
The bounded-height frequency development uses the same independent
denominator and determinant machinery (lem:height, lines 603–619).
Blueprint lem:rational-linear: height is the maximum of the absolute
reduced numerator and the positive reduced denominator.
Instances For
A finite enumeration containing every rational of height at most B.
Equations
- TrilinearHT.Auto.boundedRationalEnumeration B = Finset.image (fun (p : ℤ × ℕ) => ↑p.1 / ↑p.2) (Finset.Icc (-↑B) ↑B ×ˢ Finset.Icc 1 B)
Instances For
A common denominator for a finite rational tuple, with exactly one
factor for each entry as in lem:rational-linear, line 420.
Equations
- TrilinearHT.Auto.rationalCommonDenominator a = ∏ i : ι, (a i).den
Instances For
Clearing all denominators gives integer coordinates of size at most
B D, where D is their positive common denominator.
Blueprint lem:rational-linear, line 420: the product of all matrix
denominators is at most B^(n²), and the cleared integer entries are at most
B^(n²+1). The determinant bound is the one from the source expansion.
The adjugate formula after clearing denominators, keeping the original matrix inverse and an integer numerator and denominator.
The explicit Cramer bound underlying lem:rational-linear: inverse
entry heights are bounded by a factorial times a polynomial power of B.
Blueprint lem:rational-linear, lines 418–420: nonsingular rational
inverses have entry heights and Euclidean operator norm at most
exp (2 (d+1)^4 log (2B)), uniformly for dimensions at most d.
Select a basis from a finite rational spanning list. Its size is bounded by the ambient dimension, independently of the length of the list.
Place a small matrix in specified rows and columns, with zero entries outside them. This is the pivot solution with all other coordinates zero.
Equations
- TrilinearHT.Auto.rationalMatrixZeroExtend rows cols M = Function.extend (⇑rows) (fun (i : Fin r) => Function.extend (⇑cols) (M i) 0) 0
Instances For
Solving the pivot subsystem and setting nonpivot coordinates to zero
gives a right inverse on the full range, as in lem:rational-linear.
Blueprint lem:rational-linear: every rational matrix has a rational
right inverse on its range, with uniformly bounded height and Euclidean
operator norm. The construction uses a pivot minor and zero coordinates.
The Gram inverse formula is the actual orthogonal projection onto the row space, not merely an idempotent with the same rational dimension.
The rational Gram formula agrees, after real scalar extension, with Mathlib's orthogonal projection onto the real row space.
The common integer denominator and numerator of the Gram projection have a bound that does not multiply unrelated rational entry heights.
The shared-denominator height estimate for a rational Gram projection, before converting its explicit polynomial powers to the source budget.
Blueprint lem:rational-linear: the rational row-space projection has
the stated exponential height bound and Euclidean operator norm at most one.
Real row space of a rational matrix, in Euclidean coordinates.
Equations
- TrilinearHT.Auto.rationalRealRowSpace A = (↑(TrilinearHT.Auto.realMatrixOperator (A.transpose.map fun (q : ℚ) => ↑q))).range
Instances For
Blueprint lem:rational-linear, lines 418–420: arbitrary rational
equations determine rational orthogonal projections onto their real row
space and its orthogonal complement. Both have height at most
exp (8 (d+1)^4 log (2B)) and operator norm at most one.
Blueprint lem:height, proof line 617: clearing one vector's
denominators gives integer entries bounded by B^d, where d is the
number of coordinates. The coordinate's own denominator is canceled
before estimating the product of the remaining denominators.
Replacement determinants give the sharp Cramer numerator bound
needed in the circuit argument of lem:height, proof line 617.
A dependent column family has a proper nonsingular pivot minor, so at least one column remains available for the Cramer dependence.
Cramer numerators for a pivot minor reproduce any column after embedding back into the full row space.
An integer matrix with dependent columns has a nonzero integral kernel vector with the determinant bound, independent of the number of columns.
Every dependent bounded-height rational family has an integral
relation with the sharp coefficient budget from lem:height.
The largest nonzero term prevents cancellation in an integral linear combination of sufficiently separated real magnitudes.
Blueprint lem:height, proof line 617: bounded-height rational
vectors with geometrically separated nonzero evaluations are independent.
The same independence statement includes the empty, zero-dimensional case.
Evaluation of rational vectors against a real frequency.
Equations
Instances For
A finite positive set of bounded-height evaluations is covered by
at most d multiplicative intervals.
A finite enumeration of precisely the rational vectors of bounded height.
Equations
- TrilinearHT.Auto.boundedRationalVectors d B = {v ∈ Fintype.piFinset fun (x : Fin d) => TrilinearHT.Auto.boundedRationalEnumeration B | ∀ (j : Fin d), TrilinearHT.Auto.rationalHeight (v j) ≤ B}
Instances For
The nonzero evaluation magnitudes of all bounded-height vectors.
Equations
- TrilinearHT.Auto.boundedRationalMagnitudes B L = (Finset.image (fun (v : Fin d → ℚ) => |L v|) (TrilinearHT.Auto.boundedRationalVectors d B)).erase 0
Instances For
Bins of fixed logarithmic width occupied by a finite magnitude set.
Equations
- TrilinearHT.Auto.logarithmicMagnitudeBins s δ = Finset.image (fun (x : ℝ) => ⌊Real.log x / δ⌋) s
Instances For
Any finite set of bounded-height evaluation magnitudes occupies at most the source's polynomial-logarithmic number of dyadic bins.
Translating logarithmic intervals along an integer grid gives a finite set of crossing scales with a uniform count.
Uniform translated-scale count for bounded-height evaluations in
logarithmic coordinates; the grid spacing may be any value at least log 2.
Keep a nonnegative magnitude only when it is below the specified threshold.
Instances For
Maximum of the positive scaled magnitudes below ε, with the
source convention that an empty maximum is zero.
Equations
- TrilinearHT.Auto.finiteTinyMaximum s w ε = (insert 0 ({y ∈ Finset.image (fun (x : ℝ) => w * x) s | 0 < y ∧ y ≤ ε})).max' ⋯
Instances For
In one occupied dyadic bin the small maximum is at most twice its lower endpoint, provided that endpoint is below the cutoff.
The tiny maxima are summable over all integer scales, with four times the cutoff threshold per occupied dyadic magnitude bin.
Return frequency determined by the quadratic matrix, return directions and lattice offset.
Equations
Instances For
A subspace generated by bounded integer vectors has rational orthogonal projections with a uniform height bound, independent of the list length.
The same rational orthogonal projection has controlled height and controlled composition with a matrix whose products with its integer rows are bounded. No bound on the input matrix itself is assumed.
Quadratic matrix remaining after the return-coordinate change.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The effective quadratic form is bounded from coordinate returns in an isotropic subspace, using only the slow velocity and the return errors.