internlm/Lean-Github huggingface dataset:
Theorem: MvPolynomial.homogenization_mul
Proof state before:
case neg
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ Finsupp.mapDomain (fun j => j + Finsupp.single i (p.totalDegree + q.totalDegree - j.sum fun x m => m))
      (Finsupp.single a.1 (p a.1) * Finsupp.single a.2 (q a.2)) =
    Finsupp.single (a.1 + Finsupp.single i (p.totalDegree - a.1.sum fun x m => m)) (p a.1) *
      Finsupp.single (a.2 + Finsupp.single i (q.totalDegree - a.2.sum fun x m => m)) (q a.2)
Tactic:
simp_rw [single_eq_monomial]
Proof state after:
case neg
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ Finsupp.mapDomain (fun j => j + Finsupp.single i (p.totalDegree + q.totalDegree - j.sum fun x m => m))
      ((monomial a.1) (p a.1) * (monomial a.2) (q a.2)) =
    (monomial (a.1 + Finsupp.single i (p.totalDegree - a.1.sum fun x m => m))) (p a.1) *
      (monomial (a.2 + Finsupp.single i (q.totalDegree - a.2.sum fun x m => m))) (q a.2)
Theorem: MvPolynomial.homogenization_mul
Proof state before:
case neg
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ Finsupp.mapDomain (fun j => j + Finsupp.single i (p.totalDegree + q.totalDegree - j.sum fun x m => m))
      ((monomial a.1) (p a.1) * (monomial a.2) (q a.2)) =
    (monomial (a.1 + Finsupp.single i (p.totalDegree - a.1.sum fun x m => m))) (p a.1) *
      (monomial (a.2 + Finsupp.single i (q.totalDegree - a.2.sum fun x m => m))) (q a.2)
Tactic:
simp only [Finsupp.single_add, monomial_mul]
Proof state after:
case neg
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ Finsupp.mapDomain (fun j => j + Finsupp.single i (p.totalDegree + q.totalDegree - j.sum fun x m => m))
      ((monomial (a.1 + a.2)) (p a.1 * q a.2)) =
    (monomial
        (a.1 + Finsupp.single i (p.totalDegree - a.1.sum fun x m => m) +
          (a.2 + Finsupp.single i (q.totalDegree - a.2.sum fun x m => m))))
      (p a.1 * q a.2)
Theorem: MvPolynomial.homogenization_mul
Proof state before:
case neg
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ Finsupp.mapDomain (fun j => j + Finsupp.single i (p.totalDegree + q.totalDegree - j.sum fun x m => m))
      ((monomial (a.1 + a.2)) (p a.1 * q a.2)) =
    (monomial
        (a.1 + Finsupp.single i (p.totalDegree - a.1.sum fun x m => m) +
          (a.2 + Finsupp.single i (q.totalDegree - a.2.sum fun x m => m))))
      (p a.1 * q a.2)
Tactic:
erw [Finsupp.mapDomain_single]
Proof state after:
case neg
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ Finsupp.single (a.1 + a.2 + Finsupp.single i (p.totalDegree + q.totalDegree - (a.1 + a.2).sum fun x m => m))
      (p a.1 * q a.2) =
    (monomial
        (a.1 + Finsupp.single i (p.totalDegree - a.1.sum fun x m => m) +
          (a.2 + Finsupp.single i (q.totalDegree - a.2.sum fun x m => m))))
      (p a.1 * q a.2)
Theorem: MvPolynomial.homogenization_mul
Proof state before:
case neg
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ Finsupp.single (a.1 + a.2 + Finsupp.single i (p.totalDegree + q.totalDegree - (a.1 + a.2).sum fun x m => m))
      (p a.1 * q a.2) =
    (monomial
        (a.1 + Finsupp.single i (p.totalDegree - a.1.sum fun x m => m) +
          (a.2 + Finsupp.single i (q.totalDegree - a.2.sum fun x m => m))))
      (p a.1 * q a.2)
