The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V09. Commutative algebra I: ideals, polynomials, factorization

Mathlib.Algebra.MvPolynomial.Eval

142 declarations and 5 deprecated aliases. Mathlib docs · Source

Multivariate polynomials

This file defines functions for evaluating multivariate polynomials. These include generically evaluating a polynomial given a valuation of all its variables, and more advanced evaluations that allow one to map the coefficients to different rings.

Notation

In the definitions below, we use the following notation:

  • σ : Type* (indexing the variables)
  • R : Type* [CommSemiring R] (the coefficients)
  • s : σ →₀ ℕ, a function from σ to ℕ which is zero away from a finite set. This will give rise to a monomial in MvPolynomial σ R which mathematicians might call X^s
  • a : R
  • i : σ, with corresponding monomial X i, often denoted X_i by mathematicians
  • p : MvPolynomial σ R

Definitions

  • eval₂ (f : R → S₁) (g : σ → S₁) p : given a semiring homomorphism from R to another semiring S₁, and a map σ → S₁, evaluates p at this valuation, returning a term of type S₁. Note that eval₂ can be made using eval and map (see below), and it has been suggested that sticking to eval and map might make the code less brittle.
  • eval (g : σ → R) p : given a map σ → R, evaluates p at this valuation, returning a term of type R
  • map (f : R → S₁) p : returns the multivariate polynomial obtained from p by the change of coefficient semiring corresponding to f
  • aeval (g : σ → S₁) p : evaluates the multivariate polynomial obtained from p by the change of coefficient semiring corresponding to g (a stands for Algebra)

The algebra of multivariate polynomials

def MvPolynomial.eval₂ E1 #

{R : Type u} →
  {S₁ : Type v} →
    {σ : Type u_1} →
      [inst : CommSemiring R] → [inst_1 : CommSemiring S₁] → (R →+* S₁) → (σ → S₁) → MvPolynomial σ R → S₁

Evaluate a polynomial p given a valuation g of all the variables and a ring hom f from the scalar ring to the target

theorem MvPolynomial.eval₂_eq E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (g : R →+* S₁)
  (X : σ → S₁) (f : MvPolynomial σ R),
  MvPolynomial.eval₂ g X f = ∑ d ∈ f.support, g (f.coeff d) * ∏ i ∈ d.support, X i ^ d i

theorem MvPolynomial.eval₂_eq' E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] [inst_2 : Fintype σ]
  (g : R →+* S₁) (X : σ → S₁) (f : MvPolynomial σ R),
  MvPolynomial.eval₂ g X f = ∑ d ∈ f.support, g (f.coeff d) * ∏ i, X i ^ d i

theorem MvPolynomial.eval₂_zero E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (g : σ → S₁), MvPolynomial.eval₂ f g 0 = 0

theorem MvPolynomial.eval₂_add E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] {p q : MvPolynomial σ R}
  (f : R →+* S₁) (g : σ → S₁), MvPolynomial.eval₂ f g (p + q) = MvPolynomial.eval₂ f g p + MvPolynomial.eval₂ f g q

theorem MvPolynomial.eval₂_monomial E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} {a : R} {s : σ →₀ ℕ} [inst : CommSemiring R] [inst_1 : CommSemiring S₁]
  (f : R →+* S₁) (g : σ → S₁), MvPolynomial.eval₂ f g ((MvPolynomial.monomial s) a) = f a * s.prod fun n e ↦ g n ^ e

theorem MvPolynomial.eval₂_C E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (g : σ → S₁) (a : R), MvPolynomial.eval₂ f g (MvPolynomial.C a) = f a

theorem MvPolynomial.eval₂_one E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (g : σ → S₁), MvPolynomial.eval₂ f g 1 = 1

theorem MvPolynomial.eval₂_natCast E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (g : σ → S₁) (n : ℕ), MvPolynomial.eval₂ f g ↑n = ↑n

theorem MvPolynomial.eval₂_ofNat E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (g : σ → S₁) (n : ℕ) [inst_2 : n.AtLeastTwo], MvPolynomial.eval₂ f g (OfNat.ofNat n) = OfNat.ofNat n

theorem MvPolynomial.eval₂_X E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (g : σ → S₁) (n : σ), MvPolynomial.eval₂ f g (MvPolynomial.X n) = g n

theorem MvPolynomial.eval₂_X_pow E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (g : σ → S₁) {s : σ} {n : ℕ}, MvPolynomial.eval₂ f g (MvPolynomial.X s ^ n) = g s ^ n

theorem MvPolynomial.eval₂_mul_monomial E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] {p : MvPolynomial σ R}
  (f : R →+* S₁) (g : σ → S₁) {s : σ →₀ ℕ} {a : R},
  MvPolynomial.eval₂ f g (p * (MvPolynomial.monomial s) a) = MvPolynomial.eval₂ f g p * f a * s.prod fun n e ↦ g n ^ e

theorem MvPolynomial.eval₂_mul_C E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} {a : R} [inst : CommSemiring R] [inst_1 : CommSemiring S₁]
  {p : MvPolynomial σ R} (f : R →+* S₁) (g : σ → S₁),
  MvPolynomial.eval₂ f g (p * MvPolynomial.C a) = MvPolynomial.eval₂ f g p * f a

theorem MvPolynomial.eval₂_mul E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] {q : MvPolynomial σ R}
  (f : R →+* S₁) (g : σ → S₁) {p : MvPolynomial σ R},
  MvPolynomial.eval₂ f g (p * q) = MvPolynomial.eval₂ f g p * MvPolynomial.eval₂ f g q

theorem MvPolynomial.eval₂_mul_eq_zero_of_left E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] {p q : MvPolynomial σ R}
  (f : R →+* S₁) (g : σ → S₁), MvPolynomial.eval₂ f g p = 0 → MvPolynomial.eval₂ f g (p * q) = 0

