Theorem: Matrix.ker_diagonal_toLin'
File: Mathlib/LinearAlgebra/Matrix/Diagonal.lean

Proof steps:
state_before: m : Type u_1
n : Type u_2
inst✝³ : Fintype m
inst✝² : Fintype n
K : Type u
inst✝¹ : Semifield K
inst✝ : DecidableEq m
w : m → K
⊢ ker (toLin' (diagonal w)) = ⨆ i ∈ {i | w i = 0}, LinearMap.range (LinearMap.stdBasis K (fun x => K) i)
state_after: m : Type u_1
n : Type u_2
inst✝³ : Fintype m
inst✝² : Fintype n
K : Type u
inst✝¹ : Semifield K
inst✝ : DecidableEq m
w : m → K
⊢ ⨅ i, comap (toLin' (diagonal w)) (ker (proj i)) =
    ⨆ i ∈ {i | w i = 0}, LinearMap.range (LinearMap.stdBasis K (fun x => K) i)
tactic: rw [← comap_bot, ← iInf_ker_proj, comap_iInf]
state_before: m : Type u_1
n : Type u_2
inst✝³ : Fintype m
inst✝² : Fintype n
K : Type u
inst✝¹ : Semifield K
inst✝ : DecidableEq m
w : m → K
⊢ ⨅ i, comap (toLin' (diagonal w)) (ker (proj i)) =
    ⨆ i ∈ {i | w i = 0}, LinearMap.range (LinearMap.stdBasis K (fun x => K) i)
state_after: m : Type u_1
n : Type u_2
inst✝³ : Fintype m
inst✝² : Fintype n
K : Type u
inst✝¹ : Semifield K
inst✝ : DecidableEq m
w : m → K
this : ∀ (i : m), ker (proj i ∘ₗ toLin' (diagonal w)) = comap (toLin' (diagonal w)) (ker (proj i))
⊢ ⨅ i, comap (toLin' (diagonal w)) (ker (proj i)) =
    ⨆ i ∈ {i | w i = 0}, LinearMap.range (LinearMap.stdBasis K (fun x => K) i)
tactic: have := fun i : m => ker_comp (toLin' (diagonal w)) (proj i)
state_before: m : Type u_1
n : Type u_2
inst✝³ : Fintype m
inst✝² : Fintype n
K : Type u
inst✝¹ : Semifield K
inst✝ : DecidableEq m
w : m → K
this : ∀ (i : m), ker (proj i ∘ₗ toLin' (diagonal w)) = comap (toLin' (diagonal w)) (ker (proj i))
⊢ ⨅ i, comap (toLin' (diagonal w)) (ker (proj i)) =
    ⨆ i ∈ {i | w i = 0}, LinearMap.range (LinearMap.stdBasis K (fun x => K) i)
state_after: m : Type u_1
n : Type u_2
inst✝³ : Fintype m
inst✝² : Fintype n
K : Type u
inst✝¹ : Semifield K
inst✝ : DecidableEq m
w : m → K
this : ∀ (i : m), ker (proj i ∘ₗ toLin' (diagonal w)) = comap (toLin' (diagonal w)) (ker (proj i))
⊢ ⨅ i, ⨅ (_ : w i ≠ 0), ker (proj i) = ⨆ i ∈ {i | w i = 0}, LinearMap.range (LinearMap.stdBasis K (fun x => K) i)
tactic: simp only [comap_iInf, ← this, proj_diagonal, ker_smul']
state_before: m : Type u_1
n : Type u_2
inst✝³ : Fintype m
inst✝² : Fintype n
K : Type u
inst✝¹ : Semifield K
inst✝ : DecidableEq m
w : m → K
this : ∀ (i : m), ker (proj i ∘ₗ toLin' (diagonal w)) = comap (toLin' (diagonal w)) (ker (proj i))
⊢ ⨅ i, ⨅ (_ : w i ≠ 0), ker (proj i) = ⨆ i ∈ {i | w i = 0}, LinearMap.range (LinearMap.stdBasis K (fun x => K) i)
state_after: m : Type u_1
n : Type u_2
inst✝³ : Fintype m
inst✝² : Fintype n
K : Type u
inst✝¹ : Semifield K
inst✝ : DecidableEq m
w : m → K
this✝ : ∀ (i : m), ker (proj i ∘ₗ toLin' (diagonal w)) = comap (toLin' (diagonal w)) (ker (proj i))
this : univ ⊆ {i | w i = 0} ∪ {i | w i = 0}ᶜ
⊢ ⨅ i, ⨅ (_ : w i ≠ 0), ker (proj i) = ⨆ i ∈ {i | w i = 0}, LinearMap.range (LinearMap.stdBasis K (fun x => K) i)
tactic: have : univ ⊆ { i : m | w i = 0 } ∪ { i : m | w i = 0 }ᶜ := by rw [Set.union_compl_self]
state_before: m : Type u_1
n : Type u_2
inst✝³ : Fintype m
inst✝² : Fintype n
K : Type u
inst✝¹ : Semifield K
inst✝ : DecidableEq m
w : m → K
this✝ : ∀ (i : m), ker (proj i ∘ₗ toLin' (diagonal w)) = comap (toLin' (diagonal w)) (ker (proj i))
this : univ ⊆ {i | w i = 0} ∪ {i | w i = 0}ᶜ
⊢ ⨅ i, ⨅ (_ : w i ≠ 0), ker (proj i) = ⨆ i ∈ {i | w i = 0}, LinearMap.range (LinearMap.stdBasis K (fun x => K) i)
state_after: no goals
tactic: exact (iSup_range_stdBasis_eq_iInf_ker_proj K (fun _ : m => K) disjoint_compl_right this
    (Set.toFinite _)).symm