---
title: Weighted Ehrhart Functions
url: https://www.emergentmind.com/topics/weighted-ehrhart-functions
type: topic
---

# Weighted Ehrhart Functions

Weighted Ehrhart functions are weighted lattice-point enumerators attached to dilates of polytopes. In the basic polynomial-weighted form, for a rational convex polytope \(P \subset \mathbb{R}^d\) and a polynomial weight \(w\), one considers
\[
\mathrm{E}_{P,w}(k)=\sum_{m\in kP\cap \mathbb{Z}^d} w(m).
\]
The subject now includes polynomial weights, monomial \(q\)-weights of the form \(q^{\lambda(x)}\), Laurent-polynomial weights assigned to faces, equivariant and group-ring-valued refinements, and weights that are themselves Ehrhart quasi-polynomials of auxiliary parametric polytopes. Across these variants, the central problems are rationality of generating series, polynomial or quasi-polynomial dependence on the dilation parameter, reciprocity, positivity and monotonicity of weighted \(h^*\)-polynomials, and geometric realizations via toric varieties, mixed Hodge modules, and Euler–Maclaurin type formulas [2303.09614; 2403.17747; 2511.10373].

## 1. Core definitions and main formalisms

The classical starting point is the Ehrhart function of a rational convex polytope \(P\),
\[
\mathrm{E}_P(k)=\#(kP\cap \mathbb{Z}^d),
\]
together with its generating series. Weighted Ehrhart theory replaces the constant weight \(1\) by a nontrivial weight. In the polynomial setting, the weighted Ehrhart function is
\[
\mathrm{E}_{P,w}(k)=\sum_{m\in kP\cap \mathbb{Z}^d} w(m),
\]
where \(w\) is a polynomial. For lattice polytopes and polynomial weights, this produces a polynomial in the dilation parameter; for rational polytopes, it produces a quasi-polynomial. The associated numerator \(h^*_{P,w}(t)\) in the rational generating series is the weighted \(h^*\)-polynomial [2303.09614; 2509.00519].

In practice, the literature uses several related but distinct weighted models.

| Framework | Weight data | Representative object |
|---|---|---|
| Polynomial weights | \(w:\mathbb{R}^d\to\mathbb{R}\) polynomial | \(\mathrm{E}_{P,w}(k)=\sum_{m\in kP\cap\mathbb{Z}^d} w(m)\) |
| \(q\)-weights | \(\lambda\in M^*\), weight \(q^{\lambda(x)}\) | \(W_\lambda(nQ,q)=\sum_{x\in nQ\cap M} q^{\lambda(x)}\) |
| Face-weighted theory | \(f=\{f_Q(y)\}_{Q\le P}\), \(f_Q(y)\in \mathbb{Z}[y,y^{-1}]\) | \(E_{P,f}(\ell,y)=\sum_{Q\le P} f_Q(y)(1+y)^{\dim Q}|\operatorname{Relint}(\ell Q)\cap M|\) |
| Group-ring-valued theory | \(\varphi:\mathbb{Z}^d\to G\) | \(\ehr(P,\varphi;n)=\sum_{\alpha\in nP\cap\mathbb{Z}^d}\varphi(\alpha)\in R[G]\) |

The face-weighted formalism is designed to encode geometric data attached to torus orbits of the toric variety \(X_P\). In its generalized form, one also inserts a homogeneous polynomial \(\varphi\) and studies
\[
E_{P,f}(\ell,y)=\sum_{Q\preceq P} f_Q(y)\,(1+y)^{\dim(Q)+\deg(\varphi)} \sum_{m\in \operatorname{Relint}(\ell Q)\cap M} \varphi(m),
\]
so the lattice-point sum is refined simultaneously by face strata and by a polynomial weight on the lattice points themselves [2405.02900].

The \(q\)-analogue introduced by Chapoton assigns to each lattice point \(x\) the monomial \(q^{\lambda(x)}\), where \(\lambda\) is a fixed integral linear form. The resulting weighted sum
\[
W_\lambda(nQ,q)=\sum_{x\in nQ\cap M} q^{\lambda(x)}
\]
specializes to the ordinary Ehrhart function at \(q=1\) and gives a genuine \(q\)-analogue of Ehrhart theory [1301.1844].

