Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat: sup-closed sets are closed under finite suprema #18990

Closed
wants to merge 2 commits into from

Conversation

YaelDillies
Copy link
Collaborator

From GrowthInGroups


Open in Gitpod

@YaelDillies YaelDillies added the t-order Order theory label Nov 13, 2024
Copy link

github-actions bot commented Nov 13, 2024

PR summary 2b14177317

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Order.SupClosed 512 515 +3 (+0.59%)
Import changes for all files
Files Import difference
5 files Mathlib.Combinatorics.SetFamily.FourFunctions Mathlib.Combinatorics.SetFamily.Compression.UV Mathlib.Combinatorics.SetFamily.Shadow Mathlib.Combinatorics.SetFamily.LYM Mathlib.Combinatorics.SetFamily.KruskalKatona
1
3 files Mathlib.Algebra.Module.Submodule.Invariant Mathlib.Combinatorics.SetFamily.AhlswedeZhang Mathlib.Combinatorics.Colex
2
5 files Mathlib.Order.CompleteSublattice Mathlib.Data.Finset.Sups Mathlib.Data.Set.Sups Mathlib.Order.SupClosed Mathlib.Order.Sublattice
3

Declarations diff

+ InfClosed.biInf_mem
+ InfClosed.biInf_mem_of_nonempty
+ InfClosed.iInf_mem
+ InfClosed.iInf_mem_of_nonempty
+ InfClosed.sInf_mem
+ InfClosed.sInf_mem_of_nonempty
+ SupClosed.biSup_mem
+ SupClosed.biSup_mem_of_nonempty
+ SupClosed.iSup_mem
+ SupClosed.iSup_mem_of_nonempty
+ SupClosed.sSup_mem
+ SupClosed.sSup_mem_of_nonempty

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.

section ConditionallyCompleteLattice
variable [ConditionallyCompleteLattice α] {f : ι → α} {s t : Set α}

lemma SupClosed.iSup_mem_of_nonempty [Finite ι] [Nonempty ι] (hs : SupClosed s)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
lemma SupClosed.iSup_mem_of_nonempty [Finite ι] [Nonempty ι] (hs : SupClosed s)
lemma SupClosed.ciSup_mem [Finite ι] [Nonempty ι] (hs : SupClosed s)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I disagree with this name. This lemma is also valid (and useful) for complete lattices, and the current name helps disambiguate from the other iSup_mem lemma.

rw [← iSup_plift_down, ← Finset.sup'_univ_eq_ciSup]
exact hs.finsetSup'_mem Finset.univ_nonempty fun _ _ ↦ hf _

lemma InfClosed.iInf_mem_of_nonempty [Finite ι] [Nonempty ι] (hs : InfClosed s)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
lemma InfClosed.iInf_mem_of_nonempty [Finite ι] [Nonempty ι] (hs : InfClosed s)
lemma InfClosed.ciInf_mem [Finite ι] [Nonempty ι] (hs : InfClosed s)

lemma InfClosed.iInf_mem_of_nonempty [Finite ι] [Nonempty ι] (hs : InfClosed s)
(hf : ∀ i, f i ∈ s) : ⨅ i, f i ∈ s := hs.dual.iSup_mem_of_nonempty hf

lemma SupClosed.sSup_mem_of_nonempty (hs : SupClosed s) (ht : t.Finite) (ht' : t.Nonempty)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
lemma SupClosed.sSup_mem_of_nonempty (hs : SupClosed s) (ht : t.Finite) (ht' : t.Nonempty)
lemma SupClosed.csSup_mem (hs : SupClosed s) (ht : t.Finite) (ht' : t.Nonempty)

rw [sSup_eq_iSup']
exact hs.iSup_mem_of_nonempty (by simpa)

lemma InfClosed.sInf_mem_of_nonempty (hs : InfClosed s) (ht : t.Finite) (ht' : t.Nonempty)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
lemma InfClosed.sInf_mem_of_nonempty (hs : InfClosed s) (ht : t.Finite) (ht' : t.Nonempty)
lemma InfClosed.csInf_mem (hs : InfClosed s) (ht : t.Finite) (ht' : t.Nonempty)

Copy link
Contributor

@b-mehta b-mehta left a comment

Choose a reason for hiding this comment

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

I'm not convinced of the names still, but since they're in a namespace I guess it's not so bad that these are inconsistent

bors d+

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Dec 10, 2024

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

@YaelDillies
Copy link
Collaborator Author

*consistent in a way you don't see 😉

bors merge

mathlib-bors bot pushed a commit that referenced this pull request Dec 10, 2024
@b-mehta
Copy link
Contributor

b-mehta commented Dec 10, 2024

*consistent in a way you don't see 😉

Note that there are exactly zero other lemmas in mathlib that take a supremum over a general conditionally complete lattice and have the name iSup. And there are many other lemmas in mathlib that take a supremum over a general conditionally complete lattice that also work for complete lattices, and are still called ciSup. And, as pointed out on the zulip thread, the disambiguation argument doesn't hold if there are more lemmas in mathlib.
So I would like to see some more factual arguments that this is consistent, as currently this is objectively increasing inconsistency in mathlib 😉

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Dec 10, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: sup-closed sets are closed under finite suprema [Merged by Bors] - feat: sup-closed sets are closed under finite suprema Dec 10, 2024
@mathlib-bors mathlib-bors bot closed this Dec 10, 2024
@mathlib-bors mathlib-bors bot deleted the isup_mem_sup_closed branch December 10, 2024 17:35
@YaelDillies
Copy link
Collaborator Author

Note that there are exactly zero other lemmas in mathlib that take a supremum over a general conditionally complete lattice and have the name iSup.

There are at least three or four according to https://loogle.lean-lang.org/?q=iSup%2C+ConditionallyCompleteLattice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants