Documentation

Mathlib.CategoryTheory.Topos.Classifier

Subobject Classifier #

We define what it means for a morphism in a category to be a subobject classifier as CategoryTheory.HasClassifier.

c.f. the following Lean 3 code, where similar work was done: https://github.com/b-mehta/topos/blob/master/src/subobject_classifier.lean

Main definitions #

Let C refer to a category with a terminal object.

Main results #

References #

structure CategoryTheory.Classifier (C : Type u) [Category.{v, u} C] :
Type (max u v)

A monomorphism truth : Ω₀Ω is a subobject classifier if, for every monomorphism m : U ⟶ X in C, there is a unique map χ : X ⟶ Ω such that for some (necessarily unique) χ₀ : U ⟶ Ω₀ the following square is a pullback square:

      U ---------m----------> X
      |                       |
    χ₀ U                     χ m
      |                       |
      v                       v
      Ω₀ ------truth--------> Ω

An equivalent formulation replaces Ω₀ with the terminal object.

  • Ω₀ : C

    The domain of the truth morphism

  • Ω : C

    The codomain of the truth morphism

  • truth : self.Ω₀ self.Ω

    The truth morphism of the subobject classifier

  • mono_truth : Mono self.truth

    The truth morphism is a monomorphism

  • χ₀ (U : C) : U self.Ω₀

    The top arrow in the pullback square

  • χ {U X : C} (m : U X) [Mono m] : X self.Ω

    For any monomorphism U ⟶ X, there is an associated characteristic map X ⟶ Ω.

  • isPullback {U X : C} (m : U X) [Mono m] : IsPullback m (self.χ₀ U) (self.χ m) self.truth

    χ₀ U and χ m form the appropriate pullback square.

  • uniq {U X : C} (m : U X) [Mono m] {χ₀' : U self.Ω₀} {χ' : X self.Ω} (hχ' : IsPullback m χ₀' χ' self.truth) : χ' = self.χ m

    χ m is the only map X ⟶ Ω which forms the appropriate pullback square for any χ₀'.

Instances For
    def CategoryTheory.Classifier.mkOfTerminalΩ₀ {C : Type u} [Category.{v, u} C] (Ω₀ : C) (t : Limits.IsTerminal Ω₀) (Ω : C) (truth : Ω₀ Ω) (χ : {U X : C} → (m : U X) → [Mono m] → X Ω) (isPullback : ∀ {U X : C} (m : U X) [inst : Mono m], IsPullback m (t.from U) (χ m) truth) (uniq : ∀ {U X : C} (m : U X) [inst : Mono m] (χ' : X Ω), IsPullback m (t.from U) χ' truthχ' = χ m) :

    More explicit constructor in case Ω₀ is already known to be a terminal object.

    Instances For
      @[simp]
      theorem CategoryTheory.Classifier.mkOfTerminalΩ₀_truth {C : Type u} [Category.{v, u} C] (Ω₀ : C) (t : Limits.IsTerminal Ω₀) (Ω : C) (truth : Ω₀ Ω) (χ : {U X : C} → (m : U X) → [Mono m] → X Ω) (isPullback : ∀ {U X : C} (m : U X) [inst : Mono m], IsPullback m (t.from U) (χ m) truth) (uniq : ∀ {U X : C} (m : U X) [inst : Mono m] (χ' : X Ω), IsPullback m (t.from U) χ' truthχ' = χ m) :
      (mkOfTerminalΩ₀ Ω₀ t Ω truth χ isPullback uniq).truth = truth
      @[simp]
      theorem CategoryTheory.Classifier.mkOfTerminalΩ₀_Ω {C : Type u} [Category.{v, u} C] (Ω₀ : C) (t : Limits.IsTerminal Ω₀) (Ω : C) (truth : Ω₀ Ω) (χ : {U X : C} → (m : U X) → [Mono m] → X Ω) (isPullback : ∀ {U X : C} (m : U X) [inst : Mono m], IsPullback m (t.from U) (χ m) truth) (uniq : ∀ {U X : C} (m : U X) [inst : Mono m] (χ' : X Ω), IsPullback m (t.from U) χ' truthχ' = χ m) :
      (mkOfTerminalΩ₀ Ω₀ t Ω truth χ isPullback uniq).Ω = Ω
      @[simp]
      theorem CategoryTheory.Classifier.mkOfTerminalΩ₀_χ₀ {C : Type u} [Category.{v, u} C] (Ω₀ : C) (t : Limits.IsTerminal Ω₀) (Ω : C) (truth : Ω₀ Ω) (χ : {U X : C} → (m : U X) → [Mono m] → X Ω) (isPullback : ∀ {U X : C} (m : U X) [inst : Mono m], IsPullback m (t.from U) (χ m) truth) (uniq : ∀ {U X : C} (m : U X) [inst : Mono m] (χ' : X Ω), IsPullback m (t.from U) χ' truthχ' = χ m) (Y : C) :
      (mkOfTerminalΩ₀ Ω₀ t Ω truth χ isPullback uniq).χ₀ Y = t.from Y
      @[simp]
      theorem CategoryTheory.Classifier.mkOfTerminalΩ₀_Ω₀ {C : Type u} [Category.{v, u} C] (Ω₀ : C) (t : Limits.IsTerminal Ω₀) (Ω : C) (truth : Ω₀ Ω) (χ : {U X : C} → (m : U X) → [Mono m] → X Ω) (isPullback : ∀ {U X : C} (m : U X) [inst : Mono m], IsPullback m (t.from U) (χ m) truth) (uniq : ∀ {U X : C} (m : U X) [inst : Mono m] (χ' : X Ω), IsPullback m (t.from U) χ' truthχ' = χ m) :
      (mkOfTerminalΩ₀ Ω₀ t Ω truth χ isPullback uniq).Ω₀ = Ω₀
      @[simp]
      theorem CategoryTheory.Classifier.mkOfTerminalΩ₀_χ {C : Type u} [Category.{v, u} C] (Ω₀ : C) (t : Limits.IsTerminal Ω₀) (Ω : C) (truth : Ω₀ Ω) (χ : {U X : C} → (m : U X) → [Mono m] → X Ω) (isPullback : ∀ {U X : C} (m : U X) [inst : Mono m], IsPullback m (t.from U) (χ m) truth) (uniq : ∀ {U X : C} (m : U X) [inst : Mono m] (χ' : X Ω), IsPullback m (t.from U) χ' truthχ' = χ m) {U✝ X✝ : C} (m : U✝ X✝) (x✝ : Mono m) :
      (mkOfTerminalΩ₀ Ω₀ t Ω truth χ isPullback uniq).χ m = χ m
      @[implicit_reducible]

      Given c : Classifier C, c.Ω₀ is a terminal object. Prefer c.χ₀ over c.isTerminalΩ₀.from.

      Instances For

        A category C has a subobject classifier if there is at least one subobject classifier.

        Instances
          @[reducible, inline]

          Notation for the Ω₀ in an arbitrary choice of a subobject classifier

          Instances For
            @[reducible, inline]
            noncomputable abbrev CategoryTheory.HasClassifier.Ω (C : Type u) [Category.{v, u} C] [HasClassifier C] :
            C

            Notation for the Ω in an arbitrary choice of a subobject classifier

            Instances For
              @[reducible, inline]

              Notation for the "truth arrow" in an arbitrary choice of a subobject classifier

              Instances For
                noncomputable def CategoryTheory.HasClassifier.χ {C : Type u} [Category.{v, u} C] [HasClassifier C] {U X : C} (m : U X) [Mono m] :
                X Ω C

                returns the characteristic morphism of the subobject (m : U ⟶ X) [Mono m]

                Instances For
                  theorem CategoryTheory.HasClassifier.isPullback_χ {C : Type u} [Category.{v, u} C] [HasClassifier C] {U X : C} (m : U X) [Mono m] :
                  IsPullback m (.some.χ₀ U) (χ m) (truth C)

                  The diagram

                        U ---------m----------> X
                        |                       |
                      χ₀ U                     χ m
                        |                       |
                        v                       v
                        Ω₀ ------truth--------> Ω
                  

                  is a pullback square.

                  The diagram

                        U ---------m----------> X
                        |                       |
                      χ₀ U                     χ m
                        |                       |
                        v                       v
                        Ω₀ ------truth--------> Ω
                  

                  commutes.

                  The diagram

                        U ---------m----------> X
                        |                       |
                      χ₀ U                     χ m
                        |                       |
                        v                       v
                        Ω₀ ------truth--------> Ω
                  

                  commutes.

                  theorem CategoryTheory.HasClassifier.unique {C : Type u} [Category.{v, u} C] [HasClassifier C] {U X : C} (m : U X) [Mono m] (χ' : X Ω C) (hχ' : IsPullback m (.some.χ₀ U) χ' (truth C)) :
                  χ' = χ m

                  χ m is the only map for which the associated square is a pullback square.

                  truth C is a regular monomorphism (because it is split).

                  Instances For

                    The following diagram

                          U ---------m----------> X
                          |                       |
                        χ₀ U                     χ m
                          |                       |
                          v                       v
                          Ω₀ ------truth--------> Ω
                    

                    being a pullback for any monic m means that every monomorphism in C is the pullback of a regular monomorphism; since regularity is stable under base change, every monomorphism is regular. Hence, C is a regular mono category. It also follows that C is a balanced category.

                    If the source of a faithful functor has a subobject classifier, the functor reflects isomorphisms. This holds for any balanced category.

                    If the source of a faithful functor is the opposite category of one with a subobject classifier, the same holds -- the functor reflects isomorphisms.

                    The representability theorem of subobject classifiers #

                    From classifiers to representations #

                    @[reducible, inline]

                    The subobject of 𝒞.Ω corresponding to the truth morphism.

                    Instances For
                      theorem CategoryTheory.Classifier.surjective_χ {C : Type u} [Category.{v, u} C] [Limits.HasPullbacks C] (𝒞 : Classifier C) {X : C} (φ : X 𝒞.Ω) :
                      ∃ (Z : C) (i : Z X) (x : Mono i), φ = 𝒞.χ i

                      Any subobject classifier Ω represents the subobjects functor Subobject.presheaf.

                      Instances For

                        From representations to classifiers #

                        @[reducible, inline]

                        Abbreviation to enable dot notation on the hypothesis h stating that the subobjects presheaf is representable by some object Ω.

                        Instances For

                          h.Ω₀ is the subobject of Ω which corresponds to the identity 𝟙 Ω, given h : SubobjectRepresentableBy Ω.

                          Instances For

                            h.homEquiv acts like an "object comprehension" operator: it maps any characteristic map f : X ⟶ Ω to the associated subobject of X, obtained by pulling back h.Ω₀ along f.

                            For any subobject x, the pullback of h.Ω₀ along the characteristic map of x given by h.homEquiv is x itself.

                            h.χ m is the characteristic map of monomorphism m given by the bijection h.homEquiv.

                            Instances For

                              h.iso m is the isomorphism between m and the pullback of Ω₀ along the characteristic map of m.

                              Instances For

                                h.π m is the first projection in the following pullback square:

                                U --h.π m--> (Ω₀ : C)
                                |                |
                                m             Ω₀.arrow
                                |                |
                                v                v
                                X -----h.χ m---> Ω
                                
                                Instances For
                                  @[deprecated CategoryTheory.Classifier.SubobjectRepresentableBy.iso_inv_hom_left_comp (since := "2025-12-18")]

                                  Alias of CategoryTheory.Classifier.SubobjectRepresentableBy.iso_inv_hom_left_comp.

                                  theorem CategoryTheory.Classifier.SubobjectRepresentableBy.uniq {C : Type u} [Category.{v, u} C] [Limits.HasPullbacks C] {Ω : C} (h : SubobjectRepresentableBy Ω) {U X : C} {m : U X} [Mono m] {χ' : X Ω} {π : U Subobject.underlying.obj h.Ω₀} (sq : IsPullback m π χ' h.Ω₀.arrow) :
                                  χ' = h.χ m

                                  The main non-trivial result: h.Ω₀ is actually a terminal object.

                                  Instances For

                                    The unique map to the terminal object.

                                    Instances For

                                      h.isoΩ₀ is the unique isomorphism from h.Ω₀ to the canonical terminal object ⊤_ C.

                                      Instances For

                                        Any representation Ω of Subobject.presheaf C gives a subobject classifier with truth values object Ω.

                                        Instances For

                                          A category has a subobject classifier if and only if the subobjects functor is representable.

                                          def CategoryTheory.Classifier.hom {C : Type u} [Category.{v, u} C] (𝒞₁ 𝒞₂ : Classifier C) :
                                          𝒞₁.Ω 𝒞₂.Ω

                                          The unique morphism between classifiers mapping each others characteristic maps

                                          Instances For
                                            @[simp]
                                            theorem CategoryTheory.Classifier.hom_comp_hom {C : Type u} [Category.{v, u} C] (𝒞₁ 𝒞₂ 𝒞₃ : Classifier C) :
                                            CategoryStruct.comp (𝒞₁.hom 𝒞₂) (𝒞₂.hom 𝒞₃) = 𝒞₁.hom 𝒞₃
                                            @[simp]
                                            theorem CategoryTheory.Classifier.hom_comp_hom_assoc {C : Type u} [Category.{v, u} C] (𝒞₁ 𝒞₂ 𝒞₃ : Classifier C) {Z : C} (h : 𝒞₃.Ω Z) :
                                            CategoryStruct.comp (𝒞₁.hom 𝒞₂) (CategoryStruct.comp (𝒞₂.hom 𝒞₃) h) = CategoryStruct.comp (𝒞₁.hom 𝒞₃) h
                                            @[simp]
                                            theorem CategoryTheory.Classifier.hom_refl {C : Type u} [Category.{v, u} C] (𝒞₁ : Classifier C) :
                                            𝒞₁.hom 𝒞₁ = CategoryStruct.id 𝒞₁.Ω
                                            @[simp]
                                            theorem CategoryTheory.Classifier.χ_comp_hom {C : Type u} [Category.{v, u} C] {𝒞₁ 𝒞₂ : Classifier C} {X Y : C} (m : X Y) [Mono m] :
                                            CategoryStruct.comp (𝒞₁.χ m) (𝒞₁.hom 𝒞₂) = 𝒞₂.χ m
                                            @[simp]
                                            theorem CategoryTheory.Classifier.χ_comp_hom_assoc {C : Type u} [Category.{v, u} C] {𝒞₁ 𝒞₂ : Classifier C} {X Y : C} (m : X Y) [Mono m] {Z : C} (h : 𝒞₂.Ω Z) :
                                            CategoryStruct.comp (𝒞₁.χ m) (CategoryStruct.comp (𝒞₁.hom 𝒞₂) h) = CategoryStruct.comp (𝒞₂.χ m) h
                                            @[simp]
                                            theorem CategoryTheory.Classifier.truth_comp_hom {C : Type u} [Category.{v, u} C] {𝒞₁ 𝒞₂ : Classifier C} :
                                            CategoryStruct.comp 𝒞₁.truth (𝒞₁.hom 𝒞₂) = CategoryStruct.comp (𝒞₂.χ₀ 𝒞₁.Ω₀) 𝒞₂.truth
                                            @[simp]
                                            theorem CategoryTheory.Classifier.truth_comp_hom_assoc {C : Type u} [Category.{v, u} C] {𝒞₁ 𝒞₂ : Classifier C} {Z : C} (h : 𝒞₂.Ω Z) :
                                            CategoryStruct.comp 𝒞₁.truth (CategoryStruct.comp (𝒞₁.hom 𝒞₂) h) = CategoryStruct.comp (𝒞₂.χ₀ 𝒞₁.Ω₀) (CategoryStruct.comp 𝒞₂.truth h)
                                            def CategoryTheory.Classifier.uniqueUpToIso {C : Type u} [Category.{v, u} C] (𝒞₁ 𝒞₂ : Classifier C) :
                                            𝒞₁.Ω 𝒞₂.Ω

                                            a concrete equivalence of any two subobject classifiers

                                            Instances For
                                              @[simp]
                                              theorem CategoryTheory.Classifier.uniqueUpToIso_hom {C : Type u} [Category.{v, u} C] (𝒞₁ 𝒞₂ : Classifier C) :
                                              (𝒞₁.uniqueUpToIso 𝒞₂).hom = 𝒞₁.hom 𝒞₂
                                              @[simp]
                                              theorem CategoryTheory.Classifier.uniqueUpToIso_inv {C : Type u} [Category.{v, u} C] (𝒞₁ 𝒞₂ : Classifier C) :
                                              (𝒞₁.uniqueUpToIso 𝒞₂).inv = 𝒞₂.hom 𝒞₁
                                              instance CategoryTheory.instIsIsoHom {C : Type u} [Category.{v, u} C] (𝒞₁ 𝒞₂ : Classifier C) :
                                              IsIso (𝒞₁.hom 𝒞₂)
                                              def CategoryTheory.Classifier.ofIso {C : Type u} [Category.{v, u} C] (𝒞 : Classifier C) {Ω₀ Ω : C} ( : 𝒞.Ω Ω) (eΩ₀ : 𝒞.Ω₀ Ω₀) (from' : (C_1 : C) → C_1 Ω₀) (t : Ω₀ Ω) (ht : t = CategoryStruct.comp eΩ₀.inv (CategoryStruct.comp 𝒞.truth .hom) := by cat_disch) :

                                              Being a subobject classifier is preserved under isomorphism.

                                              Instances For
                                                @[simp]
                                                theorem CategoryTheory.Classifier.ofIso_Ω₀ {C : Type u} [Category.{v, u} C] (𝒞 : Classifier C) {Ω₀ Ω : C} ( : 𝒞.Ω Ω) (eΩ₀ : 𝒞.Ω₀ Ω₀) (from' : (C_1 : C) → C_1 Ω₀) (t : Ω₀ Ω) (ht : t = CategoryStruct.comp eΩ₀.inv (CategoryStruct.comp 𝒞.truth .hom) := by cat_disch) :
                                                (𝒞.ofIso eΩ₀ from' t ht).Ω₀ = Ω₀
                                                @[simp]
                                                theorem CategoryTheory.Classifier.ofIso_χ₀ {C : Type u} [Category.{v, u} C] (𝒞 : Classifier C) {Ω₀ Ω : C} ( : 𝒞.Ω Ω) (eΩ₀ : 𝒞.Ω₀ Ω₀) (from' : (C_1 : C) → C_1 Ω₀) (t : Ω₀ Ω) (ht : t = CategoryStruct.comp eΩ₀.inv (CategoryStruct.comp 𝒞.truth .hom) := by cat_disch) (C✝ : C) :
                                                (𝒞.ofIso eΩ₀ from' t ht).χ₀ C✝ = from' C✝
                                                @[simp]
                                                theorem CategoryTheory.Classifier.ofIso_χ {C : Type u} [Category.{v, u} C] (𝒞 : Classifier C) {Ω₀ Ω : C} ( : 𝒞.Ω Ω) (eΩ₀ : 𝒞.Ω₀ Ω₀) (from' : (C_1 : C) → C_1 Ω₀) (t : Ω₀ Ω) (ht : t = CategoryStruct.comp eΩ₀.inv (CategoryStruct.comp 𝒞.truth .hom) := by cat_disch) {F G : C} (m : F G) (x✝ : Mono m) :
                                                (𝒞.ofIso eΩ₀ from' t ht).χ m = CategoryStruct.comp (𝒞.χ m) .hom
                                                @[simp]
                                                theorem CategoryTheory.Classifier.ofIso_Ω {C : Type u} [Category.{v, u} C] (𝒞 : Classifier C) {Ω₀ Ω : C} ( : 𝒞.Ω Ω) (eΩ₀ : 𝒞.Ω₀ Ω₀) (from' : (C_1 : C) → C_1 Ω₀) (t : Ω₀ Ω) (ht : t = CategoryStruct.comp eΩ₀.inv (CategoryStruct.comp 𝒞.truth .hom) := by cat_disch) :
                                                (𝒞.ofIso eΩ₀ from' t ht).Ω = Ω
                                                @[simp]
                                                theorem CategoryTheory.Classifier.ofIso_truth {C : Type u} [Category.{v, u} C] (𝒞 : Classifier C) {Ω₀ Ω : C} ( : 𝒞.Ω Ω) (eΩ₀ : 𝒞.Ω₀ Ω₀) (from' : (C_1 : C) → C_1 Ω₀) (t : Ω₀ Ω) (ht : t = CategoryStruct.comp eΩ₀.inv (CategoryStruct.comp 𝒞.truth .hom) := by cat_disch) :
                                                (𝒞.ofIso eΩ₀ from' t ht).truth = t

                                                The image of a subobject classifier under an equivalence of categories is a subobject classifier.

                                                Instances For
                                                  @[simp]
                                                  theorem CategoryTheory.Classifier.ofEquivalence_Ω {C : Type u} [Category.{v, u} C] {D : Type u_1} [Category.{v_1, u_1} D] (𝒞₁ : Classifier C) (e : C D) :
                                                  (𝒞₁.ofEquivalence e).Ω = e.functor.obj 𝒞₁.Ω
                                                  @[simp]
                                                  theorem CategoryTheory.Classifier.ofEquivalence_χ {C : Type u} [Category.{v, u} C] {D : Type u_1} [Category.{v_1, u_1} D] (𝒞₁ : Classifier C) (e : C D) {U✝ X✝ : D} (m : U✝ X✝) [Mono m] :
                                                  (𝒞₁.ofEquivalence e).χ m = CategoryStruct.comp (e.counitInv.app X✝) (e.functor.map (𝒞₁.χ (e.inverse.map m)))
                                                  @[simp]
                                                  theorem CategoryTheory.Classifier.ofEquivalence_truth {C : Type u} [Category.{v, u} C] {D : Type u_1} [Category.{v_1, u_1} D] (𝒞₁ : Classifier C) (e : C D) :
                                                  (𝒞₁.ofEquivalence e).truth = e.functor.map 𝒞₁.truth
                                                  @[simp]
                                                  theorem CategoryTheory.Classifier.ofEquivalence_Ω₀ {C : Type u} [Category.{v, u} C] {D : Type u_1} [Category.{v_1, u_1} D] (𝒞₁ : Classifier C) (e : C D) :
                                                  (𝒞₁.ofEquivalence e).Ω₀ = e.functor.obj 𝒞₁.Ω₀
                                                  @[simp]
                                                  theorem CategoryTheory.Classifier.ofEquivalence_χ₀ {C : Type u} [Category.{v, u} C] {D : Type u_1} [Category.{v_1, u_1} D] (𝒞₁ : Classifier C) (e : C D) (Y : D) :
                                                  (𝒞₁.ofEquivalence e).χ₀ Y = CategoryStruct.comp (e.counitInv.app Y) (e.functor.map (𝒞₁.χ₀ (e.inverse.obj Y)))