Theorem: Matrix.derivative_det_one_add_X_smul_aux
File: Mathlib/LinearAlgebra/Matrix/Charpoly/Coeff.lean

tactic: simp
state_before: case zero
R : Type u
inst✝³ : CommRing R
n G : Type v
inst✝² : DecidableEq n
inst✝¹ : Fintype n
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n n R
M : Matrix (Fin 0) (Fin 0) R
⊢ eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
state_after: no goals

tactic: rw [det_succ_row_zero, map_sum, eval_finset_sum]
state_before: case succ
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin n) (Fin n) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1)) (Fin (n + 1)) R
⊢ eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
state_after: case succ
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin n) (Fin n) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1)) (Fin (n + 1)) R
⊢ ∑ i : Fin n.succ,
      eval 0
        (derivative ((-1) ^ ↑i * (1 + X • M.map ⇑C) 0 i * ((1 + X • M.map ⇑C).submatrix Fin.succ i.succAbove).det)) =
    M.trace

tactic: simp only [add_apply, smul_apply, map_apply, smul_eq_mul, X_mul_C, submatrix_add,
  submatrix_smul, Pi.add_apply, Pi.smul_apply, submatrix_map, derivative_mul, map_add,
  derivative_C, zero_mul, derivative_X, mul_one, zero_add, eval_add, eval_mul, eval_C, eval_X,
  mul_zero, add_zero, eval_det_add_X_smul, eval_pow, eval_neg, eval_one]
state_before: case succ
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin n) (Fin n) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1)) (Fin (n + 1)) R
⊢ ∑ i : Fin n.succ,
      eval 0
        (derivative ((-1) ^ ↑i * (1 + X • M.map ⇑C) 0 i * ((1 + X • M.map ⇑C).submatrix Fin.succ i.succAbove).det)) =
    M.trace
state_after: case succ
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin n) (Fin n) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1)) (Fin (n + 1)) R
⊢ ∑ x : Fin n.succ,
      ((eval 0 (derivative ((-1) ^ ↑x)) * eval 0 (1 0 x) + (-1) ^ ↑x * (eval 0 (derivative (1 0 x)) + M 0 x)) *
          eval 0 (submatrix 1 Fin.succ x.succAbove).det +
        (-1) ^ ↑x * eval 0 (1 0 x) *
          eval 0 (derivative (submatrix 1 Fin.succ x.succAbove + X • (M.submatrix Fin.succ x.succAbove).map ⇑C).det)) =
    M.trace

tactic: rw [Finset.sum_eq_single 0]
state_before: case succ
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin n) (Fin n) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1)) (Fin (n + 1)) R
⊢ ∑ x : Fin n.succ,
      ((eval 0 (derivative ((-1) ^ ↑x)) * eval 0 (1 0 x) + (-1) ^ ↑x * (eval 0 (derivative (1 0 x)) + M 0 x)) *
          eval 0 (submatrix 1 Fin.succ x.succAbove).det +
        (-1) ^ ↑x * eval 0 (1 0 x) *
          eval 0 (derivative (submatrix 1 Fin.succ x.succAbove + X • (M.submatrix Fin.succ x.succAbove).map ⇑C).det)) =
    M.trace
state_after: case succ
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin n) (Fin n) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1)) (Fin (n + 1)) R
⊢ (eval 0 (derivative ((-1) ^ ↑0)) * eval 0 (1 0 0) + (-1) ^ ↑0 * (eval 0 (derivative (1 0 0)) + M 0 0)) *
        eval 0 (submatrix 1 Fin.succ (Fin.succAbove 0)).det +
      (-1) ^ ↑0 * eval 0 (1 0 0) *
        eval 0
          (derivative
            (submatrix 1 Fin.succ (Fin.succAbove 0) + X • (M.submatrix Fin.succ (Fin.succAbove 0)).map ⇑C).det) =
    M.trace

