feat(CategoryTheory/Limits/Shapes): add WalkingArrow category#39670
feat(CategoryTheory/Limits/Shapes): add WalkingArrow category#39670VictorBoscaro wants to merge 2 commits into
Conversation
…tegory The walking arrow is the small category with two objects `zero` and `one` and a single non-identity morphism `zero ⟶ one`. It sits alongside the existing `WalkingPair`, `WalkingParallelPair`, `WalkingCospan`, and `WalkingSpan` shapes, completing the family of basic walking categories used for diagram shapes. The naming and structural style mirror `WalkingParallelPair` exactly. The equivalence `(WalkingArrow ⥤ C) ≌ Arrow C` is deferred to a follow-up PR.
- Remove non-standard `## Future work` docstring section; fold content into `## References` per Mathlib convention - Add walkingArrowHom_id to Main results list - Add @[simp] theorem walkingArrowHom_comp_arrow_id for downstream rewriting
Welcome new contributor!Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests. We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the If you haven't already done so, please come to https://leanprover.zulipchat.com/, introduce yourself, and mention your new PR. Thank you again for joining our community. |
PR summary b467b1be11Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
Summary
Adds
CategoryTheory.Limits.WalkingArrow, the small category with two objectszero/oneand a single non-identity morphismarrow : zero ⟶ one, atMathlib/CategoryTheory/Limits/Shapes/WalkingArrow.lean. TheSmallCategoryinstance is provided via an explicitWalkingArrowHomtype family mirroring the design ofWalkingParallelPairHominEqualizers.lean. FunctorsWalkingArrow ⥤ Ccorrespond to the data of a single morphism inC, i.e. to objects of the arrow categoryArrow C(Mathlib.CategoryTheory.Comma.Arrow); the equivalence of categories is deferred to a follow-up PR.Mathematical context
WalkingArrowis the freely generated category on a single non-identity morphism. It complements the existing small-fixture family —WalkingPair(two objects, no non-identity morphisms),WalkingParallelPair(two parallel non-identity morphisms),WalkingCospan,WalkingSpan— by providing the smallest non-discrete member: a single object-to-object arrow. The object nameszero/oneand the constructor naming style follow theWalkingParallelPairconvention already inEqualizers.lean.Where this could be used
diagramIsoArrowshape-rewriting: MirrorsdiagramIsoParallelPair(Mathlib.CategoryTheory.Limits.Shapes.Equalizers, line 251). AdiagramIsoArrowwould canonically rewrite anyWalkingArrow ⥤ CtoArrow.mk-form, enablinghasLimit_of_iso/hasColimit_of_isofor arrow-shaped diagrams in the same style as the equalizer case.FunctorialFactorizationData(Mathlib.CategoryTheory.MorphismProperty.Factorization) stores a functorArrow C ⥤ Ctogether with natural transformations from/toArrow.leftFuncandArrow.rightFunc. The pending(WalkingArrow ⥤ C) ≌ Arrow Cwould let those natural transformations be expressed as evaluations atzero/one, simplifying transport lemmas for weak factorization systems.Arrow.functor_ext(Mathlib.CategoryTheory.Comma.Arrow, line 421) is invoked multiple times in the small-object iteration proofs (Mathlib.CategoryTheory.SmallObject.Iteration.Basic). WithWalkingArrow, the same extensionality principle can be stated shape-theoretically as agreement on the image ofWalkingArrowHom.arrow, giving a uniform pattern across theWalking*family.ComposableArrows C 1≃Arrow Cunification:ComposableArrows.arrowEquiv(Mathlib.CategoryTheory.ComposableArrows.Basic, line 312) establishesComposableArrows C 1 ≃ Arrow Cat the type level;ComposableArrows C 1isFin 2 ⥤ C. A futureWalkingArrow ≌ Fin 2instance would make the categorical equivalence(WalkingArrow ⥤ C) ≌ Arrow Cits canonical lifting, unifying the three presentations of a single morphism.Notes
Walking*convention:WalkingArrow(type,UpperCamelCase),WalkingArrowHom(morphism family),walkingArrowHomCategory(instance,lowerCamelCase),walkingArrowHom_id(theorem,snake_case).set_option genSizeOfSpec falseapplied toWalkingArrowHomto suppress the spurioussizeOf_speclemma that triggers thesimpNFlinter on indexed inductives (same pattern asWalkingParallelPairHom).WalkingArrow ≌ Fin 2, the opposite functor, and the Arrow-C equivalence are left to follow-up PRs so that this PR is reviewable in one pass.@[simp]lemmas forcompcases beyondwalkingArrowHom_idandwalkingArrowHom_comp_arrow_id; pattern is asymmetric (thearrowconstructor has no further composition). Happy to add if preferred.