The most expansive unification in the data is the group-ring formalism. For an Abelian group \(G\) and homomorphism \(\varphi:\mathbb{Z}^d\to G\), one defines
\[
\ehr(P,\varphi;n)=\sum_{\alpha\in nP\cap\mathbb{Z}^d}\varphi(\alpha)\in R[G].
\]
This framework contains polynomial-weighted, \(q\)-weighted, and equivariant Ehrhart theories as special cases [2511.10373].

## 2. Rationality, quasi-polynomiality, and reciprocity

For polynomial weights on rational polytopes, the basic structural theorem asserts that if \(P\) has dimension \(r\), denominator \(q\), and \(w\) has degree \(m\), then
\[
\Ehr(P,w;t)=\sum_{n\ge 0}\ehr(nP,w)\,t^n=\frac{h^*_{P,w}(t)}{(1-t^q)^{r+m+1}},
\]
where \(h^*_{P,w}(t)\) is a polynomial of degree at most \(q(r+m+1)-1\). Consequently, \(\ehr(nP,w)\) is a quasi-polynomial of degree \(r+m\). Its leading coefficient is \(\int_P w(x)\,dx\), which ties weighted Ehrhart theory directly to integration over polytopes [2303.09614].

For lattice polytopes and homogeneous polynomial weights of degree \(m\), one obtains a polynomial rather than a quasi-polynomial. The weighted Ehrhart series has denominator \((1-z)^{d+m+1}\), and the weighted \(h^*\)-polynomial is defined by
\[
Ehr_{P,w}(z)=\frac{h_{P,w}^*(z)}{(1-z)^{d+m+1}}.
\]
The passage from the weighted Ehrhart polynomial to the weighted \(h^*\)-polynomial can be written explicitly using Eulerian polynomials \(A_i(z)\):
\[
h_{P,w}^*(z)=\sum_{i=0}^{d+m} c_i\,A_i(z)\,(1-z)^{d+m-i}
\]
when \(ehr_{P,w}(t)=c_{d+m}t^{d+m}+\cdots+c_0\) [2511.09744].

In Chapoton’s \(q\)-theory, the generating series
\[
Ehr_{Q,\lambda}(t,q)=\sum_{n\ge 0}W_\lambda(nQ,q)\,t^n
\]
is rational, with denominator a product of factors \(1-q^j t\) determined by the values of \(\lambda\) on vertices. More strongly, there exists a polynomial \(L_{Q,\lambda}(x)\in \mathbb{Q}(q)[x]\) such that
\[
L_{Q,\lambda}([n]_q)=W_\lambda(nQ,q),
\qquad [n]_q=\frac{q^n-1}{q-1}.
\]
This polynomial satisfies a \(q\)-analogue of Ehrhart reciprocity:
\[
L_{Q,\lambda}([-n]_q)=(-1)^d\,W_\lambda(\operatorname{Int}(nQ),1/q)
\]
for every integer \(n>0\) [1301.1844].

In the face-weighted Hodge-theoretic setting, reciprocity and purity are encoded cohomologically. For
\[
E_{P,f}(\ell,y)=\sum_{Q\le P} f_Q(y)\,(1+y)^{\dim Q}\,|\operatorname{Relint}(\ell Q)\cap M|,
\]
one has the generalized reciprocity formula
\[
E_{P,f}(-\ell,y)=\sum_{Q\le P} f_Q(y)\,(-1-y)^{\dim Q}\,|\overset{\circ}{Q}\cap M|,
\]
and in the intersection cohomology case a purity relation
\[
E_{P,f}(-\ell,y)=(-y)^n\,E_{P,f}(\ell,1/y),
\]
which is a weighted analogue of Dehn–Sommerville symmetry [2403.17747].

A different but related unification packages the weighted lattice sums
\[
D_{\varphi,F}(q)=\sum_{m\in M\cap qF}\varphi(m)
\]
for all faces \(F\) into a polynomial \(G_\varphi(q,y)\). The resulting functional equation
\[
G_\varphi(q,y)=(-y)^{n+\deg\varphi}\,G_\varphi(-q,1/y)
\]
simultaneously generalizes weighted Ehrhart–Macdonald reciprocity and the Dehn–Sommerville relations [1805.01504].

## 3. Positivity, monotonicity, and sharp counterexamples