case succ.h₀
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin n) (Fin n) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1)) (Fin (n + 1)) R
⊢ ∀ b ∈ univ,
    b ≠ 0 →
      (eval 0 (derivative ((-1) ^ ↑b)) * eval 0 (1 0 b) + (-1) ^ ↑b * (eval 0 (derivative (1 0 b)) + M 0 b)) *
            eval 0 (submatrix 1 Fin.succ b.succAbove).det +
          (-1) ^ ↑b * eval 0 (1 0 b) *
            eval 0 (derivative (submatrix 1 Fin.succ b.succAbove + X • (M.submatrix Fin.succ b.succAbove).map ⇑C).det) =
        0

case succ.h₁
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin n) (Fin n) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1)) (Fin (n + 1)) R
⊢ 0 ∉ univ →
    (eval 0 (derivative ((-1) ^ ↑0)) * eval 0 (1 0 0) + (-1) ^ ↑0 * (eval 0 (derivative (1 0 0)) + M 0 0)) *
          eval 0 (submatrix 1 Fin.succ (Fin.succAbove 0)).det +
        (-1) ^ ↑0 * eval 0 (1 0 0) *
          eval 0
            (derivative
              (submatrix 1 Fin.succ (Fin.succAbove 0) + X • (M.submatrix Fin.succ (Fin.succAbove 0)).map ⇑C).det) =
      0

tactic: simp only [Fin.val_zero, pow_zero, derivative_one, eval_zero, one_apply_eq, eval_one,
  mul_one, zero_add, one_mul, Fin.succAbove_zero, submatrix_one _ (Fin.succ_injective _),
  det_one, IH, trace_submatrix_succ]
state_before: case succ
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin n) (Fin n) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1)) (Fin (n + 1)) R
⊢ (eval 0 (derivative ((-1) ^ ↑0)) * eval 0 (1 0 0) + (-1) ^ ↑0 * (eval 0 (derivative (1 0 0)) + M 0 0)) *
        eval 0 (submatrix 1 Fin.succ (Fin.succAbove 0)).det +
      (-1) ^ ↑0 * eval 0 (1 0 0) *
        eval 0
          (derivative
            (submatrix 1 Fin.succ (Fin.succAbove 0) + X • (M.submatrix Fin.succ (Fin.succAbove 0)).map ⇑C).det) =
    M.trace
state_after: no goals

tactic: intro i _ hi
state_before: case succ.h₀
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin n) (Fin n) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1)) (Fin (n + 1)) R
⊢ ∀ b ∈ univ,
    b ≠ 0 →
      (eval 0 (derivative ((-1) ^ ↑b)) * eval 0 (1 0 b) + (-1) ^ ↑b * (eval 0 (derivative (1 0 b)) + M 0 b)) *
            eval 0 (submatrix 1 Fin.succ b.succAbove).det +
          (-1) ^ ↑b * eval 0 (1 0 b) *
            eval 0 (derivative (submatrix 1 Fin.succ b.succAbove + X • (M.submatrix Fin.succ b.succAbove).map ⇑C).det) =
        0
state_after: case succ.h₀
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin n) (Fin n) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1)) (Fin (n + 1)) R
i : Fin n.succ
a✝ : i ∈ univ
hi : i ≠ 0
⊢ (eval 0 (derivative ((-1) ^ ↑i)) * eval 0 (1 0 i) + (-1) ^ ↑i * (eval 0 (derivative (1 0 i)) + M 0 i)) *
        eval 0 (submatrix 1 Fin.succ i.succAbove).det +
      (-1) ^ ↑i * eval 0 (1 0 i) *
        eval 0 (derivative (submatrix 1 Fin.succ i.succAbove + X • (M.submatrix Fin.succ i.succAbove).map ⇑C).det) =
    0

