[Merged by Bors] - feat: condition for `Polynomial.coeffs p ⊆ s` #44795
PR summary ddb69a6390
Import changes for modified files
No significant changes to the import graph
<details><summary>Import changes for all files</summary>
|Files|Import difference|
|-|-|
</details>
---
<details><summary>
Declarations diff (regex)
</summary>
+ coe_coeffs_subset_iff+ coeffs_subset_iff
<details>
<summary>You can run this locally as follows</summary>
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>
## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>
</details>
The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.
</details>
<!-- DECLS_DIFF_LEAN_BEGIN -->
Declarations diff (Lean)
✅ Lean-aware diff — post-build, computed from the Lean environment (commit ddb69a6). +2 new declarations
−0 removed declarations
+Polynomial.coe_coeffs_subset_iff
+Polynomial.coeffs_subset_iff
<!-- DECLS_DIFF_LEAN_END -->
---
No changes to strong technical debt.
No changes to weak technical debt.
Current commit ddb69a6390
Reference commit 260040a48c
This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py 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).✅ PR Title Formatted Correctly
The title of this PR has been updated to match our commit style conventions.
Thank you!
<!-- Sticky Pull Request CommentPR Title Check -->
I'd probably write
grind [mem_coeffs_iff]
rather than mixing simp and grind?
This fits on one line?
theorem coeffs_subset_iff {s : Finset R} : p.coeffs ⊆ s ↔ ∀ n, p.coeff n ≠ 0 → p.coeff n ∈ s := by
I'm indenting it like this to match coe_coeffs_subset_iff above, which doesn't fit in one line.
simp [← Finset.subset_empty, coeffs_subset_iff, Polynomial.ext_iff]
Thanks,
maintainer delegate
🚀 Pull request has been placed on the maintainer queue by themathqueen.
bors d+
:v: vihdzp can now approve this pull request until 2026-10-27 18:09 UTC (in 2 weeks). To approve and merge, reply with bors r+. More detailed instructions are available here.
:warning: This delegation only covers changes within Archive/, Counterexamples/, docs/, DownstreamTest/, Mathlib/, MathlibTest/, Wanted/, widget/, Archive.lean, Counterexamples.lean, docs.lean, Mathlib.lean, Wanted.lean; an author commit touching anything else will revoke it. Bors also revokes it if a later push changes too many files for it to check the full list — even if it stays within scope.
bors r+
Pull request successfully merged into master.
Build succeeded:
ci (staging) / Post-CI job
ci (staging) / Lint style
ci (staging) / Build
ci (staging) / Post-Build Step
* ci (staging) / Test and lint
chenson2018
vihdzp
---
<!-- Your PR title will become the first line of the commit message.
In this box, the text above the
---(if not empty) will be appendedto the commit message, and can be used to give additional context or
details. Please leave a blank newline before the
---, otherwise GitHubwill format the text above it as a title.
For details on the "pull request lifecycle" in mathlib, please see:
https://leanprover-community.github.io/contribute/index.html
In particular, note that most reviewers will only notice your PR
if it passes the continuous integration checks.
Please ask for help on https://leanprover.zulipchat.com if needed.
When merging, all the commits will be squashed into a single commit
listing all co-authors.
Co-authors in the squash commit are gathered from two sources:
First, all authors of commits to this PR branch are included. Thus,
one way to add co-authors is to include at least one commit authored by
each co-author among the commits in the pull request. If necessary, you
may create empty commits to indicate co-authorship, using commands like so:
git commit --author="Author Name <author@email.com>" --allow-empty -m "add Author Name as coauthor"
Second, co-authors can also be listed in lines at the very bottom of
the commit message (that is, directly before the
---) using the following format:Co-authored-by: Author Name <author@email.com>
If you are moving or deleting declarations, please include these lines
at the bottom of the commit message (before the
---, and also beforeany "Co-authored-by" lines) using the following format:
Moves:
Deletions:
Any other comments you want to keep out of the PR commit should go
below the
---, and placed outside this HTML comment, or else theywill be invisible to reviewers.
If this PR depends on other PRs, please list them below this comment,
using the following format:
-->