Theorem: Polynomial.leadingCoeff_det_X_one_add_C
File: Mathlib/LinearAlgebra/Matrix/Polynomial.lean

tactic: cases subsingleton_or_nontrivial α
state_before: n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A : Matrix n n α
⊢ leadingCoeff (det (X • 1 + Matrix.map A ↑C)) = 1

tactic: rw [← @det_one n, ← coeff_det_X_add_C_card _ A, leadingCoeff]
state_before: case inr
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A : Matrix n n α
h✝ : Nontrivial α
⊢ leadingCoeff (det (X • 1 + Matrix.map A ↑C)) = 1

tactic: simp only [Matrix.map_one, C_eq_zero, RingHom.map_one]
state_before: case inr
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A : Matrix n n α
h✝ : Nontrivial α
⊢ coeff (det (X • 1 + Matrix.map A ↑C)) (natDegree (det (X • 1 + Matrix.map A ↑C))) =
    coeff (det (X • Matrix.map 1 ↑C + Matrix.map A ↑C)) (Fintype.card n)

tactic: cases' (natDegree_det_X_add_C_le 1 A).eq_or_lt with h h
state_before: case inr
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A : Matrix n n α
h✝ : Nontrivial α
⊢ coeff (det (X • 1 + Matrix.map A ↑C)) (natDegree (det (X • 1 + Matrix.map A ↑C))) =
    coeff (det (X • 1 + Matrix.map A ↑C)) (Fintype.card n)

tactic: simp
state_before: case inl
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A : Matrix n n α
h✝ : Subsingleton α
⊢ leadingCoeff (det (X • 1 + Matrix.map A ↑C)) = 1

tactic: simp only [RingHom.map_one, Matrix.map_one, C_eq_zero] at h
state_before: case inr.inl
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A : Matrix n n α
h✝ : Nontrivial α
h : natDegree (det (X • Matrix.map 1 ↑C + Matrix.map A ↑C)) = Fintype.card n
⊢ coeff (det (X • 1 + Matrix.map A ↑C)) (natDegree (det (X • 1 + Matrix.map A ↑C))) =
    coeff (det (X • 1 + Matrix.map A ↑C)) (Fintype.card n)

tactic: rw [h]
state_before: case inr.inl
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A : Matrix n n α
h✝ : Nontrivial α
h : natDegree (det (X • 1 + Matrix.map A ↑C)) = Fintype.card n
⊢ coeff (det (X • 1 + Matrix.map A ↑C)) (natDegree (det (X • 1 + Matrix.map A ↑C))) =
    coeff (det (X • 1 + Matrix.map A ↑C)) (Fintype.card n)

tactic: have H := coeff_eq_zero_of_natDegree_lt h
state_before: case inr.inr
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A : Matrix n n α
h✝ : Nontrivial α
h : natDegree (det (X • Matrix.map 1 ↑C + Matrix.map A ↑C)) < Fintype.card n
⊢ coeff (det (X • 1 + Matrix.map A ↑C)) (natDegree (det (X • 1 + Matrix.map A ↑C))) =
    coeff (det (X • 1 + Matrix.map A ↑C)) (Fintype.card n)

tactic: rw [coeff_det_X_add_C_card] at H
state_before: case inr.inr
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A : Matrix n n α
h✝ : Nontrivial α
h : natDegree (det (X • Matrix.map 1 ↑C + Matrix.map A ↑C)) < Fintype.card n
H : coeff (det (X • Matrix.map 1 ↑C + Matrix.map A ↑C)) (Fintype.card n) = 0
⊢ coeff (det (X • 1 + Matrix.map A ↑C)) (natDegree (det (X • 1 + Matrix.map A ↑C))) =
    coeff (det (X • 1 + Matrix.map A ↑C)) (Fintype.card n)

tactic: simp at H
state_before: case inr.inr
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A : Matrix n n α
h✝ : Nontrivial α
h : natDegree (det (X • Matrix.map 1 ↑C + Matrix.map A ↑C)) < Fintype.card n
H : det 1 = 0
⊢ coeff (det (X • 1 + Matrix.map A ↑C)) (natDegree (det (X • 1 + Matrix.map A ↑C))) =
    coeff (det (X • 1 + Matrix.map A ↑C)) (Fintype.card n)