awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.RingTheory.MvPolynomial.Groebner (goal)
Goal:
σ : Type u_1
m : MonomialOrder.{u_1, u_4} σ
R : Type u_2
inst : CommRing R
ι : Type u_3
b : ι → MvPolynomial σ R
hb : ∀ (i : ι), IsUnit (m.leadingCoeff (b i))
f : MvPolynomial σ R
hb' : ∀ (i : ι), m.degree (b i) ≠ 0
hf0 : ¬f = 0
i : ι
hf : m.degree (b i) ≤ m.degree f
deg_reduce :
  LT.lt.{u_4} (α := m.syn) ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (m.reduce ⋯ f)) : m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
g' : ι →₀ MvPolynomial σ R
r' : MvPolynomial σ R
H' :
  m.reduce ⋯ f =
      HAdd.hAdd (α := MvPolynomial σ R)
        ((Finsupp.linearCombination (MvPolynomial σ R) b : (a : ι →₀ MvPolynomial σ R) → MvPolynomial σ R) g' :
          MvPolynomial σ R)
        r' ∧
    (∀ (i_1 : ι),
        LE.le.{u_4} (α := m.syn)
          ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
              (m.degree
                (HMul.hMul (β := MvPolynomial σ R) (b i_1)
                  ((g' : (a : ι) → MvPolynomial σ R) i_1 : MvPolynomial σ R))) :
            m.syn)
          ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (m.reduce ⋯ f)) : m.syn)) ∧
      ∀ c ∈ r'.support, ∀ (i : ι), ¬m.degree (b i) ≤ c
pos :
  LE.le.{u_4} (α := m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
        (m.degree (b i) +
          degree.{u_1, u_2, u_4} m (R := R)
            ((monomial (m.degree f - m.degree (b i)) : (a : R) → MvPolynomial σ R)
              ((↑⋯.unit⁻¹ : R) * m.leadingCoeff f))) :
      m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
⊢ LE.le.{u_4} (α := m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
        (m.degree
          (HMul.hMul (β := MvPolynomial σ R) (b i)
            ((monomial (m.degree f - m.degree (b i)) : (a : R) → MvPolynomial σ R)
                ((↑⋯.unit⁻¹ : R) * m.leadingCoeff f) :
              MvPolynomial σ R))) :
      m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
have pos₁ : HAdd.hAdd (α := m.syn) (β := m.syn) ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (b i)) : m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
        (degree.{u_1, u_2, u_4} m (R := R)
          ((monomial (m.degree f - m.degree (b i)) : (a : R) → MvPolynomial σ R)
            ((↑sorry.unit⁻¹ : R) * m.leadingCoeff f))) :
      m.syn) ≤
  (m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f)
Tactic: grw [degree_mul_le, map_add, degree_monomial_le, ← map_add, add_tsub_cancel_of_le hf]
-- Lean 4 proof step from Mathlib.RingTheory.MvPolynomial.Groebner (goal)
Goal:
σ : Type u_1
m : MonomialOrder.{u_1, u_4} σ
R : Type u_2
inst : CommRing R
ι : Type u_3
b : ι → MvPolynomial σ R
hb : ∀ (i : ι), IsUnit (m.leadingCoeff (b i))
f : MvPolynomial σ R
hb' : ∀ (i : ι), m.degree (b i) ≠ 0
hf0 : ¬f = 0
i : ι
hf : m.degree (b i) ≤ m.degree f
deg_reduce :
  LT.lt.{u_4} (α := m.syn) ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (m.reduce ⋯ f)) : m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
