leanprover-community / leanprover-community/mathlib4
linarith should split And
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 4.2k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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