definition example theorem proof

A Galois connection between preorders and is a pair of monotone maps and such that

for all , . We say is the left adjoint and the right adjoint, and write . Galois connections were first considered by Galois (field extensions vs. automorphism groups); they are the preorder case of adjunctions, and a “relaxed version” of isomorphisms.

Sources: 7 Sketches §1.4, Definition 1.95, Examples 1.97, 1.113, 1.117, 1.122, Propositions 1.107, 1.111, Theorem 1.115, Exercises 1.98–1.101, 1.109, 1.110, 1.114, 1.119, 1.125; Remark 1.100; DaoFP §10.8 (“Freyd’s theorem in a preorder”).

PQfgPQfg

Examples

Proposition 1.107 (unit/counit characterization)

For monotone , the following are equivalent: (a) ; (b) for all : and .

Proof. Suppose . For put ; reflexivity gives . Similarly (7S Exercise 1.109). Conversely assume (1.108). If then by monotonicity , and , so . The other direction is similar.

Replacing by in (1.108) recovers isomorphism. The inequalities are the preorder versions of the unit and counit.

Basic theory

Docs: Vignette: meets

Builds on: Natural Numbers (UsualOrder) — run that note’s Julia code first.

# check the adjunction condition on finite preorders
is_galois(pP, pQ, f, g, ps, qs) =
  all(leq(pQ, f(p), q) == leq(pP, p, g(q)) for p in ps, q in qs)
 
# Example 1.97 restricted to a finite window: ⌈-/3⌉ ⊣ (3×-)
f(x) = ceil(Int, x / 3); g(y) = 3y
is_galois(UsualOrder(), UsualOrder(), f, g, -10:10, -4:4)   # true
 
# Catlab: Galois connections appear as adjunctions between thin categories;
# e.g. the closure/underlying adjunction between relations and preorders (see [[Reflexive Transitive Closure]])
-- Mathlib: `GaloisConnection l u : ∀ a b, l a ≤ b ↔ a ≤ u b`
#check @GaloisConnection
example : GaloisConnection (fun n : ℕ => n + 1) (fun m : ℕ => m - 1) := by
  intro a b; constructor <;> omega   -- (in ℕ with truncated subtraction, b ≥ 1 needed; illustrative)
#check @GaloisConnection.le_u_l          -- p ≤ g (f p)   (unit)
#check @GaloisConnection.l_u_le          -- f (g q) ≤ q   (counit)
#check @GaloisConnection.u_iInf          -- right adjoints preserve meets
#check @GaloisConnection.l_iSup          -- left adjoints preserve joins
#check @GaloisConnection.compose
-- Example 1.97: Int.ceil ⊣ cast, cast ⊣ Int.floor
#check @Int.gc_ceil_coe                  -- GaloisConnection Int.ceil (↑)
#check @Int.gc_coe_floor                 -- GaloisConnection (↑) Int.floor
-- a Galois connection between preorders (laws unenforced)
data Galois a b = Galois { leftAdj :: a -> b, rightAdj :: b -> a }
-- law: leq (leftAdj p) q == leq p (rightAdj q)
 
-- Example 1.97 on Double/Integer
ex197 :: Galois Double Integer
ex197 = Galois (\x -> ceiling (x / 3)) (\y -> 3 * fromInteger y)
 
checkGalois :: (Preorder a, Preorder b) => Galois a b -> [a] -> [b] -> Bool
checkGalois (Galois f g) ps qs = and [ leq (f p) q == leq p (g q) | p <- ps, q <- qs ]