g' : ι →₀ MvPolynomial σ R
r' : MvPolynomial σ R
H' :
  m.reduce ⋯ f =
      HAdd.hAdd (α := MvPolynomial σ R)
        ((Finsupp.linearCombination (MvPolynomial σ R) b : (a : ι →₀ MvPolynomial σ R) → MvPolynomial σ R) g' :
          MvPolynomial σ R)
        r' ∧
    (∀ (i_1 : ι),
        LE.le.{u_4} (α := m.syn)
          ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
              (m.degree
                (HMul.hMul (β := MvPolynomial σ R) (b i_1)
                  ((g' : (a : ι) → MvPolynomial σ R) i_1 : MvPolynomial σ R))) :
            m.syn)
          ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (m.reduce ⋯ f)) : m.syn)) ∧
      ∀ c ∈ r'.support, ∀ (i : ι), ¬m.degree (b i) ≤ c
pos :
  LE.le.{u_4} (α := m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
        (m.degree (b i) +
          degree.{u_1, u_2, u_4} m (R := R)
            ((monomial (m.degree f - m.degree (b i)) : (a : R) → MvPolynomial σ R)
              ((↑⋯.unit⁻¹ : R) * m.leadingCoeff f))) :
      m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
pos₁ :
  HAdd.hAdd (α := m.syn) (β := m.syn) ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (b i)) : m.syn)
      ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
          (degree.{u_1, u_2, u_4} m (R := R)
            ((monomial (m.degree f - m.degree (b i)) : (a : R) → MvPolynomial σ R)
              ((↑⋯.unit⁻¹ : R) * m.leadingCoeff f))) :
        m.syn) ≤
    (m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f)
⊢ LE.le.{u_4} (α := m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
        (m.degree
          (HMul.hMul (β := MvPolynomial σ R) (b i)
            ((monomial (m.degree f - m.degree (b i)) : (a : R) → MvPolynomial σ R)
                ((↑⋯.unit⁻¹ : R) * m.leadingCoeff f) :
              MvPolynomial σ R))) :
      m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
have pos₂ : HAdd.hAdd (α := m.syn) (β := m.syn) ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (b i)) : m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f - m.degree (b i)) : m.syn) ≤
  (m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f)
Tactic: grw [degree_mul_le, map_add, degree_monomial_le, ← map_add, add_tsub_cancel_of_le hf]
-- Lean 4 proof step from Mathlib.RingTheory.MvPolynomial.Groebner (goal)
Goal:
σ : Type u_1
m : MonomialOrder.{u_1, u_4} σ
R : Type u_2
inst : CommRing R
ι : Type u_3
b : ι → MvPolynomial σ R
hb : ∀ (i : ι), IsUnit (m.leadingCoeff (b i))
f : MvPolynomial σ R
hb' : ∀ (i : ι), m.degree (b i) ≠ 0
hf0 : ¬f = 0
i : ι
hf : m.degree (b i) ≤ m.degree f
deg_reduce :
  LT.lt.{u_4} (α := m.syn) ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (m.reduce ⋯ f)) : m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
g' : ι →₀ MvPolynomial σ R
r' : MvPolynomial σ R
H' :
  m.reduce ⋯ f =
      HAdd.hAdd (α := MvPolynomial σ R)
        ((Finsupp.linearCombination (MvPolynomial σ R) b : (a : ι →₀ MvPolynomial σ R) → MvPolynomial σ R) g' :
          MvPolynomial σ R)
        r' ∧
    (∀ (i_1 : ι),
        LE.le.{u_4} (α := m.syn)
          ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
              (m.degree
                (HMul.hMul (β := MvPolynomial σ R) (b i_1)
                  ((g' : (a : ι) → MvPolynomial σ R) i_1 : MvPolynomial σ R))) :
            m.syn)
          ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (m.reduce ⋯ f)) : m.syn)) ∧
      ∀ c ∈ r'.support, ∀ (i : ι), ¬m.degree (b i) ≤ c
pos :
  LE.le.{u_4} (α := m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
        (m.degree (b i) +
          degree.{u_1, u_2, u_4} m (R := R)
            ((monomial (m.degree f - m.degree (b i)) : (a : R) → MvPolynomial σ R)
              ((↑⋯.unit⁻¹ : R) * m.leadingCoeff f))) :
      m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
pos₁ :
  HAdd.hAdd (α := m.syn) (β := m.syn) ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (b i)) : m.syn)
      ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
          (degree.{u_1, u_2, u_4} m (R := R)
            ((monomial (m.degree f - m.degree (b i)) : (a : R) → MvPolynomial σ R)
              ((↑⋯.unit⁻¹ : R) * m.leadingCoeff f))) :
        m.syn) ≤
    (m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f)
