Commit 2026-11-20 19:08 12e50b6e
View on Github →refactor(CategoryTheory): change HasShift monoid argument to outParam (#45584)
In current master, HasShift has type signature
CategoryTheory.HasShift.{v, u, u_2} (C : Type u) (A : Type u_2) [Category.{v, u} C] [AddMonoid A]
and the TriangulatedCategory library is full of expressions like X⟦(1: ℤ)⟧. The more natural expression X⟦1⟧ raises an error when an instance of HasShift C ℕ cannot be inferred.
This PR changes the type signature of HasShift to
CategoryTheory.HasShift.{v, u, u_2} (C : Type u) (A : outParam (Type u_2)) [Category.{v, u} C] [AddMonoid A]
so that now from the expression X⟦1⟧ Lean can find the instance HasShift C ℤ and infer that 1 should have type ℤ.