{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $P \\subseteq \\R^n$ be a [[lattice polytope|F39N9NBFPZ]] of dimension $d$.\nFor each integer $t \\ge 1$, let\n$$L_P(t) = \\#\\left(tP \\cap \\Z^n\\right), \\qquad tP = \\set{tx : x \\in P},$$\nbe the number of integer points in the dilate $tP$.\nBy Ehrhart's theorem, there is a unique [[polynomial|1G0B73WPX8]] $E_P(t)$ with rational coefficients such that $E_P(t) = L_P(t)$ for all integers $t \\ge 1$.\nThis polynomial $E_P$ is the *Ehrhart polynomial* of $P$.\n\n## Remarks\n\nThe polynomial $E_P$ has degree $d$, and $E_P(0) = 1$.\nIf $d = n$, the leading coefficient of $E_P$ is the volume of $P$.\nIn general the leading coefficient is the volume of $P$ measured inside its affine hull, normalised by the lattice of integer points of that affine hull.\n\nExample: for the unit square $P = [0,1]^2$, the dilate $tP = [0,t]^2$ contains $(t+1)^2$ integer points, so $E_P(t) = t^2 + 2t + 1$.\nFor the triangle with vertices $(0,0)$, $(1,0)$, $(0,1)$, the dilate contains the points $(a,b) \\in \\Z^2$ with $a, b \\ge 0$ and $a + b \\le t$, so $E_P(t) = (t+1)(t+2)/2$.\nIn both cases the leading coefficient is the area, $1$ and $1/2$.\n\nNon-example: the segment $P = [0, 1/2]$ is a rational polytope but not a lattice polytope.\nHere $L_P(t) = \\floor{t/2} + 1$, which is not a polynomial in $t$; it is only a quasi-polynomial of period $2$.\nSo the hypothesis that the vertices are integer points is needed.\n\nThe generating function $\\sum_{t \\ge 0} E_P(t) z^t$ is a rational function of the form $h^*(z)/(1-z)^{d+1}$, where $h^*$ is a polynomial with nonnegative integer coefficients.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "9DEG0WRDHR",
    "kind": "definition",
    "msc": [
      "52B20",
      "11P21",
      "05A15"
    ],
    "name": "Ehrhart polynomial",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Ehrhart_polynomial"
      }
    ],
    "tag": "QGPHXKCNNX",
    "uses": [
      "F39N9NBFPZ",
      "1G0B73WPX8"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/QGPHXKCNNX/",
  "links": [
    {
      "field": "defines",
      "target": "9DEG0WRDHR"
    },
    {
      "field": "uses",
      "target": "F39N9NBFPZ"
    },
    {
      "field": "uses",
      "target": "1G0B73WPX8"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/QGPHXKCNNX.md",
  "msc": [
    "52B20",
    "11P21",
    "05A15"
  ],
  "name": "Ehrhart polynomial",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/QGP/QGPHXKCNNX.md",
  "status": null,
  "tag": "QGPHXKCNNX",
  "uri": "m2://QGPHXKCNNX",
  "url": "https://tamnd.github.io/math2/wiki/ehrhart-polynomial-definition/",
  "writing": {
    "tag": "QGPHXKCNNX",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
