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

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

tactic: simp [two_mul]
state_before: case zero
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
m : ℤ
⊢ 2 * T R m * T R 0 = T R (m + 0) + T R (m - 0)
state_after: no goals

tactic: rw [T_add_one, T_one]
state_before: case one
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
m : ℤ
⊢ 2 * T R m * T R 1 = T R (m + 1) + T R (m - 1)
state_after: case one
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
m : ℤ
⊢ 2 * T R m * X = 2 * X * T R m - T R (m - 1) + T R (m - 1)

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

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

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

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

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

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

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

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

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