I want some more recipes for building algebraic invariants of things. In that spirit, let me try vibing out some thing and subjecting it your peer review here on Tumblr.
On the Subtle Joy of Injectivity
Given a category C alongside a class J of morphisms in C we can consider the full subcategory Inj(J) of C constructed by restricting to J-injective objects, namely those objects A in C such that for every monomorphism p : B -> E in J and every morphism f : B -> A in C there exists a morphism f⁺ : E -> A in C such that f⁺ o p = f.
We can characterise a lot of interesting mathematical categories as Inj(J) for some appropriately chosen class J.
Example: Consider the category of directed graphs whose objects are pairs (V, E) where V is a set of vertices and E is a binary relation on V whose elements are called edges, and whose morphisms f : (V, E) -> (V', E') are functions f : V -> V' such that (x,y) ∈ E implies (f(x), f(y)) ∈ E'.
Observe that a directed graph is reflexive and only if it is injective with respect to
( { 0 } , ∅) -> ( { 0 }, { (0 , 0) } )
It is symmetric if and only if it is injective with respect to
( { 0, 1 } , { (0, 1) } ) -> ( { 0 , 1 }, { (0 , 1), (1, 0) } )
It is transitive if and only if it is injective with respect to
( { 0, 1, 2 } , { (0, 1), (1, 2) } ) -> ( { 0 , 1 , 2 }, { (0 , 1), (1, 2), (0, 2) } )
Hence, we can then say that the category of sets with equivalence relations is just Inj( { these three morphisms } ).
Similarly we could say that a ring is commutative if and only if it injective with respect to
ℤ{ x, y } -> ℤ { x , y } / ( xy - yx )
where ℤ{...} here is a free non-commutative ring.
Obstructions to Being Injective
Observe that for every object X we have an inclusion
Hom(E, X) o J ⊆ Hom(B, X).
Injectivity ensures this is an equality. Let us take free abelian groups to have
ℤ[ Hom(E, X) o J ] ⊴ ℤ[ Hom(B, X) ]
Hence we can define the injectivity obstruction group as
G(X) := ℤ[ Hom(B, X) ]/ℤ[ Hom(E, X) \circ J ]
With the enjoyable property that G(X) ≅ 0 iff X is injective with respect to at least one morphism in J.
A pleasing feature of singular homology is that we can actually prove somethings about these singular homology groups. So let us try and prove something about our injectivity obstruction group.
For the sake of simplicity let us consider the case of J = { p : B -> E }, and furthermore assume that B and E are "connected" in the sense that we have natural isomorphisms
Hom( B, X + Y ) ≅ Hom(B, X) + Hom(B, Y).
Hom(E, X + Y) ≅ Hom(E, X) + Hom(E, Y).
My sketchy mess on paper suggests
Theorem: G(X + Y) ≅ G(X) ⊕ G(Y).