Theorem: MvPolynomial.coeff_rename_mapDomain
File: Mathlib/Algebra/MvPolynomial/Rename.lean

tactic: apply φ.induction_on' (P := fun ψ => coeff (Finsupp.mapDomain f d) ((rename f) ψ) = coeff d ψ)
state_before: σ : Type u_1
τ : Type u_2
α : Type u_3
R : Type u_4
S : Type u_5
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
f : σ → τ
hf : Injective f
φ : MvPolynomial σ R
d : σ →₀ ℕ
⊢ coeff (Finsupp.mapDomain f d) ((rename f) φ) = coeff d φ
state_after: case h1
σ : Type u_1
τ : Type u_2
α : Type u_3
R : Type u_4
S : Type u_5
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
f : σ → τ
hf : Injective f
φ : MvPolynomial σ R
d : σ →₀ ℕ
⊢ ∀ (u : σ →₀ ℕ) (a : R), coeff (Finsupp.mapDomain f d) ((rename f) ((monomial u) a)) = coeff d ((monomial u) a)

case h2
σ : Type u_1
τ : Type u_2
α : Type u_3
R : Type u_4
S : Type u_5
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
f : σ → τ
hf : Injective f
φ : MvPolynomial σ R
d : σ →₀ ℕ
⊢ ∀ (p q : MvPolynomial σ R),
    coeff (Finsupp.mapDomain f d) ((rename f) p) = coeff d p →
      coeff (Finsupp.mapDomain f d) ((rename f) q) = coeff d q →
        coeff (Finsupp.mapDomain f d) ((rename f) (p + q)) = coeff d (p + q)

tactic: intro u r
state_before: case h1
σ : Type u_1
τ : Type u_2
α : Type u_3
R : Type u_4
S : Type u_5
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
f : σ → τ
hf : Injective f
φ : MvPolynomial σ R
d : σ →₀ ℕ
⊢ ∀ (u : σ →₀ ℕ) (a : R), coeff (Finsupp.mapDomain f d) ((rename f) ((monomial u) a)) = coeff d ((monomial u) a)
state_after: case h1
σ : Type u_1
τ : Type u_2
α : Type u_3
R : Type u_4
S : Type u_5
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
f : σ → τ
hf : Injective f
φ : MvPolynomial σ R
d u : σ →₀ ℕ
r : R
⊢ coeff (Finsupp.mapDomain f d) ((rename f) ((monomial u) r)) = coeff d ((monomial u) r)

tactic: rw [rename_monomial, coeff_monomial, coeff_monomial]
state_before: case h1
σ : Type u_1
τ : Type u_2
α : Type u_3
R : Type u_4
S : Type u_5
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
f : σ → τ
hf : Injective f
φ : MvPolynomial σ R
d u : σ →₀ ℕ
r : R
⊢ coeff (Finsupp.mapDomain f d) ((rename f) ((monomial u) r)) = coeff d ((monomial u) r)
state_after: case h1
σ : Type u_1
τ : Type u_2
α : Type u_3
R : Type u_4
S : Type u_5
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
f : σ → τ
hf : Injective f
φ : MvPolynomial σ R
d u : σ →₀ ℕ
r : R
⊢ (if Finsupp.mapDomain f u = Finsupp.mapDomain f d then r else 0) = if u = d then r else 0

tactic: simp only [(Finsupp.mapDomain_injective hf).eq_iff]
state_before: case h1
σ : Type u_1
τ : Type u_2
α : Type u_3
R : Type u_4
S : Type u_5
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
f : σ → τ
hf : Injective f
φ : MvPolynomial σ R
d u : σ →₀ ℕ
r : R
⊢ (if Finsupp.mapDomain f u = Finsupp.mapDomain f d then r else 0) = if u = d then r else 0
state_after: no goals

tactic: intros
state_before: case h2
σ : Type u_1
τ : Type u_2
α : Type u_3
R : Type u_4
S : Type u_5
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
f : σ → τ
hf : Injective f
φ : MvPolynomial σ R
d : σ →₀ ℕ
⊢ ∀ (p q : MvPolynomial σ R),
    coeff (Finsupp.mapDomain f d) ((rename f) p) = coeff d p →
      coeff (Finsupp.mapDomain f d) ((rename f) q) = coeff d q →
        coeff (Finsupp.mapDomain f d) ((rename f) (p + q)) = coeff d (p + q)
state_after: case h2
σ : Type u_1
τ : Type u_2
α : Type u_3
R : Type u_4
S : Type u_5
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
f : σ → τ
hf : Injective f
φ : MvPolynomial σ R
d : σ →₀ ℕ
p✝ q✝ : MvPolynomial σ R
a✝¹ : coeff (Finsupp.mapDomain f d) ((rename f) p✝) = coeff d p✝
a✝ : coeff (Finsupp.mapDomain f d) ((rename f) q✝) = coeff d q✝
⊢ coeff (Finsupp.mapDomain f d) ((rename f) (p✝ + q✝)) = coeff d (p✝ + q✝)

tactic: simp only [*, AlgHom.map_add, coeff_add]
state_before: case h2
σ : Type u_1
τ : Type u_2
α : Type u_3
R : Type u_4
S : Type u_5
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
f : σ → τ
hf : Injective f
φ : MvPolynomial σ R
d : σ →₀ ℕ
p✝ q✝ : MvPolynomial σ R
a✝¹ : coeff (Finsupp.mapDomain f d) ((rename f) p✝) = coeff d p✝
a✝ : coeff (Finsupp.mapDomain f d) ((rename f) q✝) = coeff d q✝
⊢ coeff (Finsupp.mapDomain f d) ((rename f) (p✝ + q✝)) = coeff d (p✝ + q✝)
state_after: no goals