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

Commit d521b2b

Browse files
Robin Carlierrobin-carlier
andcommitted
feat(algebraic_topology/simplex_category): epi and monos in the simplex category (#8101)
Characterize epimorphisms and monomorphisms in `simplex_category` in terms of the function they represent. Add lemmas about their behavior on length of objects. Co-authored-by: Robin Carlier <57142648+robin-carlier@users.noreply.github.com>
1 parent 07f1235 commit d521b2b

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed

src/algebraic_topology/simplex_category.lean

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,4 +402,100 @@ full_subcategory_inclusion _
402402

403403
end truncated
404404

405+
section concrete
406+
407+
instance : concrete_category.{0} simplex_category.{u} :=
408+
{ forget :=
409+
{ obj := λ i, fin (i.len + 1),
410+
map := λ i j f, f.to_preorder_hom },
411+
forget_faithful := {} }
412+
413+
end concrete
414+
415+
section epi_mono
416+
417+
/-- A morphism in `simplex_category` is a monomorphism precisely when it is an injective function
418+
-/
419+
theorem mono_iff_injective {n m : simplex_category} {f : n ⟶ m} :
420+
mono f ↔ function.injective f.to_preorder_hom :=
421+
begin
422+
split,
423+
{ introsI m x y h,
424+
have H : const n x ≫ f = const n y ≫ f,
425+
{ dsimp, rw h },
426+
change (n.const x).to_preorder_hom 0 = (n.const y).to_preorder_hom 0,
427+
rw cancel_mono f at H,
428+
rw H },
429+
{ exact concrete_category.mono_of_injective f }
430+
end
431+
432+
/-- A morphism in `simplex_category` is an epimorphism if and only if it is a surjective function
433+
-/
434+
lemma epi_iff_surjective {n m : simplex_category} {f: n ⟶ m} :
435+
epi f ↔ function.surjective f.to_preorder_hom :=
436+
begin
437+
split,
438+
{ introsI hyp_f_epi x,
439+
by_contradiction h_ab,
440+
rw not_exists at h_ab,
441+
-- The proof is by contradiction: assume f is not surjective,
442+
-- then introduce two non-equal auxiliary functions equalizing f, and get a contradiction.
443+
-- First we define the two auxiliary functions.
444+
set chi_1 : m ⟶ [1] := hom.mk ⟨λ u, if u ≤ x then 0 else 1, begin
445+
intros a b h,
446+
dsimp only [],
447+
split_ifs with h1 h2 h3,
448+
any_goals { exact le_refl _ },
449+
{ exact bot_le },
450+
{ exact false.elim (h1 (le_trans h h3)) }
451+
end ⟩,
452+
set chi_2 : m ⟶ [1] := hom.mk ⟨λ u, if u < x then 0 else 1, begin
453+
intros a b h,
454+
dsimp only [],
455+
split_ifs with h1 h2 h3,
456+
any_goals { exact le_refl _ },
457+
{ exact bot_le },
458+
{ exact false.elim (h1 (lt_of_le_of_lt h h3)) }
459+
end ⟩,
460+
-- The two auxiliary functions equalize f
461+
have f_comp_chi_i : f ≫ chi_1 = f ≫ chi_2,
462+
{ dsimp,
463+
ext,
464+
simp [le_iff_lt_or_eq, h_ab x_1] },
465+
-- We now just have to show the two auxiliary functions are not equal.
466+
rw category_theory.cancel_epi f at f_comp_chi_i, rename f_comp_chi_i eq_chi_i,
467+
apply_fun (λ e, e.to_preorder_hom x) at eq_chi_i,
468+
suffices : (0 : fin 2) = 1, by exact bot_ne_top this,
469+
simpa using eq_chi_i },
470+
{ exact concrete_category.epi_of_surjective f }
471+
end
472+
473+
/-- A monomorphism in `simplex_category` must increase lengths-/
474+
lemma len_le_of_mono {x y : simplex_category} {f : x ⟶ y} :
475+
mono f → (x.len ≤ y.len) :=
476+
begin
477+
intro hyp_f_mono,
478+
have f_inj : function.injective f.to_preorder_hom.to_fun,
479+
{ exact mono_iff_injective.elim_left (hyp_f_mono) },
480+
simpa using fintype.card_le_of_injective f.to_preorder_hom.to_fun f_inj,
481+
end
482+
483+
lemma le_of_mono {n m : ℕ} {f : [n] ⟶ [m]} : (category_theory.mono f) → (n ≤ m) :=
484+
len_le_of_mono
485+
486+
/-- An epimorphism in `simplex_category` must decrease lengths-/
487+
lemma len_le_of_epi {x y : simplex_category} {f : x ⟶ y} :
488+
epi f → y.len ≤ x.len :=
489+
begin
490+
intro hyp_f_epi,
491+
have f_surj : function.surjective f.to_preorder_hom.to_fun,
492+
{ exact epi_iff_surjective.elim_left (hyp_f_epi) },
493+
simpa using fintype.card_le_of_surjective f.to_preorder_hom.to_fun f_surj,
494+
end
495+
496+
lemma le_of_epi {n m : ℕ} {f : [n] ⟶ [m]} : epi f → (m ≤ n) :=
497+
len_le_of_epi
498+
499+
end epi_mono
500+
405501
end simplex_category

0 commit comments

Comments
 (0)