Theorem: PolyEquivTensor.left_inv
File: Mathlib/RingTheory/PolynomialAlgebra.lean

tactic: refine TensorProduct.induction_on x ?_ ?_ ?_
state_before: R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
⊢ invFun R A ((toFunAlgHom R A) x) = x
state_after: case refine_1
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
⊢ invFun R A ((toFunAlgHom R A) 0) = 0

case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
⊢ ∀ (x : A) (y : R[X]), invFun R A ((toFunAlgHom R A) (x ⊗ₜ[R] y)) = x ⊗ₜ[R] y

case refine_3
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
⊢ ∀ (x y : A ⊗[R] R[X]),
    invFun R A ((toFunAlgHom R A) x) = x →
      invFun R A ((toFunAlgHom R A) y) = y → invFun R A ((toFunAlgHom R A) (x + y)) = x + y

tactic: simp [invFun]
state_before: case refine_1
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
⊢ invFun R A ((toFunAlgHom R A) 0) = 0
state_after: no goals

tactic: intro a p
state_before: case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
⊢ ∀ (x : A) (y : R[X]), invFun R A ((toFunAlgHom R A) (x ⊗ₜ[R] y)) = x ⊗ₜ[R] y
state_after: case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
a : A
p : R[X]
⊢ invFun R A ((toFunAlgHom R A) (a ⊗ₜ[R] p)) = a ⊗ₜ[R] p

tactic: dsimp only [invFun]
state_before: case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
a : A
p : R[X]
⊢ invFun R A ((toFunAlgHom R A) (a ⊗ₜ[R] p)) = a ⊗ₜ[R] p
state_after: case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
a : A
p : R[X]
⊢ eval₂ (↑includeLeft) (1 ⊗ₜ[R] X) ((toFunAlgHom R A) (a ⊗ₜ[R] p)) = a ⊗ₜ[R] p

tactic: rw [toFunAlgHom_apply_tmul, eval₂_sum]
state_before: case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
a : A
p : R[X]
⊢ eval₂ (↑includeLeft) (1 ⊗ₜ[R] X) ((toFunAlgHom R A) (a ⊗ₜ[R] p)) = a ⊗ₜ[R] p
state_after: case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
a : A
p : R[X]
⊢ (p.sum fun n a_1 => eval₂ (↑includeLeft) (1 ⊗ₜ[R] X) ((monomial n) (a * (algebraMap R A) a_1))) = a ⊗ₜ[R] p

tactic: simp_rw [eval₂_monomial, AlgHom.coe_toRingHom, Algebra.TensorProduct.tmul_pow, one_pow,
  Algebra.TensorProduct.includeLeft_apply, Algebra.TensorProduct.tmul_mul_tmul, mul_one,
  one_mul, ← Algebra.commutes, ← Algebra.smul_def, smul_tmul, sum_def, ← tmul_sum]
state_before: case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
a : A
p : R[X]
⊢ (p.sum fun n a_1 => eval₂ (↑includeLeft) (1 ⊗ₜ[R] X) ((monomial n) (a * (algebraMap R A) a_1))) = a ⊗ₜ[R] p
state_after: case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
a : A
p : R[X]
⊢ a ⊗ₜ[R] ∑ a ∈ p.support, p.coeff a • X ^ a = a ⊗ₜ[R] p

tactic: conv_rhs => rw [← sum_C_mul_X_pow_eq p]
state_before: case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
a : A
p : R[X]
⊢ a ⊗ₜ[R] ∑ a ∈ p.support, p.coeff a • X ^ a = a ⊗ₜ[R] p
state_after: case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
a : A
p : R[X]
⊢ a ⊗ₜ[R] ∑ a ∈ p.support, p.coeff a • X ^ a = a ⊗ₜ[R] p.sum fun n a => C a * X ^ n

tactic: simp only [Algebra.smul_def]
state_before: case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
a : A
p : R[X]
⊢ a ⊗ₜ[R] ∑ a ∈ p.support, p.coeff a • X ^ a = a ⊗ₜ[R] p.sum fun n a => C a * X ^ n
state_after: case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
a : A
p : R[X]
⊢ a ⊗ₜ[R] ∑ x ∈ p.support, (algebraMap R R[X]) (p.coeff x) * X ^ x = a ⊗ₜ[R] p.sum fun n a => C a * X ^ n

tactic: rfl
state_before: case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
a : A
p : R[X]
⊢ a ⊗ₜ[R] ∑ x ∈ p.support, (algebraMap R R[X]) (p.coeff x) * X ^ x = a ⊗ₜ[R] p.sum fun n a => C a * X ^ n
state_after: no goals

tactic: intro p q hp hq
state_before: case refine_3
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
⊢ ∀ (x y : A ⊗[R] R[X]),
    invFun R A ((toFunAlgHom R A) x) = x →
      invFun R A ((toFunAlgHom R A) y) = y → invFun R A ((toFunAlgHom R A) (x + y)) = x + y
state_after: case refine_3
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x p q : A ⊗[R] R[X]
hp : invFun R A ((toFunAlgHom R A) p) = p
hq : invFun R A ((toFunAlgHom R A) q) = q
⊢ invFun R A ((toFunAlgHom R A) (p + q)) = p + q

tactic: simp only [AlgHom.map_add, invFun_add, hp, hq]
state_before: case refine_3
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x p q : A ⊗[R] R[X]
hp : invFun R A ((toFunAlgHom R A) p) = p
hq : invFun R A ((toFunAlgHom R A) q) = q
⊢ invFun R A ((toFunAlgHom R A) (p + q)) = p + q
state_after: no goals