Tactic:
congr 1
Proof state after:
case neg.e_a
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ a.1 + a.2 + Finsupp.single i (p.totalDegree + q.totalDegree - (a.1 + a.2).sum fun x m => m) =
    a.1 + Finsupp.single i (p.totalDegree - a.1.sum fun x m => m) +
      (a.2 + Finsupp.single i (q.totalDegree - a.2.sum fun x m => m))
Theorem: MvPolynomial.homogenization_mul
Proof state before:
case neg.e_a
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ a.1 + a.2 + Finsupp.single i (p.totalDegree + q.totalDegree - (a.1 + a.2).sum fun x m => m) =
    a.1 + Finsupp.single i (p.totalDegree - a.1.sum fun x m => m) +
      (a.2 + Finsupp.single i (q.totalDegree - a.2.sum fun x m => m))
Tactic:
rw [Finsupp.sum_add_index]
Proof state after:
case neg.e_a
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ a.1 + a.2 + Finsupp.single i (p.totalDegree + q.totalDegree - ((a.1.sum fun x m => m) + a.2.sum fun x m => m)) =
    a.1 + Finsupp.single i (p.totalDegree - a.1.sum fun x m => m) +
      (a.2 + Finsupp.single i (q.totalDegree - a.2.sum fun x m => m))

case neg.e_a.h_zero
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ ∀ a_1 ∈ a.1.support ∪ a.2.support, 0 = 0

case neg.e_a.h_add
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ ∀ a_1 ∈ a.1.support ∪ a.2.support, ∀ (b₁ b₂ : ℕ), b₁ + b₂ = b₁ + b₂
Theorem: MvPolynomial.homogenization_mul
Proof state before:
case neg.e_a
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ a.1 + a.2 + Finsupp.single i (p.totalDegree + q.totalDegree - ((a.1.sum fun x m => m) + a.2.sum fun x m => m)) =
    a.1 + Finsupp.single i (p.totalDegree - a.1.sum fun x m => m) +
      (a.2 + Finsupp.single i (q.totalDegree - a.2.sum fun x m => m))

case neg.e_a.h_zero
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ ∀ a_1 ∈ a.1.support ∪ a.2.support, 0 = 0

case neg.e_a.h_add
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ ∀ a_1 ∈ a.1.support ∪ a.2.support, ∀ (b₁ b₂ : ℕ), b₁ + b₂ = b₁ + b₂
Tactic:
simp only [Finsupp.single_add, Finsupp.single_tsub]
Proof state after:
case neg.e_a
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ a.1 + a.2 +
      (Finsupp.single i p.totalDegree + Finsupp.single i q.totalDegree -
        (Finsupp.single i (a.1.sum fun x m => m) + Finsupp.single i (a.2.sum fun x m => m))) =
    a.1 + (Finsupp.single i p.totalDegree - Finsupp.single i (a.1.sum fun x m => m)) +
      (a.2 + (Finsupp.single i q.totalDegree - Finsupp.single i (a.2.sum fun x m => m)))

case neg.e_a.h_zero
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ ∀ a_1 ∈ a.1.support ∪ a.2.support, 0 = 0

case neg.e_a.h_add
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ ∀ a_1 ∈ a.1.support ∪ a.2.support, ∀ (b₁ b₂ : ℕ), b₁ + b₂ = b₁ + b₂
Theorem: MvPolynomial.homogenization_mul
Proof state before:
case neg.e_a
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ a.1 + a.2 +
      (Finsupp.single i p.totalDegree + Finsupp.single i q.totalDegree -
        (Finsupp.single i (a.1.sum fun x m => m) + Finsupp.single i (a.2.sum fun x m => m))) =
    a.1 + (Finsupp.single i p.totalDegree - Finsupp.single i (a.1.sum fun x m => m)) +
      (a.2 + (Finsupp.single i q.totalDegree - Finsupp.single i (a.2.sum fun x m => m)))

case neg.e_a.h_zero
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ ∀ a_1 ∈ a.1.support ∪ a.2.support, 0 = 0

