Documentation

ReflectiveSubsystems.Persistence.Core

Persistence capacity I: the recurrent core and the absolute ceiling ([Decoupling] §3.5) #

Part one of the PersistenceCapacity development. The umbrella module ReflectiveSubsystems.PersistenceCapacity imports all four parts; its docstring carries the capacity-name key and the map of the whole development, and every part declares its names at ReflectiveSubsystems, a theorem under the predicate it takes.

A finite world is a state space X with an update U : X → X. This module owns the dynamics underneath every capacity statement — the recurrent core — and the ceiling it imposes on any time-dependent decoder, however powerful.

Main results #

ω-limit sets and the recurrent core #

For a U-closed set B the forward images U^[t] '' B form a decreasing chain; on a finite state space it stabilizes, and its intersection — the ω-limit set — is where U is a bijection. Taking B = univ gives the recurrent core: the states surviving every number of steps.

This section and the capacity section below are stated for an arbitrary finite state type X and an arbitrary endofunction U : X → X — the generality of [Persistence] §2.1, where a world is a finite set with an update and nothing further is assumed. The cell-structured world Mem ι V = ι → V is the instance X = ι → V, and the sections that genuinely need cells (the read-only stratum, the rotation gap, the eventual-persistence relaxation) take it.

def ReflectiveSubsystems.omegaLimit {X : Type u_1} (U : X → X) (B : Set X) :
Set X

The ω-limit set of a set of states: the states reachable from B after every number of steps. For a U-closed B this is the union of the limit cycles reachable from B.