theorem MvPolynomial.eval₂_mul_eq_zero_of_right E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] {p q : MvPolynomial σ R}
  (f : R →+* S₁) (g : σ → S₁), MvPolynomial.eval₂ f g q = 0 → MvPolynomial.eval₂ f g (p * q) = 0

theorem MvPolynomial.eval₂_pow E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (g : σ → S₁) {p : MvPolynomial σ R} {n : ℕ}, MvPolynomial.eval₂ f g (p ^ n) = MvPolynomial.eval₂ f g p ^ n

def MvPolynomial.eval₂Hom E1 #

{R : Type u} →
  {S₁ : Type v} →
    {σ : Type u_1} →
      [inst : CommSemiring R] → [inst_1 : CommSemiring S₁] → (R →+* S₁) → (σ → S₁) → MvPolynomial σ R →+* S₁

MvPolynomial.eval₂ as a RingHom.

theorem MvPolynomial.eval₂_dvd E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (g : σ → S₁) {p q : MvPolynomial σ R}, p ∣ q → MvPolynomial.eval₂ f g p ∣ MvPolynomial.eval₂ f g q

theorem MvPolynomial.coe_eval₂Hom E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (g : σ → S₁), ⇑(MvPolynomial.eval₂Hom f g) = MvPolynomial.eval₂ f g

theorem MvPolynomial.eval₂Hom_congr E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] {f₁ f₂ : R →+* S₁}
  {g₁ g₂ : σ → S₁} {p₁ p₂ : MvPolynomial σ R},
  f₁ = f₂ → g₁ = g₂ → p₁ = p₂ → (MvPolynomial.eval₂Hom f₁ g₁) p₁ = (MvPolynomial.eval₂Hom f₂ g₂) p₂

theorem MvPolynomial.eval₂Hom_C E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (g : σ → S₁) (r : R), (MvPolynomial.eval₂Hom f g) (MvPolynomial.C r) = f r

theorem MvPolynomial.eval₂Hom_X' E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (g : σ → S₁) (i : σ), (MvPolynomial.eval₂Hom f g) (MvPolynomial.X i) = g i

theorem MvPolynomial.comp_eval₂Hom E0 #

∀ {R : Type u} {S₁ : Type v} {S₂ : Type w} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁]
  [inst_2 : CommSemiring S₂] (f : R →+* S₁) (g : σ → S₁) (φ : S₁ →+* S₂),
  φ.comp (MvPolynomial.eval₂Hom f g) = MvPolynomial.eval₂Hom (φ.comp f) fun i ↦ φ (g i)

theorem MvPolynomial.map_eval₂Hom E0 #

∀ {R : Type u} {S₁ : Type v} {S₂ : Type w} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁]
  [inst_2 : CommSemiring S₂] (f : R →+* S₁) (g : σ → S₁) (φ : S₁ →+* S₂) (p : MvPolynomial σ R),
  φ ((MvPolynomial.eval₂Hom f g) p) = (MvPolynomial.eval₂Hom (φ.comp f) fun i ↦ φ (g i)) p

theorem MvPolynomial.hom_eval₂ E1 #

∀ {R : Type u} {S₁ : Type v} {S₂ : Type w} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁]
  [inst_2 : CommSemiring S₂] (p : MvPolynomial σ R) (f : R →+* S₁) (φ : S₁ →+* S₂) (g : σ → S₁),
  φ (MvPolynomial.eval₂ f g p) = MvPolynomial.eval₂ (φ.comp f) (fun i ↦ φ (g i)) p

theorem MvPolynomial.eval₂Hom_monomial E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (g : σ → S₁) (d : σ →₀ ℕ) (r : R),
  (MvPolynomial.eval₂Hom f g) ((MvPolynomial.monomial d) r) = f r * d.prod fun i k ↦ g i ^ k

theorem MvPolynomial.eval₂Hom_smul E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (g : σ → S₁) (r : R) (P : MvPolynomial σ R), (MvPolynomial.eval₂Hom f g) (r • P) = f r • (MvPolynomial.eval₂Hom f g) P

theorem MvPolynomial.eval₂_comp_left E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] {S₂ : Type u_2}
  [inst_2 : CommSemiring S₂] (k : S₁ →+* S₂) (f : R →+* S₁) (g : σ → S₁) (p : MvPolynomial σ R),
  k (MvPolynomial.eval₂ f g p) = MvPolynomial.eval₂ (k.comp f) (⇑k ∘ g) p

theorem MvPolynomial.eval₂_eta E0 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] (p : MvPolynomial σ R),
  MvPolynomial.eval₂ MvPolynomial.C MvPolynomial.X p = p

theorem MvPolynomial.eval₂_congr E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] {p : MvPolynomial σ R}
  (f : R →+* S₁) (g₁ g₂ : σ → S₁),
  (∀ {i : σ} {c : σ →₀ ℕ}, i ∈ c.support → p.coeff c ≠ 0 → g₁ i = g₂ i) →
    MvPolynomial.eval₂ f g₁ p = MvPolynomial.eval₂ f g₂ p

theorem MvPolynomial.eval₂_sum E0 #

∀ {R : Type u} {S₁ : Type v} {S₂ : Type w} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁]
  (f : R →+* S₁) (g : σ → S₁) (s : Finset S₂) (p : S₂ → MvPolynomial σ R),
  MvPolynomial.eval₂ f g (∑ x ∈ s, p x) = ∑ x ∈ s, MvPolynomial.eval₂ f g (p x)

theorem MvPolynomial.eval₂_prod E0 #

∀ {R : Type u} {S₁ : Type v} {S₂ : Type w} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁]
  (f : R →+* S₁) (g : σ → S₁) (s : Finset S₂) (p : S₂ → MvPolynomial σ R),
  MvPolynomial.eval₂ f g (∏ x ∈ s, p x) = ∏ x ∈ s, MvPolynomial.eval₂ f g (p x)

