File: Mathlib/Algebra/MvPolynomial/Rename.lean

full_name: MvPolynomial.rename
code: /-- Rename all the variables in a multivariable polynomial. -/
def rename (f : σ → τ) : MvPolynomial σ R →ₐ[R] MvPolynomial τ R 
goal: MvPolynomial σ R →ₐ[R] MvPolynomial τ R

full_name: MvPolynomial.rename_C
code: theorem rename_C (f : σ → τ) (r : R) : rename f (C r) = C r 
goal: (MvPolynomial.rename f) (MvPolynomial.C r) = MvPolynomial.C r

full_name: MvPolynomial.rename_X
code: @[simp]
theorem rename_X (f : σ → τ) (i : σ) : rename f (X i : MvPolynomial σ R) = X (f i) 
goal: (MvPolynomial.rename f) (MvPolynomial.X i) = MvPolynomial.X (f i)

full_name: MvPolynomial.map_rename
code: theorem map_rename (f : R →+* S) (g : σ → τ) (p : MvPolynomial σ R) :
    map f (rename g p) = rename g (map f p) 
goal: (MvPolynomial.map f) ((MvPolynomial.rename g) p) = (MvPolynomial.rename g) ((MvPolynomial.map f) p)

full_name: MvPolynomial.rename_rename
code: @[simp]
theorem rename_rename (f : σ → τ) (g : τ → α) (p : MvPolynomial σ R) :
    rename g (rename f p) = rename (g ∘ f) p 
goal: (MvPolynomial.rename g) ((MvPolynomial.rename f) p) = (MvPolynomial.rename (g ∘ f)) p

full_name: MvPolynomial.rename_id
code: @[simp]
theorem rename_id (p : MvPolynomial σ R) : rename id p = p 
goal: (MvPolynomial.rename id) p = p

full_name: MvPolynomial.rename_monomial
code: theorem rename_monomial (f : σ → τ) (d : σ →₀ ℕ) (r : R) :
    rename f (monomial d r) = monomial (d.mapDomain f) r 
goal: (MvPolynomial.rename f) ((MvPolynomial.monomial d) r) = (MvPolynomial.monomial (Finsupp.mapDomain f d)) r

full_name: MvPolynomial.rename_eq
code: theorem rename_eq (f : σ → τ) (p : MvPolynomial σ R) :
    rename f p = Finsupp.mapDomain (Finsupp.mapDomain f) p 
goal: (MvPolynomial.rename f) p = Finsupp.mapDomain (Finsupp.mapDomain f) p

full_name: MvPolynomial.rename_injective
code: theorem rename_injective (f : σ → τ) (hf : Function.Injective f) :
    Function.Injective (rename f : MvPolynomial σ R → MvPolynomial τ R) 
goal: Function.Injective ⇑(MvPolynomial.rename f)

full_name: MvPolynomial.killCompl
code: /-- Given a function between sets of variables `f : σ → τ` that is injective with proof `hf`,
  `MvPolynomial.killCompl hf` is the `AlgHom` from `R[τ]` to `R[σ]` that is left inverse to
  `rename f : R[σ] → R[τ]` and sends the variables in the complement of the range of `f` to `0`. -/
def killCompl : MvPolynomial τ R →ₐ[R] MvPolynomial σ R 
goal: MvPolynomial τ R →ₐ[R] MvPolynomial σ R

full_name: MvPolynomial.killCompl_C
code: theorem killCompl_C (r : R) : killCompl hf (C r) = C r 
goal: (MvPolynomial.killCompl hf) (MvPolynomial.C r) = MvPolynomial.C r

full_name: MvPolynomial.killCompl_comp_rename
code: theorem killCompl_comp_rename : (killCompl hf).comp (rename f) = AlgHom.id R _ 
goal: (MvPolynomial.killCompl hf).comp (MvPolynomial.rename f) = AlgHom.id R (MvPolynomial σ R)

full_name: MvPolynomial.killCompl_rename_app
code: @[simp]
theorem killCompl_rename_app (p : MvPolynomial σ R) : killCompl hf (rename f p) = p 
goal: (MvPolynomial.killCompl hf) ((MvPolynomial.rename f) p) = p

full_name: MvPolynomial.renameEquiv
code: /-- `MvPolynomial.rename e` is an equivalence when `e` is. -/
@[simps apply]
def renameEquiv (f : σ ≃ τ) : MvPolynomial σ R ≃ₐ[R] MvPolynomial τ R 
goal: MvPolynomial σ R ≃ₐ[R] MvPolynomial τ R

full_name: MvPolynomial.renameEquiv_apply
code: /-- `MvPolynomial.rename e` is an equivalence when `e` is. -/
@[simps apply]
def renameEquiv (f : σ ≃ τ) : MvPolynomial σ R ≃ₐ[R] MvPolynomial τ R 
goal: (MvPolynomial.renameEquiv R f) a = (MvPolynomial.rename ⇑f) a

full_name: MvPolynomial.renameEquiv_refl
code: @[simp]
theorem renameEquiv_refl : renameEquiv R (Equiv.refl σ) = AlgEquiv.refl 
goal: MvPolynomial.renameEquiv R (Equiv.refl σ) = AlgEquiv.refl

full_name: MvPolynomial.renameEquiv_symm
code: @[simp]
theorem renameEquiv_symm (f : σ ≃ τ) : (renameEquiv R f).symm = renameEquiv R f.symm 
goal: (MvPolynomial.renameEquiv R f).symm = MvPolynomial.renameEquiv R f.symm

full_name: MvPolynomial.renameEquiv_trans
code: @[simp]
theorem renameEquiv_trans (e : σ ≃ τ) (f : τ ≃ α) :
    (renameEquiv R e).trans (renameEquiv R f) = renameEquiv R (e.trans f) 
goal: (MvPolynomial.renameEquiv R e).trans (MvPolynomial.renameEquiv R f) = MvPolynomial.renameEquiv R (e.trans f)

full_name: MvPolynomial.eval₂_rename
code: theorem eval₂_rename : (rename k p).eval₂ f g = p.eval₂ f (g ∘ k) 
goal: MvPolynomial.eval₂ f g ((MvPolynomial.rename k) p) = MvPolynomial.eval₂ f (g ∘ k) p

full_name: MvPolynomial.eval_rename
code: theorem eval_rename (g : τ → R) (p : MvPolynomial σ R) : eval g (rename k p) = eval (g ∘ k) p 
goal: (MvPolynomial.eval g) ((MvPolynomial.rename k) p) = (MvPolynomial.eval (g ∘ k)) p

full_name: MvPolynomial.eval₂Hom_rename
code: theorem eval₂Hom_rename : eval₂Hom f g (rename k p) = eval₂Hom f (g ∘ k) p 
goal: (MvPolynomial.eval₂Hom f g) ((MvPolynomial.rename k) p) = (MvPolynomial.eval₂Hom f (g ∘ k)) p

full_name: MvPolynomial.aeval_rename
code: theorem aeval_rename [Algebra R S] : aeval g (rename k p) = aeval (g ∘ k) p 
goal: (MvPolynomial.aeval g) ((MvPolynomial.rename k) p) = (MvPolynomial.aeval (g ∘ k)) p

full_name: MvPolynomial.rename_eval₂
code: theorem rename_eval₂ (g : τ → MvPolynomial σ R) :
    rename k (p.eval₂ C (g ∘ k)) = (rename k p).eval₂ C (rename k ∘ g) 
goal: (MvPolynomial.rename k) (MvPolynomial.eval₂ MvPolynomial.C (g ∘ k) p) =
  MvPolynomial.eval₂ MvPolynomial.C (⇑(MvPolynomial.rename k) ∘ g) ((MvPolynomial.rename k) p)

full_name: MvPolynomial.rename_prod_mk_eval₂
code: theorem rename_prod_mk_eval₂ (j : τ) (g : σ → MvPolynomial σ R) :
    rename (Prod.mk j) (p.eval₂ C g) = p.eval₂ C fun x => rename (Prod.mk j) (g x) 
goal: (MvPolynomial.rename (Prod.mk j)) (MvPolynomial.eval₂ MvPolynomial.C g p) =
  MvPolynomial.eval₂ MvPolynomial.C (fun x => (MvPolynomial.rename (Prod.mk j)) (g x)) p

full_name: MvPolynomial.eval₂_rename_prod_mk
code: theorem eval₂_rename_prod_mk (g : σ × τ → S) (i : σ) (p : MvPolynomial τ R) :
    (rename (Prod.mk i) p).eval₂ f g = eval₂ f (fun j => g (i, j)) p 
goal: MvPolynomial.eval₂ f g ((MvPolynomial.rename (Prod.mk i)) p) = MvPolynomial.eval₂ f (fun j => g (i, j)) p

full_name: MvPolynomial.eval_rename_prod_mk
code: theorem eval_rename_prod_mk (g : σ × τ → R) (i : σ) (p : MvPolynomial τ R) :
    eval g (rename (Prod.mk i) p) = eval (fun j => g (i, j)) p 
goal: (MvPolynomial.eval g) ((MvPolynomial.rename (Prod.mk i)) p) = (MvPolynomial.eval fun j => g (i, j)) p

