Zulip Chat Archive

Stream: mathlib4

Topic: grind on `CostructuredArrow.w`


Robin Carlier (Oct 21 2025 at 08:31):

I was experimenting with grind and was very surprised to see the result of annotating docs#CategoryTheory.CostructuredArrow.w with grind.

as a reminder, the lemma has type

 {C : Type u₁} [inst : Category.{v₁, u₁} C] {D : Type u₂} [inst_1 : Category.{v₂, u₂} D] {T : D} {S : C  D}
  {A B : CostructuredArrow S T} (f : A  B), S.map f.left  B.hom = A.hom

and the generated pattern is

which looks like a problem for making it trigger in nice situations

I suspect grind is trying to unfold the definitions for CostructuredArrows and their morphisms (which under the hood are morphisms in Comma categories with functors involving Discrete PUnit), where it clearly shouldn’t (perhaps because calling left and hom on objects leave no choice but to infer them as objects /homs in commas, and the underlying problem is in fact that we abuse the defeq between CostructuredArrows and Commas?). @Kim Morrison do you have an idea of the culprit/know how to fix this?


Last updated: Dec 20 2025 at 21:32 UTC