definition example theorem proof
An isomorphism in a Category is a morphism such that there exists with and (i.e. , ). We call inverses, write , and say and are isomorphic, . Isomorphic objects are “interchangeable”: for any other object , maps into/out of correspond bijectively to maps into/out of .
Sources: 7 Sketches Definition 3.28, Examples 3.29, 3.34, Exercises 3.30–3.33; Kittenlab Lecture 2 (finite sets), 5; DaoFP Chapter 3 (“Isomorphisms”, “Naturality”, “Reasoning with Arrows”), §9.1; Isomorphism of Preorders and Bijection are special cases; CTfS Definition 2.1.2.7, Application 2.1.2.9, Lemma 2.1.2.11, Exercises 2.1.2.10–2.1.2.12, Definition 4.1.1.12, Lemma 4.1.1.16
Examples
- In , isomorphisms are bijections: via (inverse , , ); there are such isomorphisms (7S Exercise 3.30). Cardinality is the isomorphism class (Cantor).
- Canonical vs. arbitrary isomorphisms (CTfS Application 2.1.2.9, Exercise 2.1.2.12). The nucleotides of DNA and of RNA are isomorphic in ways, but only one is useful: transcription , , , . Two sets can be isomorphic without any choice of isomorphism being canonical (“the only reasonable one”). And there is no isomorphism from the RNA triplets to the 21 amino acids: translation is a function but cannot be inverted.
- In a Preorder, iff and (Equivalent Elements of a Preorder).
- Every identity is an isomorphism, its own inverse (7S Exercise 3.31).
- A Monoid in which every morphism is an isomorphism is a Group: is not a group ( has no inverse), is (7S Exercise 3.32).
- In a Free Category, only identities are isomorphisms (7S Exercise 3.33).
- Retraction (Example 3.34): , with but are “almost but not quite” inverses — a retraction pair.
- In programming, isomorphic types have the same external behaviour and can be swapped (except for performance): Kittenlab’s
Vec𝔽([1,2,3,3])andVec𝔽([3,2,1]),Coproduct{S,T}vsTaggedUnion{S,T}(Lecture 11). - Between functors: a Natural Isomorphism. Between categories: Equivalence of Categories (isomorphism of categories is too strict).
Reasoning with arrows (DaoFP Chapter 3)
“We do not compare objects for equality” (that would be “evil”); we compare arrows. If , then post-composition is a bijection for every observer , with inverse — a “buddy system” between arrows. Changing perspective via pre-composition commutes with changing focus: , the first appearance of a naturality condition (here automatic by associativity).
Theorem (Yoneda-style). Conversely, suppose for every we have a bijection satisfying naturality for all . Then . Proof (the Yoneda trick). Set . Naturality with , gives , so for every ; likewise with . “Even though was defined individually for every , it turned out to be completely determined by its value at a single identity arrow. This is the power of naturality!” Dually for outgoing arrows (DaoFP Exercise 3.3.1). “To show an isomorphism, it is often easier to define a natural transformation between ten thousand arrows than to find a pair of arrows between two objects.” See Yoneda Lemma, Representable Functor.
Uniqueness of universal objects. Any two terminal objects are isomorphic by a unique isomorphism (DaoFP Exercise 3.1.3, DaoFP Exercise 3.1.4, 7 Sketches Proposition 3.84); likewise for all limits, colimits, representing objects — hence “the” product, “the” limit (Remark 3.85, Remark 1.82).
Docs: FinSets — Kittenlab Lecture 2
Builds on: Finite Set (Vec𝔽), Function (𝔽Mor) — run those notes’ Julia code first.
# Kittenlab Lecture 2: an isomorphism of finite sets and its inverse
B, B′ = Vec𝔽([1, 2, 3]), Vec𝔽([:a, :b, :c])
f = 𝔽Mor(B, B′, Dict(1 => :a, 2 => :b, 3 => :c))
g = 𝔽Mor(B′, B, Dict(:a => 1, :b => 2, :c => 3))
# compose(f, g) == identity(B) and compose(g, f) == identity(B′)Catlab version (run in a fresh Julia session — Catlab exports its own compose, id, FinFunction, …):
# Catlab
using Catlab
f = FinFunction([2, 1, 3], 3)
is_iso(f) # true
compose(f, f) == id(FinSet(3)) # f is its own inverse#check CategoryTheory.Iso -- structure Iso X Y: hom, inv, hom_inv_id, inv_hom_id; notation X ≅ Y
#check CategoryTheory.IsIso -- the property of a morphism
#check @CategoryTheory.Iso.symm
-- in Type, isomorphisms are equivalences
#check @CategoryTheory.Iso.toEquiv
-- "isomorphic iff the hom-functors are naturally isomorphic": the Yoneda embedding is fully faithful
#check CategoryTheory.Yoneda.fullyFaithful-- an isomorphism as a pair of inverse arrows (laws unenforced)
data Iso a b = Iso { fwd :: a -> b, bwd :: b -> a }
-- fwd . bwd = id, bwd . fwd = id
-- DaoFP: reconstructing f from a natural family of bijections via the Yoneda trick
fromNatural :: (forall x. (x -> a) -> (x -> b)) -> (a -> b)
fromNatural alpha = alpha id