{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $\\mathcal{C}$ and $\\mathcal{D}$ be categories.\nA *contravariant functor* $F$ from $\\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 $f \\colon A \\to B$ of $\\mathcal{C}$, a morphism $F(f) \\colon F(B) \\to F(A)$ of $\\mathcal{D}$;\n\nsuch that:\n\n1. $F(1_A) = 1_{F(A)}$ for every object $A$;\n2. $F(g \\circ f) = F(f) \\circ F(g)$ for all $f \\colon A \\to B$ and $g \\colon B \\to C$.\n\n## Remarks\n\nA contravariant functor from $\\mathcal{C}$ to $\\mathcal{D}$ is the same as a [[functor|28NQ0KRHD3]] $\\mathcal{C}^{\\mathrm{op}} \\to \\mathcal{D}$ from the [[opposite category|DAMK8XE1FR]], via $f^{\\mathrm{op}} \\mapsto F(f)$.\nExample: the [[power set|00E0YZCERH]] with preimages, $A \\mapsto \\mathcal{P}(A)$ and $f \\mapsto f^{-1}$, is a contravariant functor from sets to sets.\nHere $f^{-1} \\colon \\mathcal{P}(B) \\to \\mathcal{P}(A)$, and $(g \\circ f)^{-1}(S) = f^{-1}(g^{-1}(S))$ gives clause 2.\nAnother example is the [[dual space|07JBSZE0V4]] functor $V \\mapsto V^*$, $f \\mapsto f^*$ on vector spaces over a field, where $(g \\circ f)^* = f^* \\circ g^*$.\nNon-example: the power set with direct images, $f \\mapsto (S \\mapsto f(S))$, is not contravariant, because $f(\\cdot)$ goes from $\\mathcal{P}(A)$ to $\\mathcal{P}(B)$, so clause 2 of the data fails; it is a covariant functor.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "RECR96V97B",
    "kind": "definition",
    "msc": [
      "18A05",
      "18A22"
    ],
    "name": "Contravariant functor",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Functor"
      }
    ],
    "tag": "2V8FATXF50",
    "uses": [
      "28NQ0KRHD3",
      "DAMK8XE1FR",
      "00E0YZCERH",
      "07JBSZE0V4"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/2V8FATXF50/",
  "links": [
    {
      "field": "defines",
      "target": "RECR96V97B"
    },
    {
      "field": "uses",
      "target": "28NQ0KRHD3"
    },
    {
      "field": "uses",
      "target": "DAMK8XE1FR"
    },
    {
      "field": "uses",
      "target": "00E0YZCERH"
    },
    {
      "field": "uses",
      "target": "07JBSZE0V4"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/2V8FATXF50.md",
  "msc": [
    "18A05",
    "18A22"
  ],
  "name": "Contravariant functor",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/2V8/2V8FATXF50.md",
  "status": null,
  "tag": "2V8FATXF50",
  "uri": "m2://2V8FATXF50",
  "url": "https://tamnd.github.io/math2/wiki/contravariant-functor-definition/",
  "writing": {
    "tag": "2V8FATXF50",
    "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
      }
    ]
  }
}