A central question is whether positivity phenomena from classical Ehrhart theory survive after weights are introduced. They do not do so automatically. Even if a polynomial weight is nonnegative on all dilates, the coefficients of the weighted \(h^*\)-polynomial can be negative. The basic one-dimensional example
\[
\Ehr([0,1],1+x^2;t)=\frac{2t^2-t+1}{(1-t)^4}
\]
already shows a negative numerator coefficient [2303.09614].

The strongest general results currently in the data are formulated through two semirings of weights attached to \(P\). If \(C(P)^*\) denotes the cone of linear functionals nonnegative on the homogenized cone \(C(P)\), then \(R_P\) consists of finite sums of monomials in generators of \(C(P)^*\) with positive coefficients, while \(S_P\) enlarges this to sums of nonnegative products of linear forms, allowing squares of products and even powers. For homogeneous \(w\in R_P\), the weighted \(h^*\)-polynomial has nonnegative coefficients. For homogeneous \(w\in S_P\), coefficientwise nonnegativity can fail, but one still has
\[
h_{P,w}^*(t)\ge 0 \qquad \text{for all } t\ge 0.
\]
These statements extend Stanley’s nonnegativity theorem, and there are parallel monotonicity theorems under containment: coefficientwise monotonicity for \(w\in R_Q\), and functionwise monotonicity on \([0,\infty)\) for \(w\in S_Q\) when dimensions agree [2303.09614].

The special case \(w(x)=\ell(x)^2\) is particularly delicate. In dimension \(2\), if \(P\subset \mathbb{R}^2\) is a convex lattice polygon and \(\ell\) is any linear form, then
\[
h^*_{P,\ell^2}(t)\in \mathbb{R}_{\ge 0}[t].
\]
This remains true even when \(\ell\) changes sign on \(P\). The proof uses triangulations into half-open lattice triangles and a geometric analysis of when a half-open simplex can contribute a negative coefficient. The result is sharp in multiple directions: it fails for squares of degree-two polynomials, for non-convex polygons, for rational polygons of denominator \(q\ge 6\), and in higher dimensions. A 20-dimensional lattice simplex gives a negative coefficient for the weight \(w=\ell^2\) [2303.09614].

This last example has an immediate tensor-theoretic consequence. Weighted Ehrhart polynomials with weights \(w(x)=\ell_1(x)\cdots \ell_r(x)\) are evaluations of Ehrhart tensor polynomials, and for \(r=2\) the positivity of all coefficients of \(h^*_{P,\ell^2}(t)\) is equivalent to positive semidefiniteness of the coefficients of the \(h^2\)-tensor polynomial. The 20-dimensional example therefore disproves Conjecture 6.1 of Berg, Jochemko, and Silverstein, while the polygon theorem reproves their two-dimensional positive semidefiniteness result [2303.09614].

A common misconception is that nonnegative weights should force nonnegative weighted \(h^*\)-coefficients. The existing counterexamples show that the correct positivity regime depends on the algebraic form of the weight, the denominator of the polytope, convexity, and dimension, not merely on pointwise nonnegativity.

## 4. Toric, Hodge-theoretic, and equivariant interpretations

Weighted Ehrhart theory admits a toric interpretation when \(P\) is a full-dimensional lattice polytope. The inner normal fan \(\Sigma_P\) defines a projective toric variety \(X_P\) with ample Cartier divisor \(D_P\), and faces \(Q\le P\) correspond to torus orbits \(O_\sigma\subset X_P\). For a mixed Hodge module complex \(\mathcal{M}\) on \(X_P\) whose underlying constructible sheaves are constant on the torus-orbit stratification, the local Hodge data
\[
f_Q(y):=\chi_y(i_{x_0}^*[\mathcal M])\in \mathbb{Z}[y,y^{-1}]
\]
define precisely the weights entering the combinatorial weighted Ehrhart polynomial [2403.17747].

The central formula in this setting is
\[
\chi_y(X_P,\ell D_P;\mathcal M)
=
\sum_{Q\le P}
\chi_y(i_{x_0}^*[\mathcal M])\,
(1+y)^{\dim Q}\,
|\operatorname{Relint}(\ell Q)\cap M|,
\]
so the weighted Ehrhart polynomial is a Hodge-theoretic \(\chi_y\)-polynomial of the divisor \(\ell D_P\) with coefficients in \(\mathcal M\). Duality for mixed Hodge modules yields a cohomological reciprocity theorem, and in the pure self-dual case one gets the purity relation
\[
E_{P,\mathcal M}(-\ell,y)=(-y)^n\,E_{P,\mathcal M}(\ell,1/y)
\]
[2403.17747].