theorem MvPolynomial.eval₂_assoc E1 #

∀ {R : Type u} {S₁ : Type v} {S₂ : Type w} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁]
  (f : R →+* S₁) (g : σ → S₁) (q : S₂ → MvPolynomial σ R) (p : MvPolynomial S₂ R),
  MvPolynomial.eval₂ f (fun t ↦ MvPolynomial.eval₂ f g (q t)) p =
    MvPolynomial.eval₂ f g (MvPolynomial.eval₂ MvPolynomial.C q p)

def MvPolynomial.eval E1 #

{R : Type u} → {σ : Type u_1} → [inst : CommSemiring R] → (σ → R) → MvPolynomial σ R →+* R

Evaluate a polynomial p given a valuation f of all the variables

theorem MvPolynomial.eval_eq E0 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] (X : σ → R) (f : MvPolynomial σ R),
  (MvPolynomial.eval X) f = ∑ d ∈ f.support, f.coeff d * ∏ i ∈ d.support, X i ^ d i

theorem MvPolynomial.eval_eq' E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : Fintype σ] (X : σ → R) (f : MvPolynomial σ R),
  (MvPolynomial.eval X) f = ∑ d ∈ f.support, f.coeff d * ∏ i, X i ^ d i

theorem MvPolynomial.eval_monomial E1 #

∀ {R : Type u} {σ : Type u_1} {a : R} {s : σ →₀ ℕ} [inst : CommSemiring R] {f : σ → R},
  (MvPolynomial.eval f) ((MvPolynomial.monomial s) a) = a * s.prod fun n e ↦ f n ^ e

theorem MvPolynomial.eval_C E0 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] {f : σ → R} (a : R), (MvPolynomial.eval f) (MvPolynomial.C a) = a

theorem MvPolynomial.eval_X E0 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] {f : σ → R} (n : σ),
  (MvPolynomial.eval f) (MvPolynomial.X n) = f n

theorem MvPolynomial.eval_ofNat E0 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] {f : σ → R} (n : ℕ) [inst_1 : n.AtLeastTwo],
  (MvPolynomial.eval f) (OfNat.ofNat n) = OfNat.ofNat n

theorem MvPolynomial.smul_eval E0 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] (x : σ → R) (p : MvPolynomial σ R) (s : R),
  (MvPolynomial.eval x) (s • p) = s * (MvPolynomial.eval x) p

theorem MvPolynomial.eval_add E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] {p q : MvPolynomial σ R} {f : σ → R},
  (MvPolynomial.eval f) (p + q) = (MvPolynomial.eval f) p + (MvPolynomial.eval f) q

theorem MvPolynomial.eval_mul E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] {p q : MvPolynomial σ R} {f : σ → R},
  (MvPolynomial.eval f) (p * q) = (MvPolynomial.eval f) p * (MvPolynomial.eval f) q

theorem MvPolynomial.eval_pow E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] {p : MvPolynomial σ R} {f : σ → R} (n : ℕ),
  (MvPolynomial.eval f) (p ^ n) = (MvPolynomial.eval f) p ^ n

theorem MvPolynomial.eval_sum E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] {ι : Type u_2} (s : Finset ι) (f : ι → MvPolynomial σ R)
  (g : σ → R), (MvPolynomial.eval g) (∑ i ∈ s, f i) = ∑ i ∈ s, (MvPolynomial.eval g) (f i)

theorem MvPolynomial.eval_prod E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] {ι : Type u_2} (s : Finset ι) (f : ι → MvPolynomial σ R)
  (g : σ → R), (MvPolynomial.eval g) (∏ i ∈ s, f i) = ∏ i ∈ s, (MvPolynomial.eval g) (f i)

theorem MvPolynomial.eval_assoc E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] {τ : Type u_2} (f : σ → MvPolynomial τ R) (g : τ → R)
  (p : MvPolynomial σ R),
  (MvPolynomial.eval (⇑(MvPolynomial.eval g) ∘ f)) p = (MvPolynomial.eval g) (MvPolynomial.eval₂ MvPolynomial.C f p)

theorem MvPolynomial.eval₂_id E0 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] {g : σ → R} (p : MvPolynomial σ R),
  MvPolynomial.eval₂ (RingHom.id R) g p = (MvPolynomial.eval g) p

theorem MvPolynomial.eval_eval₂ E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] {S : Type u_2} {τ : Type u_3} {x : τ → S}
  [inst_1 : CommSemiring S] (f : R →+* MvPolynomial τ S) (g : σ → MvPolynomial τ S) (p : MvPolynomial σ R),
  (MvPolynomial.eval x) (MvPolynomial.eval₂ f g p) =
    MvPolynomial.eval₂ ((MvPolynomial.eval x).comp f) (fun s ↦ (MvPolynomial.eval x) (g s)) p

def MvPolynomial.map E1 #

{R : Type u} →
  {S₁ : Type v} →
    {σ : Type u_1} →
      [inst : CommSemiring R] → [inst_1 : CommSemiring S₁] → (R →+* S₁) → MvPolynomial σ R →+* MvPolynomial σ S₁

map f p maps a polynomial p across a ring hom f

theorem MvPolynomial.map_monomial E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (s : σ →₀ ℕ) (a : R), (MvPolynomial.map f) ((MvPolynomial.monomial s) a) = (MvPolynomial.monomial s) (f a)

theorem MvPolynomial.map_C E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁) (a : R),
  (MvPolynomial.map f) (MvPolynomial.C a) = MvPolynomial.C (f a)

theorem MvPolynomial.map_ofNat E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁) (n : ℕ)
  [inst_2 : n.AtLeastTwo], (MvPolynomial.map f) (OfNat.ofNat n) = OfNat.ofNat n

theorem MvPolynomial.map_X E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁) (n : σ),
  (MvPolynomial.map f) (MvPolynomial.X n) = MvPolynomial.X n