Equations
Instances For
    def ReflectiveSubsystems.core {X : Type u_1} (U : X → X) :
    Set X

    The recurrent core: the states that survive every number of steps. U restricts to a bijection on it (core_bijOn), which is the entire reason it is the ceiling on persistence.

    Equations
    Instances For

      The core is the ω-limit set of the whole memory.

      theorem ReflectiveSubsystems.exists_image_stable_le {X : Type u_1} [Finite X] (U : X → X) {B : Set X} (hB : ∀ s ∈ B, U s ∈ B) :
      ∃ N ≤ B.ncard, ∀ (t : ℕ), N ≤ t → U^[t] '' B = U^[N] '' B

      On a finite memory the image chain of a U-closed set stabilizes, and by step |B|: past some index N ≤ B.ncard every further step reproduces the same set. This is the finite-endofunction fact behind the whole section, with the transient bounded by the space it happens in.

      The bound is the whole reason to state it this way. The chain is antitone, so before it stabilizes it strictly decreases, and a chain of naturals starting at B.ncard cannot strictly decrease more than B.ncard times. Stabilization is therefore over by step B.ncard — no earlier index need be exhibited, and none later is needed.

      theorem ReflectiveSubsystems.omegaLimit_bijOn {X : Type u_1} [Finite X] (U : X → X) {B : Set X} (hB : ∀ s ∈ B, U s ∈ B) :

      U restricts to a bijection on the ω-limit set. Surjectivity is invariance (image_omegaLimit); injectivity is then forced by finiteness.

      theorem ReflectiveSubsystems.core_bijOn {X : Type u_1} [Finite X] (U : X → X) :
      Set.BijOn U (core U) (core U)

      U restricts to a bijection on the recurrent core — the standard finite-endofunction fact ([Decoupling] §3.5): the eventual image is where the dynamics is reversible.

      theorem ReflectiveSubsystems.iterate_mem_core {X : Type u_1} [Finite X] (U : X → X) {t : ℕ} (ht : Nat.card X ≤ t) (s : X) :
      U^[t] s ∈ core U

      The transient is over by step |X|: after Nat.card X steps, every state whatever is in the recurrent core. The image chain strictly decreases until it stabilizes and it starts at |X| (exists_image_stable_le), so it has stabilized by then — the space bounds its own transient.

      This is the bound that makes a settling clock finite: an observer that waits |X| steps is past every world's transient, without knowing the world.

      The lens family and its capacity ([Decoupling] §3.5, Proposition 3.5) #

      @[reducible, inline]
      abbrev ReflectiveSubsystems.Lens (X : Type u_5) (M : Type u_6) :
      Type (max u_5 u_6)

      A lens family: a time-indexed decoder. Deliberately unconstrained — not required to be local, simple, or computable.

      Equations
      Instances For
        def ReflectiveSubsystems.CarriesUpTo {X : Type u_1} {M : Type u_4} (U : X → X) (ℓ : Lens X M) (T : ℕ) :

        The family carries a persistent model up to horizon T: reading through the time-t lens recovers what the time-0 lens read. Surjectivity of ℓ 0 makes the model genuinely M-sized.

        Equations
        Instances For
          def ReflectiveSubsystems.Carries {X : Type u_1} {M : Type u_4} (U : X → X) (ℓ : Lens X M) :

          The family carries a persistent model for all time.

          Equations
          Instances For
            theorem ReflectiveSubsystems.capacity_horizon_le {X : Type u_1} {M : Type u_4} [Fintype X] [DecidableEq X] [Fintype M] {U : X → X} {ℓ : Lens X M} {T : ℕ} (h : CarriesUpTo U ℓ T) :

            Persistence capacity at horizon T, the ceiling ([Decoupling] §3.5, Proposition 3.5), in Finset form.

            theorem ReflectiveSubsystems.capacity_horizon_ge {X : Type u_1} {M : Type u_4} [Fintype X] [DecidableEq X] [Fintype M] [Nonempty M] {U : X → X} {T : ℕ} (h : Fintype.card M ≤ (Finset.image U^[T] Finset.univ).card) :
            ∃ (ℓ : Lens X M), CarriesUpTo U ℓ T

            Persistence capacity at horizon T, attained ([Decoupling] §3.5, Proposition 3.5). Every model of that size is realized: read the world T steps ahead and stand still, i.e. ℓ t := θ ∘ U^[T - t].

            theorem ReflectiveSubsystems.capacity_core {X : Type u_1} {M : Type u_4} [Finite X] [Fintype M] {U : X → X} {ℓ : Lens X M} (h : Carries U ℓ) :

            The ceiling on persistence ([Decoupling] §3.5, Proposition 3.5). No observer, however powerful, carries more than the recurrent core: irreversibility is the only obstruction to memory.

            theorem ReflectiveSubsystems.capacity_core_ge {X : Type u_1} {M : Type u_4} [Finite X] [Fintype M] [Nonempty M] {U : X → X} (h : Fintype.card M ≤ Nat.card ↑(core U)) :
            ∃ (ℓ : Lens X M), Carries U ℓ

            The ceiling is attained ([Decoupling] §3.5, Proposition 3.5, the ⇐ half). A model of any size up to the core is carried by the canonical moving family ℓ t := θ ∘ (U ↾ core)⁻¹^t ∘ U^[N]: flow into the core, then co-move with the recurrent rule.

            theorem ReflectiveSubsystems.capacity_core_iff {X : Type u_1} {M : Type u_4} [Finite X] [Fintype M] [Nonempty M] {U : X → X} :
            (∃ (ℓ : Lens X M), Carries U ℓ) ↔ Fintype.card M ≤ Nat.card ↑(core U)

            Proposition 3.5 ([Decoupling] §3.5), packaged: a lens family carrying a persistent model of size |M| exists iff |M| ≤ |core U|. No constraint on the lens — locality, simplicity and computability are all irrelevant to the bound.

            The static capacity is below the moving one, and the gap can be total #

            def ReflectiveSubsystems.Fix {ι : Type u_2} {V : Type u_3} (U : Mem ι V → Mem ι V) :
            Set ι

            The cells the update never rewrites — the maximal static code region of [Decoupling] §3 (Corollary 3.3).

            Equations
            Instances For
              theorem ReflectiveSubsystems.static_le_moving {ι : Type u_2} {V : Type u_3} [Finite ι] [Fintype V] (U : Mem ι V → Mem ι V) :

              The static capacity never exceeds the moving one ([Decoupling] §3.5(i)). The number of models storable at fixed addresses, |V| ^ |Fix U|, is at most |core U|, because restriction from the core onto the fixed cells is surjective: any assignment of the fixed cells is realized by a core state (flow an arbitrary completion into the core — the fixed cells ride along unchanged).

              theorem ReflectiveSubsystems.rotate_gap (n : ℕ) (hn : 2 ≤ n) :
              ∃ (U : Mem (ZMod n) Bool → Mem (ZMod n) Bool), Fix U = ∅ ∧ core U = Set.univ

              The gap is total ([Decoupling] §3.5(i)). Rotate-left on a cyclic string rewrites EVERY cell — Fix U = ∅, so [Decoupling] §3 Corollary 3.2 applies and the static capacity is zero — yet it is a bijection, so the core is the whole memory and the moving capacity is log₂ |Mem| bits. Total overwrite precludes persistent content at a fixed ADDRESS, not persistent content.

              Eventual persistence: a self-repairing code region ([Decoupling] §3.5, the relaxations) #

              Relax "the model is correct at every step" to "the model is correct eventually". The conclusion relaxes from "read-only everywhere" to "read-only on the ω-limit set" — and nothing weaker.

              def ReflectiveSubsystems.Settles {ι : Type u_2} {V : Type u_3} {M : Type u_4} (U : Mem ι V → Mem ι V) (decode : Mem ι V → M) (s : Mem ι V) :

              The decoded model settles along the orbit of s: it is eventually constant.

              Equations
              Instances For
                theorem ReflectiveSubsystems.eventual_decoupling_iff {ι : Type u_2} {V : Type u_3} {M : Type u_4} [Finite ι] [Finite V] {U : Mem ι V → Mem ι V} {R : Set ι} {decode : Mem ι V → M} {B : Set (Mem ι V)} (hf : Faithful decode R) (hB : ∀ s ∈ B, U s ∈ B) :
                (∀ s ∈ B, Settles U decode s) ↔ ∀ s ∈ omegaLimit U B, ∀ a ∈ R, U s a = s a

                The Eventual Decoupling Lemma ([Decoupling] §3.5). For a faithful decoder and a U-closed basin B: the decoded model settles along every orbit from B iff U is read-only on R over the ω-limit set. Relaxing persistence to eventual persistence does not escape the Total-Overwrite Exclusion — it relocates it from the whole memory to ω B. [Decoupling] §3, Proposition 3.4 (ReflectiveSubsystems.decoupling_iff_persists_on) is the case ω B = B.

                The ⇒ direction argues through the limit cycle: a state of ω B is periodic (exists_period), and a settling sequence along a cycle is constant on it — so the model is preserved in ONE step there, and faithfulness converts that into read-only.

                Majority-vote write-back on three copies: every cell is overwritten, every step, with the majority of the three. The worked self-repairing world of [Decoupling] §3.5.

                Equations
                Instances For

                  The consensus bit the majority world writes back: the value all three copies agree on once the world has settled.

                  Equations
                  Instances For

                    The recurrent core of the majority world is the consensus set: the states whose three copies agree. One step lands in it, and majWorld is the identity there.

                    theorem ReflectiveSubsystems.majority_selfRepair :
                    ∃ (U : Mem (Fin 3) Bool → Mem (Fin 3) Bool), Fix U = ∅ ∧ core U = {s : Mem (Fin 3) Bool | s 0 = s 1 ∧ s 1 = s 2} ∧ Nat.card ↑(core U) = 2

                    The worked instance: majority-vote write-back on three copies. Each cell is overwritten, every step, with the majority of the three — so Fix U = ∅ and [Decoupling] §3 Corollary 3.2 correctly reports NO static model. Yet the recurrent core is exactly the consensus set (the states whose three copies agree), U is the identity there, and one bit persists eventually: a single corrupted copy is repaired in one step and the surviving bit is the consensus.

                    Total overwrite globally, read-only on-shell — the concrete witness for eventual_decoupling_iff.

                    After the lens: the effective law ([Decoupling] §3.5, the relaxations) #

                    The last relaxation: a decoded model that obeys a law of its own rather than standing still. Such a law exists exactly when the lens's fibres are U-invariant — the substitution property of Hartmanis and Stearns (1966), cited in [Decoupling] §3.5. That property is not ours; what is recorded here is the identification of [Decoupling] §3 Lemma 3.1 as its identity-law case (decoupling_is_identity_law): persistence is not a special topic, it is the F = id fibre of the descent hierarchy, and the read-only requirement is relocated rather than removed.

                    def ReflectiveSubsystems.Autonomous {ι : Type u_2} {V : Type u_3} {M : Type u_4} (U : Mem ι V → Mem ι V) (decode : Mem ι V → M) :

                    The decoded model obeys a law of its own: states that look alike keep looking alike. (The U-invariance of the lens's fibres — the substitution property of Hartmanis–Stearns 1966.)

                    Equations
                    Instances For
                      theorem ReflectiveSubsystems.descent_iff {ι : Type u_2} {V : Type u_3} {M : Type u_4} {U : Mem ι V → Mem ι V} {decode : Mem ι V → M} :
                      (∃ (F : M → M), ∀ (s : Mem ι V), decode (U s) = F (decode s)) ↔ Autonomous U decode

                      Descent (the substitution property, Hartmanis–Stearns 1966; [Decoupling] §3.5). The world's rule induces a law on the decoded model iff the lens's fibres are U-invariant. Forward is immediate; backward reads the induced law off any preimage, which is well defined precisely by autonomy.

                      def ReflectiveSubsystems.SettlesTo {X : Type u_1} {M : Type u_4} (U : X → X) (decode : X → M) (F : M → M) (s : X) :

                      The decoded model eventually follows the law F along the orbit of s: past a transient, each step of the world moves the reading by F. Settles is the case F = id, stated as eventual constancy rather than as an eventual one-step law — over an orbit the two say the same thing.

                      Equations
                      Instances For
                        theorem ReflectiveSubsystems.eventual_descent_iff {X : Type u_1} {M : Type u_4} [Finite X] {U : X → X} {decode : X → M} {F : M → M} {B : Set X} (hB : ∀ s ∈ B, U s ∈ B) :
                        (∀ s ∈ B, SettlesTo U decode F s) ↔ ∀ s ∈ omegaLimit U B, decode (U s) = F (decode s)

                        Eventual descent ([Persistence] §10.1 read at §10.2's generality): the decoded model eventually obeys the law F along every orbit from a U-closed B iff it obeys F at every state of the ω-limit set. The eventual-decoupling statement (eventual_decoupling_iff, whose conclusion is read-only-on-R through a faithful decoder) is the identity-law case of this, exactly as decoupling_is_identity_law is the identity-law case of descent_iff.

                        The two directions are the two halves of the ω-limit picture. Backward, orbits from B are inside ω B past the transient, where the law holds by hypothesis. Forward argues on the limit cycle: a state of ω B returns to itself (exists_period), so a law obeyed eventually is obeyed at the state itself — read the hypothesis at a multiple of the period, past the transient, and the orbit has come back to where it started.

                        No cell structure and no faithfulness are needed: this is a statement about an endofunction, a decoder, and a candidate law. What it does NOT say is that some F exists — only descent (descent_iff, Autonomous) decides that, and here F is given.

                        theorem ReflectiveSubsystems.decoupling_is_identity_law {ι : Type u_2} {V : Type u_3} {M : Type u_4} {U : Mem ι V → Mem ι V} {R : Set ι} {decode : Mem ι V → M} (hf : Faithful decode R) :
                        (∀ (s : Mem ι V), decode (U s) = decode s) ↔ Fixes U R

                        [Decoupling] §3 Lemma 3.1, relocated: the identity-law case of descent. Under a faithful decoder the induced law is the IDENTITY exactly when U is read-only on R. So persistence is not a separate phenomenon — it is the F = id fibre of the descent hierarchy, and each relaxation moves the read-only requirement rather than removing it.

                        The static hierarchy: conserved quantities ([Persistence] §4) #

                        Between the read-only region of [Decoupling] §3 and the moving observer's ceiling sits one more class of decoder: the static lens — a single ℓ : Mem → M with ℓ ∘ U = ℓ, no faithfulness, no region structure. Such an ℓ is a conserved quantity of the dynamics, and it is exactly a function constant on the components of the transition graph, so the static-lens capacity is the number of components. Three inequalities place it: read-only cells ≤ components ≤ recurrent core.

                        What a static lens buys is strictly less than what a code region buys. It carries a conserved quantity, not a program: [Decoupling]'s necessity_needs_faithful is the observation that a lossy persistent lens yields no runnable region at all.

                        def ReflectiveSubsystems.orbitRel {X : Type u_1} (U : X → X) :
                        X → X → Prop

                        The equivalence generated by one step of the update: s and t are related when a chain of forward steps, taken in either direction, joins them. Its classes are the weakly-connected components of the transition graph. Stated at an arbitrary carrier X: the definition uses nothing of Mem ι V, and staticLens_factors through hierarchy below instantiate it there with no change to their own statements.

                        Equations
                        Instances For
                          def ReflectiveSubsystems.orbitSetoid {X : Type u_1} (U : X → X) :

                          The setoid of orbitRel. Quotient (orbitSetoid U) is the set of components, and its cardinality is the static-lens capacity ([Persistence] §4, L2).

                          Equations
                          Instances For
                            theorem ReflectiveSubsystems.orbitRel_step {X : Type u_1} (U : X → X) (s : X) :
                            orbitRel U s (U s)

                            One step relates a state to its successor.

                            theorem ReflectiveSubsystems.orbitRel_iterate {X : Type u_1} (U : X → X) (s : X) (k : ℕ) :
                            orbitRel U s (U^[k] s)

                            Every state is related to all of its iterates: the orbit lies in one component.

                            theorem ReflectiveSubsystems.staticLens_factors {ι : Type u_2} {V : Type u_3} {M : Type u_4} {U : Mem ι V → Mem ι V} (ℓ : Mem ι V → M) :
                            (∀ (s : Mem ι V), ℓ (U s) = ℓ s) ↔ ∀ (s t : Mem ι V), orbitRel U s t → ℓ s = ℓ t

                            A static lens is exactly a function constant on the components ([Persistence] §4, L2). Forward is an induction over the generated equivalence; backward is the single step s ∼ U s.

                            theorem ReflectiveSubsystems.components_carries {ι : Type u_2} {V : Type u_3} (U : Mem ι V → Mem ι V) :

                            The static capacity is attained: the quotient map is itself a static lens, and it is surjective — so a model of size #components persists under a decoder that never moves.

                            theorem ReflectiveSubsystems.staticCapacity_le {ι : Type u_2} {V : Type u_3} {M : Type u_4} [Finite ι] [Finite V] {U : Mem ι V → Mem ι V} {ℓ : Mem ι V → M} (hst : ∀ (s : Mem ι V), ℓ (U s) = ℓ s) (hsurj : Function.Surjective ℓ) :

                            The static capacity is the number of components ([Persistence] §4, L2), the upper half: a static lens is constant on the components (staticLens_factors), hence factors through the quotient, and a surjection cannot leave its target bigger than its source.

                            theorem ReflectiveSubsystems.fix_le_components {ι : Type u_2} {V : Type u_3} [Finite ι] [Finite V] (U : Mem ι V → Mem ι V) :

                            Read-only cells are below the components ([Persistence] §4, Proposition 4.1, first inequality). Restriction to the never-rewritten cells is itself a static lens — the update leaves those cells alone, so the restriction is unchanged in one step — and it is onto every assignment of them. So all |V| ^ |Fix U| static models fit inside the component count.

                            theorem ReflectiveSubsystems.components_le_core {ι : Type u_2} {V : Type u_3} [Finite ι] [Finite V] (U : Mem ι V → Mem ι V) :

                            The components are below the recurrent core ([Persistence] §4, Proposition 4.1, second inequality). Every component contains a core state — iterate past stabilization and the orbit lands in the core without leaving its class — so the quotient map is already surjective from the core.

                            theorem ReflectiveSubsystems.hierarchy {ι : Type u_2} {V : Type u_3} [Finite ι] [Finite V] (U : Mem ι V → Mem ι V) :

                            The hierarchy ([Persistence] §4, Proposition 4.1): a fixed region carries no more than a conserved quantity, which carries no more than the moving observer's ceiling. The gaps are real — rotate-left has an empty fixed region (rotate_gap) and a full core.