Theorem: CategoryTheory.finrank_endomorphism_eq_one
File: Mathlib/CategoryTheory/Preadditive/Schur.lean

tactic: have id_nonzero := (isIso_iff_nonzero (𝟙 X)).mp (by infer_instance)
state_before: C : Type u_2
inst✝⁴ : Category C
inst✝³ : Preadditive C
𝕜 : Type u_3
inst✝² : Field 𝕜
inst✝¹ : IsAlgClosed 𝕜
inst✝ : Linear 𝕜 C
X : C
isIso_iff_nonzero : ∀ (f : X ⟶ X), IsIso f ↔ f ≠ 0
I : FiniteDimensional 𝕜 (X ⟶ X)
⊢ finrank 𝕜 (X ⟶ X) = 1

tactic: refine' finrank_eq_one (𝟙 X) id_nonzero _
state_before: C : Type u_2
inst✝⁴ : Category C
inst✝³ : Preadditive C
𝕜 : Type u_3
inst✝² : Field 𝕜
inst✝¹ : IsAlgClosed 𝕜
inst✝ : Linear 𝕜 C
X : C
isIso_iff_nonzero : ∀ (f : X ⟶ X), IsIso f ↔ f ≠ 0
I : FiniteDimensional 𝕜 (X ⟶ X)
id_nonzero : 𝟙 X ≠ 0
⊢ finrank 𝕜 (X ⟶ X) = 1

tactic: infer_instance
state_before: C : Type u_2
inst✝⁴ : Category C
inst✝³ : Preadditive C
𝕜 : Type u_3
inst✝² : Field 𝕜
inst✝¹ : IsAlgClosed 𝕜
inst✝ : Linear 𝕜 C
X : C
isIso_iff_nonzero : ∀ (f : X ⟶ X), IsIso f ↔ f ≠ 0
I : FiniteDimensional 𝕜 (X ⟶ X)
⊢ IsIso (𝟙 X)

tactic: intro f
state_before: C : Type u_2
inst✝⁴ : Category C
inst✝³ : Preadditive C
𝕜 : Type u_3
inst✝² : Field 𝕜
inst✝¹ : IsAlgClosed 𝕜
inst✝ : Linear 𝕜 C
X : C
isIso_iff_nonzero : ∀ (f : X ⟶ X), IsIso f ↔ f ≠ 0
I : FiniteDimensional 𝕜 (X ⟶ X)
id_nonzero : 𝟙 X ≠ 0
⊢ ∀ (w : X ⟶ X), ∃ c, c • 𝟙 X = w

tactic: have : Nontrivial (End X) := nontrivial_of_ne _ _ id_nonzero
state_before: C : Type u_2
inst✝⁴ : Category C
inst✝³ : Preadditive C
𝕜 : Type u_3
inst✝² : Field 𝕜
inst✝¹ : IsAlgClosed 𝕜
inst✝ : Linear 𝕜 C
X : C
isIso_iff_nonzero : ∀ (f : X ⟶ X), IsIso f ↔ f ≠ 0
I : FiniteDimensional 𝕜 (X ⟶ X)
id_nonzero : 𝟙 X ≠ 0
f : X ⟶ X
⊢ ∃ c, c • 𝟙 X = f

tactic: have : FiniteDimensional 𝕜 (End X) := I
state_before: C : Type u_2
inst✝⁴ : Category C
inst✝³ : Preadditive C
𝕜 : Type u_3
inst✝² : Field 𝕜
inst✝¹ : IsAlgClosed 𝕜
inst✝ : Linear 𝕜 C
X : C
isIso_iff_nonzero : ∀ (f : X ⟶ X), IsIso f ↔ f ≠ 0
I : FiniteDimensional 𝕜 (X ⟶ X)
id_nonzero : 𝟙 X ≠ 0
f : X ⟶ X
this : Nontrivial (End X)
⊢ ∃ c, c • 𝟙 X = f

tactic: obtain ⟨c, nu⟩ := spectrum.nonempty_of_isAlgClosed_of_finiteDimensional 𝕜 (End.of f)
state_before: C : Type u_2
inst✝⁴ : Category C
inst✝³ : Preadditive C
𝕜 : Type u_3
inst✝² : Field 𝕜
inst✝¹ : IsAlgClosed 𝕜
inst✝ : Linear 𝕜 C
X : C
isIso_iff_nonzero : ∀ (f : X ⟶ X), IsIso f ↔ f ≠ 0
I : FiniteDimensional 𝕜 (X ⟶ X)
id_nonzero : 𝟙 X ≠ 0
f : X ⟶ X
this✝ : Nontrivial (End X)
this : FiniteDimensional 𝕜 (End X)
⊢ ∃ c, c • 𝟙 X = f

tactic: use c
state_before: case intro
C : Type u_2
inst✝⁴ : Category C
inst✝³ : Preadditive C
𝕜 : Type u_3
inst✝² : Field 𝕜
inst✝¹ : IsAlgClosed 𝕜
inst✝ : Linear 𝕜 C
X : C
isIso_iff_nonzero : ∀ (f : X ⟶ X), IsIso f ↔ f ≠ 0
I : FiniteDimensional 𝕜 (X ⟶ X)
id_nonzero : 𝟙 X ≠ 0
f : X ⟶ X
this✝ : Nontrivial (End X)
this : FiniteDimensional 𝕜 (End X)
c : 𝕜
nu : c ∈ spectrum 𝕜 (End.of f)
⊢ ∃ c, c • 𝟙 X = f

tactic: rw [spectrum.mem_iff, IsUnit.sub_iff, isUnit_iff_isIso, isIso_iff_nonzero, Ne.def,
  Classical.not_not, sub_eq_zero, Algebra.algebraMap_eq_smul_one] at nu
state_before: case intro
C : Type u_2
inst✝⁴ : Category C
inst✝³ : Preadditive C
𝕜 : Type u_3
inst✝² : Field 𝕜
inst✝¹ : IsAlgClosed 𝕜
inst✝ : Linear 𝕜 C
X : C
isIso_iff_nonzero : ∀ (f : X ⟶ X), IsIso f ↔ f ≠ 0
I : FiniteDimensional 𝕜 (X ⟶ X)
id_nonzero : 𝟙 X ≠ 0
f : X ⟶ X
this✝ : Nontrivial (End X)
this : FiniteDimensional 𝕜 (End X)
c : 𝕜
nu : c ∈ spectrum 𝕜 (End.of f)
⊢ c • 𝟙 X = f

tactic: exact nu.symm
state_before: case intro
C : Type u_2
inst✝⁴ : Category C
inst✝³ : Preadditive C
𝕜 : Type u_3
inst✝² : Field 𝕜
inst✝¹ : IsAlgClosed 𝕜
inst✝ : Linear 𝕜 C
X : C
isIso_iff_nonzero : ∀ (f : X ⟶ X), IsIso f ↔ f ≠ 0
I : FiniteDimensional 𝕜 (X ⟶ X)
id_nonzero : 𝟙 X ≠ 0
f : X ⟶ X
this✝ : Nontrivial (End X)
this : FiniteDimensional 𝕜 (End X)
c : 𝕜
nu : End.of f = c • 1
⊢ c • 𝟙 X = f