case neg.e_a.h_add
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ ∀ a_1 ∈ a.1.support ∪ a.2.support, ∀ (b₁ b₂ : ℕ), b₁ + b₂ = b₁ + b₂
Tactic:
ext j
Proof state after:
case neg.e_a.h
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
j : ι
⊢ (a.1 + a.2 +
        (Finsupp.single i p.totalDegree + Finsupp.single i q.totalDegree -
          (Finsupp.single i (a.1.sum fun x m => m) + Finsupp.single i (a.2.sum fun x m => m))))
      j =
    (a.1 + (Finsupp.single i p.totalDegree - Finsupp.single i (a.1.sum fun x m => m)) +
        (a.2 + (Finsupp.single i q.totalDegree - Finsupp.single i (a.2.sum fun x m => m))))
      j

case neg.e_a.h_zero
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ ∀ a_1 ∈ a.1.support ∪ a.2.support, 0 = 0

case neg.e_a.h_add
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ ∀ a_1 ∈ a.1.support ∪ a.2.support, ∀ (b₁ b₂ : ℕ), b₁ + b₂ = b₁ + b₂
Theorem: MvPolynomial.homogenization_mul
Proof state before:
case neg.e_a.h
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
j : ι
⊢ (a.1 + a.2 +
        (Finsupp.single i p.totalDegree + Finsupp.single i q.totalDegree -
          (Finsupp.single i (a.1.sum fun x m => m) + Finsupp.single i (a.2.sum fun x m => m))))
      j =
    (a.1 + (Finsupp.single i p.totalDegree - Finsupp.single i (a.1.sum fun x m => m)) +
        (a.2 + (Finsupp.single i q.totalDegree - Finsupp.single i (a.2.sum fun x m => m))))
      j

case neg.e_a.h_zero
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ ∀ a_1 ∈ a.1.support ∪ a.2.support, 0 = 0

case neg.e_a.h_add
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ ∀ a_1 ∈ a.1.support ∪ a.2.support, ∀ (b₁ b₂ : ℕ), b₁ + b₂ = b₁ + b₂
Tactic:
simp only [Pi.add_apply, Finsupp.coe_add, Finsupp.coe_tsub, Pi.sub_apply]
Proof state after:
case neg.e_a.h
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
j : ι
⊢ a.1 j + a.2 j +
      ((Finsupp.single i p.totalDegree) j + (Finsupp.single i q.totalDegree) j -
        ((Finsupp.single i (a.1.sum fun x m => m)) j + (Finsupp.single i (a.2.sum fun x m => m)) j)) =
    a.1 j + ((Finsupp.single i p.totalDegree) j - (Finsupp.single i (a.1.sum fun x m => m)) j) +
      (a.2 j + ((Finsupp.single i q.totalDegree) j - (Finsupp.single i (a.2.sum fun x m => m)) j))

case neg.e_a.h_zero
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ ∀ a_1 ∈ a.1.support ∪ a.2.support, 0 = 0

case neg.e_a.h_add
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ ∀ a_1 ∈ a.1.support ∪ a.2.support, ∀ (b₁ b₂ : ℕ), b₁ + b₂ = b₁ + b₂
Theorem: MvPolynomial.homogenization_mul
Proof state before:
case pos
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : p = 0
⊢ homogenization i (p * q) = homogenization i p * homogenization i q
Tactic:
simp [hp]
Proof state after:
no goals
Theorem: MvPolynomial.homogenization_mul
Proof state before:
case pos
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : q = 0
⊢ homogenization i (p * q) = homogenization i p * homogenization i q
Tactic:
simp [hq]
Proof state after:
no goals
Theorem: MvPolynomial.homogenization_mul
Proof state before:
case neg.e_a.h
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
j : ι
⊢ a.1 j + a.2 j +
      ((Finsupp.single i p.totalDegree) j + (Finsupp.single i q.totalDegree) j -
        ((Finsupp.single i (a.1.sum fun x m => m)) j + (Finsupp.single i (a.2.sum fun x m => m)) j)) =
    a.1 j + ((Finsupp.single i p.totalDegree) j - (Finsupp.single i (a.1.sum fun x m => m)) j) +
      (a.2 j + ((Finsupp.single i q.totalDegree) j - (Finsupp.single i (a.2.sum fun x m => m)) j))

