#46993 feat(Algebra/MvPolynomial): degree of Polynomial.toMvPolynomial
PR description
AI usage: I used Claude Code to generate about 50% of the proof
Conversation on GitHub 2
LLM-generated
PR summary f7b1152ae6
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>
+ Polynomial.degreeOf_toMvPolynomial
+ Polynomial.degreeOf_toMvPolynomial_of_ne
+ Polynomial.degrees_toMvPolynomial
+ Polynomial.toMvPolynomial_eq_rename_optionEquivLeft_symm
+ Polynomial.totalDegree_toMvPolynomial
+ degree_mapEquiv
+ natDegree_mapEquiv
<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 undefined repository contains some details about this script.
</details>
Declarations diff (Lean)
✅ Lean-aware diff — post-build, computed from the Lean environment (commit
f7b1152).
- +7 new declarations
- −0 removed declarations
+Polynomial.degreeOf_toMvPolynomial
+Polynomial.degreeOf_toMvPolynomial_of_ne
+Polynomial.degree_mapEquiv
+Polynomial.degrees_toMvPolynomial
+Polynomial.natDegree_mapEquiv
+Polynomial.toMvPolynomial_eq_rename_optionEquivLeft_symm
+Polynomial.totalDegree_toMvPolynomial
No changes to strong technical debt. No changes to weak technical debt.
Current commit f7b1152ae6 Reference commit c2eaf80729
This script lives in the undefined 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
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
Mathlib/Algebra/MvPolynomial/Equiv.lean +38 −0
lemma Polynomial.toMvPolynomial_inj {i : σ} {p q : R[X]} :Mathlib/Algebra/Polynomial/Eval/Degree.lean +7 −0
lemma degree_map_le : degree (p.map f) ≤ degree p := by