leanprover-community / leanprover-community/mathlib4

Better error message for `linarith` timeouts?

Open
#2,715 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

t-meta
Dominant language
Lean
Stars
4.2k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

This causes a forest of confusing errors and two panics when I run it, see Zulip. Maybe there's a better error message and a way of avoiding the panics?

import Mathlib.Tactic.Linarith

example (p T m l : ℕ) (hp : 2 ≤ p) (hTp : p < T ^ 2)
    (hm1 : 1 < m) (hmp: m < p) (hmT : T ≤ m) (hl: p = m * l)
    (hl1 : 1 < l) :
    T * l ≤ m * l := by
  nlinarith

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 with the reproducer in the issue and the Mathlib.Tactic.Linarith entry point, then consult the linked Zulip discussion for the reported errors and panics. Investigate the timeout behavior and verify that the example produces a useful error without the reported panics.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.