leanprover-community / leanprover-community/mathlib4

linarith should split And

Open
#26,481 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

lean-live

In a proof of example (a b : Nat) (_ : a ≤ b ∧ b ≤ c) (_ : 0 < a) (_ : c < 3) : 0 < a ∧ a < 3 I have to use apply And.intro and then apply linarith separately to both goals. I think we could consider automatically splitting And with linarith.

One problem I can see, is that linarith is able to prove one part of And, and not the other, it would still fail. It might be a good idea to also report in the error which parts it managed to solve.

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 at the linarith tactic entry point and determine how proposition goals are currently handled. Clarify the intended behavior for conjunctions, including partial success and error reporting, then define regression coverage showing successful splitting and the expected failure output.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.