The intersection cohomology specialization is especially canonical. When \(0\) lies in the interior of \(P\), the local Hodge \(\chi_y\)-polynomial of the intersection cohomology stalk on the orbit corresponding to \(Q\) is Stanley’s \(g\)-polynomial of the dual face of the polar polytope:
\[
\chi_y(IC_X^H|_{x_0})=g_{Q^\circ}(-y).
\]
Hence the face weights become \(f_Q(y)=g_Q(-y)\), and the resulting weighted Ehrhart polynomial gives a combinatorial formula for \(\chi_y(X_P;IC_X^H)\). At \(y=1\), one obtains the intersection cohomology signature
\[
\mathrm{sign}(X_P)=\sum_{Q\le P} g_Q(-1)\,(-2)^{\dim Q}
\]
[2403.17747].

An equivariant refinement inserts a homogeneous polynomial \(\varphi\) on \(M_\mathbb{R}\) and studies
\[
E_{P,f}(\ell,y)=\sum_{Q\preceq P} f_Q(y)\,(1+y)^{\dim(Q)+\deg(\varphi)} \sum_{m\in \operatorname{Relint}(\ell Q)\cap M}\varphi(m).
\]
Equivariant \(K\)-theoretic Hodge-Chern classes of \(T\)-equivariant mixed Hodge modules on \(X_P\) produce these weighted sums, and the same duality formalism yields reciprocity and purity formulas compatible with the homogeneous weight \(\varphi\). In the equivariant intersection cohomology case, this recovers in geometric terms the generalized weighted Ehrhart reciprocity theorem of Beck–Gunnells–Materov [2405.02900].

These geometric constructions show that weighted Ehrhart functions are not merely ad hoc deformations of counting functions. In the toric setting, the weights often arise as local Hodge-theoretic invariants of orbit strata, and reciprocity reflects Verdier duality rather than only an inclusion–exclusion identity.

## 5. Parametric, algorithmic, and computational developments

For rational simple polytopes with polynomial weights, the highest coefficients of the weighted Ehrhart quasi-polynomial can be computed efficiently by a local refinement of Barvinok’s method. In the model case
\[
E(P,\xi,M;n)=\sum_{x\in nP\cap A}\frac{\langle \xi,x\rangle^M}{M!},
\]
the top coefficients are extracted from low-degree homogeneous pieces of cone generating functions at the vertices. The output is given in closed form as step polynomials of the dilation parameter, and the algorithm computes, for fixed \(k_0\), the top \(k_0+1\) coefficients in polynomial time in the dimension, number of vertices, and encoding lengths [1011.1602].

A complementary parametric theory considers semi-rational polytopes
\[
(\alpha,b)=\{x\in V:\langle \alpha_j,x\rangle\le b_j,\ j=1,\dots,N\}
\]
with multi-parameter \(b\in \mathbb{R}^N\), together with intermediate sums
\[
S^L(P(b),h)=\sum_y\int_{P(b)\cap (y+L)} h(x)\,dx.
\]
On every chamber in parameter space where the combinatorial type is fixed, \(S^L(P(b),h)\) is a quasi-polynomial in \(b\). The paper introduces both Barvinok’s patched quasi-polynomial and the cone-by-cone patched quasi-polynomial, and proves that each agrees with the discrete weighted sum in the \(k+1\) highest polynomial degrees [1410.8632].

The 2024 paper on sums of weighted lattice points of polytopes pushes the notion of weight much further: the weight itself may be an Ehrhart quasi-polynomial of a family of parametric polytopes. If
\[
w(\mathbf{x})=\left|Q(x_1,\dots,x_n)\cap \mathbb{Z}^m\right|,
\]
then there exists a weight lifting polytope \(P^*\) such that
\[
\sum_{\mathbf{x}\in P\cap \mathbb{Z}^n} w(\mathbf{x})
=
|P^*\cap \mathbb{Z}^{n+m}|.
\]
When the auxiliary family is homogeneous in the dilation parameter, the weighted Ehrhart quasi-polynomial of \((P,w)\) becomes the ordinary Ehrhart quasi-polynomial of \(P^*\). This transforms weighted sums into unweighted sums and yields applications to integration, maxima of quasi-polynomial weights, and new identities in representation theory and number theory [2402.11328].

For lattice polytopes with polynomial weights, an interpolation-based algorithm computes weighted Ehrhart functions by evaluating
\[
E_{\mathcal P}^w(n)=\sum_{\alpha\in n\mathcal P\cap \mathbb{Z}^s} w(\alpha)
\]
for \(n=0,\dots,d+p\) and reconstructing the polynomial by Lagrange interpolation. The same work shows how to compute generating functions of polynomials using those of unit cubes and Eulerian numbers, studies the Ehrhart ring of the \(d\)-th unit cube, and introduces weighted Ehrhart rings for linear weight maps [2509.00519].

For smooth integral polytopes deformed by varying the right-hand sides of fixed facet normals, the coefficients of weighted Ehrhart and weighted \(h^*\)-polynomials are piecewise polynomial in the parameter vector \(\mathbf{b}\). A weighted Euler–Maclaurin type formula due to Khovanskiĭ and Pukhlikov yields an algorithm and a SageMath implementation for smooth polytopes, including type \(A\) alcoved polytopes. For fixed dimension \(d\), number of facets \(n\), and monomial weight of degree \(m\), the runtime is
\[
O\!\left(n^{d^2/4}\cdot 2^m \cdot \binom{d+m}{d}\cdot (d+m)\right),
\]
and the implementation is explicitly designed to output the parametric weighted count polynomial on a type cone [2511.09744].

## 6. Extensions, applications, and unifying viewpoints

Weighted Ehrhart functions now serve as a common language across several areas. In type \(A\) and type \(B\) Coxeter combinatorics, weighted Ehrhart series of products of simplices and cross polytopes realize generating polynomials for joint distributions of major index and descents. For a composition \(\eta\), the formulas
\[
\frac{C_{S_\eta}(q,t)}{\prod_{i=0}^n (1-q^i t)}
=
\Ehr_{\Delta_\eta,\boldsymbol{\mu}_\eta}(q,t)
\]
and
\[
\frac{C_{B_\eta}(q,t)}{\prod_{i=0}^n (1-q^i t)}
=
\Ehr_{C_\eta,\bar{\boldsymbol{\mu}}_\eta}(q,t)
\]
identify generalized Eulerian polynomials as numerators of weighted Ehrhart series. Geometric properties of the associated polytopes, such as Gorenstein or reflexive behavior, then explain palindromicity and unimodality phenomena [2203.15774].

The group-ring formalism gives a broad conceptual unification. For \(\varphi:\mathbb{Z}^d\to G\), the group-ring-valued series
\[
\mathcal{E}(P,\varphi;t)=\sum_{n\ge 0}\ehr(P,\varphi;n)\,t^n
\]
simultaneously covers classical counting, \(q\)-weights, polynomial weights through auxiliary constructions, and equivariant refinements. Rationality, Brion-type formulas, and reciprocity survive in this enriched setting, and the framework accommodates coset counting and representation-valued coefficients [2511.10373].

Applications recorded in the data include Ehrhart tensor polynomials, intersection cohomology signatures, weighted formulas for representation-theoretic multiplicities, sums over simultaneous core partitions, and weighted counts on numerical semigroups [2303.09614; 2402.11328]. A plausible implication is that the most robust future developments will continue to come from settings where the weight is itself geometric—arising from toric, Hodge-theoretic, tensorial, or representation-theoretic structures—because those are the cases in which reciprocity, purity, and computability are currently best understood.

At the same time, the subject retains sharp boundaries. Coefficientwise positivity of weighted \(h^*\)-polynomials is exceptional rather than generic; sign patterns can be arbitrarily complicated in parametric families; and even when coefficients eventually stabilize under large dilations, small-dimensional examples already exhibit non-convex positivity regions and dimension-sensitive failures [2303.09614; 2511.09744]. Weighted Ehrhart functions therefore occupy a distinctive position in modern discrete geometry: they generalize classical Ehrhart theory, preserve much of its algebraic and geometric structure, and yet expose precisely where that structure breaks.

Source: https://www.emergentmind.com/topics/weighted-ehrhart-functions