theorem MvPolynomial.map_id E0 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] (p : MvPolynomial σ R), (MvPolynomial.map (RingHom.id R)) p = p

theorem MvPolynomial.map_map E0 #

∀ {R : Type u} {S₁ : Type v} {S₂ : Type w} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁]
  (f : R →+* S₁) [inst_2 : CommSemiring S₂] (g : S₁ →+* S₂) (p : MvPolynomial σ R),
  (MvPolynomial.map g) ((MvPolynomial.map f) p) = (MvPolynomial.map (g.comp f)) p

theorem MvPolynomial.eval₂_eq_eval_map E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (g : σ → S₁) (p : MvPolynomial σ R), MvPolynomial.eval₂ f g p = (MvPolynomial.eval g) ((MvPolynomial.map f) p)

theorem MvPolynomial.eval₂_comp_right E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] {S₂ : Type u_2}
  [inst_2 : CommSemiring S₂] (k : S₁ →+* S₂) (f : R →+* S₁) (g : σ → S₁) (p : MvPolynomial σ R),
  k (MvPolynomial.eval₂ f g p) = MvPolynomial.eval₂ k (⇑k ∘ g) ((MvPolynomial.map f) p)

theorem MvPolynomial.map_eval₂ E0 #

∀ {R : Type u} {S₁ : Type v} {S₂ : Type w} {S₃ : Type x} [inst : CommSemiring R] [inst_1 : CommSemiring S₁]
  (f : R →+* S₁) (g : S₂ → MvPolynomial S₃ R) (p : MvPolynomial S₂ R),
  (MvPolynomial.map f) (MvPolynomial.eval₂ MvPolynomial.C g p) =
    MvPolynomial.eval₂ MvPolynomial.C (⇑(MvPolynomial.map f) ∘ g) ((MvPolynomial.map f) p)

theorem MvPolynomial.eval₂_map_comp_C E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] {ι : Type u_2}
  (f : R →+* S₁) (h : ι → MvPolynomial σ S₁) (p : MvPolynomial ι R),
  MvPolynomial.eval₂ ((MvPolynomial.map f).comp MvPolynomial.C) h p =
    MvPolynomial.eval₂ MvPolynomial.C h ((MvPolynomial.map f) p)

theorem MvPolynomial.map_eval E0 #

∀ {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring S₁] {S₂ : Type u_2} [inst_1 : CommSemiring S₂] (q : S₁ →+* S₂)
  (g : σ → S₁) (p : MvPolynomial σ S₁),
  q ((MvPolynomial.eval g) p) = (MvPolynomial.eval (⇑q ∘ g)) ((MvPolynomial.map q) p)

theorem MvPolynomial.coeff_map E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (p : MvPolynomial σ R) (m : σ →₀ ℕ), ((MvPolynomial.map f) p).coeff m = f (p.coeff m)

theorem MvPolynomial.map_eq_eval₂Hom_C_comp E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁),
  MvPolynomial.map f = MvPolynomial.eval₂Hom (MvPolynomial.C.comp f) MvPolynomial.X

theorem MvPolynomial.map_injective E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁),
  Function.Injective ⇑f → Function.Injective ⇑(MvPolynomial.map f)

theorem MvPolynomial.map_injective_iff E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁),
  Function.Injective ⇑(MvPolynomial.map f) ↔ Function.Injective ⇑f

theorem MvPolynomial.map_surjective E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁),
  Function.Surjective ⇑f → Function.Surjective ⇑(MvPolynomial.map f)

theorem MvPolynomial.map_surjective_iff E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁),
  Function.Surjective ⇑(MvPolynomial.map f) ↔ Function.Surjective ⇑f

theorem MvPolynomial.map_leftInverse E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] {f : R →+* S₁}
  {g : S₁ →+* R}, Function.LeftInverse ⇑f ⇑g → Function.LeftInverse ⇑(MvPolynomial.map f) ⇑(MvPolynomial.map g)

If f is a left-inverse of g then map f is a left-inverse of map g.

theorem MvPolynomial.map_rightInverse E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] {f : R →+* S₁}
  {g : S₁ →+* R}, Function.RightInverse ⇑f ⇑g → Function.RightInverse ⇑(MvPolynomial.map f) ⇑(MvPolynomial.map g)

If f is a right-inverse of g then map f is a right-inverse of map g.

theorem MvPolynomial.eval_map E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (g : σ → S₁) (p : MvPolynomial σ R), (MvPolynomial.eval g) ((MvPolynomial.map f) p) = MvPolynomial.eval₂ f g p

theorem MvPolynomial.eval_comp_map E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (g : σ → S₁), (MvPolynomial.eval g).comp (MvPolynomial.map f) = MvPolynomial.eval₂Hom f g

theorem MvPolynomial.eval₂_comp E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (g : σ → R) (p : MvPolynomial σ R), f ((MvPolynomial.eval g) p) = MvPolynomial.eval₂ f (⇑f ∘ g) p

theorem MvPolynomial.eval₂_map E0 #

∀ {R : Type u} {S₁ : Type v} {S₂ : Type w} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁]
  [inst_2 : CommSemiring S₂] (f : R →+* S₁) (g : σ → S₂) (φ : S₁ →+* S₂) (p : MvPolynomial σ R),
  MvPolynomial.eval₂ φ g ((MvPolynomial.map f) p) = MvPolynomial.eval₂ (φ.comp f) g p

theorem MvPolynomial.eval₂Hom_map_hom E0 #

∀ {R : Type u} {S₁ : Type v} {S₂ : Type w} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁]
  [inst_2 : CommSemiring S₂] (f : R →+* S₁) (g : σ → S₂) (φ : S₁ →+* S₂) (p : MvPolynomial σ R),
  (MvPolynomial.eval₂Hom φ g) ((MvPolynomial.map f) p) = (MvPolynomial.eval₂Hom (φ.comp f) g) p

