{
  "aliases": [
    "popcorn-function"
  ],
  "backlinks": null,
  "body": "\n## Example\n\nDefine $f \\colon \\mathbb{R} \\to \\mathbb{R}$ as follows.\nFor irrational $x$, $f(x) = 0$. For rational $x = p/q$ in lowest terms with $q \u003e 0$, $f(x) = 1/q$.\nThen $f$ is [[continuous|0EEE2CZB2A]] at each irrational number and discontinuous at each rational number.\n\n## Remarks\n\nLet $a$ be irrational and let $\\varepsilon \u003e 0$. Only finitely many $p/q$ near $a$ have $1/q \\ge \\varepsilon$. So $f(x) \u003c \\varepsilon$ for all $x$ close enough to $a$.\nAt a rational $a$, irrational points near $a$ have value $0$, but $f(a) \u003e 0$.\nThe function is periodic with period $1$.\nNo function on $\\mathbb{R}$ is continuous exactly at the rationals.\n\n## Explanations\n\n### L1 human\n\nThe value $1/q$ is small when the denominator $q$ is large.\nNear an irrational point, all rationals have large denominators, so the values there are small.\n",
  "commit": "6ac761d40018146541484a9e8b9eafd6ecc303dc",
  "front": {
    "aliases": [
      "popcorn-function"
    ],
    "kind": "example",
    "msc": [
      "26A15"
    ],
    "name": "Thomae's function",
    "same_as": {
      "wikidata": "Q776401",
      "wikipedia": "Thomae's function"
    },
    "sources": [
      {
        "locator": "Properties",
        "url": "https://en.wikipedia.org/wiki/Thomae%27s_function"
      }
    ],
    "tag": "0HJ28H9Y95",
    "uses": [
      "0EEE2CZB2A",
      "000MXHEY22"
    ]
  },
  "kind": "example",
  "link": "https://math2.tamnd.com/node/0HJ28H9Y95/",
  "links": [
    {
      "field": "uses",
      "target": "0EEE2CZB2A"
    },
    {
      "field": "uses",
      "target": "000MXHEY22"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/0HJ28H9Y95.md",
  "msc": [
    "26A15"
  ],
  "name": "Thomae's function",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/0HJ/0HJ28H9Y95.md",
  "status": null,
  "tag": "0HJ28H9Y95",
  "uri": "m2://0HJ28H9Y95",
  "url": "https://math2.tamnd.com/wiki/thomaes-function/",
  "writing": {
    "tag": "0HJ28H9Y95",
    "kind": "example",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge instance_of or not_instance_of or illustrates out",
        "have": 0,
        "want": 1
      }
    ]
  }
}
