ch:temporal-types: ch:temporal-types
A running average implemented with a retained prefix is causal but may leak space. The equation
After the tick, RaTT-Var cannot reach
The fixed-point variable
Use a stable list accumulator and cons the current input before delaying the recursive call. Old temporal heaps remain unreachable, so proposition 55.1 holds. The list itself is a stable value reachable from the new state; its deliberate growth is not an implicit heap leak.
Productivity assumes one closed boxed output stream and yields arbitrarily many typed heads. Causality assumes a boxed function from input streams to output streams plus a typed current input, and maintains a decreasing transducer approximation. A closed stream can be productive even if a purported online implementation needed future external input, so the first theorem alone does not establish the dependency condition of the second.
Producing
Map transforms each present head, sampling chooses which present cells to forward, and running sum transports only its stable accumulator. All tail calls occur inside one delay and both recursive code and tails advance after its tick. With identity map and no dropped cells,
At index
Both programs discard the old now heap and retain one delayed tail. The natural accumulator has constant representation. In the stated stable-list extension, the list accumulator adds one cons cell per input and remains reachable as stable state, so application data grows even though no old temporal heap is retained.