The structural category of decoupled simulations ([Decoupling] §4.5) #
Provenance: [Decoupling] §4.5 — the domain of the functor Conjecture 4.4 asks for: decoupled learners, with capacity-respecting simulations as morphisms. This file defines those morphisms and proves they form a category.
Scope: STRUCTURAL, with the graded enrichment in a sibling module #
A capacity-respecting simulation is a triple: a hosting square, a code-locality condition, and a
resource grade on the reading family. The first two are here; the third is the graded enrichment
GradedSimulates in ReflectiveSubsystems/GradedSimulation.lean, where CodedReading carries each
frame's coded reading pair at a uniform budget b and inducedMap transports a graded morphism
along one frame. The price is (g, b), not (g, b, τ): a guest realizer of grade g, read by a
pair of index length at most b, is priced by 4 · max g b + 9 in the host. The dilation τ
prices time — it multiplies along a tower of hosting squares — and does not enter the
per-application realizer grade, exactly as the transport law of
ReflectiveSubsystems/GradeTransport.lean finds. What this file establishes is that the
underlying structure is a category: morphisms compose, identities exist, and the two conditions are
closed under both.
The two conditions, and why only one of them is primitive #
A decoupled subsystem splits its state as C × W — a code region and a work region — and its step
map leaves the code region fixed. That read-only property is not an extra axiom here; it is the
defining property of decoupling ([Decoupling] §3, Lemma 3.1), recorded as ReadOnly.
A simulation of U by U' is then:
- the square
Intertwines (U'^[τ]) U ℓ—τhost steps, read one frame later, are one guest step of the reading ([Persistence] §10.2, where dilated squares and their composition law live); - code-locality — the guest code the reading returns depends on the host state only through the
host's code region. Stated relationally (
x'.1 = y'.1 → (ℓ t x').1 = (ℓ t y').1) rather than as a factorization through an existential translation map, so no choice is used and no translation map has to be constructed.
The design question this settles is which conditions are primitive. One might expect to require that the code region be carried across the square, and separately that the induced code translation be time-independent. Neither is a hypothesis: both are theorems.
code_carrying— the square's code component is automatically a carrying square: the reading's guest code is unchanged by a block ofτhost steps. It follows from the guest's read-only property alone, which collapses the square's code component.code_time_indep— the reading's code component is automatically time-independent: it returns the same guest code through every frame. It follows from the host's read-only property together with code-locality, and needs nothing else — in particular no inhabitedness of the work region and no choice.
So code-locality is the one genuine condition, and it is trivially closed under composition (the code translations simply chain).
Non-discreteness #
counter_simulates exhibits a nontrivial morphism: the mod-k·n counter hosts the mod-n counter,
read by reduction mod n, at dilation 1. So the category is not discrete, and the definition is
not vacuously satisfied only by identities.
Decoupled step maps #
The decoupling property ([Decoupling] §3, Lemma 3.1): on a state space split as C × W
into a code region and a work region, the step map leaves the code region fixed. This is the
defining property of a decoupled subsystem, not an extra assumption imposed here.
Equations
- ReflectiveSubsystems.ReadOnly U = ∀ (s : C × W), (U s).1 = s.1
Instances For
The morphisms #
A simulation of U by U' at dilation τ — a morphism of the domain category
[Decoupling] §4.5 asks for, minus its resource grade (see the module docstring).
square is the hosting square: τ steps of the host, read one frame later, are one step of the
guest. codeLocal says the reading's guest code is determined by the host's code region alone —
stated as a relation between host states agreeing on their code, which avoids constructing (or
choosing) a translation map.
- square : Intertwines U'^[τ] U ℓ
the hosting square at dilation
τ the reading's guest code depends on the host state only through the host's code region
Instances For
The two automaticity facts #
The code region is carried automatically. A block of τ host steps does not change the
guest code the reading returns. Nothing is assumed about the reading beyond the square: the guest's
own read-only property collapses the square's code component, so "the square carries the code
region" is a consequence of decoupling rather than a condition on the morphism.
The induced code translation is time-independent automatically. The reading returns the same
guest code through every frame. The host's read-only property fixes the host code across a block of
τ steps, code-locality transports the previous lemma's equation from (U'^[τ]) x' back to x',
and the two together leave no room for a frame dependence.
No inhabitedness of the work region and no choice enter: the argument is entirely a chain of
equations at the single state x'.
The category structure #
Composition — the capstone. Simulations compose and dilations multiply: if U' simulates
U at dilation τ₁ and U'' simulates U' at dilation τ₂, then U'' simulates U at dilation
τ₂ * τ₁, read through the composite family k ↦ ℓ₁ k ∘ ℓ₂ (τ₁ * k) — the outer reading is taken
at the inner clock rate, since the guest's clock ticks once per τ₁ ticks of the middle system's.
The square half is the tower's composition law ([Persistence] §10.2); the code-locality half chains the two localities and needs nothing else, which is what makes the condition a categorical one rather than a constraint that has to be re-established at each level.
A nontrivial morphism: the counter tower #
The counter's code region is read-only — vacuously, its code region being a point.
The category is not discrete. The mod-k·n counter hosts the mod-n counter, read by
reduction mod n, at dilation 1: the square commutes because n ∣ k·n, so reducing the host's
wrap-around mod n is the guest's own wrap-around. Code-locality is immediate — the reading's guest
code is the point.