Theorem: MvPolynomial.vars_bind₁
File: Mathlib/Algebra/MvPolynomial/Monad.lean

tactic: calc (bind₁ f φ).vars
  _ = (φ.support.sum fun x : σ →₀ ℕ => (bind₁ f) (monomial x (coeff x φ))).vars := by
    rw [← AlgHom.map_sum, ← φ.as_sum]
  _ ≤ φ.support.biUnion fun i : σ →₀ ℕ => ((bind₁ f) (monomial i (coeff i φ))).vars :=
    (vars_sum_subset _ _)
  _ = φ.support.biUnion fun d : σ →₀ ℕ => vars (C (coeff d φ) * ∏ i ∈ d.support, f i ^ d i) := by
    simp only [bind₁_monomial]
  _ ≤ φ.support.biUnion fun d : σ →₀ ℕ => d.support.biUnion fun i => vars (f i) := ?_
  _ ≤ φ.vars.biUnion fun i : σ => vars (f i) := ?_
state_before: σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
⊢ ((bind₁ f) φ).vars ⊆ φ.vars.biUnion fun i => (f i).vars
state_after: case calc_1
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
⊢ (φ.support.biUnion fun d => (C (coeff d φ) * ∏ i ∈ d.support, f i ^ d i).vars) ≤
    φ.support.biUnion fun d => d.support.biUnion fun i => (f i).vars

case calc_2
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
⊢ (φ.support.biUnion fun d => d.support.biUnion fun i => (f i).vars) ≤ φ.vars.biUnion fun i => (f i).vars

tactic: rw [← AlgHom.map_sum, ← φ.as_sum]
state_before: σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
⊢ ((bind₁ f) φ).vars = (∑ x ∈ φ.support, (bind₁ f) ((monomial x) (coeff x φ))).vars
state_after: no goals

tactic: simp only [bind₁_monomial]
state_before: σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
⊢ (φ.support.biUnion fun i => ((bind₁ f) ((monomial i) (coeff i φ))).vars) =
    φ.support.biUnion fun d => (C (coeff d φ) * ∏ i ∈ d.support, f i ^ d i).vars
state_after: no goals

tactic: apply Finset.biUnion_mono
state_before: case calc_1
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
⊢ (φ.support.biUnion fun d => (C (coeff d φ) * ∏ i ∈ d.support, f i ^ d i).vars) ≤
    φ.support.biUnion fun d => d.support.biUnion fun i => (f i).vars
state_after: case calc_1.h
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
⊢ ∀ a ∈ φ.support, (C (coeff a φ) * ∏ i ∈ a.support, f i ^ a i).vars ⊆ a.support.biUnion fun i => (f i).vars

tactic: intro d _hd
state_before: case calc_1.h
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
⊢ ∀ a ∈ φ.support, (C (coeff a φ) * ∏ i ∈ a.support, f i ^ a i).vars ⊆ a.support.biUnion fun i => (f i).vars
state_after: case calc_1.h
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
d : σ →₀ ℕ
_hd : d ∈ φ.support
⊢ (C (coeff d φ) * ∏ i ∈ d.support, f i ^ d i).vars ⊆ d.support.biUnion fun i => (f i).vars

tactic: calc
  vars (C (coeff d φ) * ∏ i ∈ d.support, f i ^ d i) ≤
      (C (coeff d φ)).vars ∪ (∏ i ∈ d.support, f i ^ d i).vars :=
    vars_mul _ _
  _ ≤ (∏ i ∈ d.support, f i ^ d i).vars := by
    simp only [Finset.empty_union, vars_C, Finset.le_iff_subset, Finset.Subset.refl]
  _ ≤ d.support.biUnion fun i : σ => vars (f i ^ d i) := vars_prod _
  _ ≤ d.support.biUnion fun i : σ => (f i).vars := ?_