theorem MvPolynomial.constantCoeff_map E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (φ : MvPolynomial σ R), MvPolynomial.constantCoeff ((MvPolynomial.map f) φ) = f (MvPolynomial.constantCoeff φ)

theorem MvPolynomial.constantCoeff_comp_map E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁),
  MvPolynomial.constantCoeff.comp (MvPolynomial.map f) = f.comp MvPolynomial.constantCoeff

theorem MvPolynomial.support_map_subset E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (p : MvPolynomial σ R), ((MvPolynomial.map f) p).support ⊆ p.support

theorem MvPolynomial.support_map_of_injective E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (p : MvPolynomial σ R)
  {f : R →+* S₁}, Function.Injective ⇑f → ((MvPolynomial.map f) p).support = p.support

theorem MvPolynomial.C_dvd_iff_map_hom_eq_zero E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (q : R →+* S₁) (r : R),
  (∀ (r' : R), q r' = 0 ↔ r ∣ r') → ∀ (φ : MvPolynomial σ R), MvPolynomial.C r ∣ φ ↔ (MvPolynomial.map q) φ = 0

theorem MvPolynomial.map_mapRange_eq_iff E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (g : S₁ → R) (hg : g 0 = 0) (φ : MvPolynomial σ S₁),
  (MvPolynomial.map f) (AddMonoidAlgebra.ofCoeff (Finsupp.mapRange g hg φ.coeff)) = φ ↔
    ∀ (d : σ →₀ ℕ), f (g (φ.coeff d)) = φ.coeff d

theorem MvPolynomial.coeffs_map E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (p : MvPolynomial σ R) [inst_2 : DecidableEq S₁], ((MvPolynomial.map f) p).coeffs ⊆ Finset.image (⇑f) p.coeffs

theorem MvPolynomial.coe_coeffs_map E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] (f : R →+* S₁)
  (p : MvPolynomial σ R), ↑((MvPolynomial.map f) p).coeffs ⊆ ⇑f '' ↑p.coeffs

theorem MvPolynomial.mem_range_map_iff_coeffs_subset E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] {f : R →+* S₁}
  {x : MvPolynomial σ S₁}, x ∈ Set.range ⇑(MvPolynomial.map f) ↔ ↑x.coeffs ⊆ Set.range ⇑f

def MvPolynomial.mapAlgHom E1 #

{R : Type u} →
  {S₁ : Type v} →
    {S₂ : Type w} →
      {σ : Type u_1} →
        [inst : CommSemiring R] →
          [inst_1 : CommSemiring S₁] →
            [inst_2 : CommSemiring S₂] →
              [inst_3 : Algebra R S₁] →
                [inst_4 : Algebra R S₂] → (S₁ →ₐ[R] S₂) → MvPolynomial σ S₁ →ₐ[R] MvPolynomial σ S₂

If f : S₁ →ₐ[R] S₂ is a morphism of R-algebras, then so is MvPolynomial.map f.

theorem MvPolynomial.mapAlgHom_apply E0 #

∀ {R : Type u} {S₁ : Type v} {S₂ : Type w} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁]
  [inst_2 : CommSemiring S₂] [inst_3 : Algebra R S₁] [inst_4 : Algebra R S₂] (f : S₁ →ₐ[R] S₂) (x : MvPolynomial σ S₁),
  (MvPolynomial.mapAlgHom f) x = (MvPolynomial.map ↑f) x

theorem MvPolynomial.mapAlgHom_id E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] [inst_2 : Algebra R S₁],
  MvPolynomial.mapAlgHom (AlgHom.id R S₁) = AlgHom.id R (MvPolynomial σ S₁)

theorem MvPolynomial.toRingHom_mapAlgHom E0 #

∀ {R : Type u} {S₁ : Type v} {S₂ : Type w} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁]
  [inst_2 : CommSemiring S₂] [inst_3 : Algebra R S₁] [inst_4 : Algebra R S₂] (f : S₁ →ₐ[R] S₂),
  ↑(MvPolynomial.mapAlgHom f) = MvPolynomial.map ↑f

theorem MvPolynomial.range_mapAlgHom E1 #

∀ {R : Type u} {S₁ : Type v} {S₂ : Type w} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁]
  [inst_2 : CommSemiring S₂] [inst_3 : Algebra R S₁] [inst_4 : Algebra R S₂] (f : S₁ →ₐ[R] S₂),
  Subalgebra.toSubmodule (MvPolynomial.mapAlgHom f).range = MvPolynomial.coeffsIn σ (Subalgebra.toSubmodule f.range)

def MvPolynomial.aeval E1 #

{R : Type u} →
  {S₁ : Type v} →
    {σ : Type u_1} →
      [inst : CommSemiring R] →
        [inst_1 : CommSemiring S₁] → [inst_2 : Algebra R S₁] → (σ → S₁) → MvPolynomial σ R →ₐ[R] S₁

A map σ → S₁ where S₁ is an algebra over R generates an R-algebra homomorphism from multivariate polynomials over σ to S₁.

theorem MvPolynomial.aeval_def E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] [inst_2 : Algebra R S₁]
  (f : σ → S₁) (p : MvPolynomial σ R), (MvPolynomial.aeval f) p = MvPolynomial.eval₂ (algebraMap R S₁) f p

theorem MvPolynomial.aeval_eq_eval₂Hom E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] [inst_2 : Algebra R S₁]
  (f : σ → S₁) (p : MvPolynomial σ R), (MvPolynomial.aeval f) p = (MvPolynomial.eval₂Hom (algebraMap R S₁) f) p

theorem MvPolynomial.coe_aeval_eq_eval₂Hom E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] [inst_2 : Algebra R S₁]
  (f : σ → S₁), ↑(MvPolynomial.aeval f) = MvPolynomial.eval₂Hom (algebraMap R S₁) f

theorem MvPolynomial.coe_aeval_eq_eval E0 #

