Theorem: Matrix.charpoly.optionEquivLeft_symm_univ_isHomogeneous
File: Mathlib/LinearAlgebra/Matrix/Charpoly/Univ.lean

tactic: have aux : Fintype.card n = 0 + ∑ i : n, 1 := by
  simp only [zero_add, Finset.sum_const, smul_eq_mul, mul_one, Fintype.card]
state_before: R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
⊢ ((optionEquivLeft R (n × n)).symm (univ R n)).IsHomogeneous (Fintype.card n)
state_after: R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
aux : Fintype.card n = 0 + ∑ i : n, 1
⊢ ((optionEquivLeft R (n × n)).symm (univ R n)).IsHomogeneous (Fintype.card n)

tactic: simp only [aux, univ, charpoly, charmatrix, scalar_apply, RingHom.mapMatrix_apply, det_apply',
  sub_apply, map_apply, of_apply, map_sum, _root_.map_mul, map_intCast, map_prod, map_sub,
  optionEquivLeft_symm_apply, Polynomial.aevalTower_C, rename_X, diagonal, mvPolynomialX]
state_before: R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
aux : Fintype.card n = 0 + ∑ i : n, 1
⊢ ((optionEquivLeft R (n × n)).symm (univ R n)).IsHomogeneous (Fintype.card n)
state_after: R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
aux : Fintype.card n = 0 + ∑ i : n, 1
⊢ (∑ x : Equiv.Perm n,
        ↑↑(Equiv.Perm.sign x) *
          ∏ x_1 : n,
            ((Polynomial.aevalTower (rename some) (X none)) (if x x_1 = x_1 then Polynomial.X else 0) -
              X (some (x x_1, x_1)))).IsHomogeneous
    (0 + ∑ i : n, 1)

tactic: apply IsHomogeneous.sum
state_before: R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
aux : Fintype.card n = 0 + ∑ i : n, 1
⊢ (∑ x : Equiv.Perm n,
        ↑↑(Equiv.Perm.sign x) *
          ∏ x_1 : n,
            ((Polynomial.aevalTower (rename some) (X none)) (if x x_1 = x_1 then Polynomial.X else 0) -
              X (some (x x_1, x_1)))).IsHomogeneous
    (0 + ∑ i : n, 1)
state_after: case h
R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
aux : Fintype.card n = 0 + ∑ i : n, 1
⊢ ∀ i ∈ Finset.univ,
    (↑↑(Equiv.Perm.sign i) *
          ∏ x : n,
            ((Polynomial.aevalTower (rename some) (X none)) (if i x = x then Polynomial.X else 0) -
              X (some (i x, x)))).IsHomogeneous
      (0 + ∑ i : n, 1)

tactic: rintro i -
state_before: case h
R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
aux : Fintype.card n = 0 + ∑ i : n, 1
⊢ ∀ i ∈ Finset.univ,
    (↑↑(Equiv.Perm.sign i) *
          ∏ x : n,
            ((Polynomial.aevalTower (rename some) (X none)) (if i x = x then Polynomial.X else 0) -
              X (some (i x, x)))).IsHomogeneous
      (0 + ∑ i : n, 1)
state_after: case h
R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
aux : Fintype.card n = 0 + ∑ i : n, 1
i : Equiv.Perm n
⊢ (↑↑(Equiv.Perm.sign i) *
        ∏ x : n,
          ((Polynomial.aevalTower (rename some) (X none)) (if i x = x then Polynomial.X else 0) -
            X (some (i x, x)))).IsHomogeneous
    (0 + ∑ i : n, 1)

tactic: apply IsHomogeneous.mul
state_before: case h
R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
aux : Fintype.card n = 0 + ∑ i : n, 1
i : Equiv.Perm n
⊢ (↑↑(Equiv.Perm.sign i) *
        ∏ x : n,
          ((Polynomial.aevalTower (rename some) (X none)) (if i x = x then Polynomial.X else 0) -
            X (some (i x, x)))).IsHomogeneous
    (0 + ∑ i : n, 1)
state_after: case h.hφ
R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
aux : Fintype.card n = 0 + ∑ i : n, 1
i : Equiv.Perm n
⊢ (↑↑(Equiv.Perm.sign i)).IsHomogeneous 0

