{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nTo prove that the chromatic number is greater than or equal to the minimum number of vertices in a longest path, suppose that a given graph has a coloring with $k$ colors, for some number $k$. Then it may be acyclically oriented by numbering colors and by directing each edge from its lower-numbered endpoint to the higher-numbered endpoint. With this orientation, the numbers are strictly increasing along each directed path, so each path can include at most one vertex of each color, for a total of at most $k$ vertices per path.\n\nTo prove that the chromatic number is less than or equal to the minimum number of vertices in a longest path, suppose that a given graph has an orientation with at most $k$ vertices per simple directed path, for some number $k$. Then the vertices of the graph may be colored with $k$ colors by choosing a maximal acyclic subgraph of the orientation, and then coloring each vertex by the length of the longest path in the chosen subgraph that ends at that vertex. Each edge within the subgraph is oriented from a vertex with a lower number to a vertex with a higher number, and is therefore properly colored. For each edge that is not in the subgraph, there must exist a directed path within the subgraph connecting the same two vertices in the opposite direction, for otherwise the edge could have been included in the chosen subgraph; therefore, the edge is oriented from a higher number to a lower number and is again properly colored.\n\nThe proof of this theorem was used as a test case for a formalization of [[mathematical induction|0ASJVEFA9J]] by Yuri Matiyasevich.\n",
  "commit": "68a8c3dc73fd55004b2796431c607c30960d1a85",
  "front": {
    "kind": "proof",
    "name": "Proof of Gallai–Hasse–Roy–Vitaver theorem",
    "proves": "CSS694B7NR",
    "sources": [
      {
        "locator": "Gallai–Hasse–Roy–Vitaver theorem, section Proof",
        "mention": "wikipedia://en/36620043#9U0R",
        "note": "adopted",
        "sections": [
          "Proof"
        ],
        "wikipedia": "en:36620043@r1345571774"
      }
    ],
    "tag": "WQPR4SSA29"
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/WQPR4SSA29/",
  "links": [
    {
      "field": "proves",
      "target": "CSS694B7NR"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/WQPR4SSA29.md",
  "msc": null,
  "name": "Proof of Gallai–Hasse–Roy–Vitaver theorem",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/WQP/WQPR4SSA29.md",
  "status": null,
  "tag": "WQPR4SSA29",
  "uri": "m2://WQPR4SSA29",
  "url": "https://math2.tamnd.com/wiki/proof-of-gallai-hasse-roy-vitaver-theorem/",
  "writing": {
    "tag": "WQPR4SSA29",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge uses out",
        "note": "each node that the argument needs",
        "have": 0,
        "want": 1
      }
    ]
  }
}
