Summary
A Lean 4 and Mathlib formalization of the categories of -arrows associated to a simplicially enriched category, contributed to the Infinity Cosmos blueprint.
Infinity Cosmos is Emily Riehl's collaborative project to formalize the model-independent theory of -categories (following Riehl and Verity's Elements of -Category Theory) in Lean 4 and Mathlib, tracked through a LaTeX blueprint whose statements link directly to machine-checked declarations.
My contribution formalizes the category of -arrows of a simplicial category and identifies the -arrow category with the underlying ordinary category, closing three nodes of the blueprint (defn:n-arrow, lem:cat-of-n-arrows, and lem:zero-arrows-equivalence) in InfinityCosmos/ForMathlib/AlgebraicTopology/SimplicialCategory/Degree.lean with no sorrys.
Categories of -arrows
A simplicial category is a category enriched over simplicial sets : for each pair of objects , there is a mapping simplicial set , together with enriched identity and composition morphisms satisfying unit and associativity laws.
Definition 1 (-arrow). For each integer and objects of a simplicial category , an -arrow from to is an -simplex in the enriched hom-space .
Evaluating the enriched structure at the object extracts an ordinary category in each simplicial degree.
Lemma 2 (Category of -arrows). For any simplicial category and , the -arrows assemble into an ordinary category with the same objects as .
Proof. Define . Identities are given by evaluating the enriched identity natural transformation at , and composition is given by evaluating the enriched composition map at . The ordinary left-unit, right-unit, and associativity axioms follow directly by evaluating the corresponding enriched axioms at .□
In Lean, objects are wrapped in a lightweight structure Degree (C : Type u) (n : ℕ) carrying obj : C so that Category (Degree C n) can be registered as an instance without colliding with the underlying Category C instance.
abbrev NArrow (n : ℕ) (X Y : C) : Type v := (sHom X Y) _⦋n⦌
structure Degree (C : Type u) (n : ℕ) where
obj : C
noncomputable instance category : Category.{v} (Degree C n) where
Hom X Y := NArrow n X.obj Y.obj
id X := (eId SSet X.obj).app (op ⦋n⦌) PUnit.unit
comp {X Y Z} f g := (sHomComp X.obj Y.obj Z.obj).app (op ⦋n⦌) (f, g)
id_comp {X Y} f :=
ConcreteCategory.congr_hom (NatTrans.congr_app (e_id_comp SSet X.obj Y.obj) (op ⦋n⦌)) f
comp_id {X Y} f :=
ConcreteCategory.congr_hom (NatTrans.congr_app (e_comp_id SSet X.obj Y.obj) (op ⦋n⦌)) f
assoc {W X Y Z} f g h :=
congrArg (fun k => k (f, g, h))
(NatTrans.congr_app (e_assoc SSet W.obj X.obj Y.obj Z.obj) (op ⦋n⦌))
Equivalence at degree zero
In Mathlib, a simplicial category C carries both an ordinary Category C instance and an equivalence homEquiv' X Y : (X ⟶ Y) ≃ (sHom X Y) _⦋0⦌ identifying ordinary morphisms with -simplices of the mapping space, compatible with identities (eHomEquiv_id) and composition (eHomEquiv_comp).
Lemma 3 (Zero-arrows equivalence). The category of -arrows is canonically equivalent to the underlying category of via an equivalence that is the identity on objects.
Proof. The bijections homEquiv' X Y assemble into a functor toZero : C ⥤ Degree C 0 using eHomEquiv_id and eHomEquiv_comp. Because homEquiv' is an equivalence of types, its inverse fromZero : Degree C 0 ⥤ C inherits functoriality by injectivity of homEquiv'. Both round-trip compositions are strictly the identity on objects and morphisms, so Iso.refl supplies the unit and counit natural isomorphisms.□
noncomputable def zeroEquivalence : Degree C 0 ≌ C where
functor := fromZero
inverse := toZero
unitIso := NatIso.ofComponents (fun X => Iso.refl X) (by intro X Y f; simp)
counitIso := NatIso.ofComponents (fun X => Iso.refl X) (by intro X Y f; simp)
functor_unitIso_comp X := by
change fromZero.map (𝟙 X) ≫ 𝟙 X.obj = 𝟙 X.obj
simp only [Functor.map_id, fromZero_obj, Category.id_comp]
Each declaration carries an @[blueprint ...] annotation using Lean Architect and replaces the hand-written LaTeX stubs in blueprint/src/content.tex with \inputleannode directives, keeping the mathematical exposition and the checked Lean proof synchronized.