A probability analysis may start with ideal real samples while a program consumes stored words. A coupling connects these descriptions without changing the arithmetic or the matrix routines used by the algorithm. It is distinct from proving a numerical accuracy bound.
Theorem (Changing the sample representation). Fix the word machine, decoding, matrix multiplication, and QR functions. Suppose two uniform samplers and two Gaussian samplers agree after maps f and g of their sample inputs. Then the complete mathematical spectral-bisection solver returns identical words after applying those maps to its sample tree.
The agreement is an explicit hypothesis for every uniform scale and sample, and for every Gaussian input. This is an equality of word computations, not a claim that rounded arithmetic is exact real arithmetic.
Lean statement and details
NLAlib.Ops.Machine.eigh_toFloatMachine_map_samples {K Su Sg Su' Sg' : Type} [Inhabited Sg]
[Inhabited Sg'] (M : Ops.Machine K) (dec : K → ℝ) (mm : MatMulMap (K × K)) (qr : QRMap (K × K))
(unif : K → Su → K) (normal : Sg → K × K) (unif' : K → Su' → K) (normal' : Sg' → K × K)
(f : Su → Su') (g : Sg → Sg') (hu : ∀ (scale : K) (v : Su), unif scale v = unif' scale (f v))
(hn : ∀ (z : Sg), normal z = normal' (g z)) (fuel ell : ℕ) {n : ℕ}
(A : Matrix (Fin n) (Fin n) (K × K)) (R0 eps beta : K) (s : List Bool → EighSample Su Sg n) :
eigh (M.toFloatMachine dec (fun {l m n} ↦ mm) (fun {m n} ↦ qr) unif normal) fuel ell A R0 eps beta
s =
eigh (M.toFloatMachine dec (fun {l m n} ↦ mm) (fun {m n} ↦ qr) unif' normal') fuel ell A R0 eps
beta fun a ↦ (f (s a).1, fun side ↦ ((s a).2 side).map g)
Theorem (Rounded tape and ideal sample tree). Fix a word machine, its matrix routines, an ideal real tape, and rounding functions for uniform and Gaussian words. The spectral-bisection reference on the rounded tape returns exactly the ideal-sample recursion using those same word functions and routines. The equality holds at any fixed starting tape position.
This supplies the functional bridge needed to transfer a probability analysis. A separate theorem establishes the numerical good event and its probability.
Lean statement and details
NLAlib.SpectralBisection.eigh_tapeMachine_roundTape {K : Type} (M : Ops.Machine K) (dec : K → ℝ)
(mm : MatMulMap (K × K)) (qr : QRMap (K × K)) (roundUnif roundGaussian : ℝ → K)
(ideal : Ops.Tape ℝ) (n base fuel ell : ℕ) (A : Matrix (Fin n) (Fin n) (K × K))
(R0 eps beta : K) :
have T :=
SpectralBisection.tapeMachine M dec (fun {l m n} ↦ mm) (fun {m n} ↦ qr) n base
(SpectralBisection.roundTape roundUnif roundGaussian ideal);
have F :=
M.toFloatMachine dec (fun {l m n} ↦ mm) (fun {m n} ↦ qr) (M.uniformSample roundUnif)
(M.normalSample roundGaussian);
eigh T fuel ell A R0 eps beta
(eighSlotTree T n fuel R0 beta 0 0 { k := n, A := A, R := R0, ε := eps, ℓ := ell }) =
eigh F fuel ell A R0 eps beta fun a ↦
eighIdealTree F n fuel (ell + 1) R0 beta (SpectralBisection.idealTape n (ideal.shift base)) 0
0 (some { k := n, A := A, R := R0, ε := eps, ℓ := ell }) [] a