leanprover / leanprover/lean4

Make `Ord` extend `BEq`, `LE`, `LT`, `Max`, `Min`

Open
#1,777 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

P-medium
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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.