002 / MATHEMATICS & PHILOSOPHY · ENGLISH

What Are We Really Doing When We Turn an Apple into a Number?

What we make visible. What we leave behind. What must remain connected.

A richly textured red apple dissolves through transparent planes, with fine lines converging on a single blue point.
From an object to an observation. Cover created with AI assistance.

An apple sits on the table.

You pick it up, wondering whether it is sweet. The fruit seller puts it on a scale, working out what to charge. An artist moves it toward the window to see how the light falls on its skin.

Everyone is looking at the same apple, but each is looking for a different answer.

Put the apple on a digital scale, and it will tell you neither which tree the apple came from nor whether it will crunch when you bite into it. A reading appears on the screen: say, 180 grams.

That reading tells you something about the apple. It is far from everything.

There is something in school mathematics that does this sort of thing every day. We draw its graph, write down its formula, and study its maximum, minimum, and rate of change.

It is called a function.

Set the coordinate axes aside for a moment and think of a function as a way of observing. It begins to feel surprisingly natural. Follow this thought a little further, and a deeper question emerges: When we observe something, which relationships are we unwilling to lose?

01 · Turning a Question into a Function

A function is often written as

f:X→Y.f:X\to Y.

We can begin with a plain reading of this notation: give me an input from XX, and I will use the rule ff to produce one definite result in YY.

For weighing apples, XX could be the set of apple states we are considering, YY the possible readings on the scale, and ff the weighing rule. To keep instrument noise out of the discussion for now, we treat this as an idealized model under fixed conditions.

Then f(x)f(x) tells us what this observation returns when the apple is in state xx.

No elegant algebraic formula is required. Assigning a book its page count, a date its day of the week, or a photograph its black-and-white version can all be functions.

Each example does something similar: it uses a definite rule to represent an object through a particular result.

The same object can be observed in many ways. We can ask how much an apple weighs, which color category it belongs to, or simply whether it weighs more than 200 grams.

That last question needs only two possible answers: yes or no.

A function's output, then, need not be a number. It can be a category, an image, or a precisely defined yes or no. We decide what to ask, then choose the space of answers we need.

This is why thinking of functions as observations does more than give them a friendlier name. It shifts our attention from “How do I calculate this expression?” to “What does this rule make visible?”

Of course, functions can also describe actions and transformations, such as rotating an image ninety degrees. Observation is a useful way to understand functions; it does not exhaust what functions can mean.

02 · The Same Weight Does Not Mean the Same Apple

Now place a second apple on the table.

It may be redder, more sour, and from a different tree. But on the same scale, it too produces a reading of 180 grams.

Different apples, identical observations. In mathematical notation:

x≠x′,f(x)=f(x′).x\ne x',\qquad f(x)=f(x').

Once all you have left is that reading, you can no longer tell which apple was weighed.

This is where information is lost: two situations that could originally be distinguished have been merged in the record.

Imagine the function sorting all the objects into groups. Anything that produces the same observation goes into the same group. Weighing groups together apples that give the same reading. Asking only “Does it weigh more than 200 grams?” merges still more apples into just two groups: yes and no.

The coarser the observation, the more situations it may group together.

That does not make a coarse observation worthless. If you only want to select apples that meet a packaging weight limit, the instrument may have no need to report their color, variety, and sugar content as well.

For this task, those differences can be left out of the answer.

One qualification matters here: not every function merges different inputs. Take f(x)=x+10f(x)=x+10. If you know the rule, you can subtract 10 from the result and recover the original number. The identity function, f(x)=xf(x)=x, leaves the input exactly as it is.

So “Observations often discard detail” fits everyday experience. “Every function necessarily loses information” is not a mathematical fact.

Once we separate these claims, we can ask a better question: when an observation does discard detail, what makes that loss acceptable?

03 · A Map Can Leave a Great Deal Out

Think of a subway map inside a train carriage.

To make the routes legible, it straightens winding tracks and draws stretches of different lengths as roughly equal. Most of the city's buildings, trees, riverbanks, and side streets are missing.

If its job were to reproduce the city, it would clearly leave out too much.

But you have just boarded a train. What you actually want to know is: Where should I change lines? Can I reach my destination from there?

The omitted details make room for something else: the order of stations, the connections between lines, and the places where you can transfer. These stand out, making your question easier to answer.

The map's value depends on the questions it promises to answer.

Now ask a different question: How far away is the next station? Would walking be faster than taking the train?

The map that was sufficient a moment ago may no longer be sufficient. The distance information sacrificed to make transfers clearer has suddenly become what matters most.

The same simplification can be just right for one task and misleading for another.

