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

tactic: simp
state_before: case zero
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
n : ℤ
⊢ T R (0 * n) = (T R 0).comp (T R n)
state_after: no goals

tactic: simp
state_before: case one
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
n : ℤ
⊢ T R (1 * n) = (T R 1).comp (T R n)
state_after: no goals

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

tactic: simp only [sub_comp, mul_comp, ofNat_comp, X_comp] at h₂
state_before: case add_two
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
n : ℤ
m : ℕ
ih1 : T R ((↑m + 1) * n) = (T R (↑m + 1)).comp (T R n)
ih2 : T R (↑m * n) = (T R ↑m).comp (T R n)
h₁ : 2 * T R ((↑m + 1) * n) * T R n = T R ((↑m + 1) * n + n) + T R ((↑m + 1) * n - n)
h₂ : (fun x => x.comp (T R n)) (T R (↑m + 2)) = (fun x => x.comp (T R n)) (2 * X * T R (↑m + 1) - T R ↑m)
⊢ T R ((↑m + 2) * n) = (T R (↑m + 2)).comp (T R n)
state_after: case add_two
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
n : ℤ
m : ℕ
ih1 : T R ((↑m + 1) * n) = (T R (↑m + 1)).comp (T R n)
ih2 : T R (↑m * n) = (T R ↑m).comp (T R n)
h₁ : 2 * T R ((↑m + 1) * n) * T R n = T R ((↑m + 1) * n + n) + T R ((↑m + 1) * n - n)
h₂ : (T R (↑m + 2)).comp (T R n) = ↑2 * T R n * (T R (↑m + 1)).comp (T R n) - (T R ↑m).comp (T R n)
⊢ T R ((↑m + 2) * n) = (T R (↑m + 2)).comp (T R n)

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

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

tactic: simp only [sub_comp, mul_comp, ofNat_comp, X_comp] at h₂
state_before: case neg_add_one
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
n : ℤ
m : ℕ
ih1 : T R (-↑m * n) = (T R (-↑m)).comp (T R n)
ih2 : T R ((-↑m + 1) * n) = (T R (-↑m + 1)).comp (T R n)
h₁ : 2 * T R (-↑m * n) * T R n = T R (-↑m * n + n) + T R (-↑m * n - n)
h₂ :
  (fun x => x.comp (T R n)) (T R (-↑m - 1 + 2)) = (fun x => x.comp (T R n)) (2 * X * T R (-↑m - 1 + 1) - T R (-↑m - 1))
⊢ T R ((-↑m - 1) * n) = (T R (-↑m - 1)).comp (T R n)
state_after: case neg_add_one
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
n : ℤ
m : ℕ
ih1 : T R (-↑m * n) = (T R (-↑m)).comp (T R n)
ih2 : T R ((-↑m + 1) * n) = (T R (-↑m + 1)).comp (T R n)
h₁ : 2 * T R (-↑m * n) * T R n = T R (-↑m * n + n) + T R (-↑m * n - n)
h₂ : (T R (-↑m - 1 + 2)).comp (T R n) = ↑2 * T R n * (T R (-↑m - 1 + 1)).comp (T R n) - (T R (-↑m - 1)).comp (T R n)
⊢ T R ((-↑m - 1) * n) = (T R (-↑m - 1)).comp (T R n)

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