Skip to content

[Merged by Bors] - chore(Order/Defs/Unbundled): deprecate def Irreflexive in favor of class Std.Irrefl - #35191

Closed
SnirBroshi wants to merge 3 commits into
leanprover-community:masterfrom
SnirBroshi:chore/relation-duplication/irreflexive
Closed

SnirBroshi wants to merge 3 commits into
leanprover-community:masterfrom
SnirBroshi:chore/relation-duplication/irreflexive

Conversation

@SnirBroshi

Copy link
Copy Markdown
Collaborator

@SnirBroshi SnirBroshi added the t-order Order theory label Feb 12, 2026
@github-actions

github-actions Bot commented Feb 12, 2026 •

Copy link
Copy Markdown

PR summary fe7639f2f6

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ InvImage.irrefl
+ fromRel_irrefl
+ irrefl_iff_subrelation_ne

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

Adj : V → V → Prop
symm : Symmetric Adj := by aesop_graph
loopless : Irreflexive Adj := by aesop_graph
loopless : Std.Irrefl Adj := by aesop_graph

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is somewhat annoying that the change makes us have to construct/destruct Std.Irrefl the whole time. An alternative is to add a field

  loopless : ∀ x, ¬ Adj x x

and then define SimpleGraph.irrefl to return Std.Irrefl. But that would be more annoying in practice, especially if we add a few more lemmas involving Std.Irrefl. So I think the current approach is the right way to go.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is annoying, but my hope is that we'll someday convert it to [Std.Irrefl Adj] and let the typeclass system handle the proof if it can, which is why I preferred changing the field. So to construct a graph we only have to specify an Adj relation, and we can prove it is a simple graph using instances.

@Vierkantor Vierkantor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

bors r+

@mathlib-triage mathlib-triage Bot added the ready-to-merge This PR has been sent to bors. label Feb 16, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Feb 16, 2026
@mathlib-bors

mathlib-bors Bot commented Feb 16, 2026

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title chore(Order/Defs/Unbundled): deprecate def Irreflexive in favor of class Std.Irrefl [Merged by Bors] - chore(Order/Defs/Unbundled): deprecate def Irreflexive in favor of class Std.Irrefl Feb 16, 2026
@mathlib-bors mathlib-bors Bot closed this Feb 16, 2026
Maldooor pushed a commit to Maldooor/mathlib4 that referenced this pull request Feb 25, 2026
pfaffelh pushed a commit to pfaffelh/mathlib4 that referenced this pull request Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors. t-order Order theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants