Skip to content

[Merged by Bors] - chore: rename fields of LinearOrder#23976

Closed
plp127 wants to merge 20 commits intomasterfrom
aliu/linearorder
Closed

[Merged by Bors] - chore: rename fields of LinearOrder#23976
plp127 wants to merge 20 commits intomasterfrom
aliu/linearorder

Conversation

@plp127
Copy link
Copy Markdown
Contributor

@plp127 plp127 commented Apr 12, 2025

Renames LinearOrder.decidable** -> LinearOrder.toDecidable**, and same for ConditionallyCompleteLinearOrder and CompleteLinearOrder

See zulip message #mathlib4 > extending `RCLike` and `LinearOrder` @ 💬

Also fixes lots of potential diamonds caused by not specifying the decidableEq or decidableLT fields when creating an instance.


Open in Gitpod

@plp127 plp127 added the t-order Order theory label Apr 12, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 12, 2025

PR summary e913090b65

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ instance [DecidableLE α] [DecidableLT α] [DecidableEq α] (s : Flag α) : LinearOrder s
- instance [DecidableLE α] [DecidableLT α] (s : Flag α) : LinearOrder s

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

@grunweg
Copy link
Copy Markdown
Contributor

grunweg commented Apr 12, 2025

Can you fix the build, please? Then I'll review this quickly :-)

One question I already have: should there be deprecations for the changed field names? (I guess the answer is no, but I am not sure.)

@plp127 plp127 added the WIP Work in progress label Apr 12, 2025
@eric-wieser
Copy link
Copy Markdown
Member

should there be deprecations for the changed field names?

It is not possible to deprecate argument names for the constructor; as for the projections, they are instances so are exempted from our deprecation rules.

@plp127 plp127 added awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. and removed WIP Work in progress labels Apr 13, 2025
@github-actions github-actions bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Apr 13, 2025
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Apr 13, 2025
Copy link
Copy Markdown
Contributor

@grunweg grunweg left a comment

Choose a reason for hiding this comment

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

Thanks for doing this. The diff looks straightforward - except for five places where I have tiny questions.

le_total := Zsqrtd.le_total
decidableLE := Zsqrtd.decidableLE }
toDecidableLE := Zsqrtd.decidableLE
toDecidableEq := inferInstance }
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.

Just to clarify: toDecidableLT is intentionally not specified?

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 saw that toDecidableEq was not specified when we had a DecidableEq lying around, but could not find a DecidableLT so I didn't specify it. I guess you could say it was intentional. Should I mark this any way in the code?

hb (top_unique (le_trans (top_le_iff.mpr (Or.resolve_left
(eq_bot_or_eq_top a) ha)) H)) }
(eq_bot_or_eq_top a) ha)) H))
toDecidableEq := ‹_› }
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.

Just to make sure: you're intentionally not including toDecidableLT here?

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.

(same as above)

@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Apr 13, 2025
Co-authored-by: grunweg <rothgami@math.hu-berlin.de>
@grunweg
Copy link
Copy Markdown
Contributor

grunweg commented Apr 14, 2025

This looks basically good to go. I have tiny questions about small places, where another pair of eyes would be useful --- if only to say "this is fine" or "add a comment, please". So:
maintainer merge?

@github-actions
Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by grunweg.

@github-actions github-actions bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Apr 14, 2025
@eric-wieser
Copy link
Copy Markdown
Member

As a reminder for other reviewers, there's a request for a split in #23976 (comment)

@eric-wieser eric-wieser added the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 14, 2025
@plp127 plp127 removed the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 14, 2025
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Apr 14, 2025
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Apr 14, 2025
@mathlib4-dependent-issues-bot
Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

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

maintainer merge

Since I suggested this on Zulip, someone else should decide to merge.
This all looks good now, thanks!

@github-actions
Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by eric-wieser.

@jcommelin
Copy link
Copy Markdown
Member

Thanks 🎉

bors merge

@ghost ghost added ready-to-merge This PR has been sent to bors. and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Apr 15, 2025
mathlib-bors bot pushed a commit that referenced this pull request Apr 15, 2025
Renames `LinearOrder.decidable**` -> `LinearOrder.toDecidable**`, and same for `ConditionallyCompleteLinearOrder` and `CompleteLinearOrder`

See zulip message [#mathlib4 > extending &#96;RCLike&#96; and &#96;LinearOrder&#96; @ 💬](https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/extending.20.60RCLike.60.20and.20.60LinearOrder.60/near/511047785)

Also fixes lots of potential diamonds caused by not specifying the `decidableEq` or `decidableLT` fields when creating an instance.



Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Apr 15, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore: rename fields of LinearOrder [Merged by Bors] - chore: rename fields of LinearOrder Apr 15, 2025
@mathlib-bors mathlib-bors bot closed this Apr 15, 2025
@mathlib-bors mathlib-bors bot deleted the aliu/linearorder branch April 15, 2025 06:05
tannerduve pushed a commit that referenced this pull request May 13, 2025
Renames `LinearOrder.decidable**` -> `LinearOrder.toDecidable**`, and same for `ConditionallyCompleteLinearOrder` and `CompleteLinearOrder`

See zulip message [#mathlib4 > extending &#96;RCLike&#96; and &#96;LinearOrder&#96; @ 💬](https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/extending.20.60RCLike.60.20and.20.60LinearOrder.60/near/511047785)

Also fixes lots of potential diamonds caused by not specifying the `decidableEq` or `decidableLT` fields when creating an instance.



Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

5 participants