case neg.e_a.h_zero
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ ∀ a_1 ∈ a.1.support ∪ a.2.support, 0 = 0

case neg.e_a.h_add
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ ∀ a_1 ∈ a.1.support ∪ a.2.support, ∀ (b₁ b₂ : ℕ), b₁ + b₂ = b₁ + b₂
Tactic:
have : ∀ {f s p q fs ss : ℕ} (_ : fs ≤ p) (_ : ss ≤ q),
    f + s + (p + q - (fs + ss)) = f + (p - fs) + (s + (q - ss)) := by
  intros f s p q fs ss hP hQ
  zify [add_le_add hP hQ, hP, hQ]
  ring
Proof state after:
case neg.e_a.h
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
j : ι
this : ∀ {f s p q fs ss : ℕ}, fs ≤ p → ss ≤ q → f + s + (p + q - (fs + ss)) = f + (p - fs) + (s + (q - ss))
⊢ a.1 j + a.2 j +
      ((Finsupp.single i p.totalDegree) j + (Finsupp.single i q.totalDegree) j -
        ((Finsupp.single i (a.1.sum fun x m => m)) j + (Finsupp.single i (a.2.sum fun x m => m)) j)) =
    a.1 j + ((Finsupp.single i p.totalDegree) j - (Finsupp.single i (a.1.sum fun x m => m)) j) +
      (a.2 j + ((Finsupp.single i q.totalDegree) j - (Finsupp.single i (a.2.sum fun x m => m)) j))

case neg.e_a.h_zero
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ ∀ a_1 ∈ a.1.support ∪ a.2.support, 0 = 0

