Theorem: Polynomial.Chebyshev.T_neg
File: Mathlib/RingTheory/Polynomial/Chebyshev.lean

tactic: induction n using Polynomial.Chebyshev.induct with
| zero => rfl
| one => show 2 * X * 1 - X = X; ring
| add_two n ih1 ih2 =>
  have h₁ := T_add_two R n
  have h₂ := T_sub_two R (-n)
  linear_combination (norm := ring_nf) (2 * (X:R[X])) * ih1 - ih2 - h₁ + h₂
| neg_add_one n ih1 ih2 =>
  have h₁ := T_add_one R n
  have h₂ := T_sub_one R (-n)
  linear_combination (norm := ring_nf) (2 * (X:R[X])) * ih1 - ih2 + h₁ - h₂
state_before: R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
n : ℤ
⊢ T R (-n) = T R n
state_after: no goals

tactic: rfl
state_before: case zero
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
⊢ T R (-0) = T R 0
state_after: no goals

tactic: show 2 * X * 1 - X = X
state_before: case one
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
⊢ T R (-1) = T R 1
state_after: case one
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
⊢ 2 * X * 1 - X = X

tactic: ring
state_before: case one
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
⊢ 2 * X * 1 - X = X
state_after: no goals

tactic: have h₁ := T_add_two R n
state_before: case add_two
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
n : ℕ
ih1 : T R (-(↑n + 1)) = T R (↑n + 1)
ih2 : T R (-↑n) = T R ↑n
⊢ T R (-(↑n + 2)) = T R (↑n + 2)
state_after: case add_two
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
n : ℕ
ih1 : T R (-(↑n + 1)) = T R (↑n + 1)
ih2 : T R (-↑n) = T R ↑n
h₁ : T R (↑n + 2) = 2 * X * T R (↑n + 1) - T R ↑n
⊢ T R (-(↑n + 2)) = T R (↑n + 2)

tactic: have h₂ := T_sub_two R (-n)
state_before: case add_two
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
n : ℕ
ih1 : T R (-(↑n + 1)) = T R (↑n + 1)
ih2 : T R (-↑n) = T R ↑n
h₁ : T R (↑n + 2) = 2 * X * T R (↑n + 1) - T R ↑n
⊢ T R (-(↑n + 2)) = T R (↑n + 2)
state_after: case add_two
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
n : ℕ
ih1 : T R (-(↑n + 1)) = T R (↑n + 1)
ih2 : T R (-↑n) = T R ↑n
h₁ : T R (↑n + 2) = 2 * X * T R (↑n + 1) - T R ↑n
h₂ : T R (-↑n - 2) = 2 * X * T R (-↑n - 1) - T R (-↑n)
⊢ T R (-(↑n + 2)) = T R (↑n + 2)

tactic: linear_combination (norm := ring_nf) (2 * (X:R[X])) * ih1 - ih2 - h₁ + h₂
state_before: case add_two
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
n : ℕ
ih1 : T R (-(↑n + 1)) = T R (↑n + 1)
ih2 : T R (-↑n) = T R ↑n
h₁ : T R (↑n + 2) = 2 * X * T R (↑n + 1) - T R ↑n
h₂ : T R (-↑n - 2) = 2 * X * T R (-↑n - 1) - T R (-↑n)
⊢ T R (-(↑n + 2)) = T R (↑n + 2)
state_after: no goals

tactic: have h₁ := T_add_one R n
state_before: case neg_add_one
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
n : ℕ
ih1 : T R (- -↑n) = T R (-↑n)
ih2 : T R (-(-↑n + 1)) = T R (-↑n + 1)
⊢ T R (-(-↑n - 1)) = T R (-↑n - 1)
state_after: case neg_add_one
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
n : ℕ
ih1 : T R (- -↑n) = T R (-↑n)
ih2 : T R (-(-↑n + 1)) = T R (-↑n + 1)
h₁ : T R (↑n + 1) = 2 * X * T R ↑n - T R (↑n - 1)
⊢ T R (-(-↑n - 1)) = T R (-↑n - 1)

tactic: have h₂ := T_sub_one R (-n)
state_before: case neg_add_one
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
n : ℕ
ih1 : T R (- -↑n) = T R (-↑n)
ih2 : T R (-(-↑n + 1)) = T R (-↑n + 1)
h₁ : T R (↑n + 1) = 2 * X * T R ↑n - T R (↑n - 1)
⊢ T R (-(-↑n - 1)) = T R (-↑n - 1)
state_after: case neg_add_one
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
n : ℕ
ih1 : T R (- -↑n) = T R (-↑n)
ih2 : T R (-(-↑n + 1)) = T R (-↑n + 1)
h₁ : T R (↑n + 1) = 2 * X * T R ↑n - T R (↑n - 1)
h₂ : T R (-↑n - 1) = 2 * X * T R (-↑n) - T R (-↑n + 1)
⊢ T R (-(-↑n - 1)) = T R (-↑n - 1)

tactic: linear_combination (norm := ring_nf) (2 * (X:R[X])) * ih1 - ih2 + h₁ - h₂
state_before: case neg_add_one
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
n : ℕ
ih1 : T R (- -↑n) = T R (-↑n)
ih2 : T R (-(-↑n + 1)) = T R (-↑n + 1)
h₁ : T R (↑n + 1) = 2 * X * T R ↑n - T R (↑n - 1)
h₂ : T R (-↑n - 1) = 2 * X * T R (-↑n) - T R (-↑n + 1)
⊢ T R (-(-↑n - 1)) = T R (-↑n - 1)
state_after: no goals