Zulip Chat Archive

Stream: new members

Topic: beginner project: linear algebra lemma


Paul Nelson (Jan 18 2024 at 19:28):

I formalized a result from one of my papers: https://github.com/ultronozm/LinearAlgebraLemma. It's a "linear algebra lemma" that shows up at the end of a longer analytic argument. This is my first attempt at doing anything with Lean, so any feedback or criticism would be welcome. Some of the intermediary results might be useful in Mathlib in some form, but I suspect my proofs are clumsy, and I'm not very familiar with Mathlib, so any suggestions there would also be welcome.

Here's the mathematical statement:

Let MnM_{n} denote the space of complex n × n matrices, included in the space Mn+1M_{n+1} of (n+1) × (n+1) matrices as the upper-left block. Let τ be an element of Mn+1M_{n+1} with the property that no eigenvalue of τ is also an eigenvalue of the upper-left n × n submatrix of τ. Let x be an element of Mn+1M_{n+1} with [x,τ] = 0. Let z denote the image in Mn+1M_{n+1} of the identity element of MnM_{n}, thus z is a diagonal matrix with entries (1, ..., 1, 0). Suppose that [x,[z,τ]] = [y, τ] for some y in MnM_{n}. Then x is a scalar matrix.

Here's the Lean statement:

import Mathlib

abbrev Mat (R : Type) [Ring R] (n : ) := Matrix (Fin n) (Fin n) R

def matrixIncl {R : Type} [Ring R] {n : }
  (x : Mat R n) : Mat R (n+1) :=
  fun i j  if h : i   Fin.last n  j  Fin.last n
    then x i, Fin.val_lt_last h.1 j, Fin.val_lt_last h.2
    else 0

example (n : )
  (τ : Mat  (n+1)) ( : τ.charpoly.roots  (Matrix.subUpLeft τ).charpoly.roots = )
  (x : Mat  (n+1)) (hx : x, τ = 0) (y : Mat  n)
  (h : x, matrixIncl (1 : Mat  n), τ⁆⁆ = matrixIncl y, τ)
  :  (r : ), x = r  (1 : Mat  (n+1)) := by sorry

Ruben Van de Velde (Jan 18 2024 at 19:49):

Congratulations!


Last updated: May 02 2025 at 03:31 UTC