Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit b6ed62c

Browse files
kim-empecherskyfpvandoorn
committed
feat(algebraic_topology): simplicial objects and simplicial types (#6195)
Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Yakov Pechersky <ffxen158@gmail.com> Co-authored-by: Floris van Doorn <fpvdoorn@gmail.com>
1 parent f3dbe9f commit b6ed62c

File tree

2 files changed

+182
-0
lines changed

2 files changed

+182
-0
lines changed
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
/-
2+
Copyright (c) 2021 Scott Morrison. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Johan Commelin, Scott Morrison
5+
-/
6+
import algebraic_topology.simplex_category
7+
8+
/-!
9+
# Simplicial objects in a category.
10+
11+
A simplicial object in a category `C` is a `C`-valued presheaf on `simplex_category`.
12+
-/
13+
14+
open opposite
15+
open category_theory
16+
17+
universes v u
18+
19+
namespace category_theory
20+
21+
variables (C : Type u) [category.{v} C]
22+
23+
/-- The category of simplicial objects valued in a category `C`.
24+
This is the category of contravariant functors from `simplex_category` to `C`. -/
25+
@[derive category, nolint has_inhabited_instance]
26+
def simplicial_object := simplex_categoryᵒᵖ ⥤ C
27+
28+
namespace simplicial_object
29+
variables {C} (X : simplicial_object C)
30+
31+
/-- Face maps for a simplicial object. -/
32+
def δ {n} (i : fin (n+2)) : X.obj (op (n+1 : ℕ)) ⟶ X.obj (op n) :=
33+
X.map (simplex_category.δ i).op
34+
35+
/-- Degeneracy maps for a simplicial object. -/
36+
def σ {n} (i : fin (n+1)) : X.obj (op n) ⟶ X.obj (op (n+1 : ℕ)) :=
37+
X.map (simplex_category.σ i).op
38+
39+
40+
/-- Isomorphisms from identities in ℕ. -/
41+
def eq_to_iso {n m : ℕ} (h : n = m) : X.obj (op n) ≅ X.obj (op m) :=
42+
X.map_iso (eq_to_iso (by rw h))
43+
44+
@[simp] lemma eq_to_iso_refl {n : ℕ} (h : n = n) : X.eq_to_iso h = iso.refl _ :=
45+
by { ext, simp [eq_to_iso], }
46+
47+
48+
/-- The generic case of the first simplicial identity -/
49+
lemma δ_comp_δ {n} {i j : fin (n+2)} (H : i ≤ j) :
50+
X.δ j.succ ≫ X.δ i = X.δ i.cast_succ ≫ X.δ j :=
51+
by { dsimp [δ], simp only [←X.map_comp, ←op_comp, simplex_category.δ_comp_δ H] }
52+
53+
/-- The special case of the first simplicial identity -/
54+
lemma δ_comp_δ_self {n} {i : fin (n+2)} : X.δ i.cast_succ ≫ X.δ i = X.δ i.succ ≫ X.δ i :=
55+
by { dsimp [δ], simp only [←X.map_comp, ←op_comp, simplex_category.δ_comp_δ_self] }
56+
57+
/-- The second simplicial identity -/
58+
lemma δ_comp_σ_of_le {n} {i : fin (n+2)} {j : fin (n+1)} (H : i ≤ j.cast_succ) :
59+
X.σ j.succ ≫ X.δ i.cast_succ = X.δ i ≫ X.σ j :=
60+
by { dsimp [δ, σ], simp only [←X.map_comp, ←op_comp, simplex_category.δ_comp_σ_of_le H] }
61+
62+
/-- The first part of the third simplicial identity -/
63+
lemma δ_comp_σ_self {n} {i : fin (n+1)} :
64+
X.σ i ≫ X.δ i.cast_succ = 𝟙 _ :=
65+
begin
66+
dsimp [δ, σ],
67+
simp only [←X.map_comp, ←op_comp, simplex_category.δ_comp_σ_self, op_id, X.map_id],
68+
end
69+
70+
/-- The second part of the third simplicial identity -/
71+
lemma δ_comp_σ_succ {n} {i : fin (n+1)} :
72+
X.σ i ≫ X.δ i.succ = 𝟙 _ :=
73+
begin
74+
dsimp [δ, σ],
75+
simp only [←X.map_comp, ←op_comp, simplex_category.δ_comp_σ_succ, op_id, X.map_id],
76+
end
77+
78+
/-- The fourth simplicial identity -/
79+
lemma δ_comp_σ_of_gt {n} {i : fin (n+2)} {j : fin (n+1)} (H : j.cast_succ < i) :
80+
X.σ j.cast_succ ≫ X.δ i.succ = X.δ i ≫ X.σ j :=
81+
by { dsimp [δ, σ], simp only [←X.map_comp, ←op_comp, simplex_category.δ_comp_σ_of_gt H] }
82+
83+
/-- The fifth simplicial identity -/
84+
lemma σ_comp_σ {n} {i j : fin (n+1)} (H : i ≤ j) :
85+
X.σ j ≫ X.σ i.cast_succ = X.σ i ≫ X.σ j.succ :=
86+
by { dsimp [δ, σ], simp only [←X.map_comp, ←op_comp, simplex_category.σ_comp_σ H] }
87+
88+
end simplicial_object
89+
90+
end category_theory
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
/-
2+
Copyright (c) 2021 Scott Morrison. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Johan Commelin, Scott Morrison
5+
-/
6+
import algebraic_topology.simplicial_object
7+
import category_theory.yoneda
8+
9+
/-!
10+
A simplicial set is just a simplicial object in `Type`,
11+
i.e. a `Type`-valued presheaf on the simplex category.
12+
13+
(One might be tempted to all these "simplicial types" when working in type-theoretic foundations,
14+
but this would be unnecessarily confusing given the existing notion of a simplicial type in
15+
homotopy type theory.)
16+
17+
We define the standard simplices `Δ[n]` as simplicial sets,
18+
and their boundaries `∂Δ[n]` and horns `Λ[n, i]`.
19+
(The notations are available via `open_locale sSet`.)
20+
21+
## Future work
22+
23+
There isn't yet a complete API for simplices, boundaries, and horns.
24+
As an example, we should have a function that constructs
25+
from a non-surjective order preserving function `fin n → fin n`
26+
a morphism `Δ[n] ⟶ ∂Δ[n]`.
27+
-/
28+
29+
universes v u
30+
31+
open category_theory
32+
33+
/-- The category of simplicial sets.
34+
This is the category of contravariant functors from
35+
`simplex_category` to `Type u`. -/
36+
@[derive large_category]
37+
def sSet : Type (u+1) := simplicial_object (Type u)
38+
39+
namespace sSet
40+
41+
/-- The `n`-th standard simplex `Δ[n]` associated with a nonempty finite linear order `n`
42+
is the Yoneda embedding of `n`. -/
43+
def standard_simplex : simplex_category ⥤ sSet := yoneda
44+
45+
localized "notation `Δ[`n`]` := standard_simplex.obj n" in sSet
46+
47+
instance : inhabited sSet := ⟨standard_simplex.obj (0 : ℕ)⟩
48+
49+
/-- The `m`-simplices of the `n`-th standard simplex are
50+
the monotone maps from `fin (m+1)` to `fin (n+1)`. -/
51+
def as_preorder_hom {n} {m} (α : Δ[n].obj m) :
52+
preorder_hom (fin (m.unop+1)) (fin (n+1)) := α
53+
54+
/-- The boundary `∂Δ[n]` of the `n`-th standard simplex consists of
55+
all `m`-simplices of `standard_simplex n` that are not surjective
56+
(when viewed as monotone function `m → n`). -/
57+
def boundary (n : ℕ) : sSet :=
58+
{ obj := λ m, {α : Δ[n].obj m // ¬ function.surjective (as_preorder_hom α)},
59+
map := λ m₁ m₂ f α, ⟨f.unop ≫ (α : Δ[n].obj m₁),
60+
by { intro h, apply α.property, exact function.surjective.of_comp h }⟩ }
61+
62+
localized "notation `∂Δ[`n`]` := boundary n" in sSet
63+
64+
/-- The inclusion of the boundary of the `n`-th standard simplex into that standard simplex. -/
65+
def boundary_inclusion (n : ℕ) :
66+
∂Δ[n] ⟶ Δ[n] :=
67+
{ app := λ m (α : {α : Δ[n].obj m // _}), α }
68+
69+
/-- `horn n i` (or `Λ[n, i]`) is the `i`-th horn of the `n`-th standard simplex, where `i : n`.
70+
It consists of all `m`-simplices `α` of `Δ[n]`
71+
for which the union of `{i}` and the range of `α` is not all of `n`
72+
(when viewing `α` as monotone function `m → n`). -/
73+
def horn (n : ℕ) (i : fin (n+1)) : sSet :=
74+
{ obj := λ m,
75+
{ α : Δ[n].obj m // set.range (as_preorder_hom α) ∪ {i} ≠ set.univ },
76+
map := λ m₁ m₂ f α, ⟨f.unop ≫ (α : Δ[n].obj m₁),
77+
begin
78+
intro h, apply α.property,
79+
rw set.eq_univ_iff_forall at h ⊢, intro j,
80+
apply or.imp _ id (h j),
81+
intro hj,
82+
exact set.range_comp_subset_range _ _ hj,
83+
end⟩ }
84+
85+
localized "notation `Λ[`n`, `i`]` := horn n i" in sSet
86+
87+
/-- The inclusion of the `i`-th horn of the `n`-th standard simplex into that standard simplex. -/
88+
def horn_inclusion (n : ℕ) (i : fin (n+1)) :
89+
Λ[n, i] ⟶ Δ[n] :=
90+
{ app := λ m (α : {α : Δ[n].obj m // _}), α }
91+
92+
end sSet

0 commit comments

Comments
 (0)