The record clock: a periodic register plus fresh slots, read as a tick count #
Category: 7-SigmaLayer (the record layer — the first physical clock in the corpus). BACKLOG #185 (out of #39; the third of #183–#189).
A periodic subsystem does not count its cycles: after one period it is back where it was
(osc_period). A clock is a periodic register together with fresh record slots, one written per
cycle, and its reading is the number of written slots. This file builds that clock on one arena,
with the record machinery of ShearWitness.lean (the arcs, pshift, rep) and presents each slot
as a MeasurementProtocol, so that the corpus's own persistence theorem applies to every tick.
The arena. ClockArena K = KTorus × (Fin K → KTorus): the oscillator register and K slot
registers, each a copy of the pointer torus. K is the observation horizon: the apparatus
memory, one slot per tick.
The dynamics. clockEvolve T s t: the oscillator turns at rate 1/T; slot n is translated
by the gap δ = shearGap K during its own window [n T, (n+1) T] (winElapsed), from the ready
arc (0, ε] into the written arc (δ, δ + ε], and is frozen outside its window. It is a two-time
propagator (clockEvolve_self, clockEvolve_comp), measurable, and preserves Liouville measure
on the arena (clockEvolve_measurePreserving). ⚠️ The window schedule is a modelling input
indexed by ontic time t_Σ, stated as such: it is the switching of the slot couplings, exactly
as elapsed is the switching of the shear coupling in ShearWitness.lean. It is not emergent
time, and this file does not call it that.
The readout. tickCount x is the number of slots in the written arc; tickReading τ_tick x = tickCount x · τ_tick is the calibrated reading, with the physical count and the unit
τ_tick > 0 kept apart.
ClockArena,winElapsed,clockEvolve;clockEvolve_self, ★clockEvolve_comp,measurable_clockEvolve, ★clockEvolve_measurePreserving— a dynamics;osc_period— the oscillator alone cannot count: its state after one period is its state;writtenArc,writtenArc_eq_pointerArc_zero,readyArc_disjoint_writtenArc;- ★
slot_ready_before, ★slot_written_after, ★slot_written_mono— a concrete evolution writes ticknfrom the ready preparation, during windown, once and for all; tickCount, ★measurable_tickCount— the readout is well defined and measurable;tickCount_le_horizon;- ★★
tickCount_mono— the tick count is nondecreasing; - ★★
tickCount_ge,tickCount_le,tickCount_at_period— the relation between tick count and the evolution parameter: aftern + 1full periods at leastn + 1ticks, beforenperiods at mostn, and exactlymat timem T; - ★
successive_ticks_distinguishable— successive ticks occupy distinct register states; tickProtocol n— each slot is aMeasurementProtocol, withtickProtocol_pointerInvariantand ★tick_persists— ticknpersists through the window, by the corpus'srecord_persists_on_interval, not by a fresh argument;tickReading, ★★abs_tickReading_sub_lt— calibrated withτ_tick = T, the clock reads within one tick oft_Σover the horizon; ★★★record_clock— the package.
Honest scope #
- ⚠️ The writes are scheduled, not triggered by the oscillator's phase: slot
nmoves during then-th period because the schedule says so, and the oscillator's role is to define the period. A counter whose next slot is armed by the previous slot's record (a ripple counter) would make the trigger dynamical; it is not built here. - During its window a slot is in transit and may or may not read as written; the theorems about
the count are stated at the window boundaries (
tickCount_ge,tickCount_le) and the count is monotone throughout (tickCount_mono). Within one tick oft_Σis the honest resolution. - The Hamiltonian generation of
clockEvolveis not formalised, exactly as forshearEvolveandswapEvolve(R-016′); the propagator is given and shown to be a measure-preserving two-time dynamics. K ≥ 1is needed wherever a slot is written (gap_add_width_le_one); withK = 0there is no memory and nothing is claimed.
References: specs/BACKLOG.md #185, #183, #186, #39; RecordLayer/ShearWitness.lean (pshift,
readyArc, pointerArc, shearGap, shearWidth, rep_pshift_of_mem, measurePreserving_pshift);
RecordLayer/SwapWitness.lean (the slot bank); RecordLayer/MeasurementProtocol.lean;
RecordLayer/RecordPersistence.lean (record_persists_on_interval).
The arena and the window schedule #
The clock arena: the oscillator register and K slot registers. K is the horizon.
Equations
- CSD.RecordLayer.ClockArena K = (CSD.LF4.KTorus × (Fin K → CSD.LF4.KTorus))
Instances For
The propagator #
The clock propagator over [s, t]: the oscillator turns by (t − s)/T; slot n is
translated by the gap δ times the fraction of its window that elapsed.
Equations
- One or more equations did not get rendered due to their size.
Instances For
★ The two-time composition law.
★ The clock propagator preserves Liouville measure on the arena: it is a dynamics.
The oscillator alone cannot count #
The written arc #
The arc a slot occupies once its tick is written: rep ∈ (δ, δ + ε].
Equations
Instances For
The written arc is the pointer arc of the first outcome.
Writing one slot #
★ A ready slot shifted by the full gap is written.
★ Once a ready slot reads as written, it reads as written at every later fraction: the write is monotone through the window.
The ready preparation and the slots along the evolution #
The ready preparation: every slot in the ready arc.
Equations
- CSD.RecordLayer.ClockReady K = {x : CSD.RecordLayer.ClockArena K | ∀ (n : Fin K), x.2 n ∈ CSD.RecordLayer.readyArc K}
Instances For
Slot n along the evolution from time 0.
★ Before its window, slot n is still ready.
★ After its window, slot n is written: the concrete evolution writes tick n from the
ready preparation.
★ A written tick stays written: slot membership in the written arc is monotone in time.
The tick count #
The tick count: the number of slots in the written arc.
Equations
- CSD.RecordLayer.tickCount x = {n : Fin K | x.2 n ∈ CSD.RecordLayer.writtenArc K}.card
Instances For
★ The readout is measurable.
The count never exceeds the horizon: finite memory.
★★ The tick count is nondecreasing along the evolution from the ready preparation.
★★ After n + 1 full periods, at least n + 1 ticks.
★★ Before n periods, at most n ticks.
★★ Exactly m ticks at time m T, for m up to the horizon.
★ Successive ticks occupy distinguishable register states.
Each slot is a measurement protocol; ticks persist #
Slot n as a MeasurementProtocol with one outcome ("the tick is written"): start at
n T, readout at (n+1) T, record lifetime τR.
Equations
- One or more equations did not get rendered due to their size.
Instances For
After its readout the slot is frozen, so the written arc is invariant: the hypothesis the persistence theorem asks for, discharged by the dynamics.
★ Tick n persists from its readout through the record lifetime — by the corpus's
record_persists_on_interval, applied to tickProtocol n from the state at the start of its
window.
The calibrated reading #
The calibrated reading τ_A = tickCount · τ_tick: the physical count times the unit.
Equations
- CSD.RecordLayer.tickReading τtick x = ↑(CSD.RecordLayer.tickCount x) * τtick
Instances For
★★ Calibrated with the period, the clock reads within one tick of t_Σ over the horizon:
|tickCount · T − t| < T for 0 ≤ t ≤ K T. The reading is a record count; t is the ontic
parameter of the schedule; they agree to within the resolution of one tick, and that is the whole
relation between them.
The package #
★★★ The record clock. From the ready preparation on a horizon of K ≥ 1 slots, with period
T > 0: the propagator is a measure-preserving two-time dynamics; the tick count is measurable,
nondecreasing, never above K, exactly m at time m T; each tick, once written, persists; and
calibrated with the period the reading is within one tick of t_Σ.