Zulip Chat Archive
Stream: Is there code for X?
Topic: Equalizer in Type
Kenny Lau (Jul 10 2025 at 11:11):
Do we have explicit equalizer in Type? Specifically:
def Equalizer {α : Type u} {β : Type v} (f g : α → β) : Type u :=
{ x // f x = g x }
I would assume the answer is no because we have AlgHom.equalizer whose underlying set is defined explicitly.
But I would also assume yes because surely at some point we would have proved that the category Type u has equaliser...
Kenny Lau (Jul 10 2025 at 11:15):
Ok I did further digging on the last sentence,
import Mathlib
open CategoryTheory Limits
variable {X Y : Type u} (f g : X ⟶ Y)
#check (inferInstance : HasEqualizer f g)
#check Types.hasLimit
and it seems that it was proved abstractly that Type u has all small limits (remember that Has[...] is a Prop), so... they might have avoided explicitly constructing it for the equaliser diagram explicitly
Kenny Lau (Jul 10 2025 at 11:16):
and I did more digging https://github.com/leanprover-community/mathlib4/blob/02c6431ffe61ac7571e0281242e025e54638ad42/Mathlib/CategoryTheory/Limits/Types/Limits.lean#L101-L108
noncomputable def limitCone : Cone F where
pt := Shrink F.sections
Kenny Lau (Jul 10 2025 at 11:18):
so in conclusion I don't think this has been explicitly done in Type u and people probably thought "but who needs the concrete construction"
Markus Himmel (Jul 10 2025 at 11:57):
We have the dual as docs#Function.Coequalizer
Adam Topaz (Jul 10 2025 at 12:48):
We probably have some general API about limits in concrete categories that will allow you to view the equalizer as the set . What do you need this for?
Kenny Lau (Jul 11 2025 at 00:09):
@Adam Topaz I have two corepresentable functors F, G: C => Type and an equaliser diagram F ->->G and a third functor H isomorphic to the equaliser and I want to show (i.e. construct data) that H is also corepresentable
Markus Himmel (Jul 11 2025 at 08:23):
There is docs#CategoryTheory.Limits.Types.equalizerIso. There are also things like docs#CategoryTheory.Limits.pullbackObjIso, but the analogous equalizerObjIso doesn't exist yet I believe.
Last updated: Dec 20 2025 at 21:32 UTC