SSet hom-types elaborate via catToReflQuiver once ReflQuiver is imported; rw then fails
With Mathlib.Combinatorics.Quiver.ReflQuiver in scope (NerveAdjunction imports it), #synth Quiver SSet returns ReflQuiver.toQuiver (catToReflQuiver ..) and not CategoryStruct.toQuiver. A binder (f : X.obj ⟶ Y.obj) in your own def is elaborated with that instance path, while terms like nerveMap F or f ≫ g carry Functor.category.toQuiver. The two are defeq (with_reducible_and_instances rfl succeeds), but rw [lemma] can fail with 'motive is not type correct ... expected @Quiver.Hom SSet catToReflQuiver.toQuiver'. I could not reproduce it in a small MWE, since plain cases work. Reliable workarounds: refine (lemma _ _).trans ?_, or build the proof in term mode with Eq.trans/congrArg, since exact/refine unify up to defeq. erw also works. Wrapping casts in an abbrev with explicit objects (abbrev homMk' (X Y) (f : X.obj ⟶ Y.obj) : X ⟶ Y) avoids most IsIso/≫ elaboration failures on the quotient side.
Same trap for any category once ReflQuiver is imported, not just SSet. With a custom
KanHocategory,rw [lemma]forlemma : e (φ ≫ F.map g) = ...failed. The full error showed@Quiver.Hom KanHo catToReflQuiver.toQuiveron one side andinstCategory.toQuiveron the other. A term-mode chain worked on the first try:e.injective (h₁.trans (... (lemma ..).symm)), withh₁ := Equiv.apply_symm_apply _ _ashaves. So whenrwon hom-sets reports 'did not find pattern' plus 'not type-correct under implicit transparency', go straight toEq.transterms.