Appendix B.2 — the pseudoinverse equals the of the independent measurements
ProvedLocalDistanceNetwork.pinv_chiSq_eq_independentSuppose the equations of the system are built from distinct measurements: there is a vector of measurements with symmetric positive-definite covariance , and a matrix of full column rank such that the data vector is . The data covariance is then singular whenever . Suppose moreover that the model is expressed through the measurements, i.e. the coefficient matrix is for some . Let be a Moore–Penrose inverse of . Then:
- for every parameter vector ,
- the corresponding GLS estimates coincide:
So the computed with the pseudoinverse of the (singular) covariance matrix of all equations is exactly the of the linearly independent measurements, and both lead to the same solution.
Formalization Note The inverses in item 2 are Mathlib matrix inverses (equal to for singular matrices); item 2 holds as stated without assuming has full column rank.
import Mathlib import Definitions.Def_LocalDistanceNetwork_GLS open Matrix
namespace LocalDistanceNetwork
theorem pinv_chiSq_eq_independent {m k n : Type*} [Fintype m] [Fintype k] [Fintype n]
[DecidableEq k] [DecidableEq n]
(S : Matrix k k ℝ) (hS : S.PosDef)
(B : Matrix m k ℝ) (hB : Function.Injective B.mulVec)
(A₀ : Matrix k n ℝ) (Z : k → ℝ)
(P : Matrix m m ℝ) (hP : IsMoorePenroseInverse (B * S * Bᵀ) P) :
(∀ X : n → ℝ, glsObjective (B * A₀) P (B *ᵥ Z) X = glsObjective A₀ S⁻¹ Z X) ∧
glsEstimate (B * A₀) P (B *ᵥ Z) = glsEstimate A₀ S⁻¹ Z := by sorry
end LocalDistanceNetworkConfirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.