Skip to content

[Merged by Bors] - feat: basic API for ConditionallyCompletePartialOrder#35047

Closed
j-loreaux wants to merge 10 commits intoleanprover-community:masterfrom
j-loreaux:CCPO-basic
Closed

[Merged by Bors] - feat: basic API for ConditionallyCompletePartialOrder#35047
j-loreaux wants to merge 10 commits intoleanprover-community:masterfrom
j-loreaux:CCPO-basic

Conversation

@j-loreaux
Copy link
Copy Markdown
Contributor

@j-loreaux j-loreaux commented Feb 9, 2026

This develops the basic API for ConditionallyCompletePartialOrder. The API is copied from ConditionallyCompleteLattice, with DirectedOn assumptions added, and these lemmas are protected within that namespace. In a few cases, the lemmas were capable of being generalized outright, which we have done here.

As a result, some material moved out of ConditionallyCompleteLattice/Basic to ConditionallyCompletePartialOrder/Basic.


Open in Gitpod

@github-actions github-actions bot added the t-order Order theory label Feb 9, 2026
@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 9, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 9, 2026

PR summary ca1d0aeba0

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Order.ConditionallyCompleteLattice.Indexed 245 248 +3 (+1.22%)
Import changes for all files
Files Import difference
There are 4763 files with changed transitive imports taking up over 214529 characters: this is too many to display!
You can run scripts/import_trans_difference.sh all locally to see the whole output.

Declarations diff

+ Directed.Ici_ciSup
+ Directed.ciInf_le_ciSup
+ Directed.ciSup_eq_of_forall_le_of_forall_lt_exists_gt
+ Directed.ciSup_le_iff
+ Directed.ciSup_mono
+ Directed.isLUB_ciSup
+ Directed.le_ciSup_of_le
+ DirectedOn.ciSup_set_le_iff
+ DirectedOn.csInf_le_csSup
+ DirectedOn.csSup_eq_of_forall_le_of_forall_lt_exists_gt
+ DirectedOn.csSup_le_csSup
+ DirectedOn.csSup_le_iff
+ DirectedOn.isDirectedOrder
+ DirectedOn.isLUB_ciSup_set
+ DirectedOn.le_ciSup_set
+ DirectedOn.le_csSup_iff
+ DirectedOn.le_csSup_of_le
+ DirectedOn.lt_csSup_of_lt
+ DirectedOn.notMem_of_csSup_lt
+ DirectedOn.of_isDirectedOrder
+ DirectedOn.subset_Icc_csInf_csSup
+ IsGreatest.directedOn
+ directedOn_iff_isDirectedOrder
+ instance (priority := 100) CompleteLattice.toCompletePartialOrder [CompleteLattice α] :
+ instance (priority := 100) CompletePartialOrder.toOmegaCompletePartialOrder :
+ instance (priority := 100) ConditionallyCompleteLattice.toConditionallyCompletePartialOrder :
+ instance (priority := 100) [CompletePartialOrder α] : ConditionallyCompletePartialOrderSup α
+ instance [ConditionallyCompletePartialOrder α] :
+ instance [ConditionallyCompletePartialOrderInf α] :
+ instance [ConditionallyCompletePartialOrderSup α] :
+ l_ciSup_of_directed
+ l_ciSup_set_of_directedOn
+ l_csSup_of_directedOn
+ l_csSup_of_directedOn'
+ map_ciInf_of_directed
+ map_ciInf_set_of_directedOn
+ map_ciSup_of_directed
+ map_ciSup_set_of_directedOn
+ map_csInf_of_directedOn
+ map_csInf_of_directedOn'
+ map_csSup_of_directedOn
+ map_csSup_of_directedOn'
+ u_ciInf_of_directed
+ u_ciInf_set_of_directedOn
+ u_csInf_of_directedOn
+ u_csInf_of_directedOn'
- CompleteLattice.toCompletePartialOrder
- CompletePartialOrder.toOmegaCompletePartialOrder
- IsLeast.csInf_eq
- IsLeast.csInf_mem
- cbiInf_eq_of_forall
- ciInf_Ici
- ciInf_const
- ciInf_eq_ite
- ciInf_neg
- ciInf_pos
- ciInf_subsingleton
- ciInf_unique
- csInf_singleton
- iInf_congr_Prop
- iInf_of_isEmpty
- inf_eq_bot_of_bot_mem
- sInf_image'

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

@mathlib-dependent-issues mathlib-dependent-issues bot removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Feb 13, 2026
@mathlib-dependent-issues
Copy link
Copy Markdown

This PR/issue depends on:

@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 13, 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 13, 2026
@j-loreaux j-loreaux requested a review from b-mehta February 13, 2026 19:21
@j-loreaux
Copy link
Copy Markdown
Contributor Author

@b-mehta for review, it may be easiest to do in two batches of commits: everything prior to but not including eda5b56, and then everything after and including that commit. The stuff that comes before is just sSup-related, and the stuff after is iSup-related. If you want , I can split these into two PRs, but I thought it made sense to do it all at once.

@b-mehta
Copy link
Copy Markdown
Contributor

b-mehta commented Feb 16, 2026

This looks good to me! Thanks for this!

The one thing I'm unsure about is if the WithTop/SupSet (and dual) stuff should be in this file or elsewhere - it's not really specific to CCPOs. What do you think about putting that in a separate file?

bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Feb 16, 2026