pos₂ :
  HAdd.hAdd (α := m.syn) (β := m.syn) ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (b i)) : m.syn)
      ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f - m.degree (b i)) : m.syn) ≤
    (m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f)
⊢ LE.le.{u_4} (α := m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
        (m.degree
          (HMul.hMul (β := MvPolynomial σ R) (b i)
            ((monomial (m.degree f - m.degree (b i)) : (a : R) → MvPolynomial σ R)
                ((↑⋯.unit⁻¹ : R) * m.leadingCoeff f) :
              MvPolynomial σ R))) :
      m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
have pos₃ : LE.le.{u_4} (α := m.syn) ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (b i) + (m.degree f - m.degree (b i))) : m.syn)
  ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
Tactic: grw [degree_mul_le, map_add, degree_monomial_le, ← map_add, add_tsub_cancel_of_le hf]
-- Lean 4 proof step from Mathlib.RingTheory.MvPolynomial.Groebner (goal)
Goal:
σ : Type u_1
m : MonomialOrder.{u_1, u_4} σ
R : Type u_2
inst : CommRing R
ι : Type u_3
b : ι → MvPolynomial σ R
hb : ∀ (i : ι), IsUnit (m.leadingCoeff (b i))
f : MvPolynomial σ R
hb' : ∀ (i : ι), m.degree (b i) ≠ 0
hf0 : ¬f = 0
i : ι
hf : m.degree (b i) ≤ m.degree f
deg_reduce :
  LT.lt.{u_4} (α := m.syn) ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (m.reduce ⋯ f)) : m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
g' : ι →₀ MvPolynomial σ R
r' : MvPolynomial σ R
H' :
  m.reduce ⋯ f =
      HAdd.hAdd (α := MvPolynomial σ R)
        ((Finsupp.linearCombination (MvPolynomial σ R) b : (a : ι →₀ MvPolynomial σ R) → MvPolynomial σ R) g' :
          MvPolynomial σ R)
        r' ∧
    (∀ (i_1 : ι),
        LE.le.{u_4} (α := m.syn)
          ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
              (m.degree
                (HMul.hMul (β := MvPolynomial σ R) (b i_1)
                  ((g' : (a : ι) → MvPolynomial σ R) i_1 : MvPolynomial σ R))) :
            m.syn)
          ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (m.reduce ⋯ f)) : m.syn)) ∧
      ∀ c ∈ r'.support, ∀ (i : ι), ¬m.degree (b i) ≤ c
pos :
  LE.le.{u_4} (α := m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
        (m.degree (b i) +
          degree.{u_1, u_2, u_4} m (R := R)
            ((monomial (m.degree f - m.degree (b i)) : (a : R) → MvPolynomial σ R)
              ((↑⋯.unit⁻¹ : R) * m.leadingCoeff f))) :
      m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
pos₁ :
  HAdd.hAdd (α := m.syn) (β := m.syn) ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (b i)) : m.syn)
      ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
          (degree.{u_1, u_2, u_4} m (R := R)
            ((monomial (m.degree f - m.degree (b i)) : (a : R) → MvPolynomial σ R)
              ((↑⋯.unit⁻¹ : R) * m.leadingCoeff f))) :
        m.syn) ≤
    (m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f)
pos₂ :
  HAdd.hAdd (α := m.syn) (β := m.syn) ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (b i)) : m.syn)
      ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f - m.degree (b i)) : m.syn) ≤
    (m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f)
pos₃ :
  LE.le.{u_4} (α := m.syn) ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (b i) + (m.degree f - m.degree (b i))) : m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
⊢ LE.le.{u_4} (α := m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
        (m.degree
          (HMul.hMul (β := MvPolynomial σ R) (b i)
            ((monomial (m.degree f - m.degree (b i)) : (a : R) → MvPolynomial σ R)
                ((↑⋯.unit⁻¹ : R) * m.leadingCoeff f) :
              MvPolynomial σ R))) :
      m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
have pos₄ : LE.le.{u_4} (α := m.syn) ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
  ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
Tactic: grw [degree_mul_le, map_add, degree_monomial_le, ← map_add, add_tsub_cancel_of_le hf]
-- Lean 4 proof step from Mathlib.RingTheory.MvPolynomial.Groebner (goal)
Goal:
σ : Type u_1
m : MonomialOrder.{u_1, u_4} σ
R : Type u_2
inst : CommRing R
ι : Type u_3
b : ι → MvPolynomial σ R
hb : ∀ (i : ι), IsUnit (m.leadingCoeff (b i))
f : MvPolynomial σ R
hb' : ∀ (i : ι), m.degree (b i) ≠ 0
hf0 : ¬f = 0
i : ι
hf : m.degree (b i) ≤ m.degree f
deg_reduce :
  LT.lt.{u_4} (α := m.syn) ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (m.reduce ⋯ f)) : m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
g' : ι →₀ MvPolynomial σ R
r' : MvPolynomial σ R
H' :
  m.reduce ⋯ f =
      HAdd.hAdd (α := MvPolynomial σ R)
        ((Finsupp.linearCombination (MvPolynomial σ R) b : (a : ι →₀ MvPolynomial σ R) → MvPolynomial σ R) g' :
          MvPolynomial σ R)
        r' ∧
    (∀ (i_1 : ι),
        LE.le.{u_4} (α := m.syn)
          ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
              (m.degree
                (HMul.hMul (β := MvPolynomial σ R) (b i_1)
                  ((g' : (a : ι) → MvPolynomial σ R) i_1 : MvPolynomial σ R))) :
            m.syn)
          ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (m.reduce ⋯ f)) : m.syn)) ∧
      ∀ c ∈ r'.support, ∀ (i : ι), ¬m.degree (b i) ≤ c
j : ι
hc : ¬i = j
⊢ LE.le.{u_4} (α := m.syn) ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (b j * 0)) : m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
have neg : LE.le.{u_4} (α := m.syn) (0 : m.syn) ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
Tactic: simp only [mul_zero, degree_zero, map_zero]
-- Lean 4 proof step from Mathlib.RingTheory.MvPolynomial.Groebner (goal)
Goal:
σ : Type u_1
m : MonomialOrder.{u_1, u_4} σ
R : Type u_2
inst : CommRing R
ι : Type u_3
b : ι → MvPolynomial σ R
hb : ∀ (i : ι), IsUnit (m.leadingCoeff (b i))
f : MvPolynomial σ R
hb' : ∀ (i : ι), m.degree (b i) ≠ 0
hf0 : ¬f = 0
i : ι
hf : m.degree (b i) ≤ m.degree f
deg_reduce :
  LT.lt.{u_4} (α := m.syn) ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (m.reduce ⋯ f)) : m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