∀ {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring S₁] (f : σ → S₁), ↑(MvPolynomial.aeval f) = MvPolynomial.eval f

theorem MvPolynomial.aeval_eq_eval E0 #

∀ {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring S₁] (f : σ → S₁), ⇑(MvPolynomial.aeval f) = ⇑(MvPolynomial.eval f)

theorem MvPolynomial.aeval_X E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] [inst_2 : Algebra R S₁]
  (f : σ → S₁) (s : σ), (MvPolynomial.aeval f) (MvPolynomial.X s) = f s

theorem MvPolynomial.aeval_C E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] [inst_2 : Algebra R S₁]
  (f : σ → S₁) (r : R), (MvPolynomial.aeval f) (MvPolynomial.C r) = (algebraMap R S₁) r

theorem MvPolynomial.aeval_ofNat E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] [inst_2 : Algebra R S₁]
  (f : σ → S₁) (n : ℕ) [inst_3 : n.AtLeastTwo], (MvPolynomial.aeval f) (OfNat.ofNat n) = OfNat.ofNat n

theorem MvPolynomial.aeval_unique E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] [inst_2 : Algebra R S₁]
  (φ : MvPolynomial σ R →ₐ[R] S₁), φ = MvPolynomial.aeval (⇑φ ∘ MvPolynomial.X)

theorem MvPolynomial.aeval_X_left E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R],
  MvPolynomial.aeval MvPolynomial.X = AlgHom.id R (MvPolynomial σ R)

theorem MvPolynomial.aeval_X_left_apply E0 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] (p : MvPolynomial σ R), (MvPolynomial.aeval MvPolynomial.X) p = p

theorem MvPolynomial.comp_aeval E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] [inst_2 : Algebra R S₁]
  (f : σ → S₁) {B : Type u_2} [inst_3 : CommSemiring B] [inst_4 : Algebra R B] (φ : S₁ →ₐ[R] B),
  φ.comp (MvPolynomial.aeval f) = MvPolynomial.aeval fun i ↦ φ (f i)

theorem MvPolynomial.comp_aeval_apply E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] [inst_2 : Algebra R S₁]
  (f : σ → S₁) {B : Type u_2} [inst_3 : CommSemiring B] [inst_4 : Algebra R B] (φ : S₁ →ₐ[R] B) (p : MvPolynomial σ R),
  φ ((MvPolynomial.aeval f) p) = (MvPolynomial.aeval fun i ↦ φ (f i)) p

theorem MvPolynomial.map_aeval E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] [inst_2 : Algebra R S₁]
  {B : Type u_2} [inst_3 : CommSemiring B] (g : σ → S₁) (φ : S₁ →+* B) (p : MvPolynomial σ R),
  φ ((MvPolynomial.aeval g) p) = (MvPolynomial.eval₂Hom (φ.comp (algebraMap R S₁)) fun i ↦ φ (g i)) p

theorem MvPolynomial.map_aeval_eq_aeval_map E0 #

∀ {R : Type u} {S₁ : Type v} {S₂ : Type w} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁]
  [inst_2 : Algebra R S₁] [inst_3 : CommSemiring S₂] {R₂ : Type u_2} [inst_4 : CommSemiring R₂] [inst_5 : Algebra R₂ S₂]
  (φ : R →+* R₂) (ψ : S₁ →+* S₂),
  (algebraMap R₂ S₂).comp φ = ψ.comp (algebraMap R S₁) →
    ∀ (p : MvPolynomial σ R) (f : σ → S₁),
      ψ ((MvPolynomial.aeval f) p) = (MvPolynomial.aeval fun i ↦ ψ (f i)) ((MvPolynomial.map φ) p)

theorem MvPolynomial.aeval_range E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] [inst_2 : Algebra R S₁]
  (f : σ → S₁), (MvPolynomial.aeval f).range = Algebra.adjoin R (Set.range f)

theorem MvPolynomial.eval₂Hom_zero E0 #

∀ {R : Type u} {S₂ : Type w} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₂] (f : R →+* S₂),
  MvPolynomial.eval₂Hom f 0 = f.comp MvPolynomial.constantCoeff

theorem MvPolynomial.eval₂Hom_zero' E0 #

∀ {R : Type u} {S₂ : Type w} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₂] (f : R →+* S₂),
  (MvPolynomial.eval₂Hom f fun x ↦ 0) = f.comp MvPolynomial.constantCoeff

theorem MvPolynomial.eval₂Hom_zero_apply E0 #

∀ {R : Type u} {S₂ : Type w} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₂] (f : R →+* S₂)
  (p : MvPolynomial σ R), (MvPolynomial.eval₂Hom f 0) p = f (MvPolynomial.constantCoeff p)

theorem MvPolynomial.eval₂Hom_zero'_apply E0 #

∀ {R : Type u} {S₂ : Type w} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₂] (f : R →+* S₂)
  (p : MvPolynomial σ R), (MvPolynomial.eval₂Hom f fun x ↦ 0) p = f (MvPolynomial.constantCoeff p)

theorem MvPolynomial.eval₂_zero_apply E0 #

∀ {R : Type u} {S₂ : Type w} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₂] (f : R →+* S₂)
  (p : MvPolynomial σ R), MvPolynomial.eval₂ f 0 p = f (MvPolynomial.constantCoeff p)

theorem MvPolynomial.eval₂_zero'_apply E0 #

∀ {R : Type u} {S₂ : Type w} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₂] (f : R →+* S₂)
  (p : MvPolynomial σ R), MvPolynomial.eval₂ f (fun x ↦ 0) p = f (MvPolynomial.constantCoeff p)

theorem MvPolynomial.aeval_zero E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] [inst_2 : Algebra R S₁]
  (p : MvPolynomial σ R), (MvPolynomial.aeval 0) p = (algebraMap R S₁) (MvPolynomial.constantCoeff p)

