Theorem: det_ne_zero_of_sum_row_lt_diag
File: Mathlib/LinearAlgebra/Matrix/Gershgorin.lean

tactic: contrapose! h
state_before: K : Type u_1
n : Type u_2
inst✝² : NormedField K
inst✝¹ : Fintype n
inst✝ : DecidableEq n
A : Matrix n n K
h : ∀ (k : n), ∑ j ∈ Finset.univ.erase k, ‖A k j‖ < ‖A k k‖
⊢ A.det ≠ 0
state_after: K : Type u_1
n : Type u_2
inst✝² : NormedField K
inst✝¹ : Fintype n
inst✝ : DecidableEq n
A : Matrix n n K
h : A.det = 0
⊢ ∃ k, ‖A k k‖ ≤ ∑ j ∈ Finset.univ.erase k, ‖A k j‖

tactic: suffices ∃ k, 0 ∈ Metric.closedBall (A k k) (∑ j ∈ Finset.univ.erase k, ‖A k j‖) by
  exact this.imp (fun a h ↦ by rwa [mem_closedBall_iff_norm', sub_zero] at h)
state_before: K : Type u_1
n : Type u_2
inst✝² : NormedField K
inst✝¹ : Fintype n
inst✝ : DecidableEq n
A : Matrix n n K
h : A.det = 0
⊢ ∃ k, ‖A k k‖ ≤ ∑ j ∈ Finset.univ.erase k, ‖A k j‖
state_after: K : Type u_1
n : Type u_2
inst✝² : NormedField K
inst✝¹ : Fintype n
inst✝ : DecidableEq n
A : Matrix n n K
h : A.det = 0
⊢ ∃ k, 0 ∈ Metric.closedBall (A k k) (∑ j ∈ Finset.univ.erase k, ‖A k j‖)

tactic: refine eigenvalue_mem_ball ?_
state_before: K : Type u_1
n : Type u_2
inst✝² : NormedField K
inst✝¹ : Fintype n
inst✝ : DecidableEq n
A : Matrix n n K
h : A.det = 0
⊢ ∃ k, 0 ∈ Metric.closedBall (A k k) (∑ j ∈ Finset.univ.erase k, ‖A k j‖)
state_after: K : Type u_1
n : Type u_2
inst✝² : NormedField K
inst✝¹ : Fintype n
inst✝ : DecidableEq n
A : Matrix n n K
h : A.det = 0
⊢ Module.End.HasEigenvalue (Matrix.toLin' A) 0

tactic: rw [Module.End.HasEigenvalue,  Module.End.eigenspace_zero, ne_comm]
state_before: K : Type u_1
n : Type u_2
inst✝² : NormedField K
inst✝¹ : Fintype n
inst✝ : DecidableEq n
A : Matrix n n K
h : A.det = 0
⊢ Module.End.HasEigenvalue (Matrix.toLin' A) 0
state_after: K : Type u_1
n : Type u_2
inst✝² : NormedField K
inst✝¹ : Fintype n
inst✝ : DecidableEq n
A : Matrix n n K
h : A.det = 0
⊢ ⊥ ≠ LinearMap.ker (Matrix.toLin' A)

tactic: exact ne_of_lt (LinearMap.bot_lt_ker_of_det_eq_zero (by rwa [LinearMap.det_toLin']))
state_before: K : Type u_1
n : Type u_2
inst✝² : NormedField K
inst✝¹ : Fintype n
inst✝ : DecidableEq n
A : Matrix n n K
h : A.det = 0
⊢ ⊥ ≠ LinearMap.ker (Matrix.toLin' A)
state_after: no goals

tactic: exact this.imp (fun a h ↦ by rwa [mem_closedBall_iff_norm', sub_zero] at h)
state_before: K : Type u_1
n : Type u_2
inst✝² : NormedField K
inst✝¹ : Fintype n
inst✝ : DecidableEq n
A : Matrix n n K
h : A.det = 0
this : ∃ k, 0 ∈ Metric.closedBall (A k k) (∑ j ∈ Finset.univ.erase k, ‖A k j‖)
⊢ ∃ k, ‖A k k‖ ≤ ∑ j ∈ Finset.univ.erase k, ‖A k j‖
state_after: no goals

tactic: rwa [mem_closedBall_iff_norm', sub_zero] at h
state_before: K : Type u_1
n : Type u_2
inst✝² : NormedField K
inst✝¹ : Fintype n
inst✝ : DecidableEq n
A : Matrix n n K
h✝ : A.det = 0
this : ∃ k, 0 ∈ Metric.closedBall (A k k) (∑ j ∈ Finset.univ.erase k, ‖A k j‖)
a : n
h : 0 ∈ Metric.closedBall (A a a) (∑ j ∈ Finset.univ.erase a, ‖A a j‖)
⊢ ‖A a a‖ ≤ ∑ j ∈ Finset.univ.erase a, ‖A a j‖
state_after: no goals

tactic: rwa [LinearMap.det_toLin']
state_before: K : Type u_1
n : Type u_2
inst✝² : NormedField K
inst✝¹ : Fintype n
inst✝ : DecidableEq n
A : Matrix n n K
h : A.det = 0
⊢ LinearMap.det (Matrix.toLin' A) = 0
state_after: no goals