Skip to content

[Merged by Bors] - refactor: use OrderSupSet in ConditionallyCompleteLattice - #35674

Closed
astrainfinita wants to merge 95 commits into
leanprover-community:masterfrom
astrainfinita:ordersup_cssup
Closed

astrainfinita wants to merge 95 commits into
leanprover-community:masterfrom
astrainfinita:ordersup_cssup

Conversation

@astrainfinita

@astrainfinita astrainfinita commented Feb 23, 2026 •

Copy link
Copy Markdown
Collaborator

Refactor ConditionallyCompleteLattice to extend OrderSupSet and OrderInfSet instead of SupSet and InfSet, and drop the now-redundant csSup_empty field from ConditionallyCompleteLinearOrderBot.

OrderSupSet implies sSup ∅ = ⊥, so we no longer need some nonemptiness assumptions.

Also add shortcut instances NoBotOrder ℤ and NoTopOrder ℤ for ConditionallyCompleteLinearOrder ℤ.

The cleanup of ConditionallyCompleteLinearOrderBot API is split into #45436 and #45438, and the typeclass itself will be deprecated in #45438.


Zulip

Open in Gitpod

@github-actions

github-actions Bot commented Feb 23, 2026 •

Copy link
Copy Markdown

PR summary fedbc4bb12

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Algebra.Tropical.Lattice 446 447 +1 (+0.22%)
Import changes for all files
Files Import difference
Mathlib.Algebra.Tropical.Lattice 1

Declarations diff (regex)

+ IsLUB.iSup_set_eq
+ exists_isBot_iff_isBot_sSup_empty
+ instance : NoMaxOrder ℤ := ⟨fun x ↦ ⟨x.succ, Int.lt_succ_self _⟩⟩
+ instance : NoMinOrder ℤ := ⟨fun x ↦ ⟨x.pred, Int.pred_self_lt _⟩⟩
+ instance [ConditionallyCompleteLattice R] : ConditionallyCompleteLattice (MinTropical R)
+ instance [Preorder R] [OrderInfSet R] : OrderInfSet (MinTropical R)
+ instance [Preorder R] [OrderSupSet R] : OrderSupSet (MinTropical R)
- instance [ConditionallyCompleteLattice R] :

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

✅ Lean-aware diff — post-build, computed from the Lean environment (commit fedbc4b).

  • +17 new declarations
  • −6 removed declarations
+ConditionallyCompleteLattice.exists_isGLB_of_nonempty_bddBelow
+ConditionallyCompleteLattice.exists_isLUB_of_nonempty_bddAbove
-ConditionallyCompleteLattice.isGLB_csInf
-ConditionallyCompleteLattice.isLUB_csSup
-ConditionallyCompleteLattice.toInfSet
+ConditionallyCompleteLattice.toOrderInfSet
+ConditionallyCompleteLattice.toOrderSupSet
-ConditionallyCompleteLattice.toSupSet
-ConditionallyCompleteLinearOrderBot.csSup_empty
+Int.instNoMaxOrder
+Int.instNoMinOrder
+IsGLB.iInf_set_eq
+IsLUB.iSup_set_eq
+MaxTropical.instOrderInfSet
+MaxTropical.instOrderSupSet
+MinTropical.instOrderInfSet
+MinTropical.instOrderSupSet
+Order.IsPredLimit.iInf_Ioi
+Order.IsPredPrelimit.iInf_Ioi
+Order.IsPredPrelimit.sInf_Ioi
-WellFoundedLT.min.congr_simp
+exists_isBot_iff_isBot_sSup_empty
+exists_isTop_iff_isTop_sInf_empty

No changes to strong technical debt.
No changes to weak technical debt.

Current commit fedbc4bb12
Reference commit c40b024c1b

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py 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).

@astrainfinita astrainfinita mentioned this pull request Feb 23, 2026
1 of 4 tasks
@mathlib-dependent-issues mathlib-dependent-issues Bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Feb 23, 2026
@astrainfinita astrainfinita added the t-order Order theory label Feb 23, 2026
@mathlib-merge-conflicts mathlib-merge-conflicts Bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 24, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@github-actions github-actions Bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 25, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@mathlib-merge-conflicts mathlib-merge-conflicts Bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 27, 2026
@github-actions github-actions Bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Mar 15, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@github-actions github-actions Bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Nov 23, 2026
@YaelDillies YaelDillies added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Nov 24, 2026
@astrainfinita astrainfinita removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Nov 24, 2026
@YaelDillies YaelDillies added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Nov 27, 2026
@astrainfinita astrainfinita removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Nov 27, 2026

@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

@YaelDillies YaelDillies removed their assignment Nov 28, 2026
@github-actions

Copy link
Copy Markdown

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

@mathlib-triage mathlib-triage Bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Nov 28, 2026

@j-loreaux j-loreaux 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! I'm glad to see we're making progress on this refactor.

bors merge

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Dec 2, 2026
@mathlib-triage mathlib-triage Bot removed the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Dec 2, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Dec 2, 2026
Refactor `ConditionallyCompleteLattice` to extend `OrderSupSet` and `OrderInfSet` instead of `SupSet` and `InfSet`, and drop the now-redundant `csSup_empty` field from `ConditionallyCompleteLinearOrderBot`.

`OrderSupSet` implies `sSup ∅ = ⊥`, so we no longer need some nonemptiness assumptions.

Also add shortcut instances `NoBotOrder ℤ` and `NoTopOrder ℤ` for `ConditionallyCompleteLinearOrder ℤ`.

The cleanup of `ConditionallyCompleteLinearOrderBot` API is split into #45436 and #45438, and the typeclass itself will be deprecated in #45438.
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Dec 2, 2026
@mathlib-bors

mathlib-bors Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title refactor: use OrderSupSet in ConditionallyCompleteLattice [Merged by Bors] - refactor: use OrderSupSet in ConditionallyCompleteLattice Dec 2, 2026
@mathlib-bors mathlib-bors Bot closed this Dec 2, 2026
TJHeeringa pushed a commit to TJHeeringa/mathlib4 that referenced this pull request Dec 2, 2026
…over-community#35674)

Refactor `ConditionallyCompleteLattice` to extend `OrderSupSet` and `OrderInfSet` instead of `SupSet` and `InfSet`, and drop the now-redundant `csSup_empty` field from `ConditionallyCompleteLinearOrderBot`.

`OrderSupSet` implies `sSup ∅ = ⊥`, so we no longer need some nonemptiness assumptions.

Also add shortcut instances `NoBotOrder ℤ` and `NoTopOrder ℤ` for `ConditionallyCompleteLinearOrder ℤ`.

The cleanup of `ConditionallyCompleteLinearOrderBot` API is split into leanprover-community#45436 and leanprover-community#45438, and the typeclass itself will be deprecated in leanprover-community#45438.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bors-staging This PR is currently being built by bors on the staging branch. ready-to-merge This PR has been sent to bors. t-order Order theory tech debt Fixes cross-cutting technical debt, see the "technical debt counters" stream on zulip

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants