leanprover / leanprover/lean4

grind/grobner regression in 4.33.0-rc1

Open
#14,456 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

Prerequisites
Description

The code below works on 4.32.0, but fails in 4.33.0-rc1.

variable {F : Type} [Lean.Grind.Field F] (a₂ a₄ a₆ ℓ m x₁ x₂ x₃ : F)

theorem test (hne : x₁ ≠ x₂)
    (hx₃ : x₃ = ℓ ^ 2 - a₂ - x₁ - x₂)
    (h₁ : (ℓ * x₁ + m) ^ 2 = x₁ ^ 3 + a₂ * x₁ ^ 2 + a₄ * x₁ + a₆)
    (h₂ : (ℓ * x₂ + m) ^ 2 = x₂ ^ 3 + a₂ * x₂ ^ 2 + a₄ * x₂ + a₆) :
    x₁ * x₂ + x₁ * x₃ + x₂ * x₃ = a₄ - 2 * ℓ * m ∧
        x₁ * x₂ * x₃ = m ^ 2 - a₆ := by
  grobner
Context

Occurred in a project downstream of mathlib.

Note that by increasing the number of ringSteps, grobner/grind succeeds. Perhaps this suggests the default should have been adjusted when some recent change was made?

Steps to Reproduce
  1. Code as above

Expected behavior: grobner closes the goal.

Actual behavior: grobner fails to close the goal.

Versions

Tested on live.lean-lang.org, comparing Latest Release (v4.33.0-rc1 with mathlib, cslib) against Stable Release (v4.32.0 with mathlib, cslib)

Additional Information

[Additional information, configuration or data that might be necessary to reproduce the issue]

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.ecent chan

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the minimal theorem on Lean 4.33.0-rc1 and 4.32.0 to confirm the regression. Investigate the grobner/grind behavior around the default ringSteps setting; done means the supplied goal closes on 4.33.0-rc1 without manually increasing ringSteps.

Written by the indexing model from the issue text.

Assessment

Domain
compilers, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.