theorem MvPolynomial.aeval_zero' E0 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] [inst_2 : Algebra R S₁]
  (p : MvPolynomial σ R), (MvPolynomial.aeval fun x ↦ 0) p = (algebraMap R S₁) (MvPolynomial.constantCoeff p)

theorem MvPolynomial.eval_zero E0 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R], MvPolynomial.eval 0 = MvPolynomial.constantCoeff

theorem MvPolynomial.eval_zero' E0 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R], (MvPolynomial.eval fun x ↦ 0) = MvPolynomial.constantCoeff

theorem MvPolynomial.aeval_monomial E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] [inst_2 : Algebra R S₁]
  (g : σ → S₁) (d : σ →₀ ℕ) (r : R),
  (MvPolynomial.aeval g) ((MvPolynomial.monomial d) r) = (algebraMap R S₁) r * d.prod fun i k ↦ g i ^ k

theorem MvPolynomial.eval₂Hom_eq_zero E1 #

∀ {R : Type u} {S₂ : Type w} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₂] (f : R →+* S₂)
  (g : σ → S₂) (φ : MvPolynomial σ R),
  (∀ (d : σ →₀ ℕ), φ.coeff d ≠ 0 → ∃ i ∈ d.support, g i = 0) → (MvPolynomial.eval₂Hom f g) φ = 0

theorem MvPolynomial.aeval_eq_zero E1 #

∀ {R : Type u} {S₂ : Type w} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₂] [inst_2 : Algebra R S₂]
  (f : σ → S₂) (φ : MvPolynomial σ R),
  (∀ (d : σ →₀ ℕ), φ.coeff d ≠ 0 → ∃ i ∈ d.support, f i = 0) → (MvPolynomial.aeval f) φ = 0

theorem MvPolynomial.aeval_sum E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] [inst_2 : Algebra R S₁]
  (f : σ → S₁) {ι : Type u_2} (s : Finset ι) (φ : ι → MvPolynomial σ R),
  (MvPolynomial.aeval f) (∑ i ∈ s, φ i) = ∑ i ∈ s, (MvPolynomial.aeval f) (φ i)

theorem MvPolynomial.aeval_prod E1 #

∀ {R : Type u} {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] [inst_2 : Algebra R S₁]
  (f : σ → S₁) {ι : Type u_2} (s : Finset ι) (φ : ι → MvPolynomial σ R),
  (MvPolynomial.aeval f) (∏ i ∈ s, φ i) = ∏ i ∈ s, (MvPolynomial.aeval f) (φ i)

theorem Algebra.adjoin_range_eq_range_aeval E1 #

∀ (R : Type u) {S₁ : Type v} {σ : Type u_1} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] [inst_2 : Algebra R S₁]
  (f : σ → S₁), Algebra.adjoin R (Set.range f) = (MvPolynomial.aeval f).range

theorem Algebra.adjoin_eq_range E1 #

∀ (R : Type u) {S₁ : Type v} [inst : CommSemiring R] [inst_1 : CommSemiring S₁] [inst_2 : Algebra R S₁] (s : Set S₁),
  Algebra.adjoin R s = (MvPolynomial.aeval Subtype.val).range

def MvPolynomial.aevalTower E1 #

{R : Type u} →
  {σ : Type u_1} →
    [inst : CommSemiring R] →
      {S : Type u_2} →
        {A : Type u_3} →
          [inst_1 : CommSemiring S] →
            [inst_2 : CommSemiring A] →
              [inst_3 : Algebra S R] → [inst_4 : Algebra S A] → (R →ₐ[S] A) → (σ → A) → MvPolynomial σ R →ₐ[S] A

Version of aeval for defining algebra homs out of MvPolynomial σ R over a smaller base ring than R.

theorem MvPolynomial.aevalTower_X E0 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] {S : Type u_2} {A : Type u_3} [inst_1 : CommSemiring S]
  [inst_2 : CommSemiring A] [inst_3 : Algebra S R] [inst_4 : Algebra S A] (g : R →ₐ[S] A) (y : σ → A) (i : σ),
  (MvPolynomial.aevalTower g y) (MvPolynomial.X i) = y i

theorem MvPolynomial.aevalTower_C E0 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] {S : Type u_2} {A : Type u_3} [inst_1 : CommSemiring S]
  [inst_2 : CommSemiring A] [inst_3 : Algebra S R] [inst_4 : Algebra S A] (g : R →ₐ[S] A) (y : σ → A) (x : R),
  (MvPolynomial.aevalTower g y) (MvPolynomial.C x) = g x

theorem MvPolynomial.aevalTower_ofNat E0 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] {S : Type u_2} {A : Type u_3} [inst_1 : CommSemiring S]
  [inst_2 : CommSemiring A] [inst_3 : Algebra S R] [inst_4 : Algebra S A] (g : R →ₐ[S] A) (y : σ → A) (n : ℕ)
  [inst_5 : n.AtLeastTwo], (MvPolynomial.aevalTower g y) (OfNat.ofNat n) = OfNat.ofNat n

theorem MvPolynomial.aevalTower_comp_C E0 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] {S : Type u_2} {A : Type u_3} [inst_1 : CommSemiring S]
  [inst_2 : CommSemiring A] [inst_3 : Algebra S R] [inst_4 : Algebra S A] (g : R →ₐ[S] A) (y : σ → A),
  (↑(MvPolynomial.aevalTower g y)).comp MvPolynomial.C = ↑g

theorem MvPolynomial.aevalTower_algebraMap E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] {S : Type u_2} {A : Type u_3} [inst_1 : CommSemiring S]
  [inst_2 : CommSemiring A] [inst_3 : Algebra S R] [inst_4 : Algebra S A] (g : R →ₐ[S] A) (y : σ → A) (x : R),
  (MvPolynomial.aevalTower g y) ((algebraMap R (MvPolynomial σ R)) x) = g x