This gives us a concrete test of whether an observation is enough: If two situations are recorded as the same result, do they still have the same answer to the question you care about?

Suppose two apples both give a reading of 180 grams, and your question is “Does the displayed reading exceed 200 grams?” The same reading is enough to support the same answer.

If your question is “Which apple is sweeter?”, the same weight reading offers no such guarantee.

We can make this test more precise. Let ff be the observation already made, and let qq be the question you want to answer next. If there is a rule hh such that

q(x)=h(f(x)),q(x)=h(f(x)),

then the observation f(x)f(x) alone lets you work out the answer q(x)q(x).

This short equation captures a practical meaning of “enough”: the original object is no longer at hand, but the record you kept still lets you complete the task.

Conversely, if two objects have the same ff-value but different qq-values, no rule acting only on that shared observation can always give the correct answer for both. The distinction you need was erased in the previous step.

04 · Can a Computer Hold a Real Number?

We make similar choices when recording numbers.

An instrument measures a quantity and displays 1.23. This often means we have retained only a certain precision. Under the same rounding rule, 1.231 and 1.234 may both be recorded as 1.23.

In the record, they are no longer distinguishable.

You might think: Why not add more decimal places?

Greater precision certainly helps. But there is a more fundamental boundary between “retaining more detail” and “representing every real number exactly.”

Any finite computer record can be written as a finite binary string. There are finitely many one-bit strings, finitely many two-bit strings, and so on. By sorting first by length and then by order within each length, we can put all finite strings on one infinite list.

In mathematics, we say they are countable.

The real numbers are uncountable. Even the real numbers between 0 and 1 cannot all be put on such a list.

Under a fixed interpretation rule, therefore, we cannot assign an exact, distinct representation to every real number—even if records may be arbitrarily long, provided each one is finite.

A possible misunderstanding is worth clearing up: does this mean that any number with an infinite decimal expansion cannot be represented exactly?

No. We can specify one-third exactly by writing “1/31/3,” and we can specify π\pi exactly with a finite definition or program. Writing out every decimal digit of a number and specifying that number with a finite description are different things.

The actual limit is this: within a fixed system of finite descriptions, at most countably many real numbers can be specified exactly. Such a system cannot cover all real numbers.

Recording numbers at finite precision is a more familiar, concrete choice. It makes storage and computation practical, while leaving us with a question: will the discarded decimal places matter in the next step?

For example, consider rounding to the nearest integer. Round 0.4 and 0.4 separately, then add them, and you get 0+0=00+0=0. Add them first to get 0.8, then round, and you get 1.

The same two numbers. The same rounding rule. A different order of operations gives a different result.

Details dismissed as “unimportant decimal places” can add up to a carry. Now our concern extends beyond the precision of each recorded number: have we also preserved the way the numbers behave under operations?

05 · Values Can Change While Relationships Remain

Let us try three small experiments.

First experiment: add 10 to every number.

2 becomes 12, and 5 becomes 15.

The values change, but their order does not. Before, 2 was less than 5; afterward, 12 is still less than 15. Their distance is unchanged too: the difference was 3, and it is still 3.

This observation preserves order and distance.

But it does not preserve addition. Originally, 2+5=72+5=7. Add 10 to each of these three numbers, and 12+1512+15 does not equal 17.

Second experiment: multiply every number by 2.

2 becomes 4, and 5 becomes 10.

Order is still preserved, but the distance grows from 3 to 6. This time, however, addition is preserved: 4+10=144+10=14, exactly twice the original sum of 7.

“Add 10” and “multiply by 2” are both easy to undo, yet they treat different relationships differently.

This reveals a crucial distinction: whether we can recover the input from the output and whether a particular relationship is preserved are two different questions.

A fully reversible transformation may fail to preserve an operation you have specified. Conversely, an observation that discards a great deal of information may still preserve a useful structure.

Third experiment: record only whether an integer is odd or even.

This is an extremely coarse observation. 2, 100, and 1,000,000 all receive the same answer: even. The word “even” gives you almost no clue which integer you started with.

Yet if the question is “Will the sum of two integers be odd or even?”, their exact values are unnecessary.

Even plus even is even. Odd plus even is odd. Odd plus odd is even. The two observations alone determine which category the sum belongs to.

Integer addition thus has a corresponding rule of combination in the tiny answer space of “odd” and “even.”

Add the integers first, then observe their parity. Or observe their parities first, then combine them using that rule. The result is always the same.

This is what preserving an operation looks like:

f(a+b)=f(a)⊕f(b).f(a+b)=f(a)\mathbin{\oplus}f(b).

