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.Classifier.Core public import Geb.Mathlib.CategoryTheory.FinSetSkel.Mono public import Geb.Mathlib.CategoryTheory.FinSetSkel.Shapes.Instances public import Mathlib.CategoryTheory.Subobject.Classifier.Defs

The subobject classifier of FinSetSkel

The mathlib packaging of FinSetSkel.Classifier.chi and its universal property. The classifying object is the object of length 2, Ω₀ is the one-element terminal object, and truth picks the index 1; the characteristic morphism sends the members of a monomorphism's image to 1. This module and the module defining FinSetSkel.Classifier.chi fix that orientation jointly, each stating it.

Main definitions

    FinSetSkel.truth — the truth morphism.

    FinSetSkel.classifier — the subobject classifier.

Main statements

    FinSetSkel.chi_iff_of_isPullback — the fibre of a classifying morphism over 1 is the image of the monomorphism it classifies.

Implementation notes

The derivation of the vector-level hypothesis of FinSetSkel.Classifier.chi_uniq from IsPullback lives here rather than in the choice-free layer, and it is content rather than packaging: it uses the pullback's universal property and cannot be stated choice-free.

Ω₀ is the object mk 1, which the cartesian structure also takes as its unit, so the classifier's Ω₀ and the cartesian unit are the same object and their comparison is an isomorphism between an object and itself.

References

    [Freyd1972], for the axiomatisation whose subobject classifier FinSetSkel.classifier supplies.

Tags

finite sets, skeleton, subobject classifier, topos

@[expose] public sectionuniverse uopen CategoryTheory Limitsnamespace FinSetSkel

The truth morphism: the point of the classifying object at index 1.

def truth : (mk 1 : FinSetSkel.{u}) mk 2 := point 1

The fibre of a classifying morphism over 1 is the image of the monomorphism it classifies.

theorem chi_iff_of_isPullback {U X : FinSetSkel.{u}} (m : U X) (χ' : X mk 2) (hp : IsPullback m (isTerminalOne.from U) χ' truth) (j : Fin X.len) : χ'.toVec.get j = 1 j m.toVec.toList := U:FinSetSkelX:FinSetSkelm:U Xχ':X { len := 2 }hp:IsPullback m (isTerminalOne.from U) χ' truthj:Fin X.len(Hom.toVec χ').get j = 1 j (Hom.toVec m).toList -- (←) the square commutes, and both of its legs are the constant `1` U:FinSetSkelX:FinSetSkelm:U Xχ':X { len := 2 }hp:IsPullback m (isTerminalOne.from U) χ' truthj:Fin X.lenhmpr:j (Hom.toVec m).toList (Hom.toVec χ').get j = 1(Hom.toVec χ').get j = 1 j (Hom.toVec m).toList -- (→) the point at `j` factors through the pullback U:FinSetSkelX:FinSetSkelm:U Xχ':X { len := 2 }hp:IsPullback m (isTerminalOne.from U) χ' truthj:Fin X.lenhmpr:j (Hom.toVec m).toList (Hom.toVec χ').get j = 1hmp:(Hom.toVec χ').get j = 1 j (Hom.toVec m).toList(Hom.toVec χ').get j = 1 j (Hom.toVec m).toList All goals completed! 🐙

The subobject classifier of FinSetSkel.

def classifier : Subobject.Classifier FinSetSkel.{u} := Subobject.Classifier.mkOfTerminalΩ₀ (mk 1) isTerminalOne (mk 2) truth (fun m Classifier.chi m) (fun m _ U✝:FinSetSkelX✝:FinSetSkelm:U✝ X✝x✝:Mono mIsPullback m (isTerminalOne.from U✝) (Classifier.chi m) truth U✝:FinSetSkelX✝:FinSetSkelm:U✝ X✝x✝:Mono mhinj:Function.Injective (Hom.toVec m).getIsPullback m (isTerminalOne.from U✝) (Classifier.chi m) truth -- the square: both legs are the constant `1` on the image of `m` U✝:FinSetSkelX✝:FinSetSkelm:U✝ X✝x✝:Mono mhinj:Function.Injective (Hom.toVec m).gethsq:CommSq m (isTerminalOne.from U✝) (Classifier.chi m) truthIsPullback m (isTerminalOne.from U✝) (Classifier.chi m) truth -- membership of a competing cone's left leg, from its own commutation U✝:FinSetSkelX✝:FinSetSkelm:U✝ X✝x✝:Mono mhinj:Function.Injective (Hom.toVec m).gethsq:CommSq m (isTerminalOne.from U✝) (Classifier.chi m) truthhmem: (s : PullbackCone (Classifier.chi m) truth) (t : Fin s.pt.len), (Hom.toVec s.fst).get t (Hom.toVec m).toListIsPullback m (isTerminalOne.from U✝) (Classifier.chi m) truth All goals completed! 🐙) (fun m _ χ' hp Classifier.chi_uniq m χ' (chi_iff_of_isPullback m χ' hp))
end FinSetSkel