# Terminal Object

* `A -> B -> C -> D` (id and transitive arrows elided)
* `A -> B` => object `A` is *more initial* than object `B`
* `C -> D` => object `D` is *more terminal* than object `C`

If we now reverse the principle for ranking objects (from the one we used to rank initial objects) and say that an object `D` is *"more terminal"* than an object `C` if there is an arrow `C -> D`.

> **The terminal object** is the object with one and only one morphism coming to it from any object in the category. The terminal object is unique, up to isomorphism.

Examples

* In a poset, the terminal object (if it exists) is the largest object.
* In the category of sets, the terminal object is a singleton.
* In the Hask category, unit type is the terminal object as there is one and only one pure function from any type to the unit type, so all the conditions for the terminal object are satisfied.

```
unit :: a -> ()
unit _ = ()
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mandober.gitbook.io/math-debrief/450-category-theory/terms/terminal-object.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