Here ⊕\oplus is simply a symbol for the parity-combination rule we just described. The operations on the two sides need not look alike: on the left, we add integers; on the right, we combine parity classes. What matters is that both routes lead to the same answer.

Compare this with rounding. Both observations merge different inputs, but parity works consistently with its combination rule, while rounding does not always work with ordinary addition.

Knowing how much an observation loses is therefore not enough to tell us how useful it is. We also need to know what we intend to do next, and whether the relationships those operations require have survived.

06 · What You Choose to Preserve Shapes the Mathematics You Do

By now, the abstract-sounding word “structure” has several concrete meanings.

It can mean order: which element is no greater than which.

It can mean distance: how far apart two positions are.

It can mean an operation: how two elements combine to produce a third.

The same real numbers, equipped with an order, form one kind of mathematical object. Equipped with a distance, they form another. Equipped with addition, they offer another set of questions.

The observations we allow will change accordingly.

To study order, we might require maps to preserve it: whenever x≤yx\le y, we must also have f(x)≤f(y)f(x)\le f(y). An existing distinction may collapse to equality, but the order must not reverse.

To preserve distance exactly, we require the distance between any two points to remain the same after mapping.

To preserve addition, we require that adding first and then mapping gives the same result as mapping each input first and then adding.

These requirements select different maps. “Add 10” passes the first two tests but fails the third. “Multiply by 2” passes the first and third but fails the second.

This is where category theory begins to enter the picture.

In these examples, we first choose a class of objects with some structure, then choose the maps we allow between them. We might study partially ordered sets and order-preserving maps, or groups and group homomorphisms.

These maps must also be composable. If one allowed step takes us from XX to YY, and another from YY to ZZ, putting them together must give an allowed map from XX to ZZ.

This fits our experience of observation. First weigh an apple, then decide whether it exceeds a weight limit. Together, these steps still form an observation from apples to “yes” or “no.”

Mathematics also requires an identity map for every object, leaving it unchanged. And when we compose three steps, the final result must not depend on which two we group together first.

Objects, arrows between them, and composition satisfying these rules form a category. Here, the arrows are the maps we have chosen to allow. In more general categories, arrows can mean other things; they need not be functions between sets.

The question “What category are you working in?” now has an approachable starting point:

What kinds of objects are you studying? What relationships do they carry? How are you allowed to move from one object to another? How must those relationships be treated along the way?

What you want to preserve does not, by itself, determine a unique category. But it strongly influences your choice of objects and arrows.

Require order to be preserved, and you get one collection of allowed maps. Require distance to be preserved, and that collection changes. Whether a transformation is allowed depends on the specific requirements you have chosen.

07 · Back to the Apple

Look again at the apple on the table.

180 grams is one piece of information about it. It leaves out most of the apple's details, but it may be enough to price it by weight. If you are choosing apples for jam, the same reading may no longer suffice.

We use observations like this every day: a photograph, a report card, a statistical indicator, a brief description of another person. They bring certain aspects into view while leaving other differences out of the record.

These real-world activities are often more complicated than a deterministic function. They involve noise, change, and disagreement. Still, functions give us a clear starting point for asking more precise questions.

Which different situations does this record group together? What judgments can it still support? When I compare, add, connect, or further process these results, do the original relationships still hold?

Sometimes we need a more detailed record. Sometimes we need a different observation. Sometimes we have already kept enough information, but have never made clear exactly what it is enough for.

A function becomes more than a rule for calculating on paper. It can also express a definite relationship between us and the things we encounter: through this rule, certain things come into view.

Category theory invites us to look further—to ask whether the things that come into view remain related in the ways we need.

The next time you turn something rich and complex into a number, an image, or a short description, perhaps pause for a moment:

What judgments do I want to make from this result? Which relationships must survive for those judgments to remain possible?


References and Notes

[1] Brendan Fong and David I. Spivak. Seven Sketches in Compositionality: An Invitation to Applied Category Theory. arXiv:1803.05316v3, 2018. The starting point for this essay's discussion of “maps as observations” and “preserving structure” comes from Chapter 1, §1.1, especially pages 1–2 of the main text. See also §1.3.2 for observation and composition. Book PDF.

The apple, map, and parity examples are developed here to explain these ideas. The argument about finite descriptions of real numbers supplements the book's rounding example. Throughout this essay, “information loss” means that different inputs become indistinguishable in the record; no probability distribution or information entropy is introduced.

The cover is an AI-assisted conceptual illustration.


Appendix: The Mathematical Structure of Observation