case neg.e_a.h_add
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
⊢ ∀ a_1 ∈ a.1.support ∪ a.2.support, ∀ (b₁ b₂ : ℕ), b₁ + b₂ = b₁ + b₂
Theorem: MvPolynomial.homogenization_mul
Proof state before:
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
j : ι
⊢ ∀ {f s p q fs ss : ℕ}, fs ≤ p → ss ≤ q → f + s + (p + q - (fs + ss)) = f + (p - fs) + (s + (q - ss))
Tactic:
intros f s p q fs ss hP hQ
Proof state after:
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p✝ q✝ : MvPolynomial ι S
hp : ¬p✝ = 0
hq : ¬q✝ = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p✝.support ∧ a.2 ∈ q✝.support
j : ι
f s p q fs ss : ℕ
hP : fs ≤ p
hQ : ss ≤ q
⊢ f + s + (p + q - (fs + ss)) = f + (p - fs) + (s + (q - ss))
Theorem: MvPolynomial.homogenization_mul
Proof state before:
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p✝ q✝ : MvPolynomial ι S
hp : ¬p✝ = 0
hq : ¬q✝ = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p✝.support ∧ a.2 ∈ q✝.support
j : ι
f s p q fs ss : ℕ
hP : fs ≤ p
hQ : ss ≤ q
⊢ f + s + (p + q - (fs + ss)) = f + (p - fs) + (s + (q - ss))
Tactic:
zify [add_le_add hP hQ, hP, hQ]
Proof state after:
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p✝ q✝ : MvPolynomial ι S
hp : ¬p✝ = 0
hq : ¬q✝ = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p✝.support ∧ a.2 ∈ q✝.support
j : ι
f s p q fs ss : ℕ
hP : fs ≤ p
hQ : ss ≤ q
⊢ ↑f + ↑s + (↑p + ↑q - (↑fs + ↑ss)) = ↑f + (↑p - ↑fs) + (↑s + (↑q - ↑ss))
Theorem: MvPolynomial.homogenization_mul
Proof state before:
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p✝ q✝ : MvPolynomial ι S
hp : ¬p✝ = 0
hq : ¬q✝ = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p✝.support ∧ a.2 ∈ q✝.support
j : ι
f s p q fs ss : ℕ
hP : fs ≤ p
hQ : ss ≤ q
⊢ ↑f + ↑s + (↑p + ↑q - (↑fs + ↑ss)) = ↑f + (↑p - ↑fs) + (↑s + (↑q - ↑ss))
Tactic:
ring
Proof state after:
no goals
Theorem: MvPolynomial.homogenization_mul
Proof state before:
case pos
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
j : ι
this : ∀ {f s p q fs ss : ℕ}, fs ≤ p → ss ≤ q → f + s + (p + q - (fs + ss)) = f + (p - fs) + (s + (q - ss))
h : i = j
⊢ (a.1.sum fun x m => m) ≤ (Finsupp.single i p.totalDegree) j
Tactic:
simp only [h, Finsupp.single_eq_same]
Proof state after:
case pos
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
j : ι
this : ∀ {f s p q fs ss : ℕ}, fs ≤ p → ss ≤ q → f + s + (p + q - (fs + ss)) = f + (p - fs) + (s + (q - ss))
h : i = j
⊢ (a.1.sum fun x m => m) ≤ p.totalDegree
Theorem: MvPolynomial.homogenization_mul
Proof state before:
case pos
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
j : ι
this : ∀ {f s p q fs ss : ℕ}, fs ≤ p → ss ≤ q → f + s + (p + q - (fs + ss)) = f + (p - fs) + (s + (q - ss))
h : i = j
⊢ (a.1.sum fun x m => m) ≤ p.totalDegree
Tactic:
convert Finset.le_sup (α := ℕ) ha.left
Proof state after:
case h.e'_3
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
j : ι
this : ∀ {f s p q fs ss : ℕ}, fs ≤ p → ss ≤ q → f + s + (p + q - (fs + ss)) = f + (p - fs) + (s + (q - ss))
h : i = j
⊢ (a.1.sum fun x m => m) = a.1.sum fun x e => e
Theorem: MvPolynomial.homogenization_mul
Proof state before:
case h.e'_3
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
j : ι
this : ∀ {f s p q fs ss : ℕ}, fs ≤ p → ss ≤ q → f + s + (p + q - (fs + ss)) = f + (p - fs) + (s + (q - ss))
h : i = j
⊢ (a.1.sum fun x m => m) = a.1.sum fun x e => e
Tactic:
rfl
Proof state after:
no goals
Theorem: MvPolynomial.homogenization_mul
Proof state before:
case neg
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
j : ι
this : ∀ {f s p q fs ss : ℕ}, fs ≤ p → ss ≤ q → f + s + (p + q - (fs + ss)) = f + (p - fs) + (s + (q - ss))
h : ¬i = j
⊢ 0 ≤ (Finsupp.single i p.totalDegree) j
Tactic:
simp
Proof state after:
no goals
Theorem: MvPolynomial.homogenization_mul
Proof state before:
case pos
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
j : ι
this : ∀ {f s p q fs ss : ℕ}, fs ≤ p → ss ≤ q → f + s + (p + q - (fs + ss)) = f + (p - fs) + (s + (q - ss))
h : i = j
⊢ (a.2.sum fun x m => m) ≤ (Finsupp.single i q.totalDegree) j
Tactic:
simp only [h, Finsupp.single_eq_same]
Proof state after:
case pos
R : Type ?u.198757
ι : Type u_2
inst✝² : CommSemiring R
S : Type u_1
inst✝¹ : CommRing S
inst✝ : IsDomain S
i : ι
p q : MvPolynomial ι S
hp : ¬p = 0
hq : ¬q = 0
a : (ι →₀ ℕ) × (ι →₀ ℕ)
ha : a.1 ∈ p.support ∧ a.2 ∈ q.support
j : ι
this : ∀ {f s p q fs ss : ℕ}, fs ≤ p → ss ≤ q → f + s + (p + q - (fs + ss)) = f + (p - fs) + (s + (q - ss))
h : i = j
⊢ (a.2.sum fun x m => m) ≤ q.totalDegree