Skip to content

Commit 56dfd71

Browse files
thorimurj-loreaux
andcommitted
style: use simplex notation (⦋n⦌) where possible (#25322)
`StandardSimplex.mk n` is replaced with `⦋n⦌` where possible (except in notation and macros, which are left untouched). This includes opening `Simplicial` (`scoped`) in two files. Also, outdated and unused `local notation` `[n]` for `StandardSimplex.mk n` is removed. Co-authored-by: Jireh Loreaux <loreaujy@gmail.com>
1 parent 0a739db commit 56dfd71

File tree

7 files changed

+38
-39
lines changed

7 files changed

+38
-39
lines changed

Mathlib/AlgebraicTopology/CechNerve.lean

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ object, when `C` has finite products. We call this `cechNerveTerminalFrom`. When
3030
-/
3131

3232

33-
open CategoryTheory
33+
open CategoryTheory Limits
3434

35-
open CategoryTheory.Limits
35+
open scoped Simplicial
3636

3737
noncomputable section
3838

@@ -107,7 +107,7 @@ def equivalenceRightToLeft (X : SimplicialObject.Augmented C) (F : Arrow C)
107107
right := G.right
108108
w := by
109109
have := G.w
110-
apply_fun fun e => e.app (Opposite.op <| SimplexCategory.mk 0) at this
110+
apply_fun fun e => e.app (Opposite.op 0) at this
111111
simpa using this
112112

113113
/-- A helper function used in defining the Čech adjunction. -/
@@ -228,12 +228,12 @@ def augmentedCechConerve : Arrow C ⥤ CosimplicialObject.Augmented C where
228228
def equivalenceLeftToRight (F : Arrow C) (X : CosimplicialObject.Augmented C)
229229
(G : F.augmentedCechConerve ⟶ X) : F ⟶ Augmented.toArrow.obj X where
230230
left := G.left
231-
right := (WidePushout.ι _ 0 ≫ G.right.app (SimplexCategory.mk 0) :)
231+
right := (WidePushout.ι _ 0 ≫ G.right.app 0 :)
232232
w := by
233233
dsimp
234234
rw [@WidePushout.arrow_ι_assoc _ _ _ _ _ (fun (_ : Fin 1) => F.hom)
235235
(by dsimp; infer_instance)]
236-
exact congr_app G.w (SimplexCategory.mk 0)
236+
exact congr_app G.w 0
237237

238238
/-- A helper function used in defining the Čech conerve adjunction. -/
239239
@[simps!]
@@ -247,7 +247,7 @@ def equivalenceRightToLeft (F : Arrow C) (X : CosimplicialObject.Augmented C)
247247
(by
248248
rintro j
249249
rw [← Arrow.w_assoc G]
250-
have t := X.hom.naturality (SimplexCategory.const (SimplexCategory.mk 0) x j)
250+
have t := X.hom.naturality (SimplexCategory.const 0 x j)
251251
dsimp at t ⊢
252252
simp only [Category.id_comp] at t
253253
rw [← t])
@@ -298,7 +298,7 @@ abbrev cechConerveAdjunction : augmentedCechConerve ⊣ (Augmented.toArrow : _
298298

299299
end CosimplicialObject
300300

301-
/-- Given an object `X : C`, the natural simplicial object sending `[n]` to `Xⁿ⁺¹`. -/
301+
/-- Given an object `X : C`, the natural simplicial object sending `⦋n⦌` to `Xⁿ⁺¹`. -/
302302
def cechNerveTerminalFrom {C : Type u} [Category.{v} C] [HasFiniteProducts C] (X : C) :
303303
SimplicialObject C where
304304
obj n := ∏ᶜ fun _ : Fin (n.unop.len + 1) => X

Mathlib/AlgebraicTopology/MooreComplex.lean

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ open CategoryTheory CategoryTheory.Limits
3737

3838
open Opposite
3939

40+
open scoped Simplicial
41+
4042
namespace AlgebraicTopology
4143

4244
variable {C : Type*} [Category C] [Abelian C]
@@ -55,7 +57,7 @@ variable (X : SimplicialObject C)
5557

5658
/-- The normalized Moore complex in degree `n`, as a subobject of `X n`.
5759
-/
58-
def objX : ∀ n : ℕ, Subobject (X.obj (op (SimplexCategory.mk n)))
60+
def objX : ∀ n : ℕ, Subobject (X.obj (op ⦋n⦌))
5961
| 0 => ⊤
6062
| n + 1 => Finset.univ.inf fun k : Fin (n + 1) => kernelSubobject (X.δ k.succ)
6163

@@ -117,7 +119,7 @@ variable {X} {Y : SimplicialObject C} (f : X ⟶ Y)
117119
@[simps!]
118120
def map (f : X ⟶ Y) : obj X ⟶ obj Y :=
119121
ChainComplex.ofHom _ _ _ _ _ _
120-
(fun n => factorThru _ (arrow _ ≫ f.app (op (SimplexCategory.mk n))) (by
122+
(fun n => factorThru _ (arrow _ ≫ f.app (op ⦋n⦌)) (by
121123
cases n <;> dsimp
122124
· apply top_factors
123125
· refine (finset_inf_factors _).mpr fun i _ => kernelSubobject_factors _ _ ?_

Mathlib/AlgebraicTopology/SimplexCategory/Basic.lean

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ instance : skeletalFunctor.Faithful where
568568

569569
instance : skeletalFunctor.EssSurj where
570570
mem_essImage X :=
571-
mk (Fintype.card X - 1 : ℕ),
571+
(Fintype.card X - 1 : ℕ),
572572
by
573573
have aux : Fintype.card X = Fintype.card X - 1 + 1 :=
574574
(Nat.succ_pred_eq_of_pos <| Fintype.card_pos_iff.mpr ⟨⊥⟩).symm
@@ -732,9 +732,9 @@ theorem iso_eq_iso_refl {x : SimplexCategory} (e : x ≅ x) : e = Iso.refl x :=
732732
theorem eq_id_of_isIso {x : SimplexCategory} (f : x ⟶ x) [IsIso f] : f = 𝟙 _ :=
733733
congr_arg (fun φ : _ ≅ _ => φ.hom) (iso_eq_iso_refl (asIso f))
734734

735-
theorem eq_σ_comp_of_not_injective' {n : ℕ} {Δ' : SimplexCategory} (θ : mk (n + 1) ⟶ Δ')
735+
theorem eq_σ_comp_of_not_injective' {n : ℕ} {Δ' : SimplexCategory} (θ : n + 1 ⟶ Δ')
736736
(i : Fin (n + 1)) (hi : θ.toOrderHom (Fin.castSucc i) = θ.toOrderHom i.succ) :
737-
∃ θ' : mk n ⟶ Δ', θ = σ i ≫ θ' := by
737+
∃ θ' : ⦋n⦌ ⟶ Δ', θ = σ i ≫ θ' := by
738738
use δ i.succ ≫ θ
739739
ext x : 3
740740
simp only [len_mk, σ, mkHom, comp_toOrderHom, Hom.toOrderHom_mk, OrderHom.comp_coe,
@@ -763,9 +763,9 @@ theorem eq_σ_comp_of_not_injective' {n : ℕ} {Δ' : SimplexCategory} (θ : mk
763763
Nat.lt_succ_iff, Fin.ext_iff] at h' h'' ⊢
764764
omega
765765

766-
theorem eq_σ_comp_of_not_injective {n : ℕ} {Δ' : SimplexCategory} (θ : mk (n + 1) ⟶ Δ')
766+
theorem eq_σ_comp_of_not_injective {n : ℕ} {Δ' : SimplexCategory} (θ : n + 1 ⟶ Δ')
767767
(hθ : ¬Function.Injective θ.toOrderHom) :
768-
∃ (i : Fin (n + 1)) (θ' : mk n ⟶ Δ'), θ = σ i ≫ θ' := by
768+
∃ (i : Fin (n + 1)) (θ' : ⦋n⦌ ⟶ Δ'), θ = σ i ≫ θ' := by
769769
simp only [Function.Injective, exists_prop, not_forall] at hθ
770770
-- as θ is not injective, there exists `x<y` such that `θ x = θ y`
771771
-- and then, `θ x = θ (x+1)`
@@ -783,8 +783,8 @@ theorem eq_σ_comp_of_not_injective {n : ℕ} {Δ' : SimplexCategory} (θ : mk (
783783
· rw [Fin.castSucc_castPred, h₁]
784784
exact θ.toOrderHom.monotone ((Fin.succ_castPred_le_iff _).mpr h₂)
785785

786-
theorem eq_comp_δ_of_not_surjective' {n : ℕ} {Δ : SimplexCategory} (θ : Δ ⟶ mk (n + 1))
787-
(i : Fin (n + 2)) (hi : ∀ x, θ.toOrderHom x ≠ i) : ∃ θ' : Δ ⟶ mk n, θ = θ' ≫ δ i := by
786+
theorem eq_comp_δ_of_not_surjective' {n : ℕ} {Δ : SimplexCategory} (θ : Δ ⟶ n + 1)
787+
(i : Fin (n + 2)) (hi : ∀ x, θ.toOrderHom x ≠ i) : ∃ θ' : Δ ⟶ ⦋n⦌, θ = θ' ≫ δ i := by
788788
use θ ≫ σ (.predAbove (.last n) i)
789789
ext x : 3
790790
suffices ∀ j ≠ i, i.succAbove (((Fin.last n).predAbove i).predAbove j) = j by
@@ -793,9 +793,9 @@ theorem eq_comp_δ_of_not_surjective' {n : ℕ} {Δ : SimplexCategory} (θ : Δ
793793
intro j hj
794794
cases i using Fin.lastCases <;> simp [hj]
795795

796-
theorem eq_comp_δ_of_not_surjective {n : ℕ} {Δ : SimplexCategory} (θ : Δ ⟶ mk (n + 1))
796+
theorem eq_comp_δ_of_not_surjective {n : ℕ} {Δ : SimplexCategory} (θ : Δ ⟶ n + 1)
797797
(hθ : ¬Function.Surjective θ.toOrderHom) :
798-
∃ (i : Fin (n + 2)) (θ' : Δ ⟶ mk n), θ = θ' ≫ δ i := by
798+
∃ (i : Fin (n + 2)) (θ' : Δ ⟶ ⦋n⦌), θ = θ' ≫ δ i := by
799799
obtain ⟨i, hi⟩ := not_forall.mp hθ
800800
use i
801801
exact eq_comp_δ_of_not_surjective' θ i (not_exists.mp hi)
@@ -817,7 +817,7 @@ theorem eq_id_of_epi {x : SimplexCategory} (i : x ⟶ x) [Epi i] : i = 𝟙 _ :=
817817
eq_self_iff_true, and_true]
818818
infer_instance
819819

820-
theorem eq_σ_of_epi {n : ℕ} (θ : mk (n + 1)mk n) [Epi θ] : ∃ i : Fin (n + 1), θ = σ i := by
820+
theorem eq_σ_of_epi {n : ℕ} (θ : n + 1⦋n⦌) [Epi θ] : ∃ i : Fin (n + 1), θ = σ i := by
821821
rcases eq_σ_comp_of_not_injective θ (by
822822
by_contra h
823823
simpa using le_of_mono (mono_iff_injective.mpr h)) with ⟨i, θ', h⟩
@@ -828,7 +828,7 @@ theorem eq_σ_of_epi {n : ℕ} (θ : mk (n + 1) ⟶ mk n) [Epi θ] : ∃ i : Fin
828828
haveI := CategoryTheory.epi_of_epi (σ i) θ'
829829
rw [h, eq_id_of_epi θ', Category.comp_id]
830830

831-
theorem eq_δ_of_mono {n : ℕ} (θ : mk nmk (n + 1)) [Mono θ] : ∃ i : Fin (n + 2), θ = δ i := by
831+
theorem eq_δ_of_mono {n : ℕ} (θ : ⦋n⦌n + 1) [Mono θ] : ∃ i : Fin (n + 2), θ = δ i := by
832832
rcases eq_comp_δ_of_not_surjective θ (by
833833
by_contra h
834834
simpa using le_of_epi (epi_iff_surjective.mpr h)) with ⟨i, θ', h⟩

Mathlib/AlgebraicTopology/SimplicialObject/Basic.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -438,9 +438,9 @@ def toArrow : Augmented C ⥤ Arrow C where
438438
/-- The compatibility of a morphism with the augmentation, on 0-simplices -/
439439
@[reassoc]
440440
theorem w₀ {X Y : Augmented C} (f : X ⟶ Y) :
441-
(Augmented.drop.map f).app (op (SimplexCategory.mk 0)) ≫ Y.hom.app (op (SimplexCategory.mk 0)) =
442-
X.hom.app (op (SimplexCategory.mk 0)) ≫ Augmented.point.map f := by
443-
convert congr_app f.w (op (SimplexCategory.mk 0))
441+
(Augmented.drop.map f).app (op 0⦌) ≫ Y.hom.app (op 0) =
442+
X.hom.app (op 0) ≫ Augmented.point.map f := by
443+
convert congr_app f.w (op 0)
444444

445445
variable (C)
446446

@@ -663,12 +663,12 @@ theorem σ_comp_σ {n} {i j : Fin (n + 1)} (H : i ≤ j) :
663663

664664
@[reassoc (attr := simp)]
665665
theorem δ_naturality {X' X : CosimplicialObject C} (f : X ⟶ X') {n : ℕ} (i : Fin (n + 2)) :
666-
X.δ i ≫ f.app (SimplexCategory.mk (n + 1)) = f.app (SimplexCategory.mk n) ≫ X'.δ i :=
666+
X.δ i ≫ f.app n + 1 = f.app ⦋n⦌ ≫ X'.δ i :=
667667
f.naturality _
668668

669669
@[reassoc (attr := simp)]
670670
theorem σ_naturality {X' X : CosimplicialObject C} (f : X ⟶ X') {n : ℕ} (i : Fin (n + 1)) :
671-
X.σ i ≫ f.app (SimplexCategory.mk n) = f.app (SimplexCategory.mk (n + 1)) ≫ X'.σ i :=
671+
X.σ i ≫ f.app ⦋n⦌ = f.app n + 1 ≫ X'.σ i :=
672672
f.naturality _
673673

674674
variable (C)

Mathlib/AlgebraicTopology/SimplicialSet/Coskeletal.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ noncomputable def isPointwiseRightKanExtensionAt (n : ℕ) :
179179
fac s j := by
180180
ext x
181181
obtain ⟨⟨i, hi⟩, ⟨f : _ ⟶ _⟩, rfl⟩ := j.mk_surjective
182-
obtain ⟨i, rfl⟩ : ∃ j, SimplexCategory.mk j = i := ⟨_, i.mk_len⟩
182+
obtain ⟨i, rfl⟩ : ∃ j, ⦋j⦌ = i := ⟨_, i.mk_len⟩
183183
dsimp at hi ⊢
184184
apply sx.spineInjective
185185
dsimp

Mathlib/AlgebraicTopology/SimplicialSet/NerveAdjunction.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ def nerve₂Adj.counit : nerveFunctor₂ ⋙ hoFunctor₂.{u} ⟶ 𝟭 Cat where
7676
app _ := nerve₂Adj.counit.app _
7777
naturality _ _ _ := nerve₂Adj.counit.naturality _
7878

79-
local notation (priority := high) "[" n "]" => SimplexCategory.mk n
80-
8179
variable {C : Type u} [SmallCategory C] {X : SSet.Truncated.{u} 2}
8280
(F : SSet.oneTruncation₂.obj X ⟶ ReflQuiv.of C)
8381

Mathlib/AlgebraicTopology/SimplicialSet/StdSimplex.lean

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ open CategoryTheory Limits Simplicial Opposite
2525

2626
namespace SSet
2727

28-
/-- The functor `SimplexCategory ⥤ SSet` which sends `SimplexCategory.mk n` to
29-
the standard simplex `Δ[n]` is a cosimplicial object in the category of simplicial sets.
30-
(This functor is essentially given by the Yoneda embedding). -/
28+
/-- The functor `SimplexCategory ⥤ SSet` which sends `⦋n⦌` to the standard simplex `Δ[n]` is a
29+
cosimplicial object in the category of simplicial sets. (This functor is essentially given by the
30+
Yoneda embedding). -/
3131
def stdSimplex : CosimplicialObject SSet.{u} :=
3232
yoneda ⋙ uliftFunctor
3333

@@ -67,7 +67,7 @@ lemma ext {n d : ℕ} (x y : Δ[n] _⦋d⦌) (h : ∀ (i : Fin (d + 1)), x i = y
6767

6868
@[simp]
6969
lemma objEquiv_toOrderHom_apply {n i : ℕ}
70-
(x : (stdSimplex.{u} ^⦋n⦌).obj (op (.mk i))) (j : Fin (i + 1)) :
70+
(x : (stdSimplex.{u} ^⦋n⦌).obj (op ⦋i⦌)) (j : Fin (i + 1)) :
7171
DFunLike.coe (F := Fin (i + 1) →o Fin (n + 1))
7272
((DFunLike.coe (F := Δ[n].obj (op ⦋i⦌) ≃ (⦋i⦌ ⟶ ⦋n⦌))
7373
objEquiv x)).toOrderHom j = x j :=
@@ -79,8 +79,7 @@ lemma objEquiv_symm_comp {n n' : SimplexCategory} {m : SimplexCategoryᵒᵖ}
7979
(stdSimplex.map g).app _ (objEquiv.{u}.symm f) := rfl
8080

8181
@[simp]
82-
lemma objEquiv_symm_apply {n m : ℕ}
83-
(f : SimplexCategory.mk m ⟶ SimplexCategory.mk n) (i : Fin (m + 1)) :
82+
lemma objEquiv_symm_apply {n m : ℕ} (f : ⦋m⦌ ⟶ ⦋n⦌) (i : Fin (m + 1)) :
8483
(objEquiv.{u}.symm f : Δ[n] _⦋m⦌) i = f.toOrderHom i := rfl
8584

8685
/-- Constructor for simplices of the standard simplex which takes a `OrderHom` as an input. -/
@@ -91,7 +90,7 @@ abbrev objMk {n : SimplexCategory} {m : SimplexCategoryᵒᵖ}
9190

9291
@[simp]
9392
lemma objMk_apply {n m : ℕ} (f : Fin (m + 1) →o Fin (n + 1)) (i : Fin (m + 1)) :
94-
objMk.{u} (n := .mk n) (m := op (.mk m)) f i = f i :=
93+
objMk.{u} (n := ⦋n⦌) (m := op ⦋m⦌) f i = f i :=
9594
rfl
9695

9796
/-- The `m`-simplices of the `n`-th standard simplex are
@@ -231,7 +230,7 @@ then the face `face S` of `Δ[n]` is representable by `m`,
231230
i.e. `face S` is isomorphic to `Δ[m]`, see `stdSimplex.isoOfRepresentableBy`. -/
232231
def faceRepresentableBy {n : ℕ} (S : Finset (Fin (n + 1)))
233232
(m : ℕ) (e : Fin (m + 1) ≃o S) :
234-
(face S : SSet.{u}).RepresentableBy (.mk m) where
233+
(face S : SSet.{u}).RepresentableBy ⦋m⦌ where
235234
homEquiv {j} :=
236235
{ toFun f := ⟨objMk ((OrderHom.Subtype.val S.toSet).comp
237236
(e.toOrderEmbedding.toOrderHom.comp f.toOrderHom)), fun _ ↦ by aesop⟩
@@ -251,9 +250,9 @@ def faceRepresentableBy {n : ℕ} (S : Finset (Fin (n + 1)))
251250
(e.apply_symm_apply ⟨(objEquiv x).toOrderHom i, _⟩) }
252251
homEquiv_comp f g := by aesop
253252

254-
/-- If a simplicial set `X` is representable by `SimplexCategory.mk m` for some `m : ℕ`,
255-
then this is the corresponding isomorphism `Δ[m] ≅ X`. -/
256-
def isoOfRepresentableBy {X : SSet.{u}} {m : ℕ} (h : X.RepresentableBy (.mk m)) :
253+
/-- If a simplicial set `X` is representable by `⦋m⦌` for some `m : ℕ`, then this is the
254+
corresponding isomorphism `Δ[m] ≅ X`. -/
255+
def isoOfRepresentableBy {X : SSet.{u}} {m : ℕ} (h : X.RepresentableBy ⦋m⦌) :
257256
Δ[m] ≅ X :=
258257
NatIso.ofComponents (fun n ↦ Equiv.toIso (objEquiv.trans h.homEquiv)) (by
259258
intros

0 commit comments

Comments
 (0)