✌️ j-loreaux can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@mathlib-triage mathlib-triage bot added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Feb 16, 2026
@j-loreaux
Copy link
Copy Markdown
Contributor Author

bors merge

@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
This develops the basic API for `ConditionallyCompletePartialOrder`. The API is copied from `ConditionallyCompleteLattice`, with `DirectedOn` assumptions added, and these lemmas are `protected` within that namespace. In a few cases, the lemmas were capable of being generalized outright, which we have done here.

As a result, some material moved out of `ConditionallyCompleteLattice/Basic` to `ConditionallyCompletePartialOrder/Basic`.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Feb 16, 2026

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: basic API for ConditionallyCompletePartialOrder [Merged by Bors] - feat: basic API for ConditionallyCompletePartialOrder Feb 16, 2026
@mathlib-bors mathlib-bors bot closed this Feb 16, 2026
kim-em added a commit to kim-em/mathlib4 that referenced this pull request Feb 17, 2026
Resolve merge conflicts in three files:

- Mathlib/Order/CompleteLattice/Basic.lean: Keep branch's @[to_dual]
  comment for biInf_congr' auto-generation. Remove duplicate manual
  iInf_of_isEmpty (already auto-generated by @[to_dual iInf_of_isEmpty]
  on iSup_of_empty').

- Mathlib/Order/ConditionallyCompleteLattice/Basic.lean: Take master's
  version. The ConditionallyCompletePartialOrder refactoring (leanprover-community#35047) moved
  many theorems and their @[to_dual] annotations to the new
  ConditionallyCompletePartialOrder/Basic.lean file, making the branch's
  @[to_dual] annotations in this file incompatible with the new instance.

- Mathlib/Order/ConditionallyCompleteLattice/Indexed.lean: Take master's
  version for the same reason as above. The nested interval lemmas were
  moved to ConditionallyCompletePartialOrder/Indexed.lean.

Also revert Finset.lean and Group.lean to master's versions to fix
cascading @[to_dual existing] failures from the same refactoring.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
kim-em added a commit to kim-em/mathlib4 that referenced this pull request Feb 17, 2026
Resolve merge conflicts with master's ConditionallyCompletePartialOrder
refactoring (PR leanprover-community#35047). The @[to_dual] annotations added by this branch
in CCL/Basic.lean, CCL/Indexed.lean, CCL/Finset.lean, and CCL/Group.lean
are incompatible with the new CCL→CCPO bridging instance, so these files
take master's versions. The @[to_dual] changes in CompleteLattice/Basic.lean
and all other files are preserved.

Conflicted files:
- Mathlib/Order/CompleteLattice/Basic.lean: kept branch's @[to_dual]
  additions and InfSet section removal; removed duplicate iInf_of_isEmpty
- Mathlib/Order/ConditionallyCompleteLattice/Basic.lean: took master's
  version (incompatible with @[to_dual] due to CCPO instance)
- Mathlib/Order/ConditionallyCompleteLattice/Indexed.lean: took master's
  version (same reason)

Also reverted to master for CCL/Finset.lean and CCL/Group.lean where
branch's @[to_dual existing] registrations conflict with the CCPO instance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
kim-em added a commit to kim-em/mathlib4 that referenced this pull request Feb 17, 2026
The @[to_dual existing] attributes in these files are incompatible
with the ConditionallyCompletePartialOrder instance from leanprover-community#35047.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kbuzzard
Copy link
Copy Markdown
Member

!radar

@leanprover-radar
Copy link
Copy Markdown

leanprover-radar commented Feb 18, 2026

Benchmark results for 086cbab against ca1d0ae are in! @kbuzzard

  • 🟥 build//instructions: +316.9G (+0.17%)

Medium changes (4🟥)

  • 🟥 build/module/Mathlib.Order.CompleteLatticeIntervals//instructions: +4.0G (+25.12%)
  • 🟥 build/module/Mathlib.Order.CompleteSublattice//instructions: +1.6G (+12.90%)
  • 🟥 build/module/Mathlib.Probability.Process.Filtration//instructions: +7.7G (+31.63%)
  • 🟥 build/module/Mathlib.Topology.Sets.Closeds//instructions: +2.9G (+15.15%)

Small changes (2✅, 29🟥)

Too many entries to display here. View the full report on radar instead.

Maldooor pushed a commit to Maldooor/mathlib4 that referenced this pull request Feb 25, 2026
…ommunity#35047)

This develops the basic API for `ConditionallyCompletePartialOrder`. The API is copied from `ConditionallyCompleteLattice`, with `DirectedOn` assumptions added, and these lemmas are `protected` within that namespace. In a few cases, the lemmas were capable of being generalized outright, which we have done here.

As a result, some material moved out of `ConditionallyCompleteLattice/Basic` to `ConditionallyCompletePartialOrder/Basic`.
pfaffelh pushed a commit to pfaffelh/mathlib4 that referenced this pull request Mar 2, 2026
…ommunity#35047)

This develops the basic API for `ConditionallyCompletePartialOrder`. The API is copied from `ConditionallyCompleteLattice`, with `DirectedOn` assumptions added, and these lemmas are `protected` within that namespace. In a few cases, the lemmas were capable of being generalized outright, which we have done here.

As a result, some material moved out of `ConditionallyCompleteLattice/Basic` to `ConditionallyCompletePartialOrder/Basic`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). 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