g' : ι →₀ MvPolynomial σ R
r' : MvPolynomial σ R
H' :
  m.reduce ⋯ f =
      HAdd.hAdd (α := MvPolynomial σ R)
        ((Finsupp.linearCombination (MvPolynomial σ R) b : (a : ι →₀ MvPolynomial σ R) → MvPolynomial σ R) g' :
          MvPolynomial σ R)
        r' ∧
    (∀ (i_1 : ι),
        LE.le.{u_4} (α := m.syn)
          ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
              (m.degree
                (HMul.hMul (β := MvPolynomial σ R) (b i_1)
                  ((g' : (a : ι) → MvPolynomial σ R) i_1 : MvPolynomial σ R))) :
            m.syn)
          ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (m.reduce ⋯ f)) : m.syn)) ∧
      ∀ c ∈ r'.support, ∀ (i : ι), ¬m.degree (b i) ≤ c
j : ι
⊢ LE.le.{u_4} (α := m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
        (m.degree
          (HMul.hMul (β := MvPolynomial σ R) (b j)
            (((Finsupp.single i
                      ((monomial (m.degree f - m.degree (b i)) : (a : R) → MvPolynomial σ R)
                        ((↑⋯.unit⁻¹ : R) * m.leadingCoeff f)) :
                    ι →₀ MvPolynomial σ R) :
                  (a : ι) → MvPolynomial σ R)
                j :
              MvPolynomial σ R))) :
      m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
have h : LE.le.{u_4} (α := m.syn)
  ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
      (m.degree
        (HMul.hMul (β := MvPolynomial σ R) (b j)
          (if i = j then
              (monomial (m.degree f - m.degree (b i)) : (a : R) → MvPolynomial σ R) ((↑sorry.unit⁻¹ : R) * m.leadingCoeff f)
            else 0 :
            MvPolynomial σ R))) :
    m.syn)
  ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
Tactic: classical
        rw [Finsupp.single_apply]
        split_ifs with hc
        · subst j
          grw [degree_mul_le, map_add, degree_monomial_le, ← map_add, add_tsub_cancel_of_le hf]
        · simp only [mul_zero, degree_zero, map_zero]
          exact bot_le
-- Lean 4 proof step from Mathlib.RingTheory.MvPolynomial.Groebner (goal)
Goal:
σ : Type u_1
m : MonomialOrder.{u_1, u_4} σ
R : Type u_2
inst : CommRing R
ι : Type u_3
b : ι → MvPolynomial σ R
hb : ∀ (i : ι), IsUnit (m.leadingCoeff (b i))
f : MvPolynomial σ R
hb' : ∀ (i : ι), m.degree (b i) ≠ 0
hf0 : ¬f = 0
i : ι
hf : m.degree (b i) ≤ m.degree f
deg_reduce :
  LT.lt.{u_4} (α := m.syn) ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (m.reduce ⋯ f)) : m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