tactic: exact (hi (Subsingleton.elim i 0)).elim
state_before: case succ.h₀.zero
R : Type u
inst✝³ : CommRing R
n G : Type v
inst✝² : DecidableEq n
inst✝¹ : Fintype n
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n n R
IH : ∀ (M : Matrix (Fin 0) (Fin 0) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (0 + 1)) (Fin (0 + 1)) R
i : Fin (Nat.succ 0)
a✝ : i ∈ univ
hi : i ≠ 0
⊢ (eval 0 (derivative ((-1) ^ ↑i)) * eval 0 (1 0 i) + (-1) ^ ↑i * (eval 0 (derivative (1 0 i)) + M 0 i)) *
        eval 0 (submatrix 1 Fin.succ i.succAbove).det +
      (-1) ^ ↑i * eval 0 (1 0 i) *
        eval 0 (derivative (submatrix 1 Fin.succ i.succAbove + X • (M.submatrix Fin.succ i.succAbove).map ⇑C).det) =
    0
state_after: no goals

tactic: simp only [one_apply_ne' hi, eval_zero, mul_zero, zero_add, zero_mul, add_zero]
state_before: case succ.h₀.succ
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin (n + 1)) (Fin (n + 1)) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1 + 1)) (Fin (n + 1 + 1)) R
i : Fin (n + 1).succ
a✝ : i ∈ univ
hi : i ≠ 0
⊢ (eval 0 (derivative ((-1) ^ ↑i)) * eval 0 (1 0 i) + (-1) ^ ↑i * (eval 0 (derivative (1 0 i)) + M 0 i)) *
        eval 0 (submatrix 1 Fin.succ i.succAbove).det +
      (-1) ^ ↑i * eval 0 (1 0 i) *
        eval 0 (derivative (submatrix 1 Fin.succ i.succAbove + X • (M.submatrix Fin.succ i.succAbove).map ⇑C).det) =
    0
state_after: case succ.h₀.succ
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin (n + 1)) (Fin (n + 1)) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1 + 1)) (Fin (n + 1 + 1)) R
i : Fin (n + 1).succ
a✝ : i ∈ univ
hi : i ≠ 0
⊢ (-1) ^ ↑i * (eval 0 (derivative 0) + M 0 i) * eval 0 (submatrix 1 Fin.succ i.succAbove).det = 0

tactic: rw [det_eq_zero_of_column_eq_zero 0, eval_zero, mul_zero]
state_before: case succ.h₀.succ
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin (n + 1)) (Fin (n + 1)) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1 + 1)) (Fin (n + 1 + 1)) R
i : Fin (n + 1).succ
a✝ : i ∈ univ
hi : i ≠ 0
⊢ (-1) ^ ↑i * (eval 0 (derivative 0) + M 0 i) * eval 0 (submatrix 1 Fin.succ i.succAbove).det = 0
state_after: case succ.h₀.succ
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin (n + 1)) (Fin (n + 1)) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1 + 1)) (Fin (n + 1 + 1)) R
i : Fin (n + 1).succ
a✝ : i ∈ univ
hi : i ≠ 0
⊢ ∀ (i_1 : Fin (n + 1)), submatrix 1 Fin.succ i.succAbove i_1 0 = 0

tactic: intro j
state_before: case succ.h₀.succ
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin (n + 1)) (Fin (n + 1)) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1 + 1)) (Fin (n + 1 + 1)) R
i : Fin (n + 1).succ
a✝ : i ∈ univ
hi : i ≠ 0
⊢ ∀ (i_1 : Fin (n + 1)), submatrix 1 Fin.succ i.succAbove i_1 0 = 0
state_after: case succ.h₀.succ
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin (n + 1)) (Fin (n + 1)) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1 + 1)) (Fin (n + 1 + 1)) R
i : Fin (n + 1).succ
a✝ : i ∈ univ
hi : i ≠ 0
j : Fin (n + 1)
⊢ submatrix 1 Fin.succ i.succAbove j 0 = 0

