|
| 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