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: The Ahlswede-Zhang identity #8171

Closed
wants to merge 12 commits into from

Conversation

YaelDillies
Copy link
Collaborator

@YaelDillies YaelDillies commented Nov 3, 2023

The Ahlswede-Zhang identity is a sharpening of the Lubell-Yamamoto-Meshalkin inequality, by expliciting the correction term.

This PR defines Finset.truncatedSup/Finset.truncatedInf, whose cardinalities show up in the correction term, and subsequently proves the Ahlswede-Zhang identity itself.

Co-authored-by: Vladimir Ivanov [email protected]


This is a rehash of leanprover-community/mathlib3#18612 and leanprover-community/mathlib3#18618.

Open in Gitpod

The Ahlswede-Zhang identity is a sharpening of the [Lubell-Yamamoto-Meshalkin inequality](https://leanprover-community.github.io/mathlib_docs/combinatorics/set_family/lym.html#finset.sum_card_slice_div_choose_le_one), by expliciting the correction term.

This PR defines `Finset.truncatedSup`/`Finset.truncatedInf`, whose cardinalities show up in the correction term, and subsequently proves the Ahlswede-Zhang identity itself.
Comment on lines +192 to +194
/-- The infimum of the elements of `s` less than `a` if there are some, otherwise `⊥`. -/
def truncatedInf (s : Finset α) (a : α) : α :=
if h : a ∈ upperClosure s then (s.filter (· ≤ a)).inf' (inf_aux h) id else ⊥
Copy link
Member

Choose a reason for hiding this comment

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

Can you explain why you add ? The natural choice would seem to be top, since that's the inf of an empty set.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is why it's called "truncated". The theorem is not true otherwise.

Note this was already PRed to mathlib.

Copy link
Member

Choose a reason for hiding this comment

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

Wait, so is this a forward-port PR?

Copy link
Member

Choose a reason for hiding this comment

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

If the intent is not to actually forward-port it, we should just revert it in mathlib3 to get it off the dashboard

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'm happy to make this a forward-port. But note that the second half of the file is not a forward-port

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In fact, it doesn't show up on the dashboard right now. So I'd be in favor of waiting for this PR to be merged before adding the aligns.

Co-authored-by: Eric Wieser <[email protected]>
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-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 Dec 8, 2023
Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean Outdated Show resolved Hide resolved
Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean Outdated Show resolved Hide resolved
Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean Outdated Show resolved Hide resolved
Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean Outdated Show resolved Hide resolved
Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean Outdated Show resolved Hide resolved
Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean Outdated Show resolved Hide resolved
Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean Outdated Show resolved Hide resolved
Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean Outdated Show resolved Hide resolved
Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean Outdated Show resolved Hide resolved
Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean Outdated Show resolved Hide resolved
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-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 Dec 10, 2023
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-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 Dec 13, 2023
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-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 Dec 19, 2023
Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

bors d+

Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean Outdated Show resolved Hide resolved
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Jan 8, 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 and others added 2 commits January 8, 2024 20:47
Co-authored-by: Johan Commelin <[email protected]>
Co-authored-by: Johan Commelin <[email protected]>
@YaelDillies
Copy link
Collaborator Author

bors merge

mathlib-bors bot pushed a commit that referenced this pull request Jan 8, 2024
The Ahlswede-Zhang identity is a sharpening of the [Lubell-Yamamoto-Meshalkin inequality](https://leanprover-community.github.io/mathlib_docs/combinatorics/set_family/lym.html#finset.sum_card_slice_div_choose_le_one), by expliciting the correction term.

This PR defines `Finset.truncatedSup`/`Finset.truncatedInf`, whose cardinalities show up in the correction term, and subsequently proves the Ahlswede-Zhang identity itself.

Co-authored-by: Vladimir Ivanov <[email protected]>
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Jan 8, 2024

Build failed (retrying...):

@urkud
Copy link
Member

urkud commented Jan 8, 2024

Please merge master and fix compile
bors r-
bors d+

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Jan 8, 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.

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Jan 8, 2024

Canceled.

@YaelDillies
Copy link
Collaborator Author

bors merge

mathlib-bors bot pushed a commit that referenced this pull request Jan 9, 2024
The Ahlswede-Zhang identity is a sharpening of the [Lubell-Yamamoto-Meshalkin inequality](https://leanprover-community.github.io/mathlib_docs/combinatorics/set_family/lym.html#finset.sum_card_slice_div_choose_le_one), by expliciting the correction term.

This PR defines `Finset.truncatedSup`/`Finset.truncatedInf`, whose cardinalities show up in the correction term, and subsequently proves the Ahlswede-Zhang identity itself.

Co-authored-by: Vladimir Ivanov <[email protected]>
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Jan 9, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: The Ahlswede-Zhang identity [Merged by Bors] - feat: The Ahlswede-Zhang identity Jan 9, 2024
@mathlib-bors mathlib-bors bot closed this Jan 9, 2024
@mathlib-bors mathlib-bors bot deleted the ahlswede_zhang branch January 9, 2024 07:26
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.

6 participants