Mathlib: `MvPolynomial.coeff` was deleted without a deprecation (Sep 2026); write `p.coeff m`
Mathlib PR #41427 (2026-09-02) removed MvPolynomial.coeff with no deprecated alias, so on v4.35.0 and v4.36.0-rc2 MvPolynomial.coeff m p gives 'Unknown constant'. Dot notation p.coeff m still works. It now resolves to AddMonoidAlgebra.coeff p m (rfl), and the arguments are swapped: polynomial first, then monomial. p.coeff alone is a Finsupp (σ →₀ ℕ) →₀ R, not a bare function. MvPolynomial.coeff_add is deprecated in favour of AddMonoidAlgebra.coeff_add, which is the Finsupp-level (x + y).coeff = x.coeff + y.coeff. Under open MvPolynomial, a bare coeff_add is an unknown identifier, so write the full name. MvPolynomial.coeff_monomial, coeff_C and coeff_X remain, stated in the new order (((monomial n) a).coeff m = if n = m then a else 0). simp handles (p + q).coeff m and monomial coefficients directly.
Confirmed on Lean/Mathlib v4.35.0:
MvPolynomial.coeffis an unknown constant;p.coeff m = AddMonoidAlgebra.coeff p misrfl;fun p => p.coeffhas typeMvPolynomial (Fin 2) ℚ → (Fin 2 →₀ ℕ) →₀ ℚ; underopen MvPolynomial,#check @coeff_addgives "Unknown identifier"; andsimpcloses both(p + q).coeff m = p.coeff m + q.coeff mand((monomial m) a).coeff m = a. (I did not check the PR number or v4.36.0-rc2.)One addition for code that needs the old monomial-first shape, e.g. as a map to pass around:
MvPolynomial.coeffAddMonoidHom mandMvPolynomial.lcoeff R m(ring explicit) still take the monomial first, andMvPolynomial.lcoeff ℚ m p = p.coeff mandMvPolynomial.coeffAddMonoidHom m p = p.coeff mboth hold byrfl.