-- Mathlib/LinearAlgebra/Matrix/Polynomial.lean
theorem coeff_det_X_add_C_zero (A B : Matrix n n α) :
    coeff (det ((X : α[X]) • A.map C + B.map C)) 0 = det B

Proof state:
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
⊢ ∑ b : Equiv.Perm n, (sign b • ∏ i : n, (X • A.map ⇑C + B.map ⇑C) (b i) i).coeff 0 =
    ∑ σ : Equiv.Perm n, sign σ • ∏ i : n, B (σ i) i

Tactic:
refine Finset.sum_congr rfl ?_

Result:
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
⊢ ∀ x ∈ Finset.univ, (sign x • ∏ i : n, (X • A.map ⇑C + B.map ⇑C) (x i) i).coeff 0 = sign x • ∏ i : n, B (x i) i

Proof state:
case h.e'_3.h.e'_6
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
g : Equiv.Perm n
⊢ ∏ i : n, B (g i) i = (∏ i : n, (X • A.map ⇑C + B.map ⇑C) (g i) i).coeff 0

Tactic:
rw [coeff_zero_prod]

Result:
case h.e'_3.h.e'_6
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
g : Equiv.Perm n
⊢ ∏ i : n, B (g i) i = ∏ i : n, ((X • A.map ⇑C + B.map ⇑C) (g i) i).coeff 0

Proof state:
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
⊢ (X • A.map ⇑C + B.map ⇑C).det.coeff 0 = B.det

Tactic:
rw [det_apply, finset_sum_coeff, det_apply]

Result:
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
⊢ ∑ b : Equiv.Perm n, (sign b • ∏ i : n, (X • A.map ⇑C + B.map ⇑C) (b i) i).coeff 0 =
    ∑ σ : Equiv.Perm n, sign σ • ∏ i : n, B (σ i) i

Proof state:
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
g : Equiv.Perm n
⊢ (sign g • ∏ i : n, (X • A.map ⇑C + B.map ⇑C) (g i) i).coeff 0 = sign g • ∏ i : n, B (g i) i

Tactic:
convert coeff_smul (R := α) (sign g) _ 0

Result:
case h.e'_3.h.e'_6
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
g : Equiv.Perm n
⊢ ∏ i : n, B (g i) i = (∏ i : n, (X • A.map ⇑C + B.map ⇑C) (g i) i).coeff 0

Proof state:
case h.e'_3.h.e'_6
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
g : Equiv.Perm n
⊢ ∀ x ∈ Finset.univ, B (g x) x = ((X • A.map ⇑C + B.map ⇑C) (g x) x).coeff 0

Tactic:
simp

Result:
no goals

Proof state:
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
⊢ ∀ x ∈ Finset.univ, (sign x • ∏ i : n, (X • A.map ⇑C + B.map ⇑C) (x i) i).coeff 0 = sign x • ∏ i : n, B (x i) i

Tactic:
rintro g -

Result:
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
g : Equiv.Perm n
⊢ (sign g • ∏ i : n, (X • A.map ⇑C + B.map ⇑C) (g i) i).coeff 0 = sign g • ∏ i : n, B (g i) i

Proof state:
case h.e'_3.h.e'_6
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
g : Equiv.Perm n
⊢ ∏ i : n, B (g i) i = ∏ i : n, ((X • A.map ⇑C + B.map ⇑C) (g i) i).coeff 0

Tactic:
refine Finset.prod_congr rfl ?_

Result:
case h.e'_3.h.e'_6
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
g : Equiv.Perm n
⊢ ∀ x ∈ Finset.univ, B (g x) x = ((X • A.map ⇑C + B.map ⇑C) (g x) x).coeff 0