{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $\\mathcal{C}$ and $\\mathcal{D}$ be [[categories|A2DE66937D]].\nA *functor* $F \\colon \\mathcal{C} \\to \\mathcal{D}$ consists of:\n\n1. for each object $A$ of $\\mathcal{C}$, an object $F(A)$ of $\\mathcal{D}$;\n2. for each [[morphism|859F0TFVA3]] $f \\colon A \\to B$ of $\\mathcal{C}$, a morphism $F(f) \\colon F(A) \\to F(B)$ of $\\mathcal{D}$;\n\nsuch that:\n\n1. $F(1_A) = 1_{F(A)}$ for every object $A$ of $\\mathcal{C}$;\n2. $F(g \\circ f) = F(g) \\circ F(f)$ for all $f \\colon A \\to B$ and $g \\colon B \\to C$ in $\\mathcal{C}$.\n\n## Remarks\n\nSuch a functor is also called *covariant*.\nFunctors compose, and every category has an identity functor.\nA functor sends isomorphisms to isomorphisms: if $g \\circ f = 1_A$ and $f \\circ g = 1_B$, then $F(g) \\circ F(f) = 1_{F(A)}$ and $F(f) \\circ F(g) = 1_{F(B)}$.\nExample: the forgetful functor from [[groups|G5S1M9]] to sets sends a group to its underlying set and a [[group homomorphism|0JYTG5K9Y4]] to the same map.\nBoth conditions hold because identities and composites of homomorphisms are the identity and composite maps.\nNon-example: sending each group $G$ to its centre $Z(G)$ and each homomorphism to its restriction does not define a functor from groups to groups.\nLet $f \\colon \\Z/2 \\to S_3$ be the inclusion onto the subgroup generated by a transposition.\nIt maps the centre $\\Z/2$ outside the trivial centre of $S_3$.\nSo restriction gives no morphism $Z(\\Z/2) \\to Z(S_3)$, and the second item of the data fails.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "28NQ0KRHD3",
    "kind": "definition",
    "msc": [
      "18A05",
      "18A22"
    ],
    "name": "Functor",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Functor"
      }
    ],
    "tag": "KJB47D7Z05",
    "uses": [
      "A2DE66937D",
      "859F0TFVA3",
      "G5S1M9",
      "0JYTG5K9Y4"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/KJB47D7Z05/",
  "links": [
    {
      "field": "defines",
      "target": "28NQ0KRHD3"
    },
    {
      "field": "uses",
      "target": "A2DE66937D"
    },
    {
      "field": "uses",
      "target": "859F0TFVA3"
    },
    {
      "field": "uses",
      "target": "G5S1M9"
    },
    {
      "field": "uses",
      "target": "0JYTG5K9Y4"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/KJB47D7Z05.md",
  "msc": [
    "18A05",
    "18A22"
  ],
  "name": "Functor",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/KJB/KJB47D7Z05.md",
  "status": null,
  "tag": "KJB47D7Z05",
  "uri": "m2://KJB47D7Z05",
  "url": "https://tamnd.github.io/math2/wiki/functor-definition/",
  "writing": {
    "tag": "KJB47D7Z05",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
