Skip to content

Category theory, first steps

compositionality systems or relationships combined to form new systems or relationships

Who needs arithmetic?

Table of Contents

observation is “lossy” – Fong & Spivak1

compositionality systems or relationships combined to form new systems or relationships

structures and structure-preserving maps \(f: X \rightarrow Y\): which aspects of \(X\) are preserved by \(f\)?

structures and structure-preserving maps $f: X \rightarrow Y$: which aspects of \(X\) are preserved by \(f\)?

Consider functions in \(\mathbb{R}\): only some preserve order, distance, sum:

A function \(f: \mathbb{R} \Rightarrow \mathbb{R}\) is said to be

  • order-preserving \(\iff x \leq y \Rightarrow f(x) \leq f(y), \forall x \in \mathbb{R}\) (aka monotonically increasing)

    • Is order preserving

      • Let \(f(x) = x\); arguments and results are identical so order is preserved. Trivial

    • Is not order preserving

      • \(f(x) = 1/x\)

  • metric-preserving \(\iff |x-y| = |f(x)-f(y)|\)

    • Is order preserving

      • \(f(x) = x\) Trivial

    • Is not order preserving

      • \(f(x) = 1/x\)

  • addition-preserving \(\iff f(x+y) = f(x) + f(y)\)

    • Is addition preserving

      • \(f(x) = x\) Trivial

    • Is not addition preserving

      • \(f(x) = 1/x\)

Quaere: Is the identity \(f\) always preserving?


  1. Fong, B., & Spivak, D. (2019). An Invitation to Applied Category Theory: Seven Sketches in Compositionality. Cambridge: Cambridge University Press.↩︎
One way to get ahead of the curve ©2024 Richard Careaga, all rights reserved

Latest

Counting chickens

Counting chickens

Refining polling models. It's the received wisdom of the ages—don't rely on events that haven't happened yet. On the other hand, don't bring a knife to a gunfight, either.

Members Public