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:
A function that is not order-preserving:
A metric-preserving function:
A function that is not metric-preserving:
An addition-preserving function:
A function that is not addition-preserving:
Reveal answer
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.
Joining our simple systems#
Exercise 1.4.#
Reveal answer
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:
Reveal answer
Exercise 1.7.#
Reveal answer
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:
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:
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).
See also the definition of operation-preserving in Homomorphism § Definition.
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).