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
hf : ∀ (i : ι), ¬m.degree (b i) ≤ m.degree f
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
have h : f =
    HAdd.hAdd (α := MvPolynomial σ R)
      ((Finsupp.linearCombination (MvPolynomial σ R) b : (a : ι →₀ MvPolynomial σ R) → MvPolynomial σ R) g' :
        MvPolynomial σ R)
      (HAdd.hAdd (β := MvPolynomial σ R) r'
        ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f) : MvPolynomial σ 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 ∈
        (HAdd.hAdd (β := MvPolynomial σ R) r'
            ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f) : MvPolynomial σ R)).support,
      ∀ (i : ι), ¬m.degree (b i) ≤ c
Tactic: use g', r' + monomial (m.degree f) (m.leadingCoeff f)
-- 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
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
⊢ f =
      HAdd.hAdd (α := MvPolynomial σ R)
        ((Finsupp.linearCombination (MvPolynomial σ R) b : (a : ι →₀ MvPolynomial σ R) → MvPolynomial σ R) g' :
          MvPolynomial σ R)
        (HAdd.hAdd (β := MvPolynomial σ R) r'
          ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f) : MvPolynomial σ 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 ∈
          (HAdd.hAdd (β := MvPolynomial σ R) r'
              ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f) : MvPolynomial σ R)).support,
        ∀ (i : ι), ¬m.degree (b i) ≤ c
have h : f =
  HAdd.hAdd (α := MvPolynomial σ R)
    ((Finsupp.linearCombination (MvPolynomial σ R) b : (a : ι →₀ MvPolynomial σ R) → MvPolynomial σ R) g' :
      MvPolynomial σ R)
    (HAdd.hAdd (β := MvPolynomial σ R) r'
      ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f) : MvPolynomial σ R))
Tactic: constructor
-- 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
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
h :
  f =
    HAdd.hAdd (α := MvPolynomial σ R)
      ((Finsupp.linearCombination (MvPolynomial σ R) b : (a : ι →₀ MvPolynomial σ R) → MvPolynomial σ R) g' :
        MvPolynomial σ R)
      (HAdd.hAdd (β := MvPolynomial σ R) r'
        ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f) : MvPolynomial σ R))
⊢ f =
      HAdd.hAdd (α := MvPolynomial σ R)
        ((Finsupp.linearCombination (MvPolynomial σ R) b : (a : ι →₀ MvPolynomial σ R) → MvPolynomial σ R) g' :
          MvPolynomial σ R)
        (HAdd.hAdd (β := MvPolynomial σ R) r'
          ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f) : MvPolynomial σ 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 ∈
          (HAdd.hAdd (β := MvPolynomial σ R) r'
              ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f) : MvPolynomial σ R)).support,
        ∀ (i : ι), ¬m.degree (b i) ≤ c
have h₁ : (∀ (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 ∈
      (HAdd.hAdd (β := MvPolynomial σ R) r'
          ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f) : MvPolynomial σ R)).support,
    ∀ (i : ι), ¬m.degree (b i) ≤ c
Tactic: constructor
-- 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
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
⊢ (∀ (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 ∈
        (HAdd.hAdd (β := MvPolynomial σ R) r'
            ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f) : MvPolynomial σ R)).support,
      ∀ (i : ι), ¬m.degree (b i) ≤ c
have h : ∀ (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)
Tactic: constructor
-- 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
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
h :
  ∀ (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)
⊢ (∀ (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 ∈
        (HAdd.hAdd (β := MvPolynomial σ R) r'
            ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f) : MvPolynomial σ R)).support,
      ∀ (i : ι), ¬m.degree (b i) ≤ c
have h₁ : ∀
  c ∈
    (HAdd.hAdd (β := MvPolynomial σ R) r'
        ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f) : MvPolynomial σ R)).support,
  ∀ (i : ι), ¬m.degree (b i) ≤ c
Tactic: constructor
-- 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
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
c : σ →₀ ℕ
hc :
  c ∈
    (HAdd.hAdd (β := MvPolynomial σ R) r'
        ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f) : MvPolynomial σ R)).support
i : ι
⊢ ¬m.degree (b i) ≤ c
have pos : ∀ (hc' : c ∈ r'.support), ¬m.degree (b i) ≤ c
Tactic: by_cases hc' : c ∈ r'.support
-- 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
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
c : σ →₀ ℕ
hc :
  c ∈
    (HAdd.hAdd (β := MvPolynomial σ R) r'
        ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f) : MvPolynomial σ R)).support