tactic: rw [submatrix_apply, Fin.succAbove_of_castSucc_lt, one_apply_ne]
state_before: case succ.h₀.succ
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin (n + 1)) (Fin (n + 1)) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1 + 1)) (Fin (n + 1 + 1)) R
i : Fin (n + 1).succ
a✝ : i ∈ univ
hi : i ≠ 0
j : Fin (n + 1)
⊢ submatrix 1 Fin.succ i.succAbove j 0 = 0
state_after: case succ.h₀.succ
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin (n + 1)) (Fin (n + 1)) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1 + 1)) (Fin (n + 1 + 1)) R
i : Fin (n + 1).succ
a✝ : i ∈ univ
hi : i ≠ 0
j : Fin (n + 1)
⊢ j.succ ≠ Fin.castSucc 0

case succ.h₀.succ.h
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin (n + 1)) (Fin (n + 1)) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1 + 1)) (Fin (n + 1 + 1)) R
i : Fin (n + 1).succ
a✝ : i ∈ univ
hi : i ≠ 0
j : Fin (n + 1)
⊢ Fin.castSucc 0 < i

tactic: exact (bne_iff_ne (Fin.succ j) (Fin.castSucc 0)).mp rfl
state_before: case succ.h₀.succ
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin (n + 1)) (Fin (n + 1)) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1 + 1)) (Fin (n + 1 + 1)) R
i : Fin (n + 1).succ
a✝ : i ∈ univ
hi : i ≠ 0
j : Fin (n + 1)
⊢ j.succ ≠ Fin.castSucc 0
state_after: no goals

tactic: rw [Fin.castSucc_zero]
state_before: case succ.h₀.succ.h
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin (n + 1)) (Fin (n + 1)) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1 + 1)) (Fin (n + 1 + 1)) R
i : Fin (n + 1).succ
a✝ : i ∈ univ
hi : i ≠ 0
j : Fin (n + 1)
⊢ Fin.castSucc 0 < i
state_after: case succ.h₀.succ.h
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin (n + 1)) (Fin (n + 1)) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1 + 1)) (Fin (n + 1 + 1)) R
i : Fin (n + 1).succ
a✝ : i ∈ univ
hi : i ≠ 0
j : Fin (n + 1)
⊢ 0 < i

tactic: exact lt_of_le_of_ne (Fin.zero_le _) hi.symm
state_before: case succ.h₀.succ.h
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin (n + 1)) (Fin (n + 1)) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1 + 1)) (Fin (n + 1 + 1)) R
i : Fin (n + 1).succ
a✝ : i ∈ univ
hi : i ≠ 0
j : Fin (n + 1)
⊢ 0 < i
state_after: no goals

tactic: exact fun H ↦ (H <| Finset.mem_univ _).elim
state_before: case succ.h₁
R : Type u
inst✝³ : CommRing R
n✝ G : Type v
inst✝² : DecidableEq n✝
inst✝¹ : Fintype n✝
α β : Type v
inst✝ : DecidableEq α
M✝ : Matrix n✝ n✝ R
n : ℕ
IH : ∀ (M : Matrix (Fin n) (Fin n) R), eval 0 (derivative (1 + X • M.map ⇑C).det) = M.trace
M : Matrix (Fin (n + 1)) (Fin (n + 1)) R
⊢ 0 ∉ univ →
    (eval 0 (derivative ((-1) ^ ↑0)) * eval 0 (1 0 0) + (-1) ^ ↑0 * (eval 0 (derivative (1 0 0)) + M 0 0)) *
          eval 0 (submatrix 1 Fin.succ (Fin.succAbove 0)).det +
        (-1) ^ ↑0 * eval 0 (1 0 0) *
          eval 0
            (derivative
              (submatrix 1 Fin.succ (Fin.succAbove 0) + X • (M.submatrix Fin.succ (Fin.succAbove 0)).map ⇑C).det) =
      0
state_after: no goals