File: Mathlib/Algebra/MvPolynomial/Variables.lean

full_name: MvPolynomial.vars
code: /-- `vars p` is the set of variables appearing in the polynomial `p` -/
def vars (p : MvPolynomial σ R) : Finset σ 
goal: Finset σ

full_name: MvPolynomial.vars_def
code: theorem vars_def [DecidableEq σ] (p : MvPolynomial σ R) : p.vars = p.degrees.toFinset 
goal: p.vars = p.degrees.toFinset

full_name: MvPolynomial.vars_0
code: @[simp]
theorem vars_0 : (0 : MvPolynomial σ R).vars = ∅ 
goal: MvPolynomial.vars 0 = ∅

full_name: MvPolynomial.vars_monomial
code: @[simp]
theorem vars_monomial (h : r ≠ 0) : (monomial s r).vars = s.support 
goal: ((MvPolynomial.monomial s) r).vars = s.support

full_name: MvPolynomial.vars_C
code: @[simp]
theorem vars_C : (C r : MvPolynomial σ R).vars = ∅ 
goal: (MvPolynomial.C r).vars = ∅

full_name: MvPolynomial.vars_X
code: @[simp]
theorem vars_X [Nontrivial R] : (X n : MvPolynomial σ R).vars = {n} 
goal: (MvPolynomial.X n).vars = {n}

full_name: MvPolynomial.mem_vars
code: theorem mem_vars (i : σ) : i ∈ p.vars ↔ ∃ d ∈ p.support, i ∈ d.support 
goal: i ∈ p.vars ↔ ∃ d ∈ p.support, i ∈ d.support

full_name: MvPolynomial.mem_support_not_mem_vars_zero
code: theorem mem_support_not_mem_vars_zero {f : MvPolynomial σ R} {x : σ →₀ ℕ} (H : x ∈ f.support)
    {v : σ} (h : v ∉ vars f) : x v = 0 
goal: x v = 0

full_name: MvPolynomial.vars_add_subset
code: theorem vars_add_subset [DecidableEq σ] (p q : MvPolynomial σ R) :
    (p + q).vars ⊆ p.vars ∪ q.vars 
goal: (p + q).vars ⊆ p.vars ∪ q.vars

full_name: MvPolynomial.vars_add_of_disjoint
code: theorem vars_add_of_disjoint [DecidableEq σ] (h : Disjoint p.vars q.vars) :
    (p + q).vars = p.vars ∪ q.vars 
goal: (p + q).vars = p.vars ∪ q.vars

full_name: MvPolynomial.vars_mul
code: theorem vars_mul [DecidableEq σ] (φ ψ : MvPolynomial σ R) : (φ * ψ).vars ⊆ φ.vars ∪ ψ.vars 
goal: (φ * ψ).vars ⊆ φ.vars ∪ ψ.vars

full_name: MvPolynomial.vars_one
code: @[simp]
theorem vars_one : (1 : MvPolynomial σ R).vars = ∅ 
goal: MvPolynomial.vars 1 = ∅

full_name: MvPolynomial.vars_pow
code: theorem vars_pow (φ : MvPolynomial σ R) (n : ℕ) : (φ ^ n).vars ⊆ φ.vars 
goal: (φ ^ n).vars ⊆ φ.vars

full_name: MvPolynomial.vars_prod
code: /-- The variables of the product of a family of polynomials
are a subset of the union of the sets of variables of each polynomial.
-/
theorem vars_prod {ι : Type*} [DecidableEq σ] {s : Finset ι} (f : ι → MvPolynomial σ R) :
    (∏ i ∈ s, f i).vars ⊆ s.biUnion fun i => (f i).vars 
goal: (∏ i ∈ s, f i).vars ⊆ s.biUnion fun i => (f i).vars

full_name: MvPolynomial.vars_C_mul
code: theorem vars_C_mul (a : A) (ha : a ≠ 0) (φ : MvPolynomial σ A) :
    (C a * φ : MvPolynomial σ A).vars = φ.vars 
goal: (MvPolynomial.C a * φ).vars = φ.vars

full_name: MvPolynomial.vars_sum_subset
code: theorem vars_sum_subset [DecidableEq σ] :
    (∑ i ∈ t, φ i).vars ⊆ Finset.biUnion t fun i => (φ i).vars 
goal: (∑ i ∈ t, φ i).vars ⊆ t.biUnion fun i => (φ i).vars

full_name: MvPolynomial.vars_sum_of_disjoint
code: theorem vars_sum_of_disjoint [DecidableEq σ] (h : Pairwise <| (Disjoint on fun i => (φ i).vars)) :
    (∑ i ∈ t, φ i).vars = Finset.biUnion t fun i => (φ i).vars 
goal: (∑ i ∈ t, φ i).vars = t.biUnion fun i => (φ i).vars

full_name: MvPolynomial.vars_map
code: theorem vars_map : (map f p).vars ⊆ p.vars 
goal: ((MvPolynomial.map f) p).vars ⊆ p.vars

full_name: MvPolynomial.vars_map_of_injective
code: theorem vars_map_of_injective (hf : Injective f) : (map f p).vars = p.vars 
goal: ((MvPolynomial.map f) p).vars = p.vars

full_name: MvPolynomial.vars_monomial_single
code: theorem vars_monomial_single (i : σ) {e : ℕ} {r : R} (he : e ≠ 0) (hr : r ≠ 0) :
    (monomial (Finsupp.single i e) r).vars = {i} 
goal: ((MvPolynomial.monomial (Finsupp.single i e)) r).vars = {i}

full_name: MvPolynomial.vars_eq_support_biUnion_support
code: theorem vars_eq_support_biUnion_support [DecidableEq σ] :
    p.vars = p.support.biUnion Finsupp.support 
goal: p.vars = p.support.biUnion Finsupp.support

full_name: MvPolynomial.eval₂Hom_eq_constantCoeff_of_vars
code: theorem eval₂Hom_eq_constantCoeff_of_vars (f : R →+* S) {g : σ → S} {p : MvPolynomial σ R}
    (hp : ∀ i ∈ p.vars, g i = 0) : eval₂Hom f g p = f (constantCoeff p) 
goal: (MvPolynomial.eval₂Hom f g) p = f (MvPolynomial.constantCoeff p)

full_name: MvPolynomial.aeval_eq_constantCoeff_of_vars
code: theorem aeval_eq_constantCoeff_of_vars [Algebra R S] {g : σ → S} {p : MvPolynomial σ R}
    (hp : ∀ i ∈ p.vars, g i = 0) : aeval g p = algebraMap _ _ (constantCoeff p) 
goal: (MvPolynomial.aeval g) p = (algebraMap R S) (MvPolynomial.constantCoeff p)

full_name: MvPolynomial.eval₂Hom_congr'
code: theorem eval₂Hom_congr' {f₁ f₂ : R →+* S} {g₁ g₂ : σ → S} {p₁ p₂ : MvPolynomial σ R} :
    f₁ = f₂ →
      (∀ i, i ∈ p₁.vars → i ∈ p₂.vars → g₁ i = g₂ i) →
        p₁ = p₂ → eval₂Hom f₁ g₁ p₁ = eval₂Hom f₂ g₂ p₂ 
goal: f₁ = f₂ →
  (∀ i ∈ p₁.vars, i ∈ p₂.vars → g₁ i = g₂ i) →
    p₁ = p₂ → (MvPolynomial.eval₂Hom f₁ g₁) p₁ = (MvPolynomial.eval₂Hom f₂ g₂) p₂

full_name: MvPolynomial.hom_congr_vars
code: /-- If `f₁` and `f₂` are ring homs out of the polynomial ring and `p₁` and `p₂` are polynomials,
  then `f₁ p₁ = f₂ p₂` if `p₁ = p₂` and `f₁` and `f₂` are equal on `R` and on the variables
  of `p₁`.  -/
theorem hom_congr_vars {f₁ f₂ : MvPolynomial σ R →+* S} {p₁ p₂ : MvPolynomial σ R}
    (hC : f₁.comp C = f₂.comp C) (hv : ∀ i, i ∈ p₁.vars → i ∈ p₂.vars → f₁ (X i) = f₂ (X i))
    (hp : p₁ = p₂) : f₁ p₁ = f₂ p₂ 
goal: f₁ p₁ = f₂ p₂

full_name: MvPolynomial.exists_rename_eq_of_vars_subset_range
code: theorem exists_rename_eq_of_vars_subset_range (p : MvPolynomial σ R) (f : τ → σ) (hfi : Injective f)
    (hf : ↑p.vars ⊆ Set.range f) : ∃ q : MvPolynomial τ R, rename f q = p 
goal: ∃ q, (MvPolynomial.rename f) q = p

full_name: MvPolynomial.vars_rename
code: theorem vars_rename [DecidableEq τ] (f : σ → τ) (φ : MvPolynomial σ R) :
    (rename f φ).vars ⊆ φ.vars.image f 
goal: ((MvPolynomial.rename f) φ).vars ⊆ Finset.image f φ.vars

full_name: MvPolynomial.mem_vars_rename
code: theorem mem_vars_rename (f : σ → τ) (φ : MvPolynomial σ R) {j : τ} (h : j ∈ (rename f φ).vars) :
    ∃ i : σ, i ∈ φ.vars ∧ f i = j 
goal: ∃ i ∈ φ.vars, f i = j