Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

LeanProofs.Rosetta.CartanQuadraticResidual

Definition
Grade4_LeanProofs_Rosetta_CartanQuadraticResidual

by lisamegawatts · Sep 18, 2026 · Mathlib c5ea003 (Lean v4.30.0)

clifford-algebraleanproofs-grade4rosetta

Foundational definitions and structural lemmas from LeanProofs.Rosetta.CartanQuadraticResidual, required by the selected LeanProofs theorem graph.

Definition code
import Definitions.Def_Grade4_LeanProofs_Rosetta_CartanCubicInvariant
import Definitions.Def_Grade4_LeanProofs_Rosetta_ObstructionToDescent
import Mathlib.Tactic.FinCases

namespace LeanProofsGrade4P2M


/-!
# Quadratic residual of a cubic-neutral traceless Cartan triple

This file computes the full square before projection, classifies every
cubic-neutral nonzero preimage branch, and proves that the resulting traceless
quadratic residual lies on the positive repeated-eigenvalue orbit.  It also
separates two information statements: the full square determines the residual,
whereas a scalar multiple of `I2` together with the self-bracket does not.

The claims are exact algebraic statements.  No generator, preferred branch,
lift, dynamics, or physical interpretation is selected.
-/

noncomputable section

namespace Rosetta.CartanQuadraticResidual

open scoped Matrix
open Rosetta.CartanCubic
open Rosetta.ObstructionToDescent

/-! ## Frozen maps and branch predicates -/

/-- Coordinatewise full square of an eigenvalue triple. -/
def squareEigenvalues (p : EigenTriple) : EigenTriple :=
  (p.1 ^ 2, p.2.1 ^ 2, p.2.2 ^ 2)

/-- Coordinatewise traceless residual of the full square. -/
def residualEigenvalues (p : EigenTriple) : EigenTriple :=
  let s := I2 p.1 p.2.1 p.2.2 / 3
  (p.1 ^ 2 - s, p.2.1 ^ 2 - s, p.2.2 ^ 2 - s)

/-- The diagonal Cartan matrix associated to an ordered eigenvalue triple. -/
def cartanMatrix (p : EigenTriple) : Matrix (Fin 3) (Fin 3) ℝ :=
  diagonalCartan p.1 p.2.1 p.2.2

/-- The complete matrix square, retained before any traceless projection. -/
def cartanFullSquare (p : EigenTriple) : Matrix (Fin 3) (Fin 3) ℝ :=
  cartanMatrix p ^ 2

/-- The symmetric-traceless quadratic residual of the complete matrix square. -/
def cartanQuadraticResidual (p : EigenTriple) : Matrix (Fin 3) (Fin 3) ℝ :=
  cartanFullSquare p -
    (I2 p.1 p.2.1 p.2.2 / 3) • (1 : Matrix (Fin 3) (Fin 3) ℝ)

/-- All six labelled branches of a cubic-neutral traceless triple. -/
def IsCubicNeutralWeylBranch (p : EigenTriple) : Prop :=
  ∃ a : ℝ,
    (p = (a, -a, 0)) ∨
    (p = (a, 0, -a)) ∨
    (p = (0, a, -a)) ∨
    (p = (-a, a, 0)) ∨
    (p = (-a, 0, a)) ∨
    (p = (0, -a, a))



/-- The repeated-eigenvalue branch family with strictly positive common value. -/
def IsPositiveRepeatedEigenvalueWeylBranch (p : EigenTriple) : Prop :=
  ∃ b : ℝ, 0 < b ∧
    (p = (b, b, -2 * b) ∨
     p = (-2 * b, b, b) ∨
     p = (b, -2 * b, b))

/-! ## Complete square and terminal projection -/

/-- The full matrix square is the diagonal matrix of coordinate squares. -/
theorem cartan_full_square_eq_diagonal (p : EigenTriple) :
    cartanFullSquare p =
      diagonalCartan (squareEigenvalues p).1
        (squareEigenvalues p).2.1 (squareEigenvalues p).2.2 := by
  ext i j
  fin_cases i <;> fin_cases j <;>
    simp [cartanFullSquare, cartanMatrix, diagonalCartan, squareEigenvalues,
      pow_two, Matrix.mul_apply, Fin.sum_univ_succ]

/-- The matrix residual is exactly the diagonal matrix of residual eigenvalues. -/
theorem cartan_quadratic_residual_eq_diagonal (p : EigenTriple) :
    cartanQuadraticResidual p =
      diagonalCartan (residualEigenvalues p).1
        (residualEigenvalues p).2.1 (residualEigenvalues p).2.2 := by
  rw [cartanQuadraticResidual, cartan_full_square_eq_diagonal]
  ext i j
  fin_cases i <;> fin_cases j <;>
    simp [diagonalCartan, residualEigenvalues, squareEigenvalues]









/-! ## Every cubic-neutral preimage branch and its output orbit -/























/-! ## Permutation covariance -/













/-! ## Full-product sufficiency and scalar/self-bracket obstruction -/



/-- Self-bracket retained as an actual matrix rather than silently discarded. -/
def cartanSelfBracket (p : EigenTriple) : Matrix (Fin 3) (Fin 3) ℝ :=
  cartanMatrix p * cartanMatrix p - cartanMatrix p * cartanMatrix p

/-- Frozen coarse observation: normalized scalar self-data and the self-bracket. -/
def scalarSelfBracketObservation (normalization : ℝ) (p : EigenTriple) :
    ℝ × Matrix (Fin 3) (Fin 3) ℝ :=
  (normalization * I2 p.1 p.2.1 p.2.2, cartanSelfBracket p)



/-- The frozen same-coarse-data/different-residual witness. -/
def scalarSelfBracket_quadraticResidual_obstruction (normalization : ℝ) :
    DeterminationObstruction (scalarSelfBracketObservation normalization)
      cartanQuadraticResidual where
  left := (1, -1, 0)
  right := (1, 0, -1)
  same_observation := by
    simp [scalarSelfBracketObservation, cartanSelfBracket, I2]
  different_outcome := by
    rw [cartan_quadratic_residual_eq_diagonal,
      cartan_quadratic_residual_eq_diagonal]
    intro h
    have hentry := congrArg (fun M => M 1 1) h
    norm_num [residualEigenvalues, I2, diagonalCartan] at hentry





end Rosetta.CartanQuadraticResidual


end
end LeanProofsGrade4P2M
Source
https://github.com/MonumentalSystems/LeanProofs/blob/b656238b73d5f0f74515f6574a1dcb4e0216129f/LeanProofs/Rosetta/CartanQuadraticResidual.lean

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me