Skip to content

[Merged by Bors] - chore: further backports for leanprover/lean4#6397#20098

Closed
kim-em wants to merge 4 commits intomasterfrom
6397_backports2
Closed

[Merged by Bors] - chore: further backports for leanprover/lean4#6397#20098
kim-em wants to merge 4 commits intomasterfrom
6397_backports2

Conversation

@kim-em
Copy link
Copy Markdown
Contributor

@kim-em kim-em commented Dec 20, 2024

No description provided.

@kim-em kim-em added the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Dec 20, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 20, 2024

PR summary 2b7a00e3bf

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ countP_apply
+ empty_def

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 removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Dec 20, 2024

theorem countP_of (x : α) : countP p (of x) = if p x = true then 1 else 0 := by
simp [countP, List.countP, List.countP.go]
change List.countP p [x] = _
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.

Should we have a simp(?) lemma that brings the LHS in this form?

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.

No, I don't think we should, unless someone actually adds the explicit conversion from FreeMonoid to List. As is, it is 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.

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.

Aah, thanks for that pointer to zulip.
In that case, I suggest we also leave a comment at the top of the file with the same comments as (or a pointer to) that zulip thread.

theorem count_of [DecidableEq α] (x y : α) : count x (of y) = (Pi.single x 1 : α → ℕ) y := by
simp [Pi.single, Function.update, count, countP, List.countP, List.countP.go,
Bool.beq_eq_decide_eq]
change List.count x [y] = _
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.

That lemma would then also apply here, I suppose.

@jcommelin
Copy link
Copy Markdown
Member

bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Dec 20, 2024

✌️ kim-em 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 Dec 20, 2024
@jcommelin
Copy link
Copy Markdown
Member

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Dec 20, 2024
mathlib-bors bot pushed a commit that referenced this pull request Dec 20, 2024
Co-authored-by: Johan Commelin <johan@commelin.net>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Dec 20, 2024

Build failed (retrying...):

mathlib-bors bot pushed a commit that referenced this pull request Dec 20, 2024
Co-authored-by: Johan Commelin <johan@commelin.net>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Dec 20, 2024

Build failed (retrying...):

mathlib-bors bot pushed a commit that referenced this pull request Dec 20, 2024
Co-authored-by: Johan Commelin <johan@commelin.net>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Dec 20, 2024

Build failed:

@kim-em
Copy link
Copy Markdown
Contributor Author

kim-em commented Dec 20, 2024

bors merge

mathlib-bors bot pushed a commit that referenced this pull request Dec 20, 2024
Co-authored-by: Johan Commelin <johan@commelin.net>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Dec 20, 2024

Build failed (retrying...):

mathlib-bors bot pushed a commit that referenced this pull request Dec 20, 2024
Co-authored-by: Johan Commelin <johan@commelin.net>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Dec 20, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore: further backports for leanprover/lean4#6397 [Merged by Bors] - chore: further backports for leanprover/lean4#6397 Dec 20, 2024
@mathlib-bors mathlib-bors bot closed this Dec 20, 2024
@mathlib-bors mathlib-bors bot deleted the 6397_backports2 branch December 20, 2024 07:33
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants