identity_is_p_star_zero
For every dimension n, the n-by-n real identity matrix belongs to P*(0).
Statement
theorem identity_is_p_star_zero (n : ℕ) : is_p_star_kappa n 1 0- Source
- arXiv:2611.07815 Section 1
- Verified
- 07 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- is_p_star_kappaA square real matrix M belongs to the class P*(κ) for a parameter κ ≥ 0 if for all x, the sum (1 + 4κ) ∑_{i: x_i (Mx)_i > 0} x_i (Mx)_i +…
- Used by 1
- identity_is_p_starFor every dimension n : ℕ, the n-by-n real identity matrix indexed by Fin n belongs to the class P*.
Read back from the Lean
For every natural number $n$, the $n \times n$ real identity matrix (denoted 1) satisfies is_p_star_kappa with parameter $\kappa = 0$: that is, $0 \le 0$ and for every vector $x : \text{Fin } n \to \mathbb{R}$, $0 \le (1 + 4 \cdot 0) \cdot \left(\sum_{i \in \{j \in \text{Fin } n \mid 0 < x_j \cdot (1 x)_j\}} x_i \cdot (1 x)_i\right) + \sum_{i \in \{j \in \text{Fin } n \mid x_j \cdot (1 x)_j < 0\}} x_i \cdot (1 x)_i$, where $1 x$ denotes the matrix-vector multiplication Matrix.mulVec 1 x.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
The definition of P*(0) requires that κ = 0 is non-negative and that for every vector x ∈ ℝⁿ, (1 + 4κ) ∑_{x_i(Mx)_i > 0} x_i(Mx)_i + ∑_{x_i(Mx)_i < 0} x_i(Mx)_i ≥ 0. For the identity matrix M = I, each product x_i(Ix)_i simplifies to the square x_i². Because real squares are non-negative, the sum over negative terms vanishes while the sum over positive terms is non-negative, which immediately completes the proof.
The parameter κ = 0 is non-negative, satisfying the first condition of P*(0).
The definition of is_p_star_kappa is a conjunction: 0 ≤ κ and a condition for all vectors x. Splitting the conjunction produces the goal 0 ≤ 0, which is closed immediately by numerical computation (norm_num).
constructor · norm_num
For any vector x, the condition reduces to showing 0 ≤ ∑_{i : x_i^2 > 0} x_i^2 + ∑_{i : x_i^2 < 0} x_i^2.
We introduce an arbitrary vector x. Since 1 * x = x by Matrix.one_mulVec, each component x i * (1 * x) i simplifies to x i * x i. In addition, the scalar prefactor 1 + 4 * 0 simplifies to 1 via mul_zero, add_zero, and one_mul.
uses
Matrix.one_mulVec,mul_zero,add_zero,one_mul· intro x simp only [Matrix.one_mulVec, mul_zero, add_zero, one_mul]
The sum over indices where x_i^2 < 0 is zero: ∑_{i : x_i^2 < 0} x_i^2 = 0.
By Finset.sum_eq_zero, it suffices to show that each term in the sum is zero. For any index i in the filtered set, the filter condition yields x i * x i < 0 via Finset.mem_filter.mp. But squares of real numbers are always non-negative (0 ≤ x i * x i by mul_self_nonneg). Linear arithmetic detects this contradiction and deduces x i * x i = 0.
uses
Finset.sum_eq_zero,Finset.mem_filter.mp,mul_self_nonneghave hneg : ∑ i : Fin n with x i * x i < 0, x i * x i = 0 := by apply Finset.sum_eq_zero intro i hi have h := (Finset.mem_filter.mp hi).2 have h' := mul_self_nonneg (x i) linarith
The sum over indices where x_i^2 > 0 is non-negative: 0 ≤ ∑_{i : x_i^2 > 0} x_i^2.
A finite sum of non-negative elements is non-negative by Finset.sum_nonneg. For each index i in the index set, the condition 0 < x i * x i (extracted by Finset.mem_filter.mp) implies 0 ≤ x i * x i by le_of_lt.
uses
Finset.sum_nonneg,le_of_lt,Finset.mem_filter.mphave hpos : 0 ≤ ∑ i : Fin n with 0 < x i * x i, x i * x i := Finset.sum_nonneg (fun i hi => le_of_lt (Finset.mem_filter.mp hi).2)
The required inequality holds for vector x.
Since the sum of positive terms is non-negative (hpos) and the sum of negative terms is zero (hneg), their sum is non-negative by linear arithmetic (linarith).
linarith
Matrix.one_mulVec- Multiplying the identity matrix by a vector leaves the vector unchanged: 1 * v = v.
mul_zero- Multiplying any element by zero yields zero: a * 0 = 0.
add_zero- Adding zero to any element leaves it unchanged: a + 0 = a.
one_mul- Multiplying any element by one leaves it unchanged: 1 * a = a.
Finset.sum_eq_zero- A finite sum is zero if every term in the sum is zero.
Finset.mem_filter.mp- If an element belongs to a filtered finite set, it satisfies the predicate: a ∈ filter p s → a ∈ s ∧ p a.
mul_self_nonneg- The square of any element in an ordered semiring is non-negative: 0 ≤ a * a.
Finset.sum_nonneg- A finite sum is non-negative if every term in the sum is non-negative.
le_of_lt- A strict inequality implies the corresponding non-strict inequality: a < b → a ≤ b.
- On paper, the sum over indices where x i * x i < 0 is simply an empty sum because real squares are always non-negative. In the formalization, this is established by showing each summand in the filtered set would satisfy both x i * x i < 0 and 0 ≤ x i * x i, allowing linarith to deduce x i * x i = 0 by contradiction.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
/-- The identity matrix belongs to P*(0). -/theorem identity_is_p_star_zero (n : ℕ) : is_p_star_kappa n 1 0 := by constructor · norm_num · intro x simp only [Matrix.one_mulVec, mul_zero, add_zero, one_mul] have hneg : ∑ i : Fin n with x i * x i < 0, x i * x i = 0 := by apply Finset.sum_eq_zero intro i hi have h := (Finset.mem_filter.mp hi).2 have h' := mul_self_nonneg (x i) linarith have hpos : 0 ≤ ∑ i : Fin n with 0 < x i * x i, x i * x i := Finset.sum_nonneg (fun i hi => le_of_lt (Finset.mem_filter.mp hi).2) linarith