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

tactic: rw [det_apply]
state_before: 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.natDegree ≤ Fintype.card n
state_after: n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
⊢ (∑ σ : Equiv.Perm n, sign σ • ∏ i : n, (X • A.map ⇑C + B.map ⇑C) (σ i) i).natDegree ≤ Fintype.card n

tactic: refine (natDegree_sum_le _ _).trans ?_
state_before: n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
⊢ (∑ σ : Equiv.Perm n, sign σ • ∏ i : n, (X • A.map ⇑C + B.map ⇑C) (σ i) i).natDegree ≤ Fintype.card n
state_after: n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
⊢ Finset.fold max 0 (natDegree ∘ fun σ => sign σ • ∏ i : n, (X • A.map ⇑C + B.map ⇑C) (σ i) i) Finset.univ ≤
    Fintype.card n

tactic: refine Multiset.max_le_of_forall_le _ _ ?_
state_before: n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
⊢ Finset.fold max 0 (natDegree ∘ fun σ => sign σ • ∏ i : n, (X • A.map ⇑C + B.map ⇑C) (σ i) i) Finset.univ ≤
    Fintype.card n
state_after: n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
⊢ ∀ x ∈ Multiset.map (natDegree ∘ fun σ => sign σ • ∏ i : n, (X • A.map ⇑C + B.map ⇑C) (σ i) i) Finset.univ.val,
    x ≤ Fintype.card n

tactic: simp only [forall_apply_eq_imp_iff, true_and_iff, Function.comp_apply, Multiset.map_map,
  Multiset.mem_map, exists_imp, Finset.mem_univ_val]
state_before: n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
⊢ ∀ x ∈ Multiset.map (natDegree ∘ fun σ => sign σ • ∏ i : n, (X • A.map ⇑C + B.map ⇑C) (σ i) i) Finset.univ.val,
    x ≤ Fintype.card n
state_after: n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
⊢ ∀ (a : Equiv.Perm n), (sign a • ∏ i : n, (X • A.map ⇑C + B.map ⇑C) (a i) i).natDegree ≤ Fintype.card n

tactic: intro g
state_before: n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
⊢ ∀ (a : Equiv.Perm n), (sign a • ∏ i : n, (X • A.map ⇑C + B.map ⇑C) (a i) i).natDegree ≤ Fintype.card n
state_after: 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).natDegree ≤ Fintype.card n

tactic: dsimp only [add_apply, smul_apply, map_apply, smul_eq_mul]
state_before: 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
x✝ : i ∈ Finset.univ
⊢ ((X • A.map ⇑C + B.map ⇑C) (g i) i).natDegree ≤ 1
state_after: 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
x✝ : i ∈ Finset.univ
⊢ (X * C (A (g i) i) + C (B (g i) i)).natDegree ≤ 1

tactic: compute_degree
state_before: 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
x✝ : i ∈ Finset.univ
⊢ (X * C (A (g i) i) + C (B (g i) i)).natDegree ≤ 1
state_after: no goals

tactic: cases' Int.units_eq_one_or (sign g) with sg sg
state_before: 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).natDegree ≤
    (∏ i : n, (X • A.map ⇑C + B.map ⇑C) (g i) i).natDegree
state_after: case inl
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
g : Equiv.Perm n
sg : sign g = 1
⊢ (sign g • ∏ i : n, (X • A.map ⇑C + B.map ⇑C) (g i) i).natDegree ≤
    (∏ i : n, (X • A.map ⇑C + B.map ⇑C) (g i) i).natDegree

case inr
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
g : Equiv.Perm n
sg : sign g = -1
⊢ (sign g • ∏ i : n, (X • A.map ⇑C + B.map ⇑C) (g i) i).natDegree ≤
    (∏ i : n, (X • A.map ⇑C + B.map ⇑C) (g i) i).natDegree

tactic: rw [sg, one_smul]
state_before: case inl
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
g : Equiv.Perm n
sg : sign g = 1
⊢ (sign g • ∏ i : n, (X • A.map ⇑C + B.map ⇑C) (g i) i).natDegree ≤
    (∏ i : n, (X • A.map ⇑C + B.map ⇑C) (g i) i).natDegree
state_after: no goals

tactic: rw [sg, Units.neg_smul, one_smul, natDegree_neg]
state_before: case inr
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
g : Equiv.Perm n
sg : sign g = -1
⊢ (sign g • ∏ i : n, (X • A.map ⇑C + B.map ⇑C) (g i) i).natDegree ≤
    (∏ i : n, (X • A.map ⇑C + B.map ⇑C) (g i) i).natDegree
state_after: no goals

tactic: simp [mul_one, Algebra.id.smul_eq_mul, Finset.card_univ]
state_before: n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
g : Equiv.Perm n
⊢ Finset.univ.card • 1 ≤ Fintype.card n
state_after: no goals