Skip to content

Commit b23a78e

Browse files
committed
doc: turn links to Stacks into stacks attributes (#21046)
I did not touch the links that are in module docs.
1 parent 974ebe9 commit b23a78e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+164
-317
lines changed

Mathlib/CategoryTheory/Abelian/Basic.lean

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,9 @@ attribute [local instance] OfCoimageImageComparisonIsIso.isNormalEpiCategory
242242

243243
/-- A preadditive category with kernels, cokernels, and finite products,
244244
in which the coimage-image comparison morphism is always an isomorphism,
245-
is an abelian category.
246-
247-
The Stacks project uses this characterisation at the definition of an abelian category.
248-
See <https://stacks.math.columbia.edu/tag/0109>.
249-
-/
245+
is an abelian category. -/
246+
@[stacks 0109
247+
"The Stacks project uses this characterisation at the definition of an abelian category."]
250248
def ofCoimageImageComparisonIsIso : Abelian C where
251249

252250
end CategoryTheory.Abelian

Mathlib/CategoryTheory/Abelian/Images.lean

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,8 @@ end Coimage
8585
In any abelian category this is an isomorphism.
8686
8787
Conversely, any additive category with kernels and cokernels and
88-
in which this is always an isomorphism, is abelian.
89-
90-
See <https://stacks.math.columbia.edu/tag/0107>
91-
-/
88+
in which this is always an isomorphism, is abelian. -/
89+
@[stacks 0107]
9290
def coimageImageComparison : Abelian.coimage f ⟶ Abelian.image f :=
9391
cokernel.desc (kernel.ι f) (kernel.lift (cokernel.π f) f (by simp)) (by ext; simp)
9492

Mathlib/CategoryTheory/Abelian/Transfer.lean

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,8 @@ open AbelianOfAdjunction
154154
we have `F : C ⥤ D` `G : D ⥤ C` (both preserving zero morphisms),
155155
`G` is left exact (that is, preserves finite limits),
156156
and further we have `adj : G ⊣ F` and `i : F ⋙ G ≅ 𝟭 C`,
157-
then `C` is also abelian.
158-
159-
See <https://stacks.math.columbia.edu/tag/03A3>
160-
-/
157+
then `C` is also abelian. -/
158+
@[stacks 03A3]
161159
def abelianOfAdjunction {C : Type u₁} [Category.{v₁} C] [Preadditive C] [HasFiniteProducts C]
162160
{D : Type u₂} [Category.{v₂} D] [Abelian D] (F : C ⥤ D) [Functor.PreservesZeroMorphisms F]
163161
(G : D ⥤ C) [Functor.PreservesZeroMorphisms G] [PreservesFiniteLimits G] (i : F ⋙ G ≅ 𝟭 C)

Mathlib/CategoryTheory/Adjunction/Basic.lean

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,8 @@ There is also a constructor `Adjunction.mkOfHomEquiv` which constructs an adjunc
9797
hom set equivalence.
9898
9999
To construct adjoints to a given functor, there are constructors `leftAdjointOfEquiv` and
100-
`adjunctionOfEquivLeft` (as well as their duals).
101-
102-
See <https://stacks.math.columbia.edu/tag/0037>.
103-
-/
100+
`adjunctionOfEquivLeft` (as well as their duals). -/
101+
@[stacks 0037]
104102
structure Adjunction (F : C ⥤ D) (G : D ⥤ C) where
105103
/-- The unit of an adjunction -/
106104
unit : 𝟭 C ⟶ F.comp G
@@ -508,11 +506,8 @@ section
508506
variable {E : Type u₃} [ℰ : Category.{v₃} E] {H : D ⥤ E} {I : E ⥤ D}
509507
(adj₁ : F ⊣ G) (adj₂ : H ⊣ I)
510508

511-
/-- Composition of adjunctions.
512-
513-
See <https://stacks.math.columbia.edu/tag/0DV0>.
514-
-/
515-
@[simps! (config := .lemmasOnly) unit counit]
509+
/-- Composition of adjunctions. -/
510+
@[simps! (config := .lemmasOnly) unit counit, stacks 0DV0]
516511
def comp : F ⋙ H ⊣ I ⋙ G :=
517512
mk' {
518513
homEquiv := fun _ _ ↦ Equiv.trans (adj₂.homEquiv _ _) (adj₁.homEquiv _ _)

Mathlib/CategoryTheory/Adjunction/Limits.lean

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,8 @@ def functorialityAdjunction : Cocones.functoriality K F ⊣ functorialityRightAd
7979
counit := functorialityCounit adj K
8080

8181
include adj in
82-
/-- A left adjoint preserves colimits.
83-
84-
See <https://stacks.math.columbia.edu/tag/0038>.
85-
-/
82+
/-- A left adjoint preserves colimits. -/
83+
@[stacks 0038]
8684
lemma leftAdjoint_preservesColimits : PreservesColimitsOfSize.{v, u} F where
8785
preservesColimitsOfShape :=
8886
{ preservesColimit :=
@@ -203,10 +201,8 @@ def functorialityAdjunction' : functorialityLeftAdjoint adj K ⊣ Cones.functori
203201
counit := functorialityCounit' adj K
204202

205203
include adj in
206-
/-- A right adjoint preserves limits.
207-
208-
See <https://stacks.math.columbia.edu/tag/0038>.
209-
-/
204+
/-- A right adjoint preserves limits. -/
205+
@[stacks 0038]
210206
lemma rightAdjoint_preservesLimits : PreservesLimitsOfSize.{v, u} G where
211207
preservesLimitsOfShape :=
212208
{ preservesLimit :=

Mathlib/CategoryTheory/Category/Basic.lean

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,8 @@ attribute [aesop safe (rule_sets := [CategoryTheory])] Subsingleton.elim
142142

143143
/-- The typeclass `Category C` describes morphisms associated to objects of type `C`.
144144
The universe levels of the objects and morphisms are unconstrained, and will often need to be
145-
specified explicitly, as `Category.{v} C`. (See also `LargeCategory` and `SmallCategory`.)
146-
147-
See <https://stacks.math.columbia.edu/tag/0014>.
148-
-/
149-
@[pp_with_univ]
145+
specified explicitly, as `Category.{v} C`. (See also `LargeCategory` and `SmallCategory`.) -/
146+
@[pp_with_univ, stacks 0014]
150147
class Category (obj : Type u) extends CategoryStruct.{v} obj : Type max u (v + 1) where
151148
/-- Identity morphisms are left identities for composition. -/
152149
id_comp : ∀ {X Y : obj} (f : X ⟶ Y), 𝟙 X ≫ f = f := by aesop_cat
@@ -235,19 +232,15 @@ theorem dite_comp {P : Prop} [Decidable P]
235232
(if h : P then f h else f' h) ≫ g = if h : P then f h ≫ g else f' h ≫ g := by aesop
236233

237234
/-- A morphism `f` is an epimorphism if it can be cancelled when precomposed:
238-
`f ≫ g = f ≫ h` implies `g = h`.
239-
240-
See <https://stacks.math.columbia.edu/tag/003B>.
241-
-/
235+
`f ≫ g = f ≫ h` implies `g = h`. -/
236+
@[stacks 003B]
242237
class Epi (f : X ⟶ Y) : Prop where
243238
/-- A morphism `f` is an epimorphism if it can be cancelled when precomposed. -/
244239
left_cancellation : ∀ {Z : C} (g h : Y ⟶ Z), f ≫ g = f ≫ h → g = h
245240

246241
/-- A morphism `f` is a monomorphism if it can be cancelled when postcomposed:
247-
`g ≫ f = h ≫ f` implies `g = h`.
248-
249-
See <https://stacks.math.columbia.edu/tag/003B>.
250-
-/
242+
`g ≫ f = h ≫ f` implies `g = h`. -/
243+
@[stacks 003B]
251244
class Mono (f : X ⟶ Y) : Prop where
252245
/-- A morphism `f` is a monomorphism if it can be cancelled when postcomposed. -/
253246
right_cancellation : ∀ {Z : C} (g h : Z ⟶ X), g ≫ f = h ≫ f → g = h

Mathlib/CategoryTheory/Category/Preorder.lean

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,8 @@ The category structure coming from a preorder. There is a morphism `X ⟶ Y` if
3939
4040
Because we don't allow morphisms to live in `Prop`,
4141
we have to define `X ⟶ Y` as `ULift (PLift (X ≤ Y))`.
42-
See `CategoryTheory.homOfLE` and `CategoryTheory.leOfHom`.
43-
44-
See <https://stacks.math.columbia.edu/tag/00D3>.
45-
-/
42+
See `CategoryTheory.homOfLE` and `CategoryTheory.leOfHom`. -/
43+
@[stacks 00D3]
4644
instance (priority := 100) smallCategory (α : Type u) [Preorder α] : SmallCategory α where
4745
Hom U V := ULift (PLift (U ≤ V))
4846
id X := ⟨⟨le_refl X⟩⟩

Mathlib/CategoryTheory/Comma/Over.lean

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ variable {T : Type u₁} [Category.{v₁} T]
3030
variable {D : Type u₂} [Category.{v₂} D]
3131

3232
/-- The over category has as objects arrows in `T` with codomain `X` and as morphisms commutative
33-
triangles.
34-
35-
See <https://stacks.math.columbia.edu/tag/001G>.
36-
-/
33+
triangles. -/
34+
@[stacks 001G]
3735
def Over (X : T) :=
3836
CostructuredArrow (𝟭 T) X
3937

@@ -118,10 +116,8 @@ section
118116

119117
variable (X)
120118

121-
/-- The forgetful functor mapping an arrow to its domain.
122-
123-
See <https://stacks.math.columbia.edu/tag/001G>.
124-
-/
119+
/-- The forgetful functor mapping an arrow to its domain. -/
120+
@[stacks 001G]
125121
def forget : Over X ⥤ T :=
126122
Comma.fst _ _
127123

@@ -141,10 +137,8 @@ def forgetCocone (X : T) : Limits.Cocone (forget X) :=
141137
{ pt := X
142138
ι := { app := Comma.hom } }
143139

144-
/-- A morphism `f : X ⟶ Y` induces a functor `Over X ⥤ Over Y` in the obvious way.
145-
146-
See <https://stacks.math.columbia.edu/tag/001G>.
147-
-/
140+
/-- A morphism `f : X ⟶ Y` induces a functor `Over X ⥤ Over Y` in the obvious way. -/
141+
@[stacks 001G]
148142
def map {Y : T} (f : X ⟶ Y) : Over X ⥤ Over Y :=
149143
Comma.mapRight _ <| Discrete.natTrans fun _ => f
150144

Mathlib/CategoryTheory/DiscreteCategory.lean

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,8 @@ instance {α : Type u₁} [DecidableEq α] : DecidableEq (Discrete α) :=
6767
/-- The "Discrete" category on a type, whose morphisms are equalities.
6868
6969
Because we do not allow morphisms in `Prop` (only in `Type`),
70-
somewhat annoyingly we have to define `X ⟶ Y` as `ULift (PLift (X = Y))`.
71-
72-
See <https://stacks.math.columbia.edu/tag/001A>
73-
-/
70+
somewhat annoyingly we have to define `X ⟶ Y` as `ULift (PLift (X = Y))`. -/
71+
@[stacks 001A]
7472
instance discreteCategory (α : Type u₁) : SmallCategory (Discrete α) where
7573
Hom X Y := ULift (PLift (X.as = Y.as))
7674
id _ := ULift.up (PLift.up rfl)

Mathlib/CategoryTheory/Equivalence.lean

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,8 @@ universe v₁ v₂ v₃ u₁ u₂ u₃
7171
7272
The triangle equation is written as a family of equalities between morphisms, it is more
7373
complicated if we write it as an equality of natural transformations, because then we would have
74-
to insert natural transformations like `F ⟶ F1`.
75-
76-
See <https://stacks.math.columbia.edu/tag/001J>
77-
-/
78-
@[ext]
74+
to insert natural transformations like `F ⟶ F1`. -/
75+
@[ext, stacks 001J]
7976
structure Equivalence (C : Type u₁) (D : Type u₂) [Category.{v₁} C] [Category.{v₂} D] where mk' ::
8077
/-- A functor in one direction -/
8178
functor : C ⥤ D
@@ -425,10 +422,8 @@ theorem pow_neg_one (e : C ≌ C) : e ^ (-1 : ℤ) = e.symm :=
425422
-- Note: the better formulation of this would involve `HasShift`.
426423
end
427424

428-
/-- The functor of an equivalence of categories is essentially surjective.
429-
430-
See <https://stacks.math.columbia.edu/tag/02C3>.
431-
-/
425+
/-- The functor of an equivalence of categories is essentially surjective. -/
426+
@[stacks 02C3]
432427
instance essSurj_functor (e : C ≌ E) : e.functor.EssSurj :=
433428
fun Y => ⟨e.inverse.obj Y, ⟨e.counitIso.app Y⟩⟩⟩
434429

@@ -443,20 +438,16 @@ def fullyFaithfulFunctor (e : C ≌ E) : e.functor.FullyFaithful where
443438
def fullyFaithfulInverse (e : C ≌ E) : e.inverse.FullyFaithful where
444439
preimage {X Y} f := e.counitIso.inv.app X ≫ e.functor.map f ≫ e.counitIso.hom.app Y
445440

446-
/-- The functor of an equivalence of categories is faithful.
447-
448-
See <https://stacks.math.columbia.edu/tag/02C3>.
449-
-/
441+
/-- The functor of an equivalence of categories is faithful. -/
442+
@[stacks 02C3]
450443
instance faithful_functor (e : C ≌ E) : e.functor.Faithful :=
451444
e.fullyFaithfulFunctor.faithful
452445

453446
instance faithful_inverse (e : C ≌ E) : e.inverse.Faithful :=
454447
e.fullyFaithfulInverse.faithful
455448

456-
/-- The functor of an equivalence of categories is full.
457-
458-
See <https://stacks.math.columbia.edu/tag/02C3>.
459-
-/
449+
/-- The functor of an equivalence of categories is full. -/
450+
@[stacks 02C3]
460451
instance full_functor (e : C ≌ E) : e.functor.Full :=
461452
e.fullyFaithfulFunctor.full
462453

@@ -527,10 +518,8 @@ noncomputable def inv (F : C ⥤ D) [F.IsEquivalence] : D ⥤ C where
527518
map_id X := by apply F.map_injective; simp
528519
map_comp {X Y Z} f g := by apply F.map_injective; simp
529520

530-
/-- Interpret a functor that is an equivalence as an equivalence.
531-
532-
See <https://stacks.math.columbia.edu/tag/02C3>. -/
533-
@[simps functor]
521+
/-- Interpret a functor that is an equivalence as an equivalence. -/
522+
@[simps functor, stacks 02C3]
534523
noncomputable def asEquivalence (F : C ⥤ D) [F.IsEquivalence] : C ≌ D where
535524
functor := F
536525
inverse := F.inv

0 commit comments

Comments
 (0)