Zulip Chat Archive

Stream: mathlib4

Topic: Hom.HasPullback


joseph hua (Sep 22 2025 at 14:49):

In PR #29795 I generalised some theorems related to base change along a morphism. Namely instead of assuming that the category has pullbacks, we just need pullbacks along that morphism to exist. I am wondering if making a typeclass for this is a good idea:

protected class Hom.HasPullback {X Y : C} (f : X  Y) : Prop where
  hasPullback {W} (g : W  Y) : HasPullback g f

Christian Merten (Sep 22 2025 at 15:24):

I think [∀ {W} (g : W ⟶ Y), HasPullback g f] is good enough.

Kevin Buzzard (Sep 23 2025 at 06:51):

I have not used category theory much in mathlib but I have noticed similar patterns to what Joseph is suggesting before e.g. docs#CategoryTheory.Limits.HasLimitsOfSize is a class, just defined to mean "for all J, (another class)", so why isn't Christian's suggestion an argument against docs#CategoryTheory.Limits.HasLimitsOfSize ?

Joël Riou (Sep 23 2025 at 15:49):

For convenience, ∀ {W} (g : W ⟶ Y), HasPullback g f could be made into an abbrev.

I would not mind if somebody implemented a change in the design of HasLimitsOfShape and HasLimitsOfSize to make them abbrevs, as long as !bench produces reasonable results...

joseph hua (Sep 23 2025 at 16:23):

Joël Riou said:

For convenience, ∀ {W} (g : W ⟶ Y), HasPullback g f could be made into an abbrev.

I would not mind if somebody implemented a change in the design of HasLimitsOfShape and HasLimitsOfSize to make them abbrevs, as long as !bench produces reasonable results...

unless there are any objections I will implement the HasPullback instance as an abbrev in the PR

joseph hua (Sep 29 2025 at 12:18):

Now implemented in #29795


Last updated: Dec 20 2025 at 21:32 UTC