# 1.1. More than the sum#

In a Concrete category the morphisms are âstructure-preservingâ (which motivates this chapter). When we eventually get to category theory (in Chp. 3) weâll learn that functors are identity-preserving and composition-preserving. What weâll fill in for $$x$$ in $$x$$-preserving will eventually get quite interesting; e.g. manipulations of logical formulas will be truth-preserving (see Formal system, or Validity (logic) Â§ Preservation) or justification-preserving (see Intuitionistic logic).

## Exercise 1.1.#

An order-preserving function, part of the Category of preordered sets. See also Order theory:

$f(x) = x + 1$

A function that is not order-preserving:

$f(x) = -x$

A metric-preserving function:

$f(x) = x + 1$

A function that is not metric-preserving:

$f(x) = 2x$

$f(x) = 2x$

A function that is not addition-preserving:

$f(x) = x^2$

At the moment, we refer to all of these âpreservingâ operations as functions. Weâll see later that the ârightâ word for them is âmorphismâ (more specifically, Homomorphism). We implicitly assume above that e.g. the domain and codomain of $$f(x)$$ is e.g. ordered (e.g. the real numbers). If it was not ordered, how could we preserve order? Similarly, sets can have a âmetricâ defined on them (such as distance) which in some sense makes them âmoreâ than sets. The term âfunctionâ will later be reserved for functions between sets, which technically have no âstructureâ such as order.

See also Preservation (disambiguation); this word doesnât seem to have a strict mathematical definition. The more widely used word seems to be Invariant (mathematics); this sentence from that page clearly matches two of the examples above:

The distance between two points on a number line is not changed by adding the same quantity to both numbers. On the other hand, multiplication does not have this same property, as distance is not invariant under multiplication.

## 1.1.1. A first look at generative effects#

Prerequisite to Category of topological spaces.

### Exercise 1.4.#

Read âextract information from raw dataâ as $$f$$ and âcombine dataâ as Âˇ in Homomorphism Â§ Definition.

## 1.1.2 Ordering systems#

### Exercise 1.6.#

In this alternative solution, part 3. is in blue, part 4. is in red, and parts 5. and 6. are in green:

### Exercise 1.7.#

See âObservation preserves order but not joinâ in Applied Category Theory book - Math SE for valuable commentary on section 1.1.2. One major concept this section fails to address is the difference between a Binary relation and a Binary operation. As pointed out in a comment by John Baez on the Math SE question, what it means for each to preserve structure is rather different:

In general, a function đš preserves a binary operation â if đš(đ´âđľ)=đš(đ´)âđš(đľ), and it preserves a relation â˛ if đ´â˛đľ implies đš(đ´)â˛đš(đľ).

The comment assumes âoperationâ means on the same set, when in fact this is not the case in the example in the text. It may be clearer to write these equations with subscripts on the operators:

\begin{split} \begin{align} F(A â _C B) & = F(A) â _D F(B) \\ A â˛_C B & â F(A) â˛_D F(B) \end{align} \end{split}

Operations are convertible to relations (see Binary operation Â§ Binary operations as ternary relations). In fact, any function/operation can be seen as a relation that is total and functional (see Binary relation). If we assume $$A â _C B = C$$ then we can write these requirements in a more symmetric way:

\begin{split} \begin{align} (A â _C B, C) & â (F(A) â _D F(B), F(C)) \\ A â˛_C B & â F(A) â˛_D F(B) \end{align} \end{split}

To summarize, $$\leq$$ is a binary relation, and $$\vee$$ is a binary operation. The map $$\Phi$$ is an order-preserving function because if $$A \leq B$$ it implies that $$\Phi(A) \leq \Phi(B)$$. The order-preserving relationship (unlike the metric-preserving, addition-preserving, and join-preserving relationships) does not require the result before and after to be equal. Itâs defined so you only need the result of an order comparison before function application to imply the result of an order comparison after function application (the Material conditional, not the Material biconditional). For the function to be join-preserving, we need $$\Phi(A) \vee \Phi(B)$$ (applying the function before) to equal $$\Phi(A \vee B)$$ (applying the function after).

### Relationship to other sections#

In Section 1.2 youâll see that the following is a monotone map that shows how ÎŚ is order-preserving:

In Section 1.4 youâll see that because this monotone map is not a left adjoint to any monotone map in the reverse direction, it does not preserve joins.

### Binary operations vs. binary functions#

According to Binary function:

A binary operation is a binary function where the sets X, Y, and Z are all equal; binary operations are often used to define algebraic structures.

To some degree this conflicts with the section Binary operation Â§ External binary operations. It clearly conflicts with Operation (mathematics) Â§ Definition, although the conflict is discussed at the bottom of the definition. This article claims to be authoritative with respect to the term operator, as well:

An operator is similar to an operation in that it refers to the symbol or the process used to denote the operation, hence their point of view is different. For instance, one often speaks of âthe operation of additionâ or âthe addition operationâ, when focusing on the operands and result, but one switches to âaddition operatorâ (rarely âoperator of additionâ), when focusing on the process, or from the more symbolic viewpoint, the function +: X Ă X â X.

Strangely, this definition is supplied despite the warning at the top of the article:

Not to be confused with Operator (mathematics).

The parentheses in an article name generally indicate context, so it seems like defining operator in an mathematics article on what an âoperationâ is would still apply to the context of mathematics. The article Operator (mathematics) seems to fully accept that the term is ambiguous. The fact that it is used (in all these articles) with functions as operations, without any mention of category theory (in which functions are morphisms), also indicates the language is not well-developed.

The conflict is also discussed in terminology - What is the difference between functions and operations? - MSE. To make these words distinct, it seems more appropriate to use the definition requiring an operation to be closed.

Part of the issue here is that thereâs really no difference between using a symbol for a function vs. a name. That is, you can use the symbol â (from Star (glyph)) or the function name white_star. You can use the symbol + (from Plus and minus signs, also on my keyboard) or the function name plus. Whether we choose one option over the other is almost exclusively decided by practical issues like what our keyboard and operating system supports conveniently. Unfortunately weâll tend to use the term âoperatorâ when are using a symbol and the term âfunctionâ when weâre using a string of symbols (there are four symbols/letters in the term plus). This extends even to programming languages (see Order of operations, or Operator overloading) though in programming the term is often to extended to allow âoperationsâ with 2 characters.

### Relationship to other chapters#

Notice the similarity between what it means for a function to preserve a structure and the definition of a Functor. Functors are in fact âstructure-preservingâ in the sense that they preserve composition. The goal of preserving composition is to preserve structure among the objects that the functions/morphisms act on however; see Functor Â§ Properties.

A structure-preserving function (morphism) never implies one in the reverse direction. For an example of a bidirectional structure-preserving morphism this with respect to relations, see Isomorphism Â§ Relation-preserving isomorphism.

Note weâll use the term âmapâ for morphisms (structure-preserving functions) as well (see Map (mathematics) Â§ As morphisms).