leanprover / leanprover/lean4

RFC: `Std.Trans`

Open
#12,917 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

RFC
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

Proposal

I propose adding the following class to src/Init/Core.lean:

/-- `Trans r` means that the binary relation `r` is transitive, that is, `r a b → r b c → r a c`.  -/
class Trans (α : Sort _) (r : α → α → Prop) : Prop where
  /-- A transitive relation satisfies `r a b → r b c → r a c`. -/
  trans : ∀ a b c, r a b → r b c → r a c

This would join the existing docs#Std.Refl, docs#Std.Symm, docs#Std.Trichotomous, etc.

There is the existing docs#Trans but it takes in 3 relations and is geared towards calc. Additionally, Trans r r r isn't a Prop because it has max 1 in its universe.

Community Feedback

#lean4 > RFC: `Std.Trans`

Impact

Add 👍 to issues you consider important. If others benefit from the changes in this proposal being added, please ask them to add 👍 to it.

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 with the proposal in src/Init/Core.lean and compare it with the existing Std.Refl, Std.Symm, and Std.Trichotomous declarations linked in the issue. Read the linked Zulip discussion and the existing Trans documentation to determine whether the proposed class and naming are accepted; done means the RFC has a clear decision and implementation scope.

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
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.