import proofs.SutureCovariance011c /-! # 011c / S-01c.2 — SD.5 regular-minor certificate The source's SD.6 coframe `Pi_star` gives the displayed SD.4 differential. This module retains a selected full-target 16 by 16 minor as exact integer data and evaluates its fraction-free elimination in the Lean kernel. The smooth open-neighborhood consequence of SD.5 remains a separate analytic bridge. -/ set_option autoImplicit false set_option maxRecDepth 100000 namespace SutureRegular011c open RootFieldLift011a SutureSignature011b SmoothSuture011c SutureCovariance011c /-! ## Exact SD.4 minor at Pi_star -/ def piStar : List (List Int) := [[-1, -2, 1, 0], [2, -1, 1, 0], [-1, -2, 1, -2], [-1, 1, -1, 0], [-1, 0, 0, -1], [0, 1, 1, -1], [2, 2, 1, -2], [-1, -1, 0, -1]] def selectedColumns : List Nat := [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17] def selectedRows : List Nat := [0, 1, 2, 3, 4, 5, 6, 8, 10, 11, 9, 7, 12, 13, 14, 15] /-- SD.4 at SD.6, restricted to `selectedRows` and `selectedColumns`. -/ def regularMinor : List (List Int) := [[8, 0, 0, 0, 6, 0, 0, -2, 0, 0, 0, -2, 0, 0, -2, 0], [3, 4, 0, 0, -4, 3, 0, -2, -1, 0, 0, 1, -1, 0, 0, -1], [-1, 0, 4, 0, 3, 0, 0, 1, 0, -1, 0, -1, 0, -1, 0, 0], [0, 0, 0, 4, 0, 0, 3, -2, 0, 0, -1, 0, 0, 0, -1, 0], [0, 6, 0, 0, 0, -8, 0, 0, -4, 0, 0, 0, 2, 0, 0, 0], [0, -1, 3, 0, 0, 3, 0, 0, 1, -2, 0, 0, -1, 1, 0, 0], [0, 0, 0, 3, 0, 0, -4, 0, -2, 0, -2, 0, 0, 0, 0, -1], [0, 0, 0, -1, 0, 0, 3, 0, 0, -2, 1, 0, 0, 0, 0, 0], [1, 2, 0, 0, -2, 1, 0, -1, -1, 0, 0, -2, 1, 0, -1, 0], [-1, 0, 2, 0, 1, 0, 0, 1, 0, -1, 0, 1, 0, 1, -1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0, 0, 0, 0], [0, 0, -2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, -2, 0, 0], [0, 0, 0, 2, 0, 0, 1, 0, 0, 0, -1, -2, 0, 0, 1, 0], [0, -1, -1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 2, 0, -1], [0, 0, 0, -1, 0, 0, 2, 0, 0, 0, 1, 0, -2, 0, 0, 1], [0, 0, 0, 1, 0, 0, -1, 0, 0, 0, -1, 0, 0, -2, 0, 0]] /-- One Bareiss fraction-free elimination step. -/ def bareissStep (previous : Int) (rows : List (List Int)) : List (List Int) := match rows with | [] => [] | top :: lower => let pivot := top.getD 0 0 lower.map fun row => List.zipWith (fun below above => (pivot * below - row.getD 0 0 * above) / previous) (row.drop 1) (top.drop 1) def bareissFuel : Nat → Int → List (List Int) → Int | 0, _, _ => 0 | _ + 1, _, [] => 1 | _ + 1, _, [row] => row.getD 0 0 | fuel + 1, previous, top :: lower => bareissFuel fuel (top.getD 0 0) (bareissStep previous (top :: lower)) def regularMinorDeterminant : Int := bareissFuel 16 1 regularMinor theorem regularMinor_determinant : regularMinorDeterminant = 368640 := by norm_num [regularMinorDeterminant, bareissFuel, bareissStep, regularMinor] def regularMinorNonzero : Prop := regularMinorDeterminant ≠ 0 theorem regularMinor_nonzero : regularMinorNonzero := by rw [regularMinorNonzero, regularMinor_determinant] decide /-! ## SD.5 ownership and receipt -/ def regularBranchSource011c : SourceRef := ⟨"Suture Field Dynamics v0.1", "SD.4--SD.8: exact selected 16 by 16 minor of D S at Pi_star; source SHA-256 d8ef1b773356f6d85319d6b69f4b81186a1f166340b8e160b28ca33255c40a27"⟩ /-- The finite full-target-minor certificate; the smooth neighborhood remains separate. -/ def regularSutureCertificate : Certified [.consistencyFixed] regularMinorNonzero := .consistencyFixed regularBranchSource011c regularMinor_nonzero #print axioms regularMinor_determinant #print axioms regularMinor_nonzero end SutureRegular011c