module Cat.Diagram.Projective
{o ℓ}
(C : Precategory o ℓ)
where
open Cat.Reasoning C
Projective objects🔗
Let be a precategory. An object is projective if for every morphism and epimorphism there merely exists a such that as in the following diagram:
More concisely, is projective if it has the left-lifting property relative to epimorphisms in
: (P : Ob) → Type _
is-projective =
is-projective P ∀ {X Y} (p : Hom P Y) (e : X ↠ Y)
→ ∃[ s ∈ Hom P X ] (e .mor ∘ s ≡ p)
If we take the perspective of generalized elements, then a projective object lets us pick a of from the preimage of a along every This endows with an internal version of the axiom of choice.
This intuition can be made more precise by noticing that every object of is projective if and only if every epimorphism (merely) splits. For the forward direction, let have a section and note that factorizes through
epis-split→all-projective: (∀ {X Y} → (e : X ↠ Y) → ∥ has-section (e .mor) ∥)
→ ∀ {P} → is-projective P
= do
epis-split→all-projective epi-split p e
s ← epi-split e(s .section ∘ p , cancell (s .is-section))
pure where open has-section
Conversely, given an epi we can factorize to get our desired section
all-projective→epis-split: (∀ {P} → is-projective P)
→ ∀ {X Y} → (e : X ↠ Y) → ∥ has-section (e .mor) ∥
= do
all-projective→epis-split pro e (s , p) ← pro id e
(make-section s p) pure
This suggests that projective objects are quite hard to come by in constructive foundations! For the most part, this is true: constructively, the category of sets has very few projectives1, and many categories inherit their epimorphisms from However, it is still possible to have projectives if epis in are extremely structured, or there are very few maps out of some
For instance, observe that every epi splits in a pregroupoid, so every every object in a pregroupoid must be projective.
pregroupoid→all-projective: is-pregroupoid C
→ ∀ {P} → is-projective P
=
pregroupoid→all-projective pregroupoid λ e →
epis-split→all-projective (invertible→to-has-section (pregroupoid (e .mor))) pure
Likewise, if has an initial object then is projective, as there is a unique map out of
module _ (initial : Initial C) where
open Initial initial
: is-projective bot
initial-projective = pure (¡ , ¡-unique₂ (e .mor ∘ ¡) p) initial-projective p e
A functorial definition🔗
Some authors prefer to define projective objects via a functorial approach. In particular, an object is projective if and only if the preserves epimorphisms.
For the forward direction, recall that in epis are surjective. This means that if is an epi in then is surjective, as preserves epis. This directly gives us the factorization we need!
preserves-epis→projective: ∀ {P}
→ preserves-epis (Hom-from C P)
→ is-projective P
{P = P} hom-epi {X = X} {Y = Y} p e =
preserves-epis→projective (el! (Hom P X)) (el! (Hom P Y))
epi→surjective (e .mor ∘_)
(λ {c} → hom-epi (e .epic) {c = c})
p
For the reverse direciton, let be projective, be an epi, and be a pair of functions into an arbitrary set such that for any To show that preserves epis, we must show that which follows directly from the existence of a lift for every
projective→preserves-epis: ∀ {P}
→ is-projective P
→ preserves-epis (Hom-from C P)
{f = f} f-epi g h p =
projective→preserves-epis pro λ k →
ext
rec!(λ s s-section →
g k ≡˘⟨ ap g s-section ⟩(f ∘ s) ≡⟨ p $ₚ s ⟩
g (f ∘ s) ≡⟨ ap h s-section ⟩
h )
h k ∎(pro k (record { epic = f-epi }))
Closure of projectives🔗
Projective objects are equipped with a mapping-out property, so they tend to interact nicely with other constructions that also have a mapping-out property. For instance, f and are both projective, then their coproduct is projective (if it exists).
coproduct-projective: ∀ {P Q P+Q} {ι₁ : Hom P P+Q} {ι₂ : Hom Q P+Q}
→ is-projective P
→ is-projective Q
→ is-coproduct C ι₁ ι₂
→ is-projective P+Q
{ι₁ = ι₁} {ι₂ = ι₂} P-pro Q-pro coprod p e = do
coproduct-projective (s₁ , s₁-factor) ← P-pro (p ∘ ι₁) e
(s₂ , s₂-factor) ← Q-pro (p ∘ ι₂) e
pure $
[ s₁ , s₂ ] ,
unique₂(pullr []∘ι₁ ∙ s₁-factor) (pullr []∘ι₂ ∙ s₂-factor)
refl reflwhere open is-coproduct coprod
We can extend this result to indexed coproducts, provided that the indexing type is set projective.
indexed-coproduct-projective: ∀ {κ} {Idx : Type κ}
→ {P : Idx → Ob} {∐P : Ob} {ι : ∀ i → Hom (P i) ∐P}
→ is-set-projective Idx ℓ
→ (∀ i → is-projective (P i))
→ is-indexed-coproduct C P ι
→ is-projective ∐P
{P = P} {ι = ι} Idx-pro P-pro coprod {X = X} {Y = Y} p e = do
indexed-coproduct-projective
s ← Idx-pro(λ i → Σ[ sᵢ ∈ Hom (P i) X ] (e .mor ∘ sᵢ ≡ p ∘ ι i)) (λ i → hlevel 2)
(λ i → P-pro i (p ∘ ι i) e)
(match (λ i → s i .fst) , unique₂ (λ i → pullr commute ∙ s i .snd))
pure where open is-indexed-coproduct coprod
Note that this projectivity requirement is required: if projective objects were closed under arbitrary coproducts, then we would immediately be able to prove the axiom of choice: the singleton set is both a projective object and a dense separator in so closure under arbitrary coproducts would mean that every set is projective, which is precisely the axiom of choice.
Putting coproducts aside for a moment, note that projectives are closed under retracts. This follows by a straightforward bit of algebra.
retract→projective: ∀ {R P}
→ is-projective P
→ (s : Hom R P)
→ has-retract s
→ is-projective R
= do
retract→projective P-pro s r p e (t , t-factor) ← P-pro (p ∘ r .retract) e
(t ∘ s , pulll t-factor ∙ cancelr (r .is-retract)) pure
A nice consequence of this is that if has a zero object and a projective coproduct indexed by a discrete type, then each component of the coproduct is also projective.
zero+indexed-coproduct-projective→projective: ∀ {κ} {Idx : Type κ} ⦃ Idx-Discrete : Discrete Idx ⦄
→ {P : Idx → Ob} {∐P : Ob} {ι : ∀ i → Hom (P i) ∐P}
→ Zero C
→ is-indexed-coproduct C P ι
→ is-projective ∐P
→ ∀ i → is-projective (P i)
This follows immediately from the fact that if has a zero object and is indexed by a discrete type, then each coproduct inclusion has a retract.
{ι = ι} z coprod ∐P-pro i =
zero+indexed-coproduct-projective→projective (ι i) $
retract→projective ∐P-pro zero→ι-has-retract C coprod z i
Enough projectives🔗
A category is said to have enough projectives if for object there is some with projective. We will refer to these projectives as projective presentations of
Note that there are two variations on this condition: one where there merely exists a projective presentation for every and another where those presentations are provided as structure. We prefer to work with the latter, as it tends to be less painful to work with.
record Projectives : Type (o ⊔ ℓ) where
field
: Ob → Ob
Pro : ∀ {X} → Pro X ↠ X
present : ∀ {X} → is-projective (Pro X) projective
In fact, it is consistent that the only projective sets are the finite sets!↩︎