full_name: MvPolynomial.exists_finset_rename
code: /-- Every polynomial is a polynomial in finitely many variables. -/
theorem exists_finset_rename (p : MvPolynomial σ R) :
    ∃ (s : Finset σ) (q : MvPolynomial { x // x ∈ s } R), p = rename (↑) q 
goal: ∃ s q, p = (MvPolynomial.rename Subtype.val) q

full_name: MvPolynomial.exists_finset_rename₂
code: /-- `exists_finset_rename` for two polynomials at once: for any two polynomials `p₁`, `p₂` in a
  polynomial semiring `R[σ]` of possibly infinitely many variables, `exists_finset_rename₂` yields
  a finite subset `s` of `σ` such that both `p₁` and `p₂` are contained in the polynomial semiring
  `R[s]` of finitely many variables. -/
theorem exists_finset_rename₂ (p₁ p₂ : MvPolynomial σ R) :
    ∃ (s : Finset σ) (q₁ q₂ : MvPolynomial s R), p₁ = rename (↑) q₁ ∧ p₂ = rename (↑) q₂ 
goal: ∃ s q₁ q₂, p₁ = (MvPolynomial.rename Subtype.val) q₁ ∧ p₂ = (MvPolynomial.rename Subtype.val) q₂

full_name: MvPolynomial.exists_fin_rename
code: /-- Every polynomial is a polynomial in finitely many variables. -/
theorem exists_fin_rename (p : MvPolynomial σ R) :
    ∃ (n : ℕ) (f : Fin n → σ) (_hf : Injective f) (q : MvPolynomial (Fin n) R), p = rename f q 
goal: ∃ n f, ∃ (_ : Function.Injective f), ∃ q, p = (MvPolynomial.rename f) q

full_name: MvPolynomial.eval₂_cast_comp
code: theorem eval₂_cast_comp (f : σ → τ) (c : ℤ →+* R) (g : τ → R) (p : MvPolynomial σ ℤ) :
    eval₂ c (g ∘ f) p = eval₂ c g (rename f p) 
goal: MvPolynomial.eval₂ c (g ∘ f) p = MvPolynomial.eval₂ c g ((MvPolynomial.rename f) p)

full_name: MvPolynomial.coeff_rename_mapDomain
code: @[simp]
theorem coeff_rename_mapDomain (f : σ → τ) (hf : Injective f) (φ : MvPolynomial σ R) (d : σ →₀ ℕ) :
    (rename f φ).coeff (d.mapDomain f) = φ.coeff d 
goal: MvPolynomial.coeff (Finsupp.mapDomain f d) ((MvPolynomial.rename f) φ) = MvPolynomial.coeff d φ

full_name: MvPolynomial.coeff_rename_embDomain
code: @[simp]
theorem coeff_rename_embDomain (f : σ ↪ τ) (φ : MvPolynomial σ R) (d : σ →₀ ℕ) :
    (rename f φ).coeff (d.embDomain f) = φ.coeff d 
goal: MvPolynomial.coeff (Finsupp.embDomain f d) ((MvPolynomial.rename ⇑f) φ) = MvPolynomial.coeff d φ

full_name: MvPolynomial.coeff_rename_eq_zero
code: theorem coeff_rename_eq_zero (f : σ → τ) (φ : MvPolynomial σ R) (d : τ →₀ ℕ)
    (h : ∀ u : σ →₀ ℕ, u.mapDomain f = d → φ.coeff u = 0) : (rename f φ).coeff d = 0 
goal: MvPolynomial.coeff d ((MvPolynomial.rename f) φ) = 0

full_name: MvPolynomial.coeff_rename_ne_zero
code: theorem coeff_rename_ne_zero (f : σ → τ) (φ : MvPolynomial σ R) (d : τ →₀ ℕ)
    (h : (rename f φ).coeff d ≠ 0) : ∃ u : σ →₀ ℕ, u.mapDomain f = d ∧ φ.coeff u ≠ 0 
goal: ∃ u, Finsupp.mapDomain f u = d ∧ MvPolynomial.coeff u φ ≠ 0

full_name: MvPolynomial.constantCoeff_rename
code: @[simp]
theorem constantCoeff_rename {τ : Type*} (f : σ → τ) (φ : MvPolynomial σ R) :
    constantCoeff (rename f φ) = constantCoeff φ 
goal: MvPolynomial.constantCoeff ((MvPolynomial.rename f) φ) = MvPolynomial.constantCoeff φ

full_name: MvPolynomial.support_rename_of_injective
code: theorem support_rename_of_injective {p : MvPolynomial σ R} {f : σ → τ} [DecidableEq τ]
    (h : Function.Injective f) :
    (rename f p).support = Finset.image (Finsupp.mapDomain f) p.support 
goal: ((MvPolynomial.rename f) p).support = Finset.image (Finsupp.mapDomain f) p.support