i : ι
pos : ∀ (hc' : c ∈ r'.support), ¬m.degree (b i) ≤ c
⊢ ¬m.degree (b i) ≤ c
have neg : ∀ (hc' : c ∉ r'.support), ¬m.degree (b i) ≤ c
Tactic: by_cases hc' : c ∈ r'.support
-- 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
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
c : σ →₀ ℕ
hc :
  c ∈
    (HAdd.hAdd (β := MvPolynomial σ R) r'
        ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f) : MvPolynomial σ R)).support
i : ι
hc' : c ∉ r'.support
⊢ ¬m.degree (b i) ≤ c
have h : c = m.degree f
Tactic: convert! hf i
-- Lean 4 proof step from Mathlib.RingTheory.MvPolynomial.Groebner (hypothesis)
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
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
c : σ →₀ ℕ
hc :
  c ∈
    (HAdd.hAdd (β := MvPolynomial σ R) r'
        ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f) : MvPolynomial σ R)).support
i : ι
hc' : c ∉ r'.support
⊢ c = m.degree f
have this : c ∈ r'.support ∪ support.{u_2, u_1} (R := R) ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f))
Tactic: have := MvPolynomial.support_add hc
-- Lean 4 proof step from Mathlib.RingTheory.MvPolynomial.Groebner (hypothesis)
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
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
c : σ →₀ ℕ
hc :
  c ∈
    (HAdd.hAdd (β := MvPolynomial σ R) r'
        ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f) : MvPolynomial σ R)).support
i : ι
hc' : c ∉ r'.support
this :
  c ∈ r'.support ∪ support.{u_2, u_1} (R := R) ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f))
⊢ c = m.degree f
have this₁ : c ∉ r'.support →
  Membership.mem (γ := Finset (σ →₀ ℕ))
    (support.{u_2, u_1} (R := R) ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f))) c
Tactic: rw [Finset.mem_union, Classical.or_iff_not_imp_left] at this
Cleared hypotheses: this
-- 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
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
c : σ →₀ ℕ
hc :
  c ∈
    (HAdd.hAdd (β := MvPolynomial σ R) r'
        ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f) : MvPolynomial σ R)).support
i : ι
hc' : c ∉ r'.support
⊢ c = m.degree f
have h : ∀
  (this :
    c ∈
      r'.support ∪
        support.{u_2, u_1} (R := R) ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f))),
  c = m.degree f
Tactic: classical
          have := MvPolynomial.support_add hc
          rw [Finset.mem_union, Classical.or_iff_not_imp_left] at this
          simpa only [Finset.mem_singleton] using support_monomial_subset (this hc')
-- 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
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
c : σ →₀ ℕ
hc :
  c ∈
    (HAdd.hAdd (β := MvPolynomial σ R) r'
        ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f) : MvPolynomial σ R)).support
i : ι
hc' : c ∉ r'.support
h h₁ h₂ :
  ∀
    (this :
      c ∈
        r'.support ∪
          support.{u_2, u_1} (R := R) ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f))),
    c = m.degree f
⊢ c = m.degree f
have h₃ : ∀
  (this :
    c ∉ r'.support →
      Membership.mem (γ := Finset (σ →₀ ℕ))
        (support.{u_2, u_1} (R := R) ((monomial (m.degree f) : (a : R) → MvPolynomial σ R) (m.leadingCoeff f))) c),
  c = m.degree f
Tactic: classical
          have := MvPolynomial.support_add hc
          rw [Finset.mem_union, Classical.or_iff_not_imp_left] at this
          simpa only [Finset.mem_singleton] using support_monomial_subset (this hc')
-- 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
⊢ ∃ (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 neg : ∃ (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
Tactic: suffices ∃ (g' : ι →₀ MvPolynomial σ R), ∃ r',
        (m.subLTerm f = Finsupp.linearCombination (MvPolynomial σ R) b g' + r') ∧
        (∀ i, m.degree ((b i) * (g' i)) ≼[m] m.degree (m.subLTerm f)) ∧
        (∀ c ∈ r'.support, ∀ i, ¬ m.degree (b i) ≤ c) by
      obtain ⟨g', r', H'⟩ := this
      use g', r' + monomial (m.degree f) (m.leadingCoeff f)
      constructor
      · simp [← add_assoc, ← H'.1, subLTerm]
      constructor
      · exact fun b ↦ le_trans (H'.2.1 b) (degree_sub_LTerm_le f)
      · intro c hc i
        by_cases hc' : c ∈ r'.support
        · exact H'.2.2 c hc' i
        · convert! hf i
          classical
          have := MvPolynomial.support_add hc
          rw [Finset.mem_union, Classical.or_iff_not_imp_left] at this
          simpa only [Finset.mem_singleton] using support_monomial_subset (this hc')