Notes

Toy Project Dynamics (Lenses)

Companion notes unpacking the discrete brickwork toy model and the continuous slot-observation lens framing.

A project state records what is needed to determine its possible next steps. The outgoing action set is a useful discrete analogy to tangent directions, not a vector space. A deterministic policy selects an action; iterating the update generates a trajectory. Curing adds a timer to the state. Myers-style lenses separate state, readout and update, so the information shown to an observer is not confused with the full state used by the model.

1) Discrete toy model: cylindrical brickwork as a state-transition system

State space X (finite state set)

Fix:

A minimal state can be:

x = (c, p, σ, s, κ) where

You can regard the “blueprint filled in” as the exposed variable (a readout) expose(x), e.g. the set of completed cells in an N × M grid.

“Tangent fiber” TxX in the discrete sense

At each state x, define:

TxX := {admissible next actions}

Example admissible actions:

A deterministic policy is a function selecting a unique action v(x) ∈ TxX. If you want branching, switch to possibilistic/ stochastic dynamics (Myers explicitly packages those as lenses too).

Lens-shaped system data (Myers / dynamical systems convention)

A deterministic system S is: state set, input set, output set, with update/expose maps. In this toy:

With update and expose maps, this matches the “state + parameter gives next state; state gives output” interface described in Myers’ deterministic-system definition.

Pseudocode (minimal)

State = (course c, progress p, dir σ, start s, cooldown κ, placed[N][M])

expose(State):
    return placed   // the blueprint-as-filled-in (or a compressed summary)

update(State, input):
    if κ > 0:
        κ := κ - 1
        return State

    if p < M:
        pos := (s + σ*p) mod M
        placed[c][pos] := true
        p := p + 1
        if p == M:
            κ := curing_time(c)   // optional doping constraint
        return State

    // p == M and κ == 0:
    if c == N-1: return State_done
    c := c + 1
    (σ, s) := choose_direction_and_start(input, c)
    p := 0
    return State
        

2) Spivak vs Myers lens “flip” (and what I’m choosing)

They’re equivalent up to a systematic swap of what you put on top vs bottom (Spivak even flags this “flip” issue in his slides).

Choice: I’ll use Myers’ orientation here, because it makes expose the passforward map (state → output) and update the passback (state × input → next-state / tangent), matching his system-theory definitions.

3) Continuous toy model: rotation observed through a slot, as a lens + wiring diagram

Physical story (your spec)

A clean factorisation (lens-compositional)

It’s conceptually helpful to split into boxes (exactly what wiring diagrams are for; in Spivak’s slides, wiring diagrams induce lenses built from diagonals/projections, and in Myers you re-interface systems by composing with lenses).

Boxes:

  1. Init: (θ0, ω, r) ↦ s0
  2. Dynamics: closed differential system evolving s(t)
  3. Slot sensor: an observation function producing visible coordinates or null
  4. Observer: post-process stream into entry/exit intervals (events)

This is also where the “open system” intuition sits: you can distinguish closed dynamics, initial conditions and the observer's readout. A genuine open-system extension must specify how time-varying input changes the state.

Formal lens for the dynamics box (Myers style)

Myers remarks that differential systems look like deterministic systems in the cartesian category Euc, except that the right-hand ℝn in the update map is interpreted as a tangent space/vector field.

So we can model the Dynamics box as:

exposeS(θ, ω, r, τ) = (θ, r, τ)
updateS((θ, ω, r, τ), *) = (ω, 0, 0, 1)

encoding: θ̇ = ω, ω̇ = 0, ṙ = 0, τ̇ = 1.

The observation is null outside the slot, and (x, y, τ) inside, with x = r cos θ and y = r sin θ. No hidden position is included in the null observation. The demo's full circle and faint trail are an omniscient teaching view, not the sensor's output. A hard gate is discontinuous, so it is not a smooth Euc map. Initialisation selects the starting state; it is not a lens that continually resets the dynamics.

4) Working demo: interactive HTML with visuals + analytics

I built a self-contained interactive HTML that:

Download the interactive HTML demo

5) The next dynamical question

Which state distinctions must an interface expose to support valid future choices? A progress picture may hide a curing timer or occupied resource. The constructive experiment computes counterexamples, refines a summary and generates full-completion paths from the resulting dynamics.

Open-system composition requires explicit readout and update maps and a clear clock. A summary sufficient after one wiring may fail after resources change. That is a testable dynamics question, not a claim that category-theory vocabulary supplies physical laws.