case h.hψ
R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
aux : Fintype.card n = 0 + ∑ i : n, 1
i : Equiv.Perm n
⊢ (∏ x : n,
        ((Polynomial.aevalTower (rename some) (X none)) (if i x = x then Polynomial.X else 0) -
          X (some (i x, x)))).IsHomogeneous
    (∑ i : n, 1)

tactic: simp only [zero_add, Finset.sum_const, smul_eq_mul, mul_one, Fintype.card]
state_before: R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
⊢ Fintype.card n = 0 + ∑ i : n, 1
state_after: no goals

tactic: apply isHomogeneous_C
state_before: case h.hφ
R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
aux : Fintype.card n = 0 + ∑ i : n, 1
i : Equiv.Perm n
⊢ (↑↑(Equiv.Perm.sign i)).IsHomogeneous 0
state_after: no goals

tactic: apply IsHomogeneous.prod
state_before: case h.hψ
R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
aux : Fintype.card n = 0 + ∑ i : n, 1
i : Equiv.Perm n
⊢ (∏ x : n,
        ((Polynomial.aevalTower (rename some) (X none)) (if i x = x then Polynomial.X else 0) -
          X (some (i x, x)))).IsHomogeneous
    (∑ i : n, 1)
state_after: case h.hψ.h
R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
aux : Fintype.card n = 0 + ∑ i : n, 1
i : Equiv.Perm n
⊢ ∀ i_1 ∈ Finset.univ,
    ((Polynomial.aevalTower (rename some) (X none)) (if i i_1 = i_1 then Polynomial.X else 0) -
          X (some (i i_1, i_1))).IsHomogeneous
      1

tactic: rintro j -
state_before: case h.hψ.h
R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
aux : Fintype.card n = 0 + ∑ i : n, 1
i : Equiv.Perm n
⊢ ∀ i_1 ∈ Finset.univ,
    ((Polynomial.aevalTower (rename some) (X none)) (if i i_1 = i_1 then Polynomial.X else 0) -
          X (some (i i_1, i_1))).IsHomogeneous
      1
state_after: case h.hψ.h
R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
aux : Fintype.card n = 0 + ∑ i : n, 1
i : Equiv.Perm n
j : n
⊢ ((Polynomial.aevalTower (rename some) (X none)) (if i j = j then Polynomial.X else 0) -
        X (some (i j, j))).IsHomogeneous
    1

tactic: by_cases h : i j = j
state_before: case h.hψ.h
R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
aux : Fintype.card n = 0 + ∑ i : n, 1
i : Equiv.Perm n
j : n
⊢ ((Polynomial.aevalTower (rename some) (X none)) (if i j = j then Polynomial.X else 0) -
        X (some (i j, j))).IsHomogeneous
    1
state_after: case pos
R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
aux : Fintype.card n = 0 + ∑ i : n, 1
i : Equiv.Perm n
j : n
h : i j = j
⊢ ((Polynomial.aevalTower (rename some) (X none)) (if i j = j then Polynomial.X else 0) -
        X (some (i j, j))).IsHomogeneous
    1

case neg
R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
aux : Fintype.card n = 0 + ∑ i : n, 1
i : Equiv.Perm n
j : n
h : ¬i j = j
⊢ ((Polynomial.aevalTower (rename some) (X none)) (if i j = j then Polynomial.X else 0) -
        X (some (i j, j))).IsHomogeneous
    1

tactic: simp only [h, ↓reduceIte, Polynomial.aevalTower_X, IsHomogeneous.sub, isHomogeneous_X]
state_before: case pos
R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
aux : Fintype.card n = 0 + ∑ i : n, 1
i : Equiv.Perm n
j : n
h : i j = j
⊢ ((Polynomial.aevalTower (rename some) (X none)) (if i j = j then Polynomial.X else 0) -
        X (some (i j, j))).IsHomogeneous
    1
state_after: no goals

tactic: simp only [h, ↓reduceIte, map_zero, zero_sub, (isHomogeneous_X _ _).neg]
state_before: case neg
R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
aux : Fintype.card n = 0 + ∑ i : n, 1
i : Equiv.Perm n
j : n
h : ¬i j = j
⊢ ((Polynomial.aevalTower (rename some) (X none)) (if i j = j then Polynomial.X else 0) -
        X (some (i j, j))).IsHomogeneous
    1
state_after: no goals