definition example theorem proof

A monotone map between preorders and is a Function such that for all , if then . Kittenlab calls these order-preserving maps. Monotone maps are the structure-preserving maps for preorders: 7 Sketches thinks of them as observations of one system by another.

Sources: 7 Sketches Definition 1.59, Examples 1.60–1.64, 1.68, Propositions 1.70, 1.78, Exercises 1.67, 1.71, 1.77; Kittenlab Lecture 5, 7; DaoFP §20.1; CTfS Definition 3.4.3.1, Example 3.4.3.2, Application 3.4.3.3, Exercises 3.4.3.4, 3.4.4.11, 4.1.1.8

Examples

Scientific hypotheses as monotone maps (CTfS Application 3.4.3.3). “A team is only as strong as its weakest member” — is a material only as strong as its weakest constituent? Order materials by constituency ( if is an ingredient of ) and by strength ( if is stronger). The hypothesis is precisely that the identity is a monotone map . Other CTfS examples: taking images and preimages along a function (CTfS Example 3.4.3.2, Exercise 3.4.3.4); assigning to each region of the earth its range of recorded temperatures (Join). Counting: there are monotone maps between the linear orders and — e.g. 4 maps , one map and 20 maps (CTfS Exercise 4.1.1.8, Simplex Category).

Monotone maps are functors (Kittenlab Lecture 5)

Proposition. A Functor between preorders and viewed as categories is exactly a function with implying .

Proof. A morphism must be sent to a morphism , and since there is at most one morphism between any two objects, automatically preserves composites and identities.

Proposition 1.70. The Identity Function is monotone, and the composite of monotone maps is monotone (7S Exercise 1.71). Hence preorders and monotone maps form a category (Kittenlab: ), a full Subcategory of ; see Category of Preorders.

Some functors involving (Kittenlab):

  1. , view a preorder as a category;
  2. , the Preorder Reflection: iff ;
  3. , the underlying set;
  4. , the Discrete Preorder;
  5. , the Codiscrete Preorder.

Between monotone maps there is at most one Natural Transformation, existing iff for all (Lecture 7).

Preservation

A monotone map may or may not preserve meets and joins (Preservation of Meets and Joins); failing to preserve joins is a Generative Effect. Monotone maps that preserve all meets are exactly right adjoints of Galois connections (Adjoint Functor Theorem for Preorders). Between monoidal preorders the right notion is a Monoidal Monotone Map; between metric spaces, monotone maps become -functors, i.e. distance-non-increasing maps.

Docs: Vignette: preorders — Kittenlab Lecture 5

Builds on: Bool (Monoidal Preorder) (BoolPre), Natural Numbers (UsualOrder) — run those notes’ Julia code first.

# check monotonicity on finite preorders (Kittenlab-style `leq`)
is_monotone(pA, pB, f, xs) = all(!leq(pA, x, y) || leq(pB, f(x), f(y)) for x in xs, y in xs)
 
# Example 1.60: Bool → ℕ
f(b) = b ? 24 : 17
is_monotone(BoolPre(), UsualOrder(), f, [false, true])   # true
#check @Monotone     -- ∀ ⦃a b⦄, a ≤ b → f a ≤ f b
example : Monotone (fun n : ℕ => n + 5) := fun _ _ h => Nat.add_le_add_right h 5
-- monotone maps compose; bundled as `OrderHom` (notation α →o β)
#check @Monotone.comp
#check (OrderHom ℕ ℕ)
-- monotone maps are functors between the thin categories
example {α β : Type} [Preorder α] [Preorder β] (f : α →o β) :
    CategoryTheory.Functor α β := f.monotone.functor
-- a monotone map is a function with a promise (unenforced): leq x y ==> leq (f x) (f y)
newtype Monotone a b = Monotone (a -> b)
 
isMonotoneOn :: (Preorder a, Preorder b) => [a] -> (a -> b) -> Bool
isMonotoneOn xs f = and [ not (leq x y) || leq (f x) (f y) | x <- xs, y <- xs ]
 
-- Example 1.60
ex160 :: Bool -> Int
ex160 False = 17
ex160 True  = 24