Documentation

Realizability.RealizabilitySubobject

The subobject classifier of the finite fragment of the realizability category #

Realizability/RealizabilityCCC.lean built the realizability category Asm and proved it Cartesian closed; Realizability/RealizabilityCoproduct.lean added finite coproducts. This file completes the first-order inventory of subobjects on that same carrier: comprehension subobjects, the one-bit subobject classifier Bool = ๐Ÿ™ โŠ• ๐Ÿ™, its pullback universal property, and equalizers.

What this establishes #

Boundary #

The classifier claim is for the finite fragment: it needs every function out of the classified object to be a morphism (AllTrackable), which holds for encoded finite objects (finAsm witnesses it) and not a property of general assemblies โ€” for assemblies over a partial combinatory algebra no full classifier exists (a quasitopos, not a topos; van Oosten 2008). The comprehension subobjects are classified here; that a mono between finite objects is isomorphic to a comprehension subobject (upgrading the classification to all monos) is not proved here.

The terminal projection as a bundled morphism #

The unique morphism into the terminal object ๐Ÿ™, bundled (RealizabilityCCC.trackable_toTerminal supplies the tracking).

Equations
Instances For

    Global elements: every element of a carrier is a point ๐Ÿ™ โŸถ A #

    A constant-m code (r ยท n = m for all n); the realizer of a global element.

    The global element picking out a : A.carrier: the constant morphism ๐Ÿ™ โŸถ A. Every element is realized (the Asm.realized field), so the point exists โ€” this is what lets global elements separate a finite carrier in chi_unique.

    Equations
    Instances For

      The classifier object Bool = ๐Ÿ™ โŠ• ๐Ÿ™ #

      The subobject classifier Bool := ๐Ÿ™ โŠ• ๐Ÿ™, the coproduct of two singletons โ€” exactly one tag bit.

      Equations
      Instances For

        The classifier carrier is the two-element type Bool (๐Ÿ™ โŠ• ๐Ÿ™ โ‰… Bool).

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[simp]

          The classifier has exactly two elements โ€” |Bool| = 2 (the one tag bit).

          Comprehension subobjects #

          The comprehension subobject { a : A | P a }: carrier the subtype { a // P a }, a code realizes โŸจa, hโŸฉ exactly when it realizes a in A (encoding inherited from A).

          Equations
          Instances For

            The inclusion { a : A | P a } โ†ช A is realized by the identity program (idCode): the comprehension subobject shares A's encodings, so its inclusion costs no capacity.

            Equations
            Instances For
              theorem RealizabilitySubobject.subAsm_factor {A : RealizabilityCCC.Asm} (P : A.carrier โ†’ Prop) {C : RealizabilityCCC.Asm} (u : C โŸถ A) (hP : โˆ€ (c : C.carrier), P (โ†‘u c)) :

              Factorization through a comprehension subobject. A morphism u : C โŸถ A whose image lands in { a : A | P a } factors uniquely through the inclusion, and the factor carries u's own realizer (shared encodings) โ€” so no finiteness on C is needed. This is the shared core of the classifier and equalizer universal properties.

              Finite objects: every function out of them is a morphism #

              The property of an encoded finite object: every function out of A is realized (a morphism). It is what makes a characteristic map a morphism. General assemblies need not have it โ€” the realizability relation may fail to separate elements โ€” but finAsm does (finAsm_allTrackable), and so do all encoded finite objects.

              Equations
              Instances For

                The finite assembly finAsm M is an encoded finite object: every function out of it is a morphism (RealizabilityCoproduct.trackable_of_fin_dom).

                The characteristic map and the classifier property #

                The characteristic function of P: true = inl โ‹† on { a | P a }, false = inr โ‹† off it.

                Equations
                Instances For

                  The characteristic map ฯ‡_P : A โŸถ Bool of a comprehension subobject. A morphism because A is a finite object out of which every function is realized (hA).

                  Equations
                  Instances For

                    The classifying square commutes: i โ‰ซ ฯ‡_P = ! โ‰ซ true, i.e. ฯ‡_P is constantly true on the subobject.

                    The classifier universal property (pullback). For every u : C โŸถ A, the outer square with true commutes โ€” u โ‰ซ ฯ‡_P = ! โ‰ซ true โ€” iff u factors (uniquely) through the comprehension subobject { a : A | P a }. Equivalently, the classifying square is a pullback. No finiteness on C is needed: the factor carries u's own realizer (subAsm_factor).

                    Uniqueness of the classifying map: any ฯ‡' : A โŸถ Bool making the same square a pullback of the same comprehension subobject equals ฯ‡_P. Global elements (constant morphisms out of ๐Ÿ™, one per element of the carrier) separate the finite carrier: at each a, testing the pullback condition against the point a forces ฯ‡' a = true โ†” P a.

                    Equalizers as comprehension subobjects #

                    The equalizer of f, g : A โŸถ B as a comprehension subobject { a : A | f a = g a } (equality of encodings is decidable on finite objects, so equalizers are comprehension subobjects, fitting wherever A does).

                    Equations
                    Instances For

                      The equalizer inclusion Eq(f,g) โ†ช A.

                      Equations
                      Instances For

                        The equalizer universal property (fork). u : C โŸถ A coequalizes f and g โ€” u โ‰ซ f = u โ‰ซ g โ€” iff it factors (uniquely) through the equalizer. No finiteness on C: the factor carries u's realizer (subAsm_factor).