The main essay approaches functions as observations through apples, maps, and numerical records. This appendix develops that perspective through mathematical definitions and propositions. Each section identifies the part of the essay it expands on. The proofs use only basic facts about sets, functions, and operations.

Conventions. We begin with deterministic observations: functions between sets. Here, “information” means the ability to distinguish inputs, not Shannon information. To avoid irrelevant issues involving readings that never occur, we often restrict a function's codomain to its actual image.

A · The Indistinguishability Relation Induced by an Observation

Expands Sections 01–02: how can two different apples become the same case under an observation?

Let XX be a set of states and f:X→Yf:X\to Y an observation. Define

x∼fx′⟺f(x)=f(x′).x\sim_f x' \quad\Longleftrightarrow\quad f(x)=f(x').

This is an equivalence relation: reflexivity, symmetry, and transitivity follow directly from the corresponding properties of equality. Its equivalence classes are

[x]f={x′∈X:f(x′)=f(x)}.[x]_f=\{x'\in X:f(x')=f(x)\}.

Thus [x]f[x]_f collects all states that produce the same reading as xx. It is also the fiber of ff through xx, namely f−1({f(x)})f^{-1}(\{f(x)\}).

Let X/∼fX/{\sim_f} denote the quotient set of these equivalence classes, and define the quotient map

pf:X→X/∼f,x↦[x]f.p_f:X\to X/{\sim_f}, \qquad x\mapsto[x]_f.

Proposition A.1. Every observation factors into “merge indistinguishable states, then label the resulting classes.”

More precisely, the map

fˉ:X/∼f→f(X),[x]f↦f(x)\bar f:X/{\sim_f}\to f(X), \qquad [x]_f\mapsto f(x)

is a bijection, and

f=ι∘fˉ∘pf,f=\iota\circ\bar f\circ p_f,

where ι:f(X)↪Y\iota:f(X)\hookrightarrow Y is the inclusion map.

Proof. All representatives of an equivalence class have the same ff-value, so fˉ\bar f is well-defined. If two equivalence classes have the same image under fˉ\bar f, their representatives are related by ∼f\sim_f, so the classes are equal. Thus fˉ\bar f is injective. Every y∈f(X)y\in f(X) equals f(x)f(x) for some xx, so fˉ\bar f is surjective. The factorization holds pointwise. □

This factorization separates what is lost from how the results are labeled. Distinct states are merged at the pfp_f step; fˉ\bar f simply relabels the equivalence classes with the actual readings.

Corollary A.2. Every input can be recovered exactly from its actual reading if and only if ff is injective.

Here, “recovered” means that there is a function r:f(X)→Xr:f(X)\to X such that r(f(x))=xr(f(x))=x for every x∈Xx\in X. If such an rr exists, then f(x)=f(x′)f(x)=f(x') implies x=r(f(x))=r(f(x′))=x′x=r(f(x))=r(f(x'))=x'. Conversely, if ff is injective, define r(f(x))=xr(f(x))=x; injectivity makes this unambiguous. □

Connection to the essay. Two apples that both give a reading of 180 grams belong to the same fiber. Saying that the weight record cannot distinguish them means precisely that this fiber contains more than one state. By contrast, f(x)=x+10f(x)=x+10 is injective: the values change, but the ability to distinguish inputs is fully preserved.

B · Exactly When an Observation Is Enough to Answer a Question

Expands Section 03: when is a map or a reading sufficient?

Let q:X→Zq:X\to Z represent the question we actually want to answer. Its value q(x)q(x) may be a number, a category, or a truth value.

Definition B.1. An observation ff is sufficient for a question qq if there exists h:f(X)→Zh:f(X)\to Z such that

q(x)=h(f(x))(∀x∈X).q(x)=h(f(x))\qquad(\forall x\in X).

This is a factorization of qq through ff. Observe first, then process the result, and you obtain the answer to the question.

We define hh on the actual image f(X)f(X). There is no need to make it handle readings that never occur. Whenever we write q=h∘fq=h\circ f below, we implicitly restrict the codomain of ff to f(X)f(X).

Theorem B.2. The following conditions are equivalent:

  1. ff is sufficient for qq.
  2. qq is constant on every fiber of ff; that is,
f(x)=f(x′)⟹q(x)=q(x′)(∀x,x′∈X).f(x)=f(x')\Longrightarrow q(x)=q(x') \qquad(\forall x,x'\in X).

When these conditions hold, hh is unique on f(X)f(X).

Proof. If q=h∘fq=h\circ f, equal ff-values remain equal after applying hh.

Conversely, for y∈f(X)y\in f(X), define h(y)=q(x)h(y)=q(x), where xx satisfies f(x)=yf(x)=y. Condition 2 ensures that every such xx gives the same qq-value, so hh is well-defined. By construction, h(f(x))=q(x)h(f(x))=q(x). Any hh satisfying this equation must take the value q(x)q(x) at each y=f(x)y=f(x), proving uniqueness. □

Using the relations from Section A, condition 2 can also be written as

∼f ⊆ ∼q,{\sim_f}\ \subseteq\ {\sim_q},

where equivalence relations are viewed as subsets of X×XX\times X. In words: any states that ff merges must also be states that qq has no need to distinguish.

Connection to the essay. If the question is only “Does the displayed scale reading exceed 200 grams?”, then qq can be calculated from that reading, so ff is sufficient. If the question concerns sweetness, and two apples with the same reading have different sweetness levels, the theorem tells us directly that no subsequent rule using only the weight reading can answer the sweetness question correctly for every apple.

C · Observations Can Be Finer or Coarser

Expands Sections 02–03: how do we compare “recording more detail” and “recording less detail” precisely?

Fix a state set XX. For observations f:X→Yf:X\to Y and g:X→Wg:X\to W, define

f⪰g⟺∃h:f(X)→g(X),g=h∘f.f\succeq g \quad\Longleftrightarrow\quad \exists h:f(X)\to g(X),\quad g=h\circ f.

Read this as “ff is at least as fine as gg.” Knowing the result of ff always lets us calculate the result of gg.

By Theorem B.2,

f⪰g⟺∼f⊆∼g.f\succeq g \quad\Longleftrightarrow\quad {\sim_f}\subseteq{\sim_g}.

Notice the direction of inclusion: a finer observation merges fewer states, so its indistinguishability relation is smaller.

This relation is a preorder. Every observation can be obtained from itself using the identity function, giving reflexivity. If g=h∘fg=h\circ f and k=j∘gk=j\circ g, then k=(j∘h)∘fk=(j\circ h)\circ f, giving transitivity.

It need not be antisymmetric on observation functions themselves. For example, on X=RX=\mathbb R, the functions f(x)=xf(x)=x and g(x)=x+10g(x)=x+10 are different, yet each can be calculated from the other.

More precisely, f⪰gf\succeq g and g⪰fg\succeq f if and only if ∼f=∼g\sim_f=\sim_g. In this case there is a unique bijection bb between the actual images satisfying b(f(x))=g(x)b(f(x))=g(x). The two observations retain exactly the same distinctions and merely label their results differently.

Identifying observations of this kind gives a partial order. It can also be described in terms of partitions of XX and their refinement order.

Connection to the essay. Exact weight determines rounded weight, which in turn supports certain coarse classifications. Such post-processing can preserve or merge existing fibers; it cannot split states that have already been merged. This is a precise, deterministic, set-theoretic version of “post-processing cannot increase distinguishability.” It requires neither probability nor information entropy.

D · When Can Operations Be Performed on Observations?

Expands Sections 04–05: why does parity work with addition, while rounding causes problems?

Suppose XX carries a binary operation

μ:X×X→X.\mu:X\times X\to X.

We want to define a binary operation ν\nu on the actual readings Y0=f(X)Y_0=f(X) such that

f(μ(x1,x2))=ν(f(x1),f(x2))(∀x1,x2∈X).f(\mu(x_1,x_2)) =\nu(f(x_1),f(x_2)) \qquad(\forall x_1,x_2\in X).

In other words, operating on the original objects and then observing should give the same answer as observing first and then operating on the results.

Theorem D.1. Such a ν\nu exists if and only if ∼f\sim_f is compatible with μ\mu:

x1∼fx1′,x2∼fx2′⟹μ(x1,x2)∼fμ(x1′,x2′).\begin{aligned} x_1\sim_f x'_1,\quad x_2\sim_f x'_2 \quad\Longrightarrow\quad \mu(x_1,x_2)\sim_f\mu(x'_1,x'_2). \end{aligned}

When ν\nu exists, it is unique.

Proof. If ν\nu exists, identical pairs of input readings must give identical results under ν\nu, so compatibility holds.

Conversely, define

ν(f(x1),f(x2)):=f(μ(x1,x2)).\nu(f(x_1),f(x_2)):=f(\mu(x_1,x_2)).

Compatibility ensures that changing the representatives x1x_1 and x2x_2 does not change the right-hand side, so ν\nu is well-defined. Every pair of actual readings has the form (f(x1),f(x2))(f(x_1),f(x_2)), so the equation determines ν\nu uniquely. □

An equivalence relation compatible with an operation is called a congruence relation. It allows us to define an operation on the quotient set:

[x1]f μ^ [x2]f:=[μ(x1,x2)]f.[x_1]_f\,\widehat\mu\,[x_2]_f :=[\mu(x_1,x_2)]_f.

Example D.2. Parity is a congruence for addition.

Take X=ZX=\mathbb Z, μ(a,b)=a+b\mu(a,b)=a+b, and f(n)=[n]2∈Z/2Zf(n)=[n]_2\in\mathbb Z/2\mathbb Z. If a−a′a-a' and b−b′b-b' are both even, then

(a+b)−(a′+b′)=(a−a′)+(b−b′)(a+b)-(a'+b')=(a-a')+(b-b')

is also even. Addition therefore descends to parity classes, where it becomes addition modulo 2:

[a+b]2=[a]2+[b]2.[a+b]_2=[a]_2+[b]_2.

Example D.3. Integer rounding cannot support any “addition of readings” that works for all real inputs.

Specifically, take r:R→Zr:\mathbb R\to\mathbb Z with r(x)=⌊x+1/2⌋r(x)=\lfloor x+1/2\rfloor. This fixes the rounding convention at half-integers. We have

r(0.1)=r(0.4)=0.r(0.1)=r(0.4)=0.

But

r(0.1+0.1)=0,r(0.4+0.4)=1.r(0.1+0.1)=0,\qquad r(0.4+0.4)=1.

Both input pairs give the same readings, (0,0)(0,0), yet adding first and then observing gives 0 in one case and 1 in the other. If a function ν:Z×Z→Z\nu:\mathbb Z\times\mathbb Z\to\mathbb Z satisfied r(a+b)=ν(r(a),r(b))r(a+b)=\nu(r(a),r(b)) for all a,ba,b, then ν(0,0)\nu(0,0) would have to equal both 0 and 1—a contradiction.

Connection to the essay. The main text shows that rounding does not preserve ordinary addition. Here we prove something stronger: if we retain only the two integer readings, no alternative binary operation on the output side can repair the problem exactly for all inputs. To calculate the rounded value of the original sum correctly, we must retain more information or restrict the allowed inputs.

E · Reversibility and Structure Preservation Are Different Requirements

Expands Section 05: why can adding 10 be undone even though it does not preserve ordinary addition?

Given operations μ:X×X→X\mu:X\times X\to X and ν:Y×Y→Y\nu:Y\times Y\to Y, a function f:X→Yf:X\to Y preserves these operations if

f∘μ=ν∘(f×f),f\circ\mu=\nu\circ(f\times f),

where (f×f)(x1,x2)=(f(x1),f(x2))(f\times f)(x_1,x_2)=(f(x_1),f(x_2)). This is the equation from Section D written as an equality of functions. We also say that the corresponding square commutes.

Now take X=Y=RX=Y=\mathbb R, with ordinary addition specified on both sides. For t(x)=x+10t(x)=x+10,

t(a+b)=a+b+10,t(a+b)=a+b+10,

whereas

t(a)+t(b)=a+b+20.t(a)+t(b)=a+b+20.

Thus tt is an invertible function, but it is not a group homomorphism from the additive group (R,+)(\mathbb R,+) to itself.

If we allow the output operation to change, however, the situation changes. Define

u⋆v=u+v−10.u\star v=u+v-10.

Then

t(a)⋆t(b)=a+b+10=t(a+b).t(a)\star t(b)=a+b+10=t(a+b).

Now t:(R,+)→(R,⋆)t:(\mathbb R,+)\to(\mathbb R,\star) is a group isomorphism. The identity element of the second group is 10, and the inverse of uu is 20−u20-u.

More generally, if f:X→Yf:X\to Y is a bijection, we can always transport an operation μ\mu on XX to YY by defining

ν(u,v):=f(μ(f−1(u),f−1(v))).\nu(u,v):= f\bigl(\mu(f^{-1}(u),f^{-1}(v))\bigr).

This ν\nu automatically satisfies the operation-preservation equation. If μ\mu is associative, so is ν\nu: use f−1f^{-1} to pull any three elements of YY back to XX, then apply the associativity of μ\mu. Identity elements and other structure can be transported as well.

Connection to the essay. Saying “tt does not preserve addition” assumes that ordinary addition has already been specified on both sides. This is perfectly consistent with being able to recover xx from t(x)t(x). When discussing structure preservation, we must specify the structures on both the input and output sides. Section D goes further, identifying when even a noninjective observation allows a compatible operation to be defined on its outputs.

F · Organizing These Requirements into Categories

Expands Section 06: what else is needed to move from “what we want to preserve” to a category?

Definition F.1. A locally small category C\mathcal C consists of the following data:

  1. A class of objects Ob⁡(C)\operatorname{Ob}(\mathcal C).
  2. For each pair of objects A,BA,B, a set of morphisms Hom⁡C(A,B)\operatorname{Hom}_{\mathcal C}(A,B). If f∈Hom⁡C(A,B)f\in\operatorname{Hom}_{\mathcal C}(A,B), we write f:A→Bf:A\to B.
  3. For every object AA, an identity morphism id⁡A:A→A\operatorname{id}_A:A\to A.
  4. For every triple of objects A,B,CA,B,C, a composition operation
Hom⁡C(B,C)×Hom⁡C(A,B)⟶Hom⁡C(A,C),(g,f)⟼g∘f.\operatorname{Hom}_{\mathcal C}(B,C) \times\operatorname{Hom}_{\mathcal C}(A,B) \longrightarrow\operatorname{Hom}_{\mathcal C}(A,C), \qquad(g,f)\longmapsto g\circ f.

These data satisfy associativity and the identity laws. For all composable f,g,hf,g,h,

h∘(g∘f)=(h∘g)∘f;h\circ(g\circ f)=(h\circ g)\circ f;

and for every f:A→Bf:A\to B,

id⁡B∘f=f=f∘id⁡A.\operatorname{id}_B\circ f=f =f\circ\operatorname{id}_A.

“Locally small” means only that the morphisms between any fixed pair of objects form a set; the objects as a whole need not form a set. All the examples below satisfy this condition.

Category Objects Requirement on morphisms
Set\mathbf{Set} Sets Any function
Pos\mathbf{Pos} Partially ordered sets x≤x′x\le x' implies f(x)≤f(x′)f(x)\le f(x')
Grp\mathbf{Grp} Groups f(ab)=f(a)f(b)f(ab)=f(a)f(b)
Met1\mathbf{Met}_1 Metric spaces dY(f(x),f(x′))≤dX(x,x′)d_Y(f(x),f(x'))\le d_X(x,x')
Metisom\mathbf{Met}_{\mathrm{isom}} Metric spaces dY(f(x),f(x′))=dX(x,x′)d_Y(f(x),f(x'))=d_X(x,x')

The names of the last two categories are notation adopted in this appendix. They use nonexpansive maps and distance-preserving maps as morphisms, respectively. The latter permits isometric embeddings; surjectivity is not required.

Why do these choices form categories? Because identity functions satisfy each requirement, and the requirements are closed under composition. For example, if ff and gg both preserve order, then

x≤x′⟹f(x)≤f(x′)⟹g(f(x))≤g(f(x′)).x\le x' \Longrightarrow f(x)\le f(x') \Longrightarrow g(f(x))\le g(f(x')).

If ff and gg are group homomorphisms, then

(g∘f)(ab)=g(f(a)f(b))=g(f(a))g(f(b)).(g\circ f)(ab) =g(f(a)f(b)) =g(f(a))g(f(b)).

The composite of nonexpansive maps satisfies

dZ(g(f(x)),g(f(x′)))≤dY(f(x),f(x′))≤dX(x,x′).d_Z(g(f(x)),g(f(x'))) \le d_Y(f(x),f(x')) \le d_X(x,x').

For distance-preserving maps, replace the inequalities with equalities. Associativity and the identity laws are inherited from function composition.

This also explains why simply choosing some functions we like is not enough to form a category. For example, the translations f(x)=x+cf(x)=x+c on R\mathbb R with c>0c>0 do not include the identity function. They therefore cannot, as given, be all the morphisms of a category whose only object is R\mathbb R.

Connection to the essay. Choosing a category means specifying objects, morphisms, and composition together. What we preserve constrains the morphisms, but we must still check identities and composition. Even with metric spaces as our objects, we may require distances to be preserved exactly or merely never to increase. These choices give different categories.

The morphisms in these examples happen to be functions. In a general category, morphisms are part of the defining data and need not admit a description in terms of how individual elements correspond. Thus “all morphisms are lossy observations” cannot be treated as a general theorem of category theory.

G · The Universal Property of a Quotient Map: Expressing “Enough” Categorically

Expands Sections 02, 03, and 06: how do indistinguishability, factorization, and categories come together?

Return to an observation f:X→Yf:X\to Y. Let

Rf:={(x,x′)∈X×X:f(x)=f(x′)},R_f:=\{(x,x')\in X\times X:f(x)=f(x')\},

and define the projections π1,π2:Rf→X\pi_1,\pi_2:R_f\to X by taking the first and second components of each ordered pair.

The quotient map pf:X→X/∼fp_f:X\to X/{\sim_f} satisfies

pf∘π1=pf∘π2,p_f\circ\pi_1=p_f\circ\pi_2,

because a pair of indistinguishable states is sent to the same equivalence class.

Moreover, for any set ZZ and function q:X→Zq:X\to Z satisfying

q∘π1=q∘π2,q\circ\pi_1=q\circ\pi_2,

there is a unique function q~:X/∼f→Z\widetilde q:X/{\sim_f}\to Z such that

q=q~∘pf.q=\widetilde q\circ p_f.

To prove this, simply define q~([x]f)=q(x)\widetilde q([x]_f)=q(x). The preceding equality makes this well-defined, and the surjectivity of pfp_f gives uniqueness. This is Theorem B.2 rewritten in terms of the quotient set.

In Set\mathbf{Set}, this property says that pfp_f is a coequalizer of π1\pi_1 and π2\pi_2.

The terminology expresses something concrete. We require the state pairs listed in RfR_f to be treated as identical, and pfp_f performs those identifications. Any answer function qq that respects the same identifications factors uniquely through pfp_f.

The “universal property” lies in the quantifiers: “for every ZZ and qq, there exists a unique q~\widetilde q.” It characterizes the quotient map by its relationship with all subsequent maps of this kind.

By Section A, X/∼fX/{\sim_f} is in bijection with f(X)f(X), so f:X→f(X)f:X\to f(X), with its codomain restricted to its actual image, has the same coequalizer property. If we continue to regard ff as a function into all of YY and ff is not surjective, we cannot make this assertion: readings that never occur may destroy the uniqueness of subsequent maps.

Connection to the essay. In Section B, “What can we still answer from the observation alone?” led to a criterion about functions. Here it becomes a categorical universal property. Category theory expresses the quantifiers, composition, and uniqueness of the same mechanism in a unified language.

H · Why Finite Descriptions Cannot Cover All Real Numbers

Expands Section 04: making “we cannot store all real numbers” into a precise cardinality statement.

The set of finite binary strings is

{0,1}∗=⋃n=0∞{0,1}n.\{0,1\}^{*}=\bigcup_{n=0}^{\infty}\{0,1\}^{n}.

There are exactly 2n2^n strings of length nn. Ordering first by length and then lexicographically lists all finite strings in a countable sequence.

Let D⊆{0,1}∗D\subseteq\{0,1\}^{*} be the codes allowed by a fixed representation system, with a decoding rule

decode⁡:D→R.\operatorname{decode}:D\to\mathbb R.

We do not require this rule to be computable; we require only that each valid code specify one definite real number. Since DD is at most countable, its image decode⁡(D)\operatorname{decode}(D) is also at most countable. Cantor's uncountability theorem tells us that R\mathbb R is uncountable, so decode⁡\operatorname{decode} cannot be surjective.

It follows that, in any fixed system of finite representations, uncountably many real numbers remain without an exact representation.

Allowing expressions such as “1/31/3,” “2\sqrt{2},” or “π\pi” does not change the conclusion: these symbols and their finite definitions are still finite strings. They specify certain numbers exactly, but cannot cover all real numbers.

Connection to the essay. This result concerns which numbers a representation system can cover. A particular rounding function concerns how numerical inputs are merged into readings of finite precision. The former is a cardinality constraint; the latter can be analyzed using the fibers of Section A and the compatibility condition of Section D. They are related, but they are different statements.


A Guide from the Essay to the Appendix

Question in the essay Mathematical formulation in the appendix
Which states become indistinguishable under observation? Fibers, equivalence relations, and quotient sets (A)
Is the record sufficient? The target function is constant on fibers; factorization (B)
Which observation is finer? The post-processing preorder and partition refinement (C)
Can we still perform operations on the observations? Congruence relations and operations descending to quotients (D)
Why does reversibility not guarantee structure preservation? Specified operations on both sides and transport of structure (E)
How do these requirements define a mathematical setting? Objects, morphisms, identities, and composition in a category (F)
How does category theory express answering from the record alone? The coequalizer universal property of a quotient map (G)
Why can finite descriptions not cover all real numbers? Countability of finite strings (H)

This appendix starts from the observation perspective in Chapter 1 of Fong and Spivak's Seven Sketches in Compositionality, cited above, and adds standard arguments from set theory, algebra, and category theory. Its organization and proofs were developed as mathematical supplements to this essay; they are not a paragraph-by-paragraph translation of the book.