Skip to content

feat(Order/ConditionallyCompleteLattice/Basic): bounded conditionally complete lattices are complete - #45440

Open
astrainfinita wants to merge 72 commits into
leanprover-community:masterfrom
astrainfinita:ccl_bounded
Open

astrainfinita wants to merge 72 commits into
leanprover-community:masterfrom
astrainfinita:ccl_bounded

Conversation

@astrainfinita

Copy link
Copy Markdown
Collaborator

# Conflicts:
#	Mathlib/Algebra/Order/Nonneg/Lattice.lean
#	Mathlib/Basic/NNReal/Defs.lean
#	Mathlib/Order/CompleteLatticeIntervals.lean
…hTop`

This PR moves the material on `sSup` and `sInf` on `WithTop α` and `WithBot α` from `Order/ConditionallyCompleteLattice/Basic` and `Order/ConditionallyCompleteLattice/Indexed` to a new file `Order/ConditionallyCompleteLattice/WithTop`.

This material was scattered over five places in the two files, although the rest of these files does not depend on it.
…nces on `WithTop`

Adds `OrderSupSet (WithTop α)` and `OrderInfSet (WithTop α)` instances (and their `WithBot` duals), and cleans up the API for `sSup` and `sInf` on `WithTop`.
…nditionallyCompleteLinearOrderBot`"

This reverts commit 166d9c7.
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

PR summary 82125eeaae

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
../mathlib-ci/scripts/pr_summary/import_trans_difference.sh all
There are 3324 files with changed transitive imports taking up over 154643 characters: this is too many to display!
You can run this locally from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci


Declarations diff (regex)

+ CompleteLattice.ofConditionallyCompleteLattice
+ CompleteLinearOrder.ofConditionallyCompleteLinearOrder
+ OrderSupSet.chooseBot
+ OrderSupSet.chooseBot_sSup_empty_of_noBotOrder
+ OrderSupSet.chooseBot_sSup_of_not_exists
+ Set.OrdConnected.coe_sInf
+ Set.OrdConnected.coe_sSup
+ Set.OrdConnected.conditionallyCompleteLinearOrder
+ Set.OrdConnected.csInf_image_mem
+ Set.OrdConnected.csSup_image_mem
+ Set.OrdConnected.sInf_empty_of_noTopOrder
+ Set.OrdConnected.sSup_empty_of_noBotOrder
+ Subtype.isLUB_of_csSup_image_mem
+ bddBelow_preimage_coe
+ coe_sInf'
+ exists_isLUB_cond
+ instOrderInfSet
+ instSupSet
+ instance : NoBotOrder ℤ := ⟨fun x ↦ ⟨x - 1, (Int.sub_one_lt_of_le le_rfl).not_ge⟩⟩
+ instance : NoTopOrder ℤ := ⟨fun x ↦ ⟨x + 1, (Int.lt_add_one_of_le le_rfl).not_ge⟩⟩
+ isCompl_range_coe
+ isGLB_coe_iff
+ isGLB_top_iff
+ isLUB_coe_iff
+ isLUB_top_iff
+ lowerBounds_preimage_coe
+ sInf_eq_coe_iff
+ sInf_eq_top_iff
+ sSup_eq_coe_iff
+ sSup_eq_top_iff
++ instOrderSupSet
- WithTop.coe_sInf'
- instance [SupSet α] : SupSet (WithTop α)
- ordConnectedSubsetConditionallyCompleteLinearOrder
--++ instance [ConditionallyCompleteLinearOrder α] :

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

  • +55 new declarations
  • −7 removed declarations
+CompleteLattice.ofConditionallyCompleteLattice
+CompleteLinearOrder.ofConditionallyCompleteLinearOrder
+ConditionallyCompleteLattice.exists_isGLB_cond
+ConditionallyCompleteLattice.exists_isLUB_cond
-ConditionallyCompleteLattice.isGLB_csInf
-ConditionallyCompleteLattice.isLUB_csSup
-ConditionallyCompleteLattice.toInfSet
+ConditionallyCompleteLattice.toOrderInfSet
+ConditionallyCompleteLattice.toOrderSupSet
-ConditionallyCompleteLattice.toSupSet
-ConditionallyCompleteLinearOrderBot.csSup_empty
+Int.instNoBotOrder
+Int.instNoTopOrder
+OrderInfSet.chooseTop
+OrderInfSet.chooseTop_sInf_empty_of_noTopOrder
+OrderInfSet.chooseTop_sInf_of_not_exists
+OrderInfSet.choose_sInf
+OrderSupSet.chooseBot
+OrderSupSet.chooseBot_sSup_empty_of_noBotOrder
+OrderSupSet.chooseBot_sSup_of_not_exists
+OrderSupSet.choose_sSup
+Seminorm.instOrderSupSet
+Set.OrdConnected.coe_sInf
+Set.OrdConnected.coe_sSup
+Set.OrdConnected.conditionallyCompleteLinearOrder
+Set.OrdConnected.csInf_image_mem
+Set.OrdConnected.csSup_image_mem
+Set.OrdConnected.sInf_empty_of_noTopOrder
+Set.OrdConnected.sSup_empty_of_noBotOrder
+Subtype.isGLB_of_csInf_image_mem
+Subtype.isLUB_of_csSup_image_mem
-WellFoundedLT.min.congr_simp
+WithBot.bddAbove_preimage_coe
+WithBot.instOrderInfSet
+WithBot.instOrderSupSet
+WithBot.isCompl_range_coe
+WithBot.isGLB_bot_iff
+WithBot.isGLB_coe_iff
+WithBot.isLUB_bot_iff
+WithBot.isLUB_coe_iff
+WithBot.sInf_eq_bot_iff
+WithBot.sInf_eq_coe_iff
+WithBot.sSup_eq_bot_iff
+WithBot.sSup_eq_coe_iff
+WithBot.upperBounds_preimage_coe
+WithTop.bddBelow_preimage_coe
+WithTop.instOrderInfSet
+WithTop.instOrderSupSet
+WithTop.isCompl_range_coe
+WithTop.isGLB_coe_iff
+WithTop.isGLB_top_iff
+WithTop.isLUB_coe_iff
+WithTop.isLUB_top_iff
+WithTop.lowerBounds_preimage_coe
+WithTop.sInf_eq_coe_iff
+WithTop.sInf_eq_top_iff
+WithTop.sSup_eq_coe_iff
+WithTop.sSup_eq_top_iff
+exists_isGLB_cond
+exists_isLUB_cond
+isGLB_csInf'
-ordConnectedSubsetConditionallyCompleteLinearOrder

No changes to strong technical debt.

Increase in weak tech debt: (relative, absolute) = (1.00, 0.00)
Current number Change Type (weak)
5127 1 exposed public sections

Current commit 82125eeaae
Reference commit ee6c124192

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

@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 Oct 28, 2026
@mathlib-dependent-issues

Copy link
Copy Markdown

This PR/issue depends on:

@astrainfinita astrainfinita added t-order Order theory awaiting-bench This PR needs to be benchmarked before merging and removed awaiting-bench This PR needs to be benchmarked before merging labels Oct 28, 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 Oct 30, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) t-order Order theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants