Now we come to one of the coolest and most powerful ideas in this chapter: enriched categories. But first, beware:
**ENRICHED CATEGORIES ARE NOT CATEGORIES!!!**
We are just warming up to study categories. When we do, we'll be in a position to understand this strange fact better. For now, you should think of enriched categories as a generalization of preorders.
Given two elements \\(x,y\\) of a preorder, \\(x\le y\\) is _Boolean-valued_. That's a fancy way of saying it's either true or false. But secretly it's relying on the **[Booleans](https://forum.azimuthproject.org/discussion/1916/exercise-4-chapter-1)**:
\[ \mathbf{Bool} = \\{ \tt{true}, \tt{false} \\} . \]
And if we replace the Booleans by something else, we can get _generalizations_ of the concept of preorder, called ["enriched categories"](https://en.wikipedia.org/wiki/Enriched_category), that do very interesting and important things.
To see why this could be a good idea, remember the kind of questions a preorder can answer for us:
1) Is this at least as big as that?
2) Is this at least as expensive than that?
3) Can I get from here to there?
All these are yes-or-no questions. Their answers are Boolean-valued. But many questions in life don't have yes-or-no answers:
4) How much bigger is this than that?
5) How much more expensive is this than that?
6) How long will it take to get from here to there?
7) How many ways are there to get from here to there?
Questions 4)-6) of these have number-valued answers: if we like, we can decree that the answer should be an element of the set of **costs**:
\[ \mathbf{Cost} = [0,\infty] , \]
that is, nonnegative real numbers _together with infinity_. We use infinity to handle exceptions like this: if I ask you how long it will take to get from here to there, and it's _impossible_ to get from here to there, you can say "\\(\infty\\)". If I ask you how much more expensive this painting is than that one, and this painting is not for sale, you can say "\\(\infty\\)".
Question 7) has a _set-valued_ answer: there will be a _set_ of ways to get from here to there.
We can answer questions 1)-3) with a \\(\mathbf{Bool}\\)-enriched category. Don't worry: this is just an ordinary preorder! I'm just calling it a \\(\mathbf{Bool}\\)-enriched category so you can start to understand this new "enriched" stuff. The point is that a \\(\mathbf{Bool}\\)-enriched category lets you take two things \\(x\\) and \\(y\\) and get a Boolean: true or false.
We can answer questions 4-6) with a \\(\mathbf{Cost}\\)-enriched category. This is something new you need to learn about. The point is that a \\(\mathbf{Cost}\\)-enriched category lets you take two things \\(x\\) and \\(y\\) and get a **cost**: a number from \\(0\\) to \\(\infty\\).
We can question 7) with a \\(\mathbf{Set}\\)-enriched category. This is just a _category!_
And this is something we won't talk about until the next chapter. Sorry! I know that hundreds of you are reading this course, refusing to ask any questions or make a any comments until I start talking explicitly about categories. But the book _Seven Sketches_ works its way to categories in a clever way. First it talks about preorders. Then it talks about a special case of enriched categories. Then it talks about enriched categories in general - which include categories as a special case! At this point you'll suddenly shoot forward into _modern_ category theory - the kind of stuff that bigshots like [Ross Street](https://en.wikipedia.org/wiki/Ross_Street) and [Martin Hyland](https://en.wikipedia.org/wiki/Martin_Hyland) do. But it should be painless, because you'll already be used to this "enriched" business.
Let's get started. I'll just show you the definition; next time we'll talk about it and start looking at lots of examples. We'll start by picking a monoidal preorder \\((\mathcal{V},\leq,\otimes,I)\\), like \\(\mathbf{Bool}\\) or \\(\mathbf{Cost}\\). Then:
**Definition.** A **\\(\mathcal{V}\\)-enriched category** \\(\mathcal{X}\\) consists of two parts, satisfying two properties. First:
1. one specifies a set \\(\mathrm{Ob}(\mathcal{X})\\), elements of which are called **objects**;
2. for every two objects \\(x,y\\), one specifies an element \\(\mathcal{X}(x,y)\\) of \\(\mathcal{V}\\).
Then:
a) for every object \\(x\in\text{Ob}(\mathcal{X})\\) we require that
\[ I\leq\mathcal{X}(x,x) .\]
b) for every three objects \\(x,y,z\in\mathrm{Ob}(\mathcal{X})\\), we require that
\[ \mathcal{X}(x,y)\otimes\mathcal{X}(y,z)\leq\mathcal{X}(x,z). \]
We call \\(\mathcal{X}\\) a **\\(\mathcal{V}\\)-category** for short. We call \\(\mathcal{V}\\) the **base of the enrichment** for \\(\mathcal{X}\\), and we say that \\(\mathcal{X}\\) is **enriched in** \\(\mathcal{V}\\).
**Puzzle 86.** Show that \\(\mathbf{Bool}\\) becomes a commutative monoidal poset if we use the usual ordering \\(\tt{false} \le \tt{true}\\), take \\(\otimes\\) to be \\(\wedge\\) - that is, "and" - and take \\(I\\) to be \\(\tt{true}\\) .
**Puzzle 87.** Figure out exactly what a \\(\mathbf{Bool}\\)-enriched category is, starting with the definition above. Here what matters is not your final answer so much as your process of deducing it!
**[To read other lectures go here.](http://www.azimuthproject.org/azimuth/show/Applied+Category+Theory#Chapter_2)**