Theorem: MvPolynomial.pUnitAlgEquiv_apply
File: Mathlib/Algebra/MvPolynomial/Equiv.lean

Proof steps:
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
s : σ →₀ ℕ
inst✝ : CommSemiring R
⊢ LeftInverse (Polynomial.eval₂ C (X PUnit.unit)) (eval₂ Polynomial.C fun x => Polynomial.X)
state_after: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
s : σ →₀ ℕ
inst✝ : CommSemiring R
f : R[X] →+* MvPolynomial PUnit.{?u.1732 + 1} R := eval₂RingHom C (X PUnit.unit)
⊢ LeftInverse (Polynomial.eval₂ C (X PUnit.unit)) (eval₂ Polynomial.C fun x => Polynomial.X)
tactic: let f : R[X] →+* MvPolynomial PUnit R := Polynomial.eval₂RingHom MvPolynomial.C (X PUnit.unit)
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
s : σ →₀ ℕ
inst✝ : CommSemiring R
f : R[X] →+* MvPolynomial PUnit.{?u.1732 + 1} R := eval₂RingHom C (X PUnit.unit)
⊢ LeftInverse (Polynomial.eval₂ C (X PUnit.unit)) (eval₂ Polynomial.C fun x => Polynomial.X)
state_after: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
s : σ →₀ ℕ
inst✝ : CommSemiring R
f : R[X] →+* MvPolynomial PUnit.{?u.1732 + 1} R := eval₂RingHom C (X PUnit.unit)
g : MvPolynomial PUnit.{?u.2149 + 1} R →+* R[X] := eval₂Hom Polynomial.C fun x => Polynomial.X
⊢ LeftInverse (Polynomial.eval₂ C (X PUnit.unit)) (eval₂ Polynomial.C fun x => Polynomial.X)
tactic: let g : MvPolynomial PUnit R →+* R[X] := eval₂Hom Polynomial.C fun _ => Polynomial.X
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
s : σ →₀ ℕ
inst✝ : CommSemiring R
f : R[X] →+* MvPolynomial PUnit.{?u.1732 + 1} R := eval₂RingHom C (X PUnit.unit)
g : MvPolynomial PUnit.{?u.2149 + 1} R →+* R[X] := eval₂Hom Polynomial.C fun x => Polynomial.X
⊢ LeftInverse (Polynomial.eval₂ C (X PUnit.unit)) (eval₂ Polynomial.C fun x => Polynomial.X)
state_after: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
s : σ →₀ ℕ
inst✝ : CommSemiring R
f : R[X] →+* MvPolynomial PUnit.{?u.2149 + 1} R := eval₂RingHom C (X PUnit.unit)
g : MvPolynomial PUnit.{?u.2149 + 1} R →+* R[X] := eval₂Hom Polynomial.C fun x => Polynomial.X
⊢ ∀ (p : MvPolynomial PUnit.{?u.2149 + 1} R), (f.comp g) p = p
tactic: show ∀ p, f.comp g p = p
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
s : σ →₀ ℕ
inst✝ : CommSemiring R
f : R[X] →+* MvPolynomial PUnit.{?u.2149 + 1} R := eval₂RingHom C (X PUnit.unit)
g : MvPolynomial PUnit.{?u.2149 + 1} R →+* R[X] := eval₂Hom Polynomial.C fun x => Polynomial.X
⊢ ∀ (p : MvPolynomial PUnit.{?u.2149 + 1} R), (f.comp g) p = p
state_after: case hC
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
s : σ →₀ ℕ
inst✝ : CommSemiring R
f : R[X] →+* MvPolynomial PUnit.{?u.2149 + 1} R := eval₂RingHom C (X PUnit.unit)
g : MvPolynomial PUnit.{?u.2149 + 1} R →+* R[X] := eval₂Hom Polynomial.C fun x => Polynomial.X
⊢ (f.comp g).comp C = C

case hX
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
s : σ →₀ ℕ
inst✝ : CommSemiring R
f : R[X] →+* MvPolynomial PUnit.{?u.2149 + 1} R := eval₂RingHom C (X PUnit.unit)
g : MvPolynomial PUnit.{?u.2149 + 1} R →+* R[X] := eval₂Hom Polynomial.C fun x => Polynomial.X
⊢ ∀ (n : PUnit.{?u.2149 + 1}), (f.comp g) (X n) = X n
tactic: apply is_id
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a✝ a' a₁ a₂ : R
e : ℕ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p : R[X]
a : R
⊢ eval₂ Polynomial.C (fun x => Polynomial.X) (Polynomial.eval₂ C (X PUnit.unit) (Polynomial.C a)) = Polynomial.C a
state_after: no goals
tactic: rw [Polynomial.eval₂_C, MvPolynomial.eval₂_C]
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p✝ p q : R[X]
hp : eval₂ Polynomial.C (fun x => Polynomial.X) (Polynomial.eval₂ C (X PUnit.unit) p) = p
hq : eval₂ Polynomial.C (fun x => Polynomial.X) (Polynomial.eval₂ C (X PUnit.unit) q) = q
⊢ eval₂ Polynomial.C (fun x => Polynomial.X) (Polynomial.eval₂ C (X PUnit.unit) (p + q)) = p + q
state_after: no goals
tactic: rw [Polynomial.eval₂_add, MvPolynomial.eval₂_add, hp, hq]
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p✝ : R[X]
p : ℕ
n : R
x✝ :
  eval₂ Polynomial.C (fun x => Polynomial.X) (Polynomial.eval₂ C (X PUnit.unit) (Polynomial.C n * Polynomial.X ^ p)) =
    Polynomial.C n * Polynomial.X ^ p
⊢ eval₂ Polynomial.C (fun x => Polynomial.X)
      (Polynomial.eval₂ C (X PUnit.unit) (Polynomial.C n * Polynomial.X ^ (p + 1))) =
    Polynomial.C n * Polynomial.X ^ (p + 1)
state_after: no goals
tactic: rw [Polynomial.eval₂_mul, Polynomial.eval₂_pow, Polynomial.eval₂_X, Polynomial.eval₂_C,
        eval₂_mul, eval₂_C, eval₂_pow, eval₂_X]