import Mathlib.LinearAlgebra.Matrix.Block import proofs.SutureLDU011c import proofs.SutureLDUCertificate011c /-! # 011c / SD.5 — rational LU certificate carried to `LDUWitness` STATUS. Elaborated against the pinned Mathlib (v4.33.0) with the real 011 modules (RootFieldLift011a ... SutureLDU011c, SutureLDUCertificate011c) in a partial-build harness in which only `SmoothSuture011c` and `SutureCovariance011c` were replaced by empty-namespace stubs. The full repository CI run (manifold carrier, `lake exe cache`) is the remaining receipt. What this file does, and only this. 1. Reads the core-Lean rational tables `Lat`, `Uat` (kernel-checked in `SutureLDUCertificate011c.lean`) as Mathlib matrices over `ℚ` and `ℝ`. 2. Re-checks `lowerQ * upperQ = selectedQ` over `ℚ` by kernel evaluation. 3. Proves `lowerR.det = 1` and `upperR.det = pivotProduct` from the triangular shape (Mathlib `det_of_lowerTriangular` / `det_of_upperTriangular`). 4. Given the entrywise identification `actualMinorMatrix piStar = selectedR` (proved separately in `SutureLDUEntries011c.lean`), produces `LDUWitness (actualMinorMatrix piStar)` and hence `actualMinor piStar = 368640`. Nothing here touches the smooth SD.5 open-neighbourhood theorem, imported Einstein–Hilbert/Maxwell terms, constants, the `SmoothCompletion` premises, density, calibration, or boundary terms. -/ set_option autoImplicit false set_option maxRecDepth 100000 namespace SutureLDUWitness011c open SutureLDU011c SutureActualMinor011c SutureLDUCertificate011c noncomputable section /-! ## The selected minor as a matrix over ℚ and ℝ -/ def selectedQ : Matrix (Fin 16) (Fin 16) ℚ := fun i j => ((Aat i.val j.val : ℤ) : ℚ) def selectedR : Matrix (Fin 16) (Fin 16) ℝ := fun i j => ((Aat i.val j.val : ℤ) : ℝ) /-- The certified table is the integer minor already used by `SutureRegular011c`. -/ theorem A_eq_regularMinor : SutureLDUCertificate011c.A = SutureRegular011c.regularMinor := by decide +kernel def lowerQ : Matrix (Fin 16) (Fin 16) ℚ := fun i j => Lat i.val j.val def upperQ : Matrix (Fin 16) (Fin 16) ℚ := fun i j => Uat i.val j.val def lowerR : Matrix (Fin 16) (Fin 16) ℝ := fun i j => ((Lat i.val j.val : ℚ) : ℝ) def upperR : Matrix (Fin 16) (Fin 16) ℝ := fun i j => ((Uat i.val j.val : ℚ) : ℝ) /-! ## Finite rational algebra, re-stated on `Matrix` -/ theorem lowerQ_mul_upperQ : lowerQ * upperQ = selectedQ := by decide +kernel theorem upper_diagonal_product : ∏ i : Fin 16, upperQ i i = pivotProduct := by decide +kernel /-! ## Transfer to ℝ -/ theorem lowerR_mul_upperR : lowerR * upperR = selectedR := by ext i j have hq := congrArg (fun x : ℚ => (x : ℝ)) (congrFun (congrFun lowerQ_mul_upperQ i) j) simpa [Matrix.mul_apply, lowerR, upperR, lowerQ, upperQ, selectedR, selectedQ, Rat.cast_sum, Rat.cast_mul] using hq /-! ## Triangular determinant witnesses -/ theorem lowerR_det : lowerR.det = 1 := by have hT : lowerR.IsLowerTriangular := by intro i j h have hij : i < j := OrderDual.toDual_lt_toDual.mp h have hz := L_zero_above i.val i.isLt j.val j.isLt (Fin.lt_def.mp hij) simp [lowerR, hz] rw [Matrix.det_of_isLowerTriangular lowerR hT] apply Finset.prod_eq_one intro i _ have hd := L_unit_diagonal i.val i.isLt simp [lowerR, hd] theorem upperR_det : upperR.det = (pivotProduct : ℝ) := by have hT : upperR.IsUpperTriangular := by intro i j h have hz := U_zero_below i.val i.isLt j.val j.isLt (Fin.lt_def.mp h) simp [upperR, hz] rw [Matrix.det_of_isUpperTriangular hT] have hcast : (∏ i : Fin 16, upperR i i) = ((∏ i : Fin 16, upperQ i i : ℚ) : ℝ) := by rw [Rat.cast_prod] rfl rw [hcast, upper_diagonal_product] /-! ## `LDUWitness` for the actual SD.4 minor, given the entry identification -/ /-- The remaining entrywise identification, discharged in `SutureLDUEntries011c.lean`. -/ def EntriesIdentified : Prop := actualMinorMatrix SutureOpenBranch011c.piStar = selectedR def lduWitness (h : EntriesIdentified) : LDUWitness (actualMinorMatrix SutureOpenBranch011c.piStar) where lower := lowerR upper := upperR factor := by have h' : actualMinorMatrix SutureOpenBranch011c.piStar = selectedR := h rw [h'] exact lowerR_mul_upperR.symm lowerDeterminant := lowerR_det upperDeterminant := upperR_det theorem actualMinor_piStar_value (h : EntriesIdentified) : actualMinor SutureOpenBranch011c.piStar = 368640 := determinant_of_LDU_value (lduWitness h) theorem actualMinor_agreement (h : EntriesIdentified) : actualMinor SutureOpenBranch011c.piStar = (SutureRegular011c.regularMinorDeterminant : ℝ) := by simp [actualMinor_piStar_value h, SutureRegular011c.regularMinor_determinant] #print axioms A_eq_regularMinor #print axioms lowerQ_mul_upperQ #print axioms upper_diagonal_product #print axioms lowerR_mul_upperR #print axioms lowerR_det #print axioms upperR_det #print axioms actualMinor_piStar_value #print axioms actualMinor_agreement end end SutureLDUWitness011c