theorem proof

Theorem 1.115. Suppose is a Preorder that has all meets and let be any preorder. A Monotone Map preserves meets if and only if it is a right adjoint (of a Galois Connection). Similarly, if has all joins and is any preorder, a monotone preserves joins iff it is a left adjoint.

Sources: 7 Sketches Theorem 1.115; DaoFP §10.8 (“Freyd’s theorem in a preorder”, “Solution set condition”); general version: Adjoint Functor Theorem.

Proof (meets). One direction is Right Adjoints Preserve Meets. Conversely suppose preserves meets. Define the candidate left adjoint by

which exists because has all meets. Monotone: if then , so by Proposition 1.91 (Meet) . By Proposition 1.107 it suffices to show and . For the first,

where the inequality holds because is below every element of the set, and the isomorphism is meet-preservation. For the second, , so

DaoFP’s view (§10.8). In a preorder a left adjoint to must satisfy — the limit of the comma category . Freyd’s theorem says that for general categories the same formula works provided is complete, preserves limits, and a solution set condition holds guaranteeing the limit is over a small diagram; in a preorder with all meets the condition is automatic. Applied to Defunctionalization: DaoFP uses the theorem to explain why arbitrary functions can be replaced by a “solution set” of data.

The theorem explains the slogan: a monotone map does not have generative effects iff it is a left adjoint.

-- Mathlib: complete lattices, Galois connections and the ingredients of (1.116)
#check @GaloisConnection
#check @GaloisConnection.u_sInf     -- right adjoints preserve all meets
#check @sInf_le                     -- used to show f(g q₀) ≤ q₀
-- The candidate left adjoint (1.116):
def leftAdjCandidate {P Q : Type} [Preorder P] [CompleteLattice Q] (g : Q → P) (p : P) : Q :=
  sInf {q | p ≤ g q}
-- (1.116) on finite preorders: build the left adjoint from a meet-preserving g
leftAdjoint :: (Preorder p, Preorder q) => [q] -> (q -> p) -> p -> Maybe q
leftAdjoint qs g p = meet qs [q | q <- qs, leq p (g q)]