Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
File size: 5,169 Bytes
4365a98 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
/-
Copyright (c) 2021 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin, Scott Morrison, Adam Topaz
-/
import algebraic_topology.simplicial_object
import algebraic_topology.topological_simplex
import category_theory.limits.presheaf
import category_theory.limits.types
import category_theory.yoneda
import topology.category.Top.limits
/-!
A simplicial set is just a simplicial object in `Type`,
i.e. a `Type`-valued presheaf on the simplex category.
(One might be tempted to call these "simplicial types" when working in type-theoretic foundations,
but this would be unnecessarily confusing given the existing notion of a simplicial type in
homotopy type theory.)
We define the standard simplices `Δ[n]` as simplicial sets,
and their boundaries `∂Δ[n]` and horns `Λ[n, i]`.
(The notations are available via `open_locale simplicial`.)
## Future work
There isn't yet a complete API for simplices, boundaries, and horns.
As an example, we should have a function that constructs
from a non-surjective order preserving function `fin n → fin n`
a morphism `Δ[n] ⟶ ∂Δ[n]`.
-/
universes v u
open category_theory
open_locale simplicial
/-- The category of simplicial sets.
This is the category of contravariant functors from
`simplex_category` to `Type u`. -/
@[derive [large_category, limits.has_limits, limits.has_colimits]]
def sSet : Type (u+1) := simplicial_object (Type u)
namespace sSet
/-- The `n`-th standard simplex `Δ[n]` associated with a nonempty finite linear order `n`
is the Yoneda embedding of `n`. -/
def standard_simplex : simplex_category ⥤ sSet := yoneda
localized "notation `Δ[`n`]` := sSet.standard_simplex.obj (simplex_category.mk n)" in simplicial
instance : inhabited sSet := ⟨Δ[0]⟩
section
/-- The `m`-simplices of the `n`-th standard simplex are
the monotone maps from `fin (m+1)` to `fin (n+1)`. -/
def as_order_hom {n} {m} (α : Δ[n].obj m) :
order_hom (fin (m.unop.len+1)) (fin (n+1)) := α.to_order_hom
end
/-- The boundary `∂Δ[n]` of the `n`-th standard simplex consists of
all `m`-simplices of `standard_simplex n` that are not surjective
(when viewed as monotone function `m → n`). -/
def boundary (n : ℕ) : sSet :=
{ obj := λ m, {α : Δ[n].obj m // ¬ function.surjective (as_order_hom α)},
map := λ m₁ m₂ f α, ⟨f.unop ≫ (α : Δ[n].obj m₁),
by { intro h, apply α.property, exact function.surjective.of_comp h }⟩ }
localized "notation `∂Δ[`n`]` := sSet.boundary n" in simplicial
/-- The inclusion of the boundary of the `n`-th standard simplex into that standard simplex. -/
def boundary_inclusion (n : ℕ) :
∂Δ[n] ⟶ Δ[n] :=
{ app := λ m (α : {α : Δ[n].obj m // _}), α }
/-- `horn n i` (or `Λ[n, i]`) is the `i`-th horn of the `n`-th standard simplex, where `i : n`.
It consists of all `m`-simplices `α` of `Δ[n]`
for which the union of `{i}` and the range of `α` is not all of `n`
(when viewing `α` as monotone function `m → n`). -/
def horn (n : ℕ) (i : fin (n+1)) : sSet :=
{ obj := λ m,
{ α : Δ[n].obj m // set.range (as_order_hom α) ∪ {i} ≠ set.univ },
map := λ m₁ m₂ f α, ⟨f.unop ≫ (α : Δ[n].obj m₁),
begin
intro h, apply α.property,
rw set.eq_univ_iff_forall at h ⊢, intro j,
apply or.imp _ id (h j),
intro hj,
exact set.range_comp_subset_range _ _ hj,
end⟩ }
localized "notation `Λ[`n`, `i`]` := sSet.horn (n : ℕ) i" in simplicial
/-- The inclusion of the `i`-th horn of the `n`-th standard simplex into that standard simplex. -/
def horn_inclusion (n : ℕ) (i : fin (n+1)) :
Λ[n, i] ⟶ Δ[n] :=
{ app := λ m (α : {α : Δ[n].obj m // _}), α }
section examples
open_locale simplicial
/-- The simplicial circle. -/
noncomputable def S1 : sSet :=
limits.colimit $ limits.parallel_pair
((standard_simplex.map $ simplex_category.δ 0) : Δ[0] ⟶ Δ[1])
(standard_simplex.map $ simplex_category.δ 1)
end examples
/-- Truncated simplicial sets. -/
@[derive [large_category, limits.has_limits, limits.has_colimits]]
def truncated (n : ℕ) := simplicial_object.truncated (Type u) n
/-- The skeleton functor on simplicial sets. -/
def sk (n : ℕ) : sSet ⥤ sSet.truncated n := simplicial_object.sk n
instance {n} : inhabited (sSet.truncated n) := ⟨(sk n).obj $ Δ[0]⟩
end sSet
/-- The functor associating the singular simplicial set to a topological space. -/
noncomputable def Top.to_sSet : Top ⥤ sSet :=
colimit_adj.restricted_yoneda simplex_category.to_Top
/-- The geometric realization functor. -/
noncomputable def sSet.to_Top : sSet ⥤ Top :=
colimit_adj.extend_along_yoneda simplex_category.to_Top
/-- Geometric realization is left adjoint to the singular simplicial set construction. -/
noncomputable def sSet_Top_adj : sSet.to_Top ⊣ Top.to_sSet :=
colimit_adj.yoneda_adjunction _
/-- The geometric realization of the representable simplicial sets agree
with the usual topological simplices. -/
noncomputable def sSet.to_Top_simplex :
(yoneda : simplex_category ⥤ _) ⋙ sSet.to_Top ≅ simplex_category.to_Top :=
colimit_adj.is_extension_along_yoneda _
|