Skip to content

[Merged by Bors] - feat(Order/Cover): characterise covering in Pi types#22929

Closed
b-mehta wants to merge 4 commits intomasterfrom
cover-pi
Closed

[Merged by Bors] - feat(Order/Cover): characterise covering in Pi types#22929
b-mehta wants to merge 4 commits intomasterfrom
cover-pi

Conversation

@b-mehta
Copy link
Copy Markdown
Contributor

@b-mehta b-mehta commented Mar 14, 2025

Characterise the covering relation in products of partial orders.
Generalise this characterisation to products of preorders.
Use the characterisation to significantly simplify the characterisation of atoms in products of partial orders.


Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 14, 2025

PR summary 1157d7379a

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ _root_.WCovBy.eval
+ covBy_iff
+ covBy_iff_antisymmRel
+ covBy_iff_exists_left_eq
+ covBy_iff_exists_right_eq
+ exists_forall_antisymmRel_of_covBy
+ exists_forall_antisymmRel_of_wcovBy
+ exists_forall_eq_of_covBy
+ exists_forall_eq_of_wcovBy
+ wcovBy_iff
+ wcovBy_iff_antisymmRel
+ wcovBy_iff_exists_left_eq
+ wcovBy_iff_exists_right_eq

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.


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

@github-actions github-actions bot added the t-order Order theory label Mar 14, 2025
@b-mehta b-mehta requested review from kbuzzard and urkud April 18, 2025 21:26
refine h.2 (by simpa) (lt_of_le_not_le hcb ?_)
simp [le_update_iff, h₂.not_le]

lemma exists_forall_antisymmRel_of_covBy (h : a ⋖ b) :
Copy link
Copy Markdown
Member

@urkud urkud Apr 24, 2025

Choose a reason for hiding this comment

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

Optional:

Suggested change
lemma exists_forall_antisymmRel_of_covBy (h : a ⋖ b) :
lemma _root_.CovBy.exists_forall_antisymmRel (h : a ⋖ b) :

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agree dot-notation here would be nice, but this loses the Pi mention of the original; which I think needs to be present here, and I don't see how to fit it nicely in the new name. Putting exists_forall_antisymmRel in the CovBy namespace without mentioning pi feels confusing to me

A characterisation of the `WCovBy` relation in products of preorders. See `Pi.wcovBy_iff` for the
(more common) version in products of partial orders.
-/
lemma wcovBy_iff' [Nonempty ι] :
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Optional, not sure if it's better:

Suggested change
lemma wcovBy_iff' [Nonempty ι] :
lemma wcovBy_iff_antisymmRel [Nonempty ι] :

· rintro ⟨i, x, h, rfl⟩
exact ⟨i, by simpa +contextual⟩

lemma wcovBy_iff_exists_left_eq [Nonempty ι] [DecidableEq ι] :
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you get left versions from OrderDual? Or do you consider it to be defeq abuse?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think it is defeq abuse, but more importantly it seems quite a bit more painful to do: there's juggling between the order dual on each of the component types and on the pi type, and commuting the toDual/ofDual with Function.update; overall I don't think it's worth it.

@urkud
Copy link
Copy Markdown
Member

urkud commented Apr 24, 2025

I left some optional naming suggestions (move more theorems to WCovBy/CovBy namespaces). I'm not sure if they're actually better than the names you chose, so feel free to reject them. Thanks!
bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Apr 24, 2025

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

@ghost ghost added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Apr 24, 2025
@b-mehta
Copy link
Copy Markdown
Contributor Author

b-mehta commented Apr 27, 2025

Thanks for the review! I kept one batch of renames.

@b-mehta
Copy link
Copy Markdown
Contributor Author

b-mehta commented May 1, 2025

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label May 1, 2025
mathlib-bors bot pushed a commit that referenced this pull request May 1, 2025
Characterise the covering relation in products of partial orders.
Generalise this characterisation to products of preorders.
Use the characterisation to significantly simplify the characterisation of atoms in products of partial orders.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented May 1, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Order/Cover): characterise covering in Pi types [Merged by Bors] - feat(Order/Cover): characterise covering in Pi types May 1, 2025
@mathlib-bors mathlib-bors bot closed this May 1, 2025
@mathlib-bors mathlib-bors bot deleted the cover-pi branch May 1, 2025 23:14
pfaffelh pushed a commit that referenced this pull request May 2, 2025
Characterise the covering relation in products of partial orders.
Generalise this characterisation to products of preorders.
Use the characterisation to significantly simplify the characterisation of atoms in products of partial orders.
riccardobrasca pushed a commit that referenced this pull request May 7, 2025
Characterise the covering relation in products of partial orders.
Generalise this characterisation to products of preorders.
Use the characterisation to significantly simplify the characterisation of atoms in products of partial orders.
tannerduve pushed a commit that referenced this pull request May 13, 2025
Characterise the covering relation in products of partial orders.
Generalise this characterisation to products of preorders.
Use the characterisation to significantly simplify the characterisation of atoms in products of partial orders.
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.

2 participants