definition example theorem proof

Let and be functors. is left adjoint to (and right adjoint to ), written , if for all , there is an isomorphism of hom-sets

natural in and (as functors : for , and , ). The image of is its mate (DaoFP: transpose), and vice versa. The turnstile always points from the left adjoint to the right adjoint.

Intuition (Category Theory for Scientists §5.1): adjoint functors are dictionaries between categories that are not on the same conceptual level, like a baby’s repeatable noises and an adult’s meaningful words. The left adjoint promotes every noise to a word of unknown meaning (“I wonder what she means by Ronnon”), the right adjoint forgets the meaning of words and hears them as noises. The hom-set bijection says: a way to interpret the freely-promoted words in our lexicon is the same as a way for the baby to emulate our sounds.

CDL?RCDL?R

Sources: 7 Sketches §3.4.2 (Definition 3.70, Examples 3.71–3.74, Exercise 3.73), §3.4.3; DaoFP Chapter 10 (§10.1–10.11), §15 (monads from adjunctions); CTfS §5.1 (Definition 5.1.1.1, Proposition 5.1.1.2, Examples 5.1.1.4–5.1.1.7, §5.1.1.10 quantifiers, §5.1.2–5.1.4); Kittenlab (implicitly: Lecture 5 discrete/codiscrete, Lecture 7 free monoid unit). Preorder case: Galois Connection (“Galois connections and adjunctions between the corresponding categories are exactly the same thing”, Example 3.71: hom-sets with one or zero elements).

Examples

  • Currying (Example 3.72, DaoFP §10.1): on , ; “if you give me just , I’ll return a function waiting for the input”. Defines the Exponential Object and cartesian closed categories; is one too, with (7S Exercise 3.73: on morphisms and ; currying gives ).
  • Sum and product (DaoFP §10.2): with the Diagonal Functor; more generally (§10.4).
  • Free/forgetful (Example 3.74, DaoFP §10.9): free group, monoid, ring, vector space underlying set; free category and free preorder on a graph underlying graph; discrete underlying codiscrete (preorders, graphs, categories, topological spaces); abelianization inclusion ; Preorder Reflection inclusion. See Free-Forgetful Adjunction.
  • Data migration (§3.4.3): (Data Migration Functor); Kan extensions generalize.
  • (DaoFP Ch. 11), for subsets; in a Monoidal Closed Category.
  • Not every adjunction is symmetric (CTfS Example 5.1.1.4): for , but is not right adjoint to : the trivial monoid is initial, so has one element while has two.
  • Some functors have adjoints on both sides (CTfS Examples 5.1.1.5–5.1.1.7, CTfS Exercise 5.1.1.6): discrete underlying set indiscrete for preorders; for graphs, the vertex-set functor has left adjoint “no arrows” and right adjoint “one arrow between every ordered pair”; for , and (connected components, CTfS Exercise 5.1.1.9).
  • Every adjunction gives a Monad and a Comonad (DaoFP Ch. 15–16); every monad arises this way (Eilenberg-Moore Category, Kleisli Category).

Equivalent formulations (DaoFP §10.5–10.6)

  • Unit and counit: with , and with (the Yoneda trick), satisfying the triangle identities and . Conversely such give the hom-set bijection: and (DaoFP Exercise 10.5.2). This definition works in any 2-Category. See Unit and Counit of an Adjunction.
  • Universal arrows: iff for every there is a terminal object in the Comma Category — a Universal Arrow from to ; dually initial objects in . An adjunction is a “half-equivalence”: if are isomorphisms it is an Equivalence of Categories.

Properties

“Universal constructions are one of the most important themes of category theory: one gives some specified shape and says ‘find me the best solution!’; category theory asks ‘approximate from the left or the right?‘” (7 Sketches §3.6). “A sculptor subtracts irrelevant stone until a sculpture emerges” (DaoFP Ch. 10).

Docs: FinCats · C-set morphisms · Data migration · ACSets API · Graphs

# Catlab: adjunctions appear as Σ ⊣ Δ ⊣ Π data migrations and as free/forgetful constructions
# (checked with Catlab 0.16.20)
using Catlab
@present SchDDS(FreeSchema) begin State::Ob; next::Hom(State, State) end
@acset_type DDS(SchDDS)
F = FinFunctor(Dict(:V => :State, :E => :State), Dict(:src => id(SchDDS[:State]), :tgt => :next),
               FinCat(SchGraph), FinCat(SchDDS))
Δ = DeltaMigration(F); Σ = SigmaMigrationFunctor(F, Graph, DDS)
G = cycle_graph(Graph, 3)          # Σ(G) is the free DDS on G: here the 3-cycle
I = @acset DDS begin State = 3; next = [2, 3, 1] end
# the adjunction Σ ⊣ Δ:  Hom(Σ G, I) ≅ Hom(G, Δ I)
length(homomorphisms(Σ(G), I)) == length(homomorphisms(G, migrate(Graph, I, Δ)))  # true (3 = 3)
# (on path_graph(Graph, 3) the free DDS is infinite — the last state needs a fresh `next` — and the chase does not terminate)
#check CategoryTheory.Adjunction          -- structure: homEquiv, unit, counit, triangle laws; notation F ⊣ G
#check CategoryTheory.Adjunction.mkOfHomEquiv
#check CategoryTheory.Adjunction.mkOfUnitCounit
#check CategoryTheory.Adjunction.leftAdjointPreservesColimits
#check CategoryTheory.Adjunction.rightAdjointPreservesLimits
#check CategoryTheory.Adjunction.comp     -- composition of adjunctions
#check CategoryTheory.Adjunction.toMonad
-- currying: (- × B) ⊣ (B ⟶ -) in a cartesian closed category
#check CategoryTheory.exp.adjunction
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
-- DaoFP §10.3/§10.5: an adjunction between endofunctors, hom-set form and unit/counit form
class (Functor left, Functor right) => Adjunction left right | left -> right, right -> left where
  ltor   :: (left x -> y) -> (x -> right y)
  rtol   :: (x -> right y) -> (left x -> y)
  unit   :: x -> right (left x)
  counit :: left (right x) -> x
  ltor g = fmap g . unit
  rtol f = counit . fmap f
 
-- the currying adjunction (- , r) ⊣ (r -> -)
data L r x = L (x, r) deriving Functor
data R r x = R (r -> x) deriving Functor
instance Adjunction (L r) (R r) where
  unit x = R (\r -> L (x, r))
  counit (L (R f, r)) = f r
 
-- triangle identities (should be identities):
triangle  :: L r x -> L r x
triangle  = counit . fmap unit
triangle' :: R r x -> R r x
triangle' = fmap counit . unit