Skip to content

[Merged by Bors] - feat(Order/Zorn): change zorn to use Maximal API#14781

Closed
apnelson1 wants to merge 49 commits intomasterfrom
minimal_zorn
Closed

[Merged by Bors] - feat(Order/Zorn): change zorn to use Maximal API#14781
apnelson1 wants to merge 49 commits intomasterfrom
minimal_zorn

Conversation

@apnelson1
Copy link
Copy Markdown
Collaborator

@apnelson1 apnelson1 commented Jul 15, 2024

We change statements of Zorn's lemma to use the new Maximal API from #14721. The new definitions eliminate the need for separate PartialOrder and Preorder versions of Zorn's lemma, and slightly simplify most of its applications.

The new statements of Zorn aren't defeq to the old ones, so a good number of files are touched, but very few theorem statements outside Order.Zorn itself are actually changed - most changes are small modifications of existing proofs.


Open in Gitpod

@apnelson1 apnelson1 added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Jul 15, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 15, 2024

PR summary f665fa8f24

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Order.Zorn 344 352 +8 (+2.33%)
Mathlib.Order.Extension.Linear 345 353 +8 (+2.32%)
Mathlib.SetTheory.Cardinal.SchroederBernstein 382 390 +8 (+2.09%)
Mathlib.Order.ZornAtoms 362 365 +3 (+0.83%)
Mathlib.Order.PrimeSeparator 402 403 +1 (+0.25%)
Import changes for all files
Files Import difference
Mathlib.Order.PrimeSeparator 1
Mathlib.Order.ZornAtoms 3
3 files Mathlib.Order.Zorn Mathlib.SetTheory.Cardinal.SchroederBernstein Mathlib.Order.Extension.Linear
8

Declarations diff

+ zorn_le
+ zorn_le_nonempty
+ zorn_le_nonempty_Ici₀
+ zorn_le_nonempty₀
+ zorn_le₀
- zorn_nonempty_Ici₀
- zorn_nonempty_partialOrder
- zorn_nonempty_partialOrder₀
- zorn_nonempty_preorder
- zorn_nonempty_preorder₀
- zorn_partialOrder
- zorn_partialOrder₀
- zorn_preorder
- zorn_preorder₀

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.

@apnelson1 apnelson1 added the t-order Order theory label Jul 15, 2024
@ghost ghost removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Jul 15, 2024
@ghost ghost added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Jul 16, 2024
@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jul 19, 2024
@ghost ghost removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Aug 5, 2024
@j-loreaux j-loreaux self-requested a review August 7, 2024 06:33
Copy link
Copy Markdown
Contributor

@j-loreaux j-loreaux left a comment

Choose a reason for hiding this comment

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

Looks relatively reasonable, but here are some comments.

Comment on lines +66 to +67
obtain ⟨Jset, _, hmax⟩ := zorn_subset_nonempty S chainub I IinS
obtain ⟨Jidl, IJ, JF⟩ := hmax.prop
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.

I see this pattern a lot in this PR. Should we just have an additional lemma besides zorn_subset_nonempty that does the second step deconstruction too?

@j-loreaux j-loreaux added the awaiting-author A reviewer has asked the author a question or requested changes. label Aug 7, 2024
apnelson1 and others added 8 commits August 7, 2024 19:20
Co-authored-by: Jireh Loreaux <loreaujy@gmail.com>
Co-authored-by: Jireh Loreaux <loreaujy@gmail.com>
Co-authored-by: Jireh Loreaux <loreaujy@gmail.com>
Co-authored-by: Jireh Loreaux <loreaujy@gmail.com>
Co-authored-by: Jireh Loreaux <loreaujy@gmail.com>
Co-authored-by: Jireh Loreaux <loreaujy@gmail.com>
Co-authored-by: Jireh Loreaux <loreaujy@gmail.com>
@j-loreaux
Copy link
Copy Markdown
Contributor

LGTM now.

maintainer merge

@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 8, 2024

🚀 Pull request has been placed on the maintainer queue by j-loreaux.

@github-actions github-actions bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Aug 8, 2024
@mattrobball
Copy link
Copy Markdown
Contributor

!bench

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Here are the benchmark results for commit f665fa8.
There were no significant changes against commit e860e3b.

@mattrobball
Copy link
Copy Markdown
Contributor

bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-author A reviewer has asked the author a question or requested changes. labels Aug 8, 2024
mathlib-bors bot pushed a commit that referenced this pull request Aug 8, 2024
We change statements of Zorn's lemma to use the new `Maximal` API from #14721. The new definitions eliminate the need for separate `PartialOrder` and `Preorder` versions of Zorn's lemma, and slightly simplify most of its applications. 

The new statements of Zorn aren't defeq to the old ones, so a good number of files are touched, but very few theorem statements outside `Order.Zorn` itself are actually changed - most changes are small modifications of existing proofs. 

- [x] depends on: #14721
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Aug 8, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Order/Zorn): change zorn to use Maximal API [Merged by Bors] - feat(Order/Zorn): change zorn to use Maximal API Aug 8, 2024
@mathlib-bors mathlib-bors bot closed this Aug 8, 2024
@mathlib-bors mathlib-bors bot deleted the minimal_zorn branch August 8, 2024 18:23
bjoernkjoshanssen pushed a commit that referenced this pull request Sep 9, 2024
We change statements of Zorn's lemma to use the new `Maximal` API from #14721. The new definitions eliminate the need for separate `PartialOrder` and `Preorder` versions of Zorn's lemma, and slightly simplify most of its applications. 

The new statements of Zorn aren't defeq to the old ones, so a good number of files are touched, but very few theorem statements outside `Order.Zorn` itself are actually changed - most changes are small modifications of existing proofs. 

- [x] depends on: #14721
bjoernkjoshanssen pushed a commit that referenced this pull request Sep 9, 2024
We change statements of Zorn's lemma to use the new `Maximal` API from #14721. The new definitions eliminate the need for separate `PartialOrder` and `Preorder` versions of Zorn's lemma, and slightly simplify most of its applications. 

The new statements of Zorn aren't defeq to the old ones, so a good number of files are touched, but very few theorem statements outside `Order.Zorn` itself are actually changed - most changes are small modifications of existing proofs. 

- [x] depends on: #14721
bjoernkjoshanssen pushed a commit that referenced this pull request Sep 12, 2024
We change statements of Zorn's lemma to use the new `Maximal` API from #14721. The new definitions eliminate the need for separate `PartialOrder` and `Preorder` versions of Zorn's lemma, and slightly simplify most of its applications. 

The new statements of Zorn aren't defeq to the old ones, so a good number of files are touched, but very few theorem statements outside `Order.Zorn` itself are actually changed - most changes are small modifications of existing proofs. 

- [x] depends on: #14721
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. 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