Documentation

ReflectiveSubsystems.RecursorAlgebra

A genuine, discriminating initial algebra for the bounded recursor ([Decoupling] §5) #

Provenance: [Decoupling] §5 (bounded recursor). Companion / upgrade to the FV-17 material in ReflectiveSubsystems/RepFintype.lean (ReflectiveSubsystems.ParamNNO.recursorConeIsInitial).

Why this is sharper than FV-17 #

FV-17 states initiality of the recursor in a category of recursion cones whose hom-order is "agree on the orbit N_M". That order is symmetric (agreement is an equivalence), so the cone category is thin/chaotic: every object is initial and uniqueness is Subsingleton.elim. Its initiality therefore does not discriminate — it is a universal property with a trivial (Prop) hom-structure.

Here we give a genuine initial object of Mathlib's CategoryTheory.Endofunctor.Algebra, whose morphisms are honest algebra homomorphisms (functions commuting with the structure map), not Props. Distinct algebras give distinct recursors, so uniqueness is a real induction over the orbit, not Subsingleton. This is the discriminating universal property FV-17 could not express.

Honest boundary (ReflectiveSubsystems.no_true_nno) #

The unrestricted initial algebra of F X = 𝟙 ⊕ X is ℕ (an infinite object), and no_true_nno proves no finite state space carries such a true NNO. So a finite carrier is never initial in all of Endofunctor.Algebra succEndo. We therefore restrict to the full subcategory of orbit-saturating algebras (Sat M): those whose z-orbit reaches an s-fixed point by step M. There the finite Fin (M+1) saturating-successor algebra is genuinely initial. This is a sharper-but-narrower universal property than FV-17's arbitrary-target relativized recursor: the successor saturates (it does not wrap, unlike the ZMod cyclicParamNNO) and the target class is restricted, but within that class initiality is discriminating and the uniqueness is a genuine induction.

The endofunctor F X = 𝟙 ⊕ X and the z/s reading of its algebras #

The endofunctor F X = 𝟙 ⊕ X (PUnit ⊕ X) on Type. Its algebras (A, str) are exactly a basepoint z := str (inl ⋆) together with a unary successor s := str ∘ inr; its unrestricted initial algebra is ℕ (so no finite algebra is initial in all of Algebra succEndo).

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

    The saturation predicate and the saturating full subcategory #

    Saturation. Sat M alg says the z-orbit reaches an s-fixed point by step M: s (sᴹ z) = sᴹ z. The algebras where the finite saturating recursor is the initial object.

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

      The full subcategory of F-algebras satisfying Sat M. Its morphisms are the ambient Endofunctor.Algebra.Homs (genuine algebra homomorphisms), so the category is not thin.

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

        The candidate: the Fin (M+1) saturating-successor algebra #

        The saturating successor on Fin (M+1): k ↦ min (k+1) M, i.e. climb 0,1,…,M and then stay at M = Fin.last M. (Equivalently if k = Fin.last M then Fin.last M else k + 1; the min form avoids Fin wrap-around bookkeeping.)

        Equations
        Instances For

          The candidate algebra: carrier Fin (M+1), basepoint 0, successor the saturating successor.

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

            The candidate algebra is orbit-saturating.

            The unique morphism out: the bounded recursor k ↦ sᵏ z #

            The underlying map of the unique morphism boundedAlg M ⟶ alg: the bounded recursor k ↦ sᵏ z. This is the saturating (Fin) counterpart of the wrapping (ZMod) cyclicParamNNO.

            Equations
            Instances For

              The bounded recursor is an algebra homomorphism boundedAlg M ⟶ alg, for every saturating alg (existence half of initiality).

              Equations
              Instances For

                Uniqueness on the orbit (a genuine induction, not Subsingleton): any algebra hom g : boundedAlg M ⟶ alg has g.f ⟨n, _⟩ = sⁿ z. The base uses the inl-square (g 0 = z); the step uses the inr-square at ⟨n, _⟩ with n < M (there the saturating successor is the honest n+1), giving g ⟨n+1,_⟩ = s (g ⟨n,_⟩).

                Consequently g.f = ↾(rec M alg) for every algebra hom g : boundedAlg M ⟶ alg.

                The discriminating initiality #

                Headline. boundedInitialAlgebra M is a genuine IsInitial object of the saturating full subcategory SatAlg M of Endofunctor.Algebra succEndo. Discharged via IsInitial.ofUniqueHom: existence is the recursor hom toSatHom, uniqueness is the orbit induction hom_f_eq_rec.

                Honesty (three points):

                • (a) Genuine & discriminating. Morphisms here are honest algebra homomorphisms, not Props (contrast FV-17's thin cone category, where initiality is Subsingleton.elim). Distinct algebras give distinct recursors, so uniqueness is a real induction over the orbit.
                • (b) Only in the subcategory. Initiality holds only in the saturating subcategory SatAlg M, not in all of Endofunctor.Algebra succEndo: the unrestricted initial 𝟙 ⊕ (·)-algebra is ℕ, and no_true_nno proves no finite carrier is a true NNO. Correspondingly the structure map is not an isomorphism here (boundedAlg_str_not_injective), so Lambek's Endofunctor.Algebra.Initial.str_isIso — which needs initiality in the whole algebra category — does not apply; a true (Lambek-iso-structure) initial 𝟙 ⊕ (·)-algebra would be the infinite ℕ.
                • (c) Sharper-but-narrower. A saturating successor and a restricted target class — a sharper (discriminating, non-thin) but narrower universal property than FV-17's arbitrary-target relativized recursor.
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  The unique morphism out of the initial object has underlying map the bounded recursor k ↦ sᵏ z — the saturating (Fin) counterpart of the wrapping (ZMod) cyclicParamNNO.

                  Honesty (Lambek does not apply here). The structure map of boundedInitialAlgebra M is not injective (its domain PUnit ⊕ Fin (M+1) has M+2 elements, its codomain M+1), hence not an isomorphism. So the finite initial object of the saturating subcategory is not a Lambek fixed point — exactly the finite-capacity obstruction of no_true_nno.