-- Init.Grind.Ring.CommSolver
Lean.Grind.CommRing.Poly.combine.go.induct_unfolding : ∀ (motive : ℕ → Lean.Grind.CommRing.Poly → Lean.Grind.CommRing.Poly → Lean.Grind.CommRing.Poly → Prop),
  (∀ (p₁ p₂ : Lean.Grind.CommRing.Poly), motive 0 p₁ p₂ (p₁.concat p₂)) →
    (∀ (fuel : ℕ) (k₁ k₂ : ℤ),
        motive fuel.succ (Lean.Grind.CommRing.Poly.num k₁) (Lean.Grind.CommRing.Poly.num k₂)
          (Lean.Grind.CommRing.Poly.num (k₁ + k₂))) →
      (∀ (fuel : ℕ) (k₁ k₂ : ℤ) (m₂ : Lean.Grind.CommRing.Mon) (p₂ : Lean.Grind.CommRing.Poly),
          motive fuel.succ (Lean.Grind.CommRing.Poly.num k₁) (Lean.Grind.CommRing.Poly.add k₂ m₂ p₂)
            ((Lean.Grind.CommRing.Poly.add k₂ m₂ p₂).addConst k₁)) →
        (∀ (fuel : ℕ) (k₁ : ℤ) (m₁ : Lean.Grind.CommRing.Mon) (p₁ : Lean.Grind.CommRing.Poly) (k₂ : ℤ),
            motive fuel.succ (Lean.Grind.CommRing.Poly.add k₁ m₁ p₁) (Lean.Grind.CommRing.Poly.num k₂)
              ((Lean.Grind.CommRing.Poly.add k₁ m₁ p₁).addConst k₂)) →
          (∀ (fuel : ℕ) (k₁ : ℤ) (m₁ : Lean.Grind.CommRing.Mon) (p₁ : Lean.Grind.CommRing.Poly) (k₂ : ℤ)
              (m₂ : Lean.Grind.CommRing.Mon) (p₂ : Lean.Grind.CommRing.Poly),
              m₁.grevlex m₂ = Ordering.eq →
                have k := k₁ + k₂;
                (k == 0) = true →
                  motive fuel p₁ p₂ (Lean.Grind.CommRing.Poly.combine.go fuel p₁ p₂) →
                    motive fuel.succ (Lean.Grind.CommRing.Poly.add k₁ m₁ p₁) (Lean.Grind.CommRing.Poly.add k₂ m₂ p₂)
                      (Lean.Grind.CommRing.Poly.combine.go fuel p₁ p₂)) →
            (∀ (fuel : ℕ) (k₁ : ℤ) (m₁ : Lean.Grind.CommRing.Mon) (p₁ : Lean.Grind.CommRing.Poly) (k₂ : ℤ)
                (m₂ : Lean.Grind.CommRing.Mon) (p₂ : Lean.Grind.CommRing.Poly),
                m₁.grevlex m₂ = Ordering.eq →
                  have k := k₁ + k₂;
                  (k == 0) = false →
                    motive fuel p₁ p₂ (Lean.Grind.CommRing.Poly.combine.go fuel p₁ p₂) →
                      motive fuel.succ (Lean.Grind.CommRing.Poly.add k₁ m₁ p₁) (Lean.Grind.CommRing.Poly.add k₂ m₂ p₂)
                        (Lean.Grind.CommRing.Poly.add k m₁ (Lean.Grind.CommRing.Poly.combine.go fuel p₁ p₂))) →
              (∀ (fuel : ℕ) (k₁ : ℤ) (m₁ : Lean.Grind.CommRing.Mon) (p₁ : Lean.Grind.CommRing.Poly) (k₂ : ℤ)
                  (m₂ : Lean.Grind.CommRing.Mon) (p₂ : Lean.Grind.CommRing.Poly),
                  m₁.grevlex m₂ = Ordering.gt →
                    motive fuel p₁ (Lean.Grind.CommRing.Poly.add k₂ m₂ p₂)
                        (Lean.Grind.CommRing.Poly.combine.go fuel p₁ (Lean.Grind.CommRing.Poly.add k₂ m₂ p₂)) →
                      motive fuel.succ (Lean.Grind.CommRing.Poly.add k₁ m₁ p₁) (Lean.Grind.CommRing.Poly.add k₂ m₂ p₂)
                        (Lean.Grind.CommRing.Poly.add k₁ m₁
                          (Lean.Grind.CommRing.Poly.combine.go fuel p₁ (Lean.Grind.CommRing.Poly.add k₂ m₂ p₂)))) →
                (∀ (fuel : ℕ) (k₁ : ℤ) (m₁ : Lean.Grind.CommRing.Mon) (p₁ : Lean.Grind.CommRing.Poly) (k₂ : ℤ)
                    (m₂ : Lean.Grind.CommRing.Mon) (p₂ : Lean.Grind.CommRing.Poly),
                    m₁.grevlex m₂ = Ordering.lt →
                      motive fuel (Lean.Grind.CommRing.Poly.add k₁ m₁ p₁) p₂
                          (Lean.Grind.CommRing.Poly.combine.go fuel (Lean.Grind.CommRing.Poly.add k₁ m₁ p₁) p₂) →
                        motive fuel.succ (Lean.Grind.CommRing.Poly.add k₁ m₁ p₁) (Lean.Grind.CommRing.Poly.add k₂ m₂ p₂)
                          (Lean.Grind.CommRing.Poly.add k₂ m₂
                            (Lean.Grind.CommRing.Poly.combine.go fuel (Lean.Grind.CommRing.Poly.add k₁ m₁ p₁) p₂))) →
                  ∀ (fuel : ℕ) (p₁ p₂ : Lean.Grind.CommRing.Poly),
                    motive fuel p₁ p₂ (Lean.Grind.CommRing.Poly.combine.go fuel p₁ p₂)