Skip to content

[Merged by Bors] - feat: LinearOrder instance for Empty - #31889

Closed
YanYablonovskiy wants to merge 18 commits into
leanprover-community:masterfrom
YanYablonovskiy:Empty.instLinearOrder
Closed

YanYablonovskiy wants to merge 18 commits into
leanprover-community:masterfrom
YanYablonovskiy:Empty.instLinearOrder

Conversation

@YanYablonovskiy

@YanYablonovskiy YanYablonovskiy commented Nov 21, 2025 •

Copy link
Copy Markdown
Contributor

Adds a LinearOrder instance on Empty, is required for defining order types, and complements the PUnit LinearOrder instance below it.

Edit: Refactors LinearOrder on PUnit , and defined an instance on Empty and PEmpty via an instance on Subsingleton.


Open in Gitpod

@github-actions github-actions Bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Nov 21, 2025
@YaelDillies YaelDillies changed the title Add a LinearOrder instance on Empty feat: LinearOrder instance for Empty Nov 21, 2025
@github-actions

github-actions Bot commented Nov 21, 2025 •

Copy link
Copy Markdown

PR summary b3cf7a02d3

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ LinearOrder.ofSubsingleton
+ instance : LinearOrder Empty := .ofSubsingleton
+ instance : LinearOrder PEmpty := .ofSubsingleton

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).

@github-actions github-actions Bot added the t-order Order theory label Nov 21, 2025
@github-actions

github-actions Bot commented Nov 21, 2025 •

Copy link
Copy Markdown

✅ PR Title Formatted Correctly

The title of this PR has been updated to match our commit style conventions.
Thank you!

@YaelDillies YaelDillies 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!

maintainer delegate

Comment thread Mathlib/Order/Basic.lean Resolved
Comment thread Mathlib/Order/Basic.lean Resolved
@github-actions

Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by YaelDillies.

@ghost ghost added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Nov 21, 2025
Co-authored-by: Yaël Yanis Dillies <[email protected]>
Comment thread Mathlib/Order/Basic.lean Resolved
@jcommelin jcommelin added awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Nov 21, 2025
Added `Empty.linearOrder` with signature `(α : Type*) -> [inst : IsEmpty α] -> LinearOrder α` , in order to register instances of `LinearOrder` on `Empty` and `PEmpty`.
Comment thread Mathlib/Order/Basic.lean Resolved
Comment thread Mathlib/Order/Basic.lean Resolved
Comment thread Mathlib/Order/Basic.lean Resolved
Comment thread Mathlib/Order/Basic.lean Resolved
Co-authored-by: Yaël Yanis Dillies <[email protected]>
Comment thread Mathlib/Order/Basic.lean Resolved
Comment thread Mathlib/Order/Basic.lean Resolved
Comment thread Mathlib/Order/Basic.lean Resolved
Comment thread Mathlib/Order/Basic.lean Resolved
Comment thread Mathlib/Order/Basic.lean Resolved

@YaelDillies YaelDillies 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! 🚀

maintainer merge

@github-actions

Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by YaelDillies.

@ghost ghost added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Nov 22, 2025
Comment thread Mathlib/Order/Basic.lean Resolved
Comment thread Mathlib/Order/Basic.lean Resolved
Comment thread Mathlib/Order/Basic.lean Resolved
Comment thread Mathlib/Order/Basic.lean Resolved
Co-authored-by: Yaël Yanis Dillies <[email protected]>
@YaelDillies YaelDillies removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Nov 22, 2025
@ocfnash

ocfnash commented Nov 22, 2025

Copy link
Copy Markdown
Contributor

bors merge

@ghost ghost added ready-to-merge This PR has been sent to bors. and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Nov 22, 2025
mathlib-bors Bot pushed a commit that referenced this pull request Nov 22, 2025
Adds a LinearOrder instance on Empty, is required for defining order types, and complements the PUnit LinearOrder instance below it.


Edit: Refactors LinearOrder on PUnit , and defined an instance on Empty and PEmpty via an instance on Subsingleton.

Co-authored-by: YanYablonovskiy <[email protected]>
@mathlib-bors

mathlib-bors Bot commented Nov 22, 2025

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat: LinearOrder instance for Empty [Merged by Bors] - feat: LinearOrder instance for Empty Nov 22, 2025
@mathlib-bors mathlib-bors Bot closed this Nov 22, 2025
@YanYablonovskiy
YanYablonovskiy deleted the Empty.instLinearOrder branch November 26, 2025 07:43
alok added a commit to alok/mathlib4 that referenced this pull request Mar 17, 2026
…lib4

* 'master' of https://github.com/leanprover-community/mathlib4: (3130 commits)
  feat(SetTheory/ZFC): add `ZFSet.card` (leanprover-community#29365)
  feat: grind annotations for `choose_spec` (leanprover-community#31927)
  chore(scripts): update nolints.json (leanprover-community#31975)
  feat(Analysis): cos (n * π) = (-1) ^ n (leanprover-community#31971)
  chore: rename `mul_le_mul_right'` to `mul_le_mul_left` (leanprover-community#30242)
  chore: update Mathlib dependencies 2025-11-22 (leanprover-community#31955)
  feat(MeasureTheory): ae-measurability notation wrt non-standard sigma-algebra (leanprover-community#31910)
  doc: add missing spaces around doc code blocks (leanprover-community#31917)
  chore: update Mathlib dependencies 2025-11-22 (leanprover-community#31945)
  chore: shortcut instance for `Nat` to be mul-torsion-free (leanprover-community#31027)
  doc(Topology/Algebra/Algebra): outdated TODO (leanprover-community#31944)
  feat(EqHaar): add `addHaar_nnreal_smul` (leanprover-community#31922)
  chore(Algebra): make invertibleInv an instance (leanprover-community#31916)
  chore(Algebra): change two statements in CubicDiscriminant (leanprover-community#31912)
  chore(MeasureTheory): mark `map_dirac`  as simp (leanprover-community#31909)
  feat: `LinearOrder` instance for `Empty` (leanprover-community#31889)
  chore: deprecate all remaining modules in `Analysis/NormedSpace` (leanprover-community#31913)
  feat(SimpleGraph): weaker condition for paths in acyclic graphs (leanprover-community#25814)
  chore: do not set `group` when declaring option (leanprover-community#31888)
  chore: clean up more unused `Decidable*` instances in types (leanprover-community#31934)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! 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.

4 participants