Skip to content
The Lumenary

Each worksheet prints cleanly on A4 or Letter. Answer keys are on a separate page.

The Lumenary · Advanced undergraduate

The Yoneda lemma

Name: ______________________

Date: ______________________

You will learn to

  • State and prove the Yoneda lemma Nat(Hom(A,−),F)≅F(A)\mathrm{Nat}(\Hom(A, -), F) \cong F(A), including its naturality in AA and FF
  • Deduce that the Yoneda embedding C→[Cop,Set]\mathcal{C} \to [\mathcal{C}^{\mathrm{op}}, \cat{Set}] is full and faithful, and that Hom(−,A)≅Hom(−,B)\Hom(-, A) \cong \Hom(-, B) implies A≅BA \cong B
  • Apply the lemma to recover Cayley's theorem, the down-set embedding of a poset and the natural operations on groups
  • Prove that every presheaf on a small category is a colimit of representable presheaves
  • Explain the functor-of-points idea and why an object is determined by the arrows into it, not by its elements
  1. 1.

    In the Yoneda lemma Nat(Hom(A,−),F)≅F(A)\mathrm{Nat}(\Hom(A, -), F) \cong F(A), which element of F(A)F(A) corresponds to a natural transformation α:Hom(A,−)⇒F\alpha : \Hom(A, -) \Rightarrow F?

    • A.αA(idA)\alpha_A(\id_A)
    • B.F(idA)F(\id_A)
    • C.αX(f)\alpha_X(f) for some arrow f:A→Xf : A \to X chosen in advance
    • D.The image of all of Hom(A,A)\Hom(A, A) under αA\alpha_A
  2. 2.

    A directed graph GG (allowing loops and parallel edges) has 77 vertices and 1212 edges. View it as a functor on the category E\mathbb{E} with arrows s,t:E→Vs, t : E \to V. How many graph homomorphisms are there from the walking edge Hom(E,−)\Hom(E, -) — one edge from a vertex ss to a vertex tt — to GG?

  3. 3.

    On the category Ab\cat{Ab} of abelian groups, Hom(Z/3,−)\Hom(\Z/3, -) sends GG to its elements of order dividing 33, and Hom(Z,−)\Hom(\Z, -) sends GG to all of its elements. How many natural transformations Hom(Z/3,−)⇒Hom(Z,−)\Hom(\Z/3, -) \Rightarrow \Hom(\Z, -) are there?

  4. 4.

    Which of these rules define natural transformations U⇒UU \Rightarrow U, where U:Grp→SetU : \cat{Grp} \to \cat{Set} is the forgetful functor (a rule must be defined for every group and commute with every homomorphism)? Choose all that apply.

    • A.g↦g−1g \mapsto g^{-1}
    • B.g↦g5g \mapsto g^5
    • C.g↦gg \mapsto g if GG is abelian, and g↦eg \mapsto e otherwise
    • D.g↦hgh−1g \mapsto h g h^{-1} for a fixed element hh
  5. 5.

    In the proof that Ψ(Φ(α))=α\Psi(\Phi(\alpha)) = \alpha we write αX(f)=αX(f∘idA)=F(f)(αA(idA))\alpha_X(f) = \alpha_X(f \circ \id_A) = F(f)(\alpha_A(\id_A)). Which fact justifies the second equality?

    • A.Naturality of α\alpha along the arrow f:A→Xf : A \to X, applied to the element idA\id_A
    • B.Functoriality of FF: F(f∘idA)=F(f)F(f \circ \id_A) = F(f)
    • C.The identity law f∘idA=ff \circ \id_A = f
    • D.The Yoneda lemma itself
  6. 6.

    Which of these conclusions are justified for objects A,BA, B of a locally small category? Choose all that apply.

    • A.If Hom(X,A)≅Hom(X,B)\Hom(X, A) \cong \Hom(X, B) naturally in XX, then A≅BA \cong B.
    • B.If Hom(A,X)≅Hom(B,X)\Hom(A, X) \cong \Hom(B, X) naturally in XX, then A≅BA \cong B.
    • C.In Top\cat{Top}: if Hom(1,A)≅Hom(1,B)\Hom(1, A) \cong \Hom(1, B), i.e. AA and BB have the same number of points, then A≅BA \cong B.
    • D.If Hom(−,A)≅Hom(−,B)\Hom(-, A) \cong \Hom(-, B), then there is exactly one isomorphism A→BA \to B.
  7. 7.

    Let GG be a group. Which permutations σ\sigma of the set GG satisfy σ(xh)=σ(x)h\sigma(xh) = \sigma(x)h for all x,h∈Gx, h \in G?

    • A.Exactly the left multiplications x↦gxx \mapsto gx
    • B.Exactly the right multiplications x↦xgx \mapsto xg
    • C.Only the identity
    • D.All permutations of GG
  8. 8.

    Mathlib's coyoneda.obj (op A) is the functor Hom(A,−)\Hom(A, -). Which Lean statement formalises "if Hom(A,−)≅Hom(B,−)\Hom(A, -) \cong \Hom(B, -) naturally, then A≅BA \cong B"?

    • A.theorem iso_of_corepresentable_iso {A B : C} (e : coyoneda.obj (op A) ≅ coyoneda.obj (op B)) : Nonempty (A ≅ B)
    • B.theorem t {A B : C} (e : A ≅ B) : Nonempty (coyoneda.obj (op A) ≅ coyoneda.obj (op B))
    • C.theorem t {A B : C} (h : ∀ X : C, Nonempty ((A ⟶ X) ≃ (B ⟶ X))) : Nonempty (A ≅ B)
    • D.theorem t {A B : C} (α : coyoneda.obj (op A) ⟶ coyoneda.obj (op B)) : A ⟶ B
  9. 9.

    The cyclic group Z/n\Z/n acts on X={0,…,m−1}X = \{0, \dots, m-1\} when its generator acts by a permutation p (a list with p[x] the image of x) satisfying pn=idp^n = \mathrm{id}. An equivariant map from the regular action is a function a : Z/n → X (a list of length n) with a[(k + 1) % n] == p[a[k]] for all k. Write count_equivariant(n, p) that counts such maps by brute force over all functions (use itertools.product). The Yoneda lemma predicts the answer len(p).

    Computational — Practice

Code: Apache-2.0 · Content: CC BY-SA 4.0