Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat(AlgebraicTopology): the simplex category (and its truncated versions) are generated by faces and degeneracies #21828

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,7 @@ import Mathlib.AlgebraicTopology.RelativeCellComplex.AttachCells
import Mathlib.AlgebraicTopology.RelativeCellComplex.Basic
import Mathlib.AlgebraicTopology.SimplexCategory.Basic
import Mathlib.AlgebraicTopology.SimplexCategory.Defs
import Mathlib.AlgebraicTopology.SimplexCategory.MorphismProperty
import Mathlib.AlgebraicTopology.SimplicialCategory.Basic
import Mathlib.AlgebraicTopology.SimplicialCategory.SimplicialObject
import Mathlib.AlgebraicTopology.SimplicialNerve
Expand Down
83 changes: 83 additions & 0 deletions Mathlib/AlgebraicTopology/SimplexCategory/MorphismProperty.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/-
Copyright (c) 2025 Joël Riou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joël Riou
-/
import Mathlib.AlgebraicTopology.SimplexCategory.Basic
import Mathlib.CategoryTheory.MorphismProperty.Composition

/-!
# Properties of morphisms in the simplex category

In this file, we show that morphisms in the simplex category
are generated by faces and degeneracies. This is stated by
saying that if `W : MorphismProperty SimplexCategory` is
multiplicative, and contains faces and degeneracies, then `W = ⊤`.
This statement is deduced from a similar statement for
the category `SimplexCategory.Truncated d`.

-/

open CategoryTheory

namespace SimplexCategory

lemma Truncated.morphismProperty_eq_top
{d : ℕ} (W : MorphismProperty (Truncated d)) [W.IsMultiplicative]
(δ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 2)),
W (SimplexCategory.δ (n := n) i : ⟨.mk n, by dsimp; omega⟩ ⟶
⟨.mk (n + 1), by dsimp; omega⟩))
(σ_mem : ∀ (n : ℕ) (hn : n < d) (i : Fin (n + 1)),
W (SimplexCategory.σ (n := n) i : ⟨.mk (n + 1), by dsimp; omega⟩ ⟶
⟨.mk n, by dsimp; omega⟩)) :
W = ⊤ := by
ext ⟨a, ha⟩ ⟨b, hb⟩ f
simp only [MorphismProperty.top_apply, iff_true]
induction' a using SimplexCategory.rec with a
induction' b using SimplexCategory.rec with b
dsimp at ha hb
generalize h : a + b = c
induction c generalizing a b with
| zero =>
obtain rfl : a = 0 := by omega
obtain rfl : b = 0 := by omega
obtain rfl : f = 𝟙 _ := by
ext i : 3
apply Subsingleton.elim (α := Fin 1)
apply MorphismProperty.id_mem
| succ c hc =>
let f' : mk a ⟶ mk b := f
by_cases h₁ : Function.Surjective f'.toOrderHom; swap
· obtain _ | b := b
· exact (h₁ (fun _ ↦ ⟨0, Subsingleton.elim (α := Fin 1) _ _⟩)).elim
· obtain ⟨i, g', hf'⟩ := eq_comp_δ_of_not_surjective _ h₁
obtain rfl : f = (g' : _ ⟶ ⟨mk b, by dsimp; omega⟩) ≫ δ i := hf'
exact W.comp_mem _ _ (hc _ _ _ _ _ (by omega))
(δ_mem _ (by omega) _)
by_cases h₂ : Function.Injective f'.toOrderHom; swap
· obtain _ | a := a
· exact (h₂ (Function.injective_of_subsingleton (α := Fin 1) _)).elim
· obtain ⟨i, g', hf'⟩ := eq_σ_comp_of_not_injective _ h₂
obtain rfl : f = (by exact σ i) ≫ (g' : ⟨mk a, by dsimp; omega⟩ ⟶ _) := hf'
exact W.comp_mem _ _ (σ_mem _ (by omega) _) (hc _ _ _ _ _ (by omega))
rw [← epi_iff_surjective] at h₁
rw [← mono_iff_injective] at h₂
obtain rfl : a = b := le_antisymm (len_le_of_mono h₂) (len_le_of_epi h₁)
obtain rfl : f = 𝟙 _ := eq_id_of_mono f'
apply W.id_mem

lemma morphismProperty_eq_top
(W : MorphismProperty SimplexCategory) [W.IsMultiplicative]
(δ_mem : ∀ {n : ℕ} (i : Fin (n + 2)), W (SimplexCategory.δ i))
(σ_mem : ∀ {n : ℕ} (i : Fin (n + 1)), W (SimplexCategory.σ i)) :
W = ⊤ := by
have hW (d : ℕ) : W.inverseImage (Truncated.inclusion d) = ⊤ :=
Truncated.morphismProperty_eq_top _ (fun _ _ i ↦ δ_mem i)
(fun _ _ i ↦ σ_mem i)
ext a b f
simp only [MorphismProperty.top_apply, iff_true]
change W.inverseImage (Truncated.inclusion _)
(f : ⟨a, Nat.le_max_left _ _⟩ ⟶ ⟨b, Nat.le_max_right _ _⟩)
simp only [hW, MorphismProperty.top_apply]

end SimplexCategory
3 changes: 3 additions & 0 deletions Mathlib/CategoryTheory/MorphismProperty/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ lemma ext (W W' : MorphismProperty C) (h : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), W f
lemma top_apply {X Y : C} (f : X ⟶ Y) : (⊤ : MorphismProperty C) f := by
simp only [top_eq]

lemma of_eq_top {P : MorphismProperty C} (h : P = ⊤) {X Y : C} (f : X ⟶ Y) : P f := by
simp [h]

@[simp]
lemma sSup_iff (S : Set (MorphismProperty C)) {X Y : C} (f : X ⟶ Y) :
sSup S f ↔ ∃ (W : S), W.1 f := by
Expand Down
4 changes: 4 additions & 0 deletions Mathlib/CategoryTheory/MorphismProperty/Composition.lean
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ instance {P : MorphismProperty D} [P.IsMultiplicative] (F : C ⥤ D) :
instance inf {P Q : MorphismProperty C} [P.IsMultiplicative] [Q.IsMultiplicative] :
(P ⊓ Q).IsMultiplicative where

instance naturalityProperty {F₁ F₂ : C ⥤ D} (app : ∀ X, F₁.obj X ⟶ F₂.obj X) :
(naturalityProperty app).IsMultiplicative where
id_mem _ := by simp

end IsMultiplicative

/-- A class of morphisms `W` has the of-postcomp property wrt. `W'` if whenever
Expand Down