state_before: case calc_1.h
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
d : σ →₀ ℕ
_hd : d ∈ φ.support
⊢ (C (coeff d φ) * ∏ i ∈ d.support, f i ^ d i).vars ⊆ d.support.biUnion fun i => (f i).vars
state_after: case calc_1.h
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
d : σ →₀ ℕ
_hd : d ∈ φ.support
⊢ (d.support.biUnion fun i => (f i ^ d i).vars) ≤ d.support.biUnion fun i => (f i).vars

tactic: apply Finset.biUnion_mono
state_before: case calc_1.h
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
d : σ →₀ ℕ
_hd : d ∈ φ.support
⊢ (d.support.biUnion fun i => (f i ^ d i).vars) ≤ d.support.biUnion fun i => (f i).vars
state_after: case calc_1.h.h
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
d : σ →₀ ℕ
_hd : d ∈ φ.support
⊢ ∀ a ∈ d.support, (f a ^ d a).vars ⊆ (f a).vars

tactic: intro i _hi
state_before: case calc_1.h.h
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
d : σ →₀ ℕ
_hd : d ∈ φ.support
⊢ ∀ a ∈ d.support, (f a ^ d a).vars ⊆ (f a).vars
state_after: case calc_1.h.h
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
d : σ →₀ ℕ
_hd : d ∈ φ.support
i : σ
_hi : i ∈ d.support
⊢ (f i ^ d i).vars ⊆ (f i).vars

tactic: apply vars_pow
state_before: case calc_1.h.h
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
d : σ →₀ ℕ
_hd : d ∈ φ.support
i : σ
_hi : i ∈ d.support
⊢ (f i ^ d i).vars ⊆ (f i).vars
state_after: no goals

tactic: simp only [Finset.empty_union, vars_C, Finset.le_iff_subset, Finset.Subset.refl]
state_before: σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
d : σ →₀ ℕ
_hd : d ∈ φ.support
⊢ (C (coeff d φ)).vars ∪ (∏ i ∈ d.support, f i ^ d i).vars ≤ (∏ i ∈ d.support, f i ^ d i).vars
state_after: no goals

tactic: intro j
state_before: case calc_2
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
⊢ (φ.support.biUnion fun d => d.support.biUnion fun i => (f i).vars) ≤ φ.vars.biUnion fun i => (f i).vars
state_after: case calc_2
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
j : τ
⊢ (j ∈ φ.support.biUnion fun d => d.support.biUnion fun i => (f i).vars) → j ∈ φ.vars.biUnion fun i => (f i).vars

tactic: simp_rw [Finset.mem_biUnion]
state_before: case calc_2
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
j : τ
⊢ (j ∈ φ.support.biUnion fun d => d.support.biUnion fun i => (f i).vars) → j ∈ φ.vars.biUnion fun i => (f i).vars
state_after: case calc_2
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
j : τ
⊢ (∃ a ∈ φ.support, ∃ a_1 ∈ a.support, j ∈ (f a_1).vars) → ∃ a ∈ φ.vars, j ∈ (f a).vars

tactic: rintro ⟨d, hd, ⟨i, hi, hj⟩⟩
state_before: case calc_2
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
j : τ
⊢ (∃ a ∈ φ.support, ∃ a_1 ∈ a.support, j ∈ (f a_1).vars) → ∃ a ∈ φ.vars, j ∈ (f a).vars
state_after: case calc_2.intro.intro.intro.intro
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
j : τ
d : σ →₀ ℕ
hd : d ∈ φ.support
i : σ
hi : i ∈ d.support
hj : j ∈ (f i).vars
⊢ ∃ a ∈ φ.vars, j ∈ (f a).vars

tactic: exact ⟨i, (mem_vars _).mpr ⟨d, hd, hi⟩, hj⟩
state_before: case calc_2.intro.intro.intro.intro
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : DecidableEq τ
f : σ → MvPolynomial τ R
φ : MvPolynomial σ R
j : τ
d : σ →₀ ℕ
hd : d ∈ φ.support
i : σ
hi : i ∈ d.support
hj : j ∈ (f i).vars
⊢ ∃ a ∈ φ.vars, j ∈ (f a).vars
state_after: no goals