English
Let R be a commutative semiring, σ a type, M an additive commutative monoid with a semilattice structure and bottom element, and w: σ → M a weight function. For every multivariate polynomial p in the polynomial ring MvPolynomial σ R, the weighted total degree of p with respect to w is defined as the supremum (in M) of the weights weight w s over all monomials s that actually occur in p (i.e., over the support of p).
Русский
Пусть R — коммутативная полусеть, σ — множество индикаторов, M — добавочное коммориальное моноид с полем ⊥, и w: σ → M — весовая функция. Для любого многочлена p в MvPolynomial σ R взвешенная суммарная степень относительно w задаётся как верхняя грань по-мондамие of веса weight w s над всеми мономами s, которые встречаются в p (то есть в поддержке p).
LaTeX
$$$\\operatorname{weightedTotalDegree}(w,p) = \\sup_{s \\in \\operatorname{support}(p)} \\operatorname{weight} w\\; s$$$
Lean4
/-- When `M` has a `⊥` element, we can define the weighted total degree of a multivariate
polynomial as a function taking values in `M`. -/
def weightedTotalDegree (w : σ → M) (p : MvPolynomial σ R) : M :=
p.support.sup fun s => weight w s