Skip to content

[Merged by Bors] - feat(Combinatorics/SimpleGraph/Walk): add dropLast#16382

Closed
Command-Master wants to merge 10 commits intomasterfrom
CM_wsnd
Closed

[Merged by Bors] - feat(Combinatorics/SimpleGraph/Walk): add dropLast#16382
Command-Master wants to merge 10 commits intomasterfrom
CM_wsnd

Conversation

@Command-Master
Copy link
Copy Markdown
Collaborator

@Command-Master Command-Master commented Sep 1, 2024

@Command-Master Command-Master added RFC Request for comment t-combinatorics Combinatorics labels Sep 1, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 1, 2024

PR summary 2647207846

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ concat_dropLast
+ dropLast
+ dropLast_concat
+ dropLast_cons_cons
+ dropLast_cons_nil
+ dropLast_cons_of_not_nil
+ dropLast_nil
+ getVert_mem_support
+ nil_reverse
+ penultimate_nil
+ take

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

@Command-Master Command-Master added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Sep 1, 2024
@ghost ghost removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Sep 1, 2024
@Command-Master Command-Master added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Sep 1, 2024
@ghost ghost removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Sep 4, 2024
@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Sep 4, 2024
@Command-Master Command-Master changed the title refactor(Combinatorics/SimpleGraph/Walk): change sndOfNotNil and tail to not require a not-nil assumption, and add penultimate and dropLast refactor(Combinatorics/SimpleGraph/Walk): add penultimate and dropLast Sep 6, 2024
@Command-Master Command-Master removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) RFC Request for comment labels Sep 6, 2024
@Command-Master Command-Master changed the title refactor(Combinatorics/SimpleGraph/Walk): add penultimate and dropLast feat(Combinatorics/SimpleGraph/Walk): add penultimate and dropLast Sep 6, 2024
@Command-Master Command-Master added the RFC Request for comment label Sep 6, 2024
@pimotte
Copy link
Copy Markdown
Collaborator

pimotte commented Sep 8, 2024

I don't think I really have quite enough experience to do a full-on review, but I do have a suggestion:

Either reintroduce snd/second (without the notNil), or use p.getVert (p.length - 1) directly to keep the whole thing consistent. I'm tempted to advise the latter, given the direction my PR was taking, but maybe @YaelDillies can weigh in on this?:)

Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

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

Yes indeed I would tend to agree that we don't want penultimate/dropLast for the same reason we got rid of sndOfNeNil.

There is an argument to be made that p appears twice in the body of penultimate/dropLast though...

@Command-Master
Copy link
Copy Markdown
Collaborator Author

dropLast mirrors tail, so I don't see a reason to drop it. Regarding penultimate, I also think it's good, mainly due to p appearing twice in the definition.

@YaelDillies
Copy link
Copy Markdown
Contributor

YaelDillies commented Sep 8, 2024

I would then suggest you reintroduce sndOfNeNil under the name snd (and without the ¬ Nil assumption), for symmetry. Maybe make this PR be about dropLast (which is uncontentious as it mirrors tail) and move penultimate to a second PR depending on this one?

@Command-Master
Copy link
Copy Markdown
Collaborator Author

But I need penultimate for dropLast

@YaelDillies
Copy link
Copy Markdown
Contributor

Then can you make penultimate and snd a preliminary PR to dropLast?

@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 Sep 13, 2024
@Command-Master Command-Master removed the RFC Request for comment label Sep 14, 2024
@leanprover-community-bot-assistant leanprover-community-bot-assistant 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 16, 2024
@leanprover-community-bot-assistant leanprover-community-bot-assistant removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jan 6, 2025
@YaelDillies YaelDillies added the awaiting-author A reviewer has asked the author a question or requested changes. label Jan 6, 2025
@Command-Master Command-Master removed the awaiting-author A reviewer has asked the author a question or requested changes. label Jan 6, 2025
Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

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

Thanks!

maintainer delegate

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 6, 2025

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

@github-actions github-actions bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Jan 6, 2025
Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
@Command-Master
Copy link
Copy Markdown
Collaborator Author

Do I need to do maintainer merge? How does maintainer delegate work?

@YaelDillies
Copy link
Copy Markdown
Contributor

Works the same as maintainer merge, but telling maintainers to delegate

@b-mehta
Copy link
Copy Markdown
Contributor

b-mehta commented Jan 20, 2025

It looks like this one doesn't add penultimate any more, right?

@sgouezel
Copy link
Copy Markdown
Contributor

bors d+
Can you fix the PR title before merging?

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jan 23, 2025

✌️ Command-Master 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 Jan 23, 2025
@YaelDillies YaelDillies changed the title feat(Combinatorics/SimpleGraph/Walk): add penultimate and dropLast feat(Combinatorics/SimpleGraph/Walk): add dropLast Feb 11, 2025
@YaelDillies
Copy link
Copy Markdown
Contributor

Since the name was so trivial to fix, I did it myself.

maintainer merge

@github-actions
Copy link
Copy Markdown

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

@b-mehta
Copy link
Copy Markdown
Contributor

b-mehta commented Feb 11, 2025

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 Feb 11, 2025
mathlib-bors bot pushed a commit that referenced this pull request Feb 11, 2025
Co-authored-by: Daniel Weber <55664973+Command-Master@users.noreply.github.com>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Feb 11, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Combinatorics/SimpleGraph/Walk): add dropLast [Merged by Bors] - feat(Combinatorics/SimpleGraph/Walk): add dropLast Feb 11, 2025
@mathlib-bors mathlib-bors bot closed this Feb 11, 2025
@mathlib-bors mathlib-bors bot deleted the CM_wsnd branch February 11, 2025 21:00
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-combinatorics Combinatorics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants