Make `Ord` extend `BEq`, `LE`, `LT`, `Max`, `Min`
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
As discussed in the dev meeting.
The general rule should be: if there is a noncanonical fooOfBar instance, then we should probably always make Bar extend Foo.
I'd also prefer to have properties defining the derived operations like a < b ↔ compare a b = .lt be part of Ord. Additional "lawful" classes like LinearOrder should then contain stronger properties like ¬ a < a. (But I believe Sebastian preferred a different split.)
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
No files or tests are named. Start by locating the declarations for Ord, BEq, LE, LT, Max, and Min, then review existing noncanonical fooOfBar instances. Done requires agreement on and implementation of the inheritance and law-property split described in the issue.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100