{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Summary\n\nIn the field of type theory in computer science, a **quotient type** is a data type that respects a user-defined equality relation. A quotient type defines an [[equivalence relation|0G8VEZ3WTK]] $\\equiv$ on elements of the type — for example, we might say that two values of the type `Point` are equivalent if they have the same respective x- and y-coordinates; formally `p1 == p2` if `p1.x == p2.x \u0026\u0026 p1.y == p2.y`. In type theories that allow quotient types, an additional requirement is made that all operations must respect the equivalence between elements. For example, if `f` is a function on values of type `Point`, it must be the case that for two `Point`s `p1` and `p2`, if `p1 == p2` then `f(p1) == f(p2)`.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "inventory": [
      "31A6BAMCZB"
    ],
    "kind": "concept",
    "name": "Quotient type",
    "same_as": {
      "wikidata": "Q17045118",
      "wikipedia": "Quotient type"
    },
    "sources": [
      {
        "locator": "Quotient type",
        "mention": "wikipedia://en/42011185",
        "note": "adopted",
        "sections": [
          "Summary"
        ],
        "wikipedia": "en:42011185@r1316023810"
      }
    ],
    "tag": "AVRG7XE2QR"
  },
  "kind": "concept",
  "link": "https://math2.tamnd.com/node/AVRG7XE2QR/",
  "links": null,
  "markdown": "https://math2.tamnd.com/node/AVRG7XE2QR.md",
  "msc": null,
  "name": "Quotient type",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/AVR/AVRG7XE2QR.md",
  "status": null,
  "tag": "AVRG7XE2QR",
  "uri": "m2://AVRG7XE2QR",
  "url": "https://math2.tamnd.com/wiki/quotient-type/",
  "writing": {
    "tag": "AVRG7XE2QR",
    "kind": "concept",
    "level": "W1",
    "next": [
      {
        "what": "edge defines in",
        "note": "at least one definition",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge instance_of in",
        "note": "at least two examples",
        "have": 0,
        "want": 2
      },
      {
        "what": "edge not_instance_of in",
        "note": "at least one non-example",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge specializes both",
        "note": "the more general notions and the special cases",
        "have": 0,
        "want": 1
      }
    ]
  }
}
