Imports
/-
Copyright (c) 2026 Terence Rokop. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Terence Rokop
-/
module
public import Geb.Mathlib.CategoryTheory.FinSetSkel.Shapes.Core
Monomorphisms of FinSetSkel
A morphism is a monomorphism exactly when its vector is injective.
Main statements
FinSetSkel.mono_iff_injective — monomorphisms are the morphisms
with injective vectors.
Implementation notes
CategoryTheory.Mono and CategoryTheory.Category are both
axiom-free, so the statement belongs in the choice-free layer, and
the proof is direct over vectors: the forward direction tests a
morphism against two points, and the reverse is
FinSetSkel.hom_ext.
It supplies the hypothesis Vector.invOfInjective takes, and so is a
prerequisite of the subobject classifier rather than a free-standing
characterisation.
Tags
finite sets, skeleton, monomorphism, injective
@[expose] public sectionuniverse uopen CategoryTheorynamespace FinSetSkelA morphism is a monomorphism exactly when its vector is injective.
theorem mono_iff_injective {X Y : FinSetSkel.{u}} {f : X ⟶ Y} :
Mono f ↔ Function.Injective f.toVec.get := X:FinSetSkelY:FinSetSkelf:X ⟶ Y⊢ Mono f ↔ Function.Injective (Hom.toVec f).get
X:FinSetSkelY:FinSetSkelf:X ⟶ Y⊢ Mono f → Function.Injective (Hom.toVec f).getX:FinSetSkelY:FinSetSkelf:X ⟶ Y⊢ Function.Injective (Hom.toVec f).get → Mono f
X:FinSetSkelY:FinSetSkelf:X ⟶ Y⊢ Mono f → Function.Injective (Hom.toVec f).get X:FinSetSkelY:FinSetSkelf:X ⟶ Yhm:Mono fi:Fin X.lenj:Fin X.lenhij:(Hom.toVec f).get i = (Hom.toVec f).get j⊢ i = j
mp X:FinSetSkelY:FinSetSkelf:X ⟶ Yhm:Mono fi:Fin X.lenj:Fin X.lenhij:(Hom.toVec f).get i = (Hom.toVec f).get jh:point i ≫ f = point j ≫ f⊢ i = j
have hp : (point i : mk 1 ⟶ X) = point j := (cancel_mono f).mp h mp X:FinSetSkelY:FinSetSkelf:X ⟶ Yhm:Mono fi:Fin X.lenj:Fin X.lenhij:(Hom.toVec f).get i = (Hom.toVec f).get jh:point i ≫ f = point j ≫ fhp:point i = point j⊢ i = j
have := congrArg (fun m ↦ (m : mk 1 ⟶ X).toVec.get 0) hp mp X:FinSetSkelY:FinSetSkelf:X ⟶ Yhm:Mono fi:Fin X.lenj:Fin X.lenhij:(Hom.toVec f).get i = (Hom.toVec f).get jh:point i ≫ f = point j ≫ fhp:point i = point jthis:(Hom.toVec (point i)).get 0 = (Hom.toVec (point j)).get 0⊢ i = j
simpa only [point_get] using this All goals completed! 🐙
· mpr X:FinSetSkelY:FinSetSkelf:X ⟶ Y⊢ Function.Injective (Hom.toVec f).get → Mono f intro hinj mpr X:FinSetSkelY:FinSetSkelf:X ⟶ Yhinj:Function.Injective (Hom.toVec f).get⊢ Mono f
constructor mpr X:FinSetSkelY:FinSetSkelf:X ⟶ Yhinj:Function.Injective (Hom.toVec f).get⊢ ∀ {Z : FinSetSkel} (g h : Z ⟶ X), g ≫ f = h ≫ f → g = h
intro Z g h hgh mpr X:FinSetSkelY:FinSetSkelf:X ⟶ Yhinj:Function.Injective (Hom.toVec f).getZ:FinSetSkelg:Z ⟶ Xh:Z ⟶ Xhgh:g ≫ f = h ≫ f⊢ g = h
exact hom_ext fun t ↦ hinj (by X:FinSetSkelY:FinSetSkelf:X ⟶ Yhinj:Function.Injective (Hom.toVec f).getZ:FinSetSkelg:Z ⟶ Xh:Z ⟶ Xhgh:g ≫ f = h ≫ ft:Fin Z.len⊢ (Hom.toVec f).get ((Hom.toVec g).get t) = (Hom.toVec f).get ((Hom.toVec h).get t)
have := congrArg (fun m ↦ (m : Z ⟶ Y).toVec.get t) hgh X:FinSetSkelY:FinSetSkelf:X ⟶ Yhinj:Function.Injective (Hom.toVec f).getZ:FinSetSkelg:Z ⟶ Xh:Z ⟶ Xhgh:g ≫ f = h ≫ ft:Fin Z.lenthis:(Hom.toVec (g ≫ f)).get t = (Hom.toVec (h ≫ f)).get t⊢ (Hom.toVec f).get ((Hom.toVec g).get t) = (Hom.toVec f).get ((Hom.toVec h).get t)
simpa only [comp_get] using this All goals completed! 🐙)end FinSetSkel