g' : ι →₀ MvPolynomial σ R
r' : MvPolynomial σ R
H' :
  m.reduce ⋯ f =
      HAdd.hAdd (α := MvPolynomial σ R)
        ((Finsupp.linearCombination (MvPolynomial σ R) b : (a : ι →₀ MvPolynomial σ R) → MvPolynomial σ R) g' :
          MvPolynomial σ R)
        r' ∧
    (∀ (i_1 : ι),
        LE.le.{u_4} (α := m.syn)
          ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
              (m.degree
                (HMul.hMul (β := MvPolynomial σ R) (b i_1)
                  ((g' : (a : ι) → MvPolynomial σ R) i_1 : MvPolynomial σ R))) :
            m.syn)
          ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (m.reduce ⋯ f)) : m.syn)) ∧
      ∀ c ∈ r'.support, ∀ (i : ι), ¬m.degree (b i) ≤ c
j : ι
h h₁ h₂ :
  LE.le.{u_4} (α := m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
        (m.degree
          (HMul.hMul (β := MvPolynomial σ R) (b j)
            (if i = j then
                (monomial (m.degree f - m.degree (b i)) : (a : R) → MvPolynomial σ R)
                  ((↑⋯.unit⁻¹ : R) * m.leadingCoeff f)
              else 0 :
              MvPolynomial σ R))) :
      m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
⊢ LE.le.{u_4} (α := m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
        (m.degree
          (HMul.hMul (β := MvPolynomial σ R) (b j)
            (((Finsupp.single i
                      ((monomial (m.degree f - m.degree (b i)) : (a : R) → MvPolynomial σ R)
                        ((↑⋯.unit⁻¹ : R) * m.leadingCoeff f)) :
                    ι →₀ MvPolynomial σ R) :
                  (a : ι) → MvPolynomial σ R)
                j :
              MvPolynomial σ R))) :
      m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
have pos : ∀ (hc : i = j),
  LE.le.{u_4} (α := m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
        (m.degree
          (HMul.hMul (β := MvPolynomial σ R) (b j)
            ((monomial (m.degree f - m.degree (b i)) : (a : R) → MvPolynomial σ R)
                ((↑sorry.unit⁻¹ : R) * m.leadingCoeff f) :
              MvPolynomial σ R))) :
      m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
Tactic: classical
        rw [Finsupp.single_apply]
        split_ifs with hc
        · subst j
          grw [degree_mul_le, map_add, degree_monomial_le, ← map_add, add_tsub_cancel_of_le hf]
        · simp only [mul_zero, degree_zero, map_zero]
          exact bot_le
-- Lean 4 proof step from Mathlib.RingTheory.MvPolynomial.Groebner (goal)
Goal:
σ : Type u_1
m : MonomialOrder.{u_1, u_4} σ
R : Type u_2
inst : CommRing R
ι : Type u_3
b : ι → MvPolynomial σ R
hb : ∀ (i : ι), IsUnit (m.leadingCoeff (b i))
f : MvPolynomial σ R
hb' : ∀ (i : ι), m.degree (b i) ≠ 0
hf0 : ¬f = 0
i : ι
hf : m.degree (b i) ≤ m.degree f
deg_reduce :
  LT.lt.{u_4} (α := m.syn) ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (m.reduce ⋯ f)) : m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
g' : ι →₀ MvPolynomial σ R
r' : MvPolynomial σ R
H' :
  m.reduce ⋯ f =
      HAdd.hAdd (α := MvPolynomial σ R)
        ((Finsupp.linearCombination (MvPolynomial σ R) b : (a : ι →₀ MvPolynomial σ R) → MvPolynomial σ R) g' :
          MvPolynomial σ R)
        r' ∧
    (∀ (i_1 : ι),
        LE.le.{u_4} (α := m.syn)
          ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
              (m.degree
                (HMul.hMul (β := MvPolynomial σ R) (b i_1)
                  ((g' : (a : ι) → MvPolynomial σ R) i_1 : MvPolynomial σ R))) :
            m.syn)
          ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (m.reduce ⋯ f)) : m.syn)) ∧
      ∀ c ∈ r'.support, ∀ (i : ι), ¬m.degree (b i) ≤ c
j : ι
h h₁ h₂ :
  LE.le.{u_4} (α := m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
        (m.degree
          (HMul.hMul (β := MvPolynomial σ R) (b j)
            (if i = j then
                (monomial (m.degree f - m.degree (b i)) : (a : R) → MvPolynomial σ R)
                  ((↑⋯.unit⁻¹ : R) * m.leadingCoeff f)
              else 0 :
              MvPolynomial σ R))) :
      m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
pos :
  ∀ (hc : i = j),
    LE.le.{u_4} (α := m.syn)
      ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
          (m.degree
            (HMul.hMul (β := MvPolynomial σ R) (b j)
              ((monomial (m.degree f - m.degree (b i)) : (a : R) → MvPolynomial σ R)
                  ((↑⋯.unit⁻¹ : R) * m.leadingCoeff f) :
                MvPolynomial σ R))) :
        m.syn)
      ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
⊢ LE.le.{u_4} (α := m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
        (m.degree
          (HMul.hMul (β := MvPolynomial σ R) (b j)
            (((Finsupp.single i
                      ((monomial (m.degree f - m.degree (b i)) : (a : R) → MvPolynomial σ R)
                        ((↑⋯.unit⁻¹ : R) * m.leadingCoeff f)) :
                    ι →₀ MvPolynomial σ R) :
                  (a : ι) → MvPolynomial σ R)
                j :
              MvPolynomial σ R))) :
      m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
have neg : ∀ (hc : ¬i = j),
  LE.le.{u_4} (α := m.syn) ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (b j * 0)) : m.syn)
    ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)
Tactic: classical
        rw [Finsupp.single_apply]
        split_ifs with hc
        · subst j
          grw [degree_mul_le, map_add, degree_monomial_le, ← map_add, add_tsub_cancel_of_le hf]
        · simp only [mul_zero, degree_zero, map_zero]
          exact bot_le
-- Lean 4 proof step from Mathlib.RingTheory.MvPolynomial.Groebner (goal)
Goal:
σ : Type u_1
m : MonomialOrder.{u_1, u_4} σ
R : Type u_2
inst : CommRing R
ι : Type u_3
b : ι → MvPolynomial σ R
hb : ∀ (i : ι), IsUnit (m.leadingCoeff (b i))
f : MvPolynomial σ R
hb' : ∀ (i : ι), m.degree (b i) ≠ 0
hf0 : ¬f = 0
hf : ∀ (i : ι), ¬m.degree (b i) ≤ m.degree f
this :
  ∃ (g' : ι →₀ MvPolynomial σ R) (r' : MvPolynomial σ R),
    m.subLTerm f =
        HAdd.hAdd (α := MvPolynomial σ R)
          ((Finsupp.linearCombination (MvPolynomial σ R) b : (a : ι →₀ MvPolynomial σ R) → MvPolynomial σ R) g' :
            MvPolynomial σ R)
          r' ∧
      (∀ (i : ι),
          LE.le.{u_4} (α := m.syn)
            ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
                (m.degree
                  (HMul.hMul (β := MvPolynomial σ R) (b i) ((g' : (a : ι) → MvPolynomial σ R) i : MvPolynomial σ R))) :
              m.syn)
            ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (m.subLTerm f)) : m.syn)) ∧
        ∀ c ∈ r'.support, ∀ (i : ι), ¬m.degree (b i) ≤ c
⊢ ∃ (g : ι →₀ MvPolynomial σ R) (r : MvPolynomial σ R),
    f =
        HAdd.hAdd (α := MvPolynomial σ R)
          ((Finsupp.linearCombination (MvPolynomial σ R) b : (a : ι →₀ MvPolynomial σ R) → MvPolynomial σ R) g :
            MvPolynomial σ R)
          r ∧
      (∀ (i : ι),
          LE.le.{u_4} (α := m.syn)
            ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
                (m.degree
                  (HMul.hMul (β := MvPolynomial σ R) (b i) ((g : (a : ι) → MvPolynomial σ R) i : MvPolynomial σ R))) :
              m.syn)
            ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)) ∧
        ∀ c ∈ r.support, ∀ (i : ι), ¬m.degree (b i) ≤ c
have obtain : ∀ (g' : ι →₀ MvPolynomial σ R) (r' : MvPolynomial σ R)
  (H' :
    m.subLTerm f =
        HAdd.hAdd (α := MvPolynomial σ R)
          ((Finsupp.linearCombination (MvPolynomial σ R) b : (a : ι →₀ MvPolynomial σ R) → MvPolynomial σ R) g' :
            MvPolynomial σ R)
          r' ∧
      (∀ (i : ι),
          LE.le.{u_4} (α := m.syn)
            ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
                (m.degree
                  (HMul.hMul (β := MvPolynomial σ R) (b i) ((g' : (a : ι) → MvPolynomial σ R) i : MvPolynomial σ R))) :
              m.syn)
            ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree (m.subLTerm f)) : m.syn)) ∧
        ∀ c ∈ r'.support, ∀ (i : ι), ¬m.degree (b i) ≤ c),
  ∃ (g : ι →₀ MvPolynomial σ R) (r : MvPolynomial σ R),
    f =
        HAdd.hAdd (α := MvPolynomial σ R)
          ((Finsupp.linearCombination (MvPolynomial σ R) b : (a : ι →₀ MvPolynomial σ R) → MvPolynomial σ R) g :
            MvPolynomial σ R)
          r ∧
      (∀ (i : ι),
          LE.le.{u_4} (α := m.syn)
            ((m.toSyn : (a : σ →₀ ℕ) → m.syn)
                (m.degree
                  (HMul.hMul (β := MvPolynomial σ R) (b i) ((g : (a : ι) → MvPolynomial σ R) i : MvPolynomial σ R))) :
              m.syn)
            ((m.toSyn : (a : σ →₀ ℕ) → m.syn) (m.degree f) : m.syn)) ∧
        ∀ c ∈ r.support, ∀ (i : ι), ¬m.degree (b i) ≤ c
Tactic: obtain ⟨g', r', H'⟩ := this
Cleared hypotheses: this