Missing order instances for `Bool`
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- devtools
Research direction
Start from the five failing #synth lines in the issue and find where the existing LE, LT, Ord, Min and Max instances for Bool are defined in the core Lean library's Init sources. The targets are the Std.IsLinearOrder and Std.LawfulOrder* classes. Done when all five #synth checks succeed and the new instances compile with their proofs, which requires some familiarity with Lean theorem proving.
Written by the indexing model from the issue text.
Description
Prerequisites
- Check that your issue is not already filed:
https://github.com/leanprover/lean4/issues - Reduce the issue to a minimal, self-contained, reproducible test case.
Avoid dependencies to Mathlib or Batteries. - Test your test case against the latest nightly release, for example on
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”) - When reporting a perceived soundness bug: Does it affect
lake check --paranoid?
If in doubt, please reach out on [email protected] for responsible disclosure.
Description
There are some order instances for Bool, but most of the order properties are missing. This is not the case for other types such as Nat, String, List, etc.
Context
Mathlib has a LinearOrder instance for Bool which needs to be defined manually. If we had these instances, then it could be defined using LinearOrder.ofStd.
Steps to Reproduce
-- These work
#synth LE Bool
#synth LT Bool
#synth Ord Bool
#synth Min Bool
#synth Max Bool
-- These fail
#synth Std.IsLinearOrder Bool
#synth Std.LawfulOrderLT Bool
#synth Std.LawfulOrderOrd Bool
#synth Std.LawfulOrderMin Bool
#synth Std.LawfulOrderMax Bool
Expected behavior: All the instances above exist.
Actual behavior: The instances don't exist.
Versions
Lean 4.37.0-nightly-2026-11-11
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
- Dominant language
- Lean
- Stars
- 10.3k
- Forks
- 1.1k
- Avg merge
- 19h 8m
- Merged PRs (30d)
- 421
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from leanprover/lean4
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
leanprover/lean4#16681 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
leanprover/lean4#16305 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
leanprover/lean4#16299 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
leanprover/lean4#16257 ·
Maintainers usually reply within 1 day
-
`IO.FS.realPath` reports every failure as `noFileOrDirectory` instead of classifying by `errno`Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
leanprover/lean4#15683 ·
Maintainers usually reply within 1 day
All issues in leanprover/lean4
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
gh-sync ship audits cards before writing station done, so every ship reports false STATUS findingsOpenharness
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mruangutai/harness#2455 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
zmkfirmware/zmk#3571 ·
Maintainers usually reply within 10 days
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Tarektouati/made#191 ·
Maintainers usually reply within 1 day
-
Extend .gitignoreOpen
Difficulty 1/5 Under an hour Newbie friendliness 85/100
vitruv-tools/Vitruv-DSLs#736 ·
Maintainers usually reply within 1 day