theorem MvPolynomial.aevalTower_comp_algebraMap E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] {S : Type u_2} {A : Type u_3} [inst_1 : CommSemiring S]
  [inst_2 : CommSemiring A] [inst_3 : Algebra S R] [inst_4 : Algebra S A] (g : R →ₐ[S] A) (y : σ → A),
  (↑(MvPolynomial.aevalTower g y)).comp (algebraMap R (MvPolynomial σ R)) = ↑g

theorem MvPolynomial.aevalTower_toAlgHom E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] {S : Type u_2} {A : Type u_3} [inst_1 : CommSemiring S]
  [inst_2 : CommSemiring A] [inst_3 : Algebra S R] [inst_4 : Algebra S A] (g : R →ₐ[S] A) (y : σ → A) (x : R),
  (MvPolynomial.aevalTower g y) ((IsScalarTower.toAlgHom S R (MvPolynomial σ R)) x) = g x

theorem MvPolynomial.aevalTower_comp_toAlgHom E0 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] {S : Type u_2} {A : Type u_3} [inst_1 : CommSemiring S]
  [inst_2 : CommSemiring A] [inst_3 : Algebra S R] [inst_4 : Algebra S A] (g : R →ₐ[S] A) (y : σ → A),
  (MvPolynomial.aevalTower g y).comp (IsScalarTower.toAlgHom S R (MvPolynomial σ R)) = g

theorem MvPolynomial.aevalTower_id E0 #

∀ {σ : Type u_1} {S : Type u_2} [inst : CommSemiring S], MvPolynomial.aevalTower (AlgHom.id S S) = MvPolynomial.aeval

theorem MvPolynomial.aevalTower_ofId E0 #

∀ {σ : Type u_1} {S : Type u_2} {A : Type u_3} [inst : CommSemiring S] [inst_1 : CommSemiring A] [inst_2 : Algebra S A],
  MvPolynomial.aevalTower (Algebra.ofId S A) = MvPolynomial.aeval

theorem MvPolynomial.eval₂_mem E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommSemiring R] {S : Type u_2} {subS : Type u_3} [inst_1 : CommSemiring S]
  [inst_2 : SetLike subS S] [SubsemiringClass subS S] {f : R →+* S} {p : MvPolynomial σ R} {s : subS},
  (∀ i ∈ p.support, f (p.coeff i) ∈ s) → ∀ {v : σ → S}, (∀ (i : σ), v i ∈ s) → MvPolynomial.eval₂ f v p ∈ s

theorem MvPolynomial.eval_mem E1 #

∀ {σ : Type u_1} {S : Type u_2} {subS : Type u_3} [inst : CommSemiring S] [inst_1 : SetLike subS S]
  [SubsemiringClass subS S] {p : MvPolynomial σ S} {s : subS},
  (∀ i ∈ p.support, p.coeff i ∈ s) → ∀ {v : σ → S}, (∀ (i : σ), v i ∈ s) → (MvPolynomial.eval v) p ∈ s

theorem MvPolynomial.aeval_sumElim E1 #

∀ {R : Type u} [inst : CommSemiring R] {S : Type u_2} {T : Type u_3} [inst_1 : CommSemiring S] [inst_2 : Algebra R S]
  [inst_3 : CommSemiring T] [inst_4 : Algebra R T] [inst_5 : Algebra S T] [IsScalarTower R S T] {σ : Type u_4}
  {τ : Type u_5} (p : MvPolynomial (σ ⊕ τ) R) (f : τ → S) (g : σ → T),
  (MvPolynomial.aeval (Sum.elim g (⇑(algebraMap S T) ∘ f))) p =
    (MvPolynomial.aeval g) ((MvPolynomial.aeval (Sum.elim MvPolynomial.X (⇑MvPolynomial.C ∘ f))) p)

def MvPolynomial.algebraMvPolynomial E1 #

{R : Type u_2} →
  {S : Type u_3} →
    {σ : Type u_4} →
      [inst : CommSemiring R] →
        [inst_1 : CommSemiring S] → [Algebra R S] → Algebra (MvPolynomial σ R) (MvPolynomial σ S)

If S is an R-algebra, then MvPolynomial σ S is a MvPolynomial σ R algebra.

Warning: This produces a diamond for Algebra (MvPolynomial σ R) (MvPolynomial σ (MvPolynomial σ S)). That's why it is not a global instance.

theorem MvPolynomial.algebraMap_def E0 #

∀ {R : Type u_2} {S : Type u_3} {σ : Type u_4} [inst : CommSemiring R] [inst_1 : CommSemiring S] [inst_2 : Algebra R S],
  algebraMap (MvPolynomial σ R) (MvPolynomial σ S) = MvPolynomial.map (algebraMap R S)

instance MvPolynomial.instIsScalarTower E0 #

∀ {R : Type u_2} {S : Type u_3} {σ : Type u_4} [inst : CommSemiring R] [inst_1 : CommSemiring S] [inst_2 : Algebra R S],
  IsScalarTower R (MvPolynomial σ R) (MvPolynomial σ S)

instance MvPolynomial.instFaithfulSMul E0 #

∀ {R : Type u_2} {S : Type u_3} {σ : Type u_4} [inst : CommSemiring R] [inst_1 : CommSemiring S] [inst_2 : Algebra R S]
  [FaithfulSMul R S], FaithfulSMul (MvPolynomial σ R) (MvPolynomial σ S)

Deprecated aliases

NameNew nameSince
MvPolynomial.coe_eval₂AlgHomMvPolynomial.aeval_eq_eval₂Hom2026-07-22
MvPolynomial.eval₂AlgHomMvPolynomial.aeval2026-07-22
MvPolynomial.eval₂AlgHom_XMvPolynomial.aeval_X2026-07-22
MvPolynomial.eval₂AlgHom_applyMvPolynomial.aeval_def2026-07-22
MvPolynomial.mapAlgHom_coe_ringHomMvPolynomial.toRingHom_mapAlgHom2026-05-05