{'fraction_non_alphanumeric': 0.04778312827599642, 'fraction_numerical': 0.005783408314714817, 'mean_word_length': 4.337058938202612, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 30, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Information dynamics and the arrow of time

Why does time appear to pass irreversibly? To investigate, we introduce a class of partitioned cellular automata (PCAs) whose cellwise evolution is based on the chaotic baker's map. After imposing a suitable initial condition and restricting to a macroscopic view, we are left with a stochastic PCA (SPCA). When the underlying PCA's dynamics are reversible, the corresponding SPCA serves as a model of emergent time-reversal asymmetry. Specifically, we prove that its transition probabilities are homogeneous in space and time, as well as Markov relative to a Pearlean causal graph with timelike future-directed edges. Consequently, SPCAs satisfy generalizations of the second law of thermodynamics, which we term the Resource and Memory Laws. By subjecting information-processing agents (e.g., human experimenters) to these laws, we clarify issues regarding the Past Hypothesis, Landauer's principle, Boltzmann brains, scientific induction, and the so-called psychological arrow of time. Finally, by describing a theoretical agent powered by data compression, we argue that the algorithmic entropy takes conceptual precedence over both the Shannon-Gibbs and Boltzmann entropies.


I. INTRODUCTION
The complete trajectory of a dynamical system can be specified in two parts: (1) an initial condition that specifies its configuration at the initial time, and (2) dynamics that specify how the configuration evolves over time. It's widely believed that the Universe exhibits CPT symmetry: under a simultaneous reversal in charge (C) and parity (P), its dynamics are symmetric in time (T). In other words, every video recording remains physically valid when played in rewind 1 . CPT is a rigorous theorem in axiomatic quantum field theory [1], standing in stark contrast to our everyday experience with irreversible phenomena. Indeed, fragile items drop and shatter, but don't unshatter and undrop; we remember yesterday's events, but plan tomorrow's agenda; causes precede effects. If the dynamics are truly symmetric, then, by a process of elimination, only a special choice of initial condition can break the symmetry.
In particular, the initial condition must be set in such a way as to imply the second law of thermodynamics: a general principle of physics that forbids the entropy of any closed system from decreasing. Much work has gone into justifying various formal definitions of entropy, along with conditions that would imply the second law. Even if the second law is taken for granted, relating it to causal and decision-theoretic concepts remains a challenge.
From Maxwell's demon to Poincaré recurrence to Landauer's principle, the subject of irreversibility has a history fraught with debates and misunderstandings [2]. To increase confidence in our main results, we take a mathematically rigorous approach in which all modeling assumptions are laid bare. Modeling choices are made in an effort to balance conceptual clarity, generality, and applicability to real physics. We abstract away what we can from physical field theories, substituting a generic class of cellular automata in their place.
Like our Universe, these automata have dynamics that are reversible microscopically, but not macroscopically; as such, they model the emergence of asymmetries with respect to time reversal, i.e., arrows of time. Despite deterministic dynamics, we discover precisely how Markovian probabilities emerge as a macroscopic behavior. By applying ideas from information theory and Pearlean causality to these automata, we collect insights on how the arrow of time operates. In particular, we learn why memories only inform us about the past, and why causes precede effects.
Following the traditional sequence of physics pedagogy, this article only models classical information, leaving extensions to the quantum setting for future work. Our classical approach stands as a rebuttal against suggestions that the psychological arrow of time is a distinctly quantum phenomenon [3,4]. The remainder of this introduction develops the background, motivation, and general structure of our approach.

A. Discrete-State Entropy
Our models are inspired by classical mechanics, which operates on a continuous phase space. Before addressing the latter, we start with the discrete setting, where entropy has a clearer meaning. Even there, entropy can be understood in a number of ways. Intuitively, it's often thought of as a measure of combinatorial complexity, or "disorder". Conversely, a lack of entropy is often thought of as a resource, akin to free energy; or as knowledge, narrowing down the set of possible states. Loosely speaking, if the object s is a "typical" element of some finite set S, then we'd like to say its entropy is log |S|.
To make this precise, we can define entropy as a function of a probability measure µ on some countable set S. The Shannon entropy of µ (also known as its Gibbs entropy) is given by H(µ) := s∈S µ(s) log 1 µ(s) . (1) The base of the logarithm is not important: since it only changes the entropy by a constant factor, a change of base is effectively just a change of units. For example, when the base is 2, the entropy is given in bits. Note that when µ is uniformly distributed over some subset A ⊂ S, we indeed have H(µ) = s∈A 1 |A| log |A| = log |A|. For non-uniform µ, the Shannon entropy is motivated by supposing that µ is the joint distribution over a long sequence s = (s 1 , . . . , s n ) from a stationary ergodic process. As a special case, the sequence can be i.i.d. (independent and identically distributed), representing, for instance, the state of n particles in an ideal gas. As n gets large, there is a sense in which µ approximates the uniform distribution on a "typical set" S typ of about 2 H(µ) elements (where H is given in bits). In particular, H(µ) ≈ log |S typ | ≈ nh, where h is the entropy rate of the process [5, §16.8].
Note that H is a function of µ, not of s. In other words, the Shannon entropy appears to depend on some subjective measure of our knowledge about s, but not on its actual realization. Since we do not yet have the tools to reason about subjective knowledge (see Section VI C), we need a notion that's a direct function of s.
In statistical mechanics, the most common approach is to coarse-grain the state space into a union of Boltzmann macrostates: S = ∪ i S i . The macrostates S i are typically chosen to be disjoint; if not, identify each Boltzmann microstate s ∈ S with the smallest macrostate containing it. The Boltzmann entropy of s is given by B(s) := min{log |S i | : S i ∋ s}. (2) Typically, the partition index i corresponds to a collection of macroscopic parameters, such as temperature, pressure, and chemical composition, specified to a reasonable degree of precision. There is debate over the validity of the coarse-graining procedure, since the Boltzmann entropy is very sensitive to the choice of partition.
The theory of computation offers a third definition, which unifies and yields additional insights into the preceding approaches. To apply it, we must fix a universal Turing machine U , as well as a digital encoding s for each element s ∈ S. The algorithmic U -entropy of s ∈ S (also known as its Kolmogorov complexity) is then defined to be the length of the shortest program p 2 , whose output is s : If p is written in binary, then K is given in units of bits. Once again, there is some room to fudge the definition, by changing either the universal machine or the encoding. Fortunately, for "reasonable" choices, the changes would be very small. For instance, let's see if some other machine T can yield substantially smaller complexities than U . The universality of U means that it encodes T as some string T , satisfying U ( T , p) = T (p) for all programs p. Thus, the U -entropy of a system cannot exceed its T -entropy by more than the constant | T |.
For a Universe with an effective minimum length scale (i.e., the Planck length), it's plausible that there would only exist finitely many functionally distinct CPU designs (or Turing machine heads) with diameter smaller than, say, a millimeter. Thus, U can be chosen in such a way that every machine T with a small physical implementation also has a short encoding T 3 . For large complex systems described by very large |p|, the contribution | T | of any small machine becomes negligible in comparison. As for smaller systems, in practice they are always embedded within a larger context: conditional forms of the algorithmic entropy or universal prior can be used to quantify a subsystem's contribution to a larger system's entropy [6, §3.8 and §5.2].
Thus, we argue that K is the most objective and fundamental definition of entropy. This perspective finds additional support in Section VI D, where compressible strings are shown to serve as a resource. In practice, H and B are often easier to estimate; we now review conditions under which they closely approximate K. Obviously, as long as such conditions hold, H and B are approximately invariant to specific details of the chosen distribution or coarse-graining partition.
Let's first look at the Boltzmann entropy B. Any coarse-graining yields a two-part code p for each s ∈ S, consisting of (1) the macrostate S i 's description, and (2) an index of length B(s) = log |S i |, identifying s within S i . Suppose that (1) macrostates have short descriptions 4 , and (2) s is algorithmically typical (i.e., Martin-Löf random [6, §2.4]) with respect to the uniform

B. Continuous-State Entropy
In classical Hamiltonian mechanics, the discrete state space S is replaced by a continuous phase space. For example, a system of n free particles has its state described by a point in R 6n , representing their 3D positions and momenta. Given a probability measure µ over phase space, the Shannon (or Gibbs) differential entropy is defined by replacing the sum in Equation (1) by an integral. A defining characteristic of Hamiltonian evolution is Liouville's theorem: it states that phase volumes, and hence the differential entropy, do not change with time [8].
On the other hand, the continuous setting is conducive to views with limited numerical precision. For concreteness, fix a resolution ε > 0. To each point in R 6n , apply the coordinate-wise discretization x → ⌊ x ε ⌋ε. It partitions the phase space into axis-aligned hypercubes of width ε, identified with elements of a discretized state space S := (εZ) 6n . Since S is countable, all of the discrete-state entropies H, B, K apply. Despite Liouville's theorem, the discretized entropies can be altered by changing the shape of a phase volume, so that it occupies different numbers of ε-cubes.
Note that the computation of B now involves two levels of partitioning: (1) the fine partition of continuous phase space into its discretized version, and (2) the coarse partition of discretized phase space into Boltzmann macrostates. For the remainder of this article, the word microscopic refers to the full continuous description, whereas macroscopic refers to the discretization into fine macrostates. Although the latter are considered microstates in the Boltzmann picture, there will be no ambiguity as we've chosen to focus on the Shannon entropy. In light of the correspondence between B and H in Section I A, Boltzmann's coarse macrostates are replaced with probability distributions over fine macrostates.
For certain volume-preserving dynamical systems, we'll find initial conditions that ensure the discretized Shannon entropy never decreases. The idea is to employ a particularly convenient chaotic map.

C. The Baker's Map and the Shift Map
We consider a discrete-time map that shares many properties with Hamiltonian mechanics, but is more tractable. It substitutes the unit square S baker := [0, 1) 2 for phase space. Fix m ∈ N. The m-fold baker's map β : S baker → S baker acts on the square by stretching its x-axis while squeezing its y-axis, each by a factor of m, then cutting and re-arranging to get back the unit square: β(x, y) = mx − ⌊mx⌋, y + ⌊mx⌋ m .
The combination of stretching and squeezing makes β volume-preserving and chaotic. It also satisfies a CPT-like symmetry, since where ρ(x, y) := (y, x) is a reflection about the line y = x. Since β is invertible, any (possibly random) initial state C 0 = (X 0 , Y 0 ) ∈ S baker determines the state at all times t ∈ Z by iterating C t+1 = β(C t ), forward and backward. Given the distribution of C 0 and the resolution ε, we are interested in the Shannon entropy of C t 's discretization at various t. In light of the symmetry in Equation (4), we cannot preferentially guarantee higher entropy at higher t.
Instead, provided that the initial distribution is absolutely continuous, the entropy tends toward a maximum in a symmetric fashion, as t → ±∞. Some intuition is offered by the special case in which C 0 is uniformly distributed on a union of axis-aligned squares, whose vertex coordinates are multiples of δ, with each of ε, δ being integer powers of 1 m . The reader may verify that the entropy is non-decreasing for |t| ≥ log m 1 ε − log m 1 δ , and is maximal at |t| ≥ log m 1 ε + log m 1 δ . In a much more general setting, Theorem 4 will imply an asymptotic version of the second law of thermodynamics as t → ±∞. β is a prototypical example of a chaotic map: it's physically realizable [9] and guides our geometric intuition. It also has a convenient symbolic representation. To that end, let Z m := {0, 1, . . . , m−1}. The m-symbol shift map σ : S shift → S shift is defined on the set of bi-infinite sequences S shift := (Z m ) Z , by simply shifting the entire sequence r ∈ S shift over by one position: Despite their different appearances, the maps β and σ are essentially equivalent, in the sense that the correspondence Ψ : S shift → S baker , defined by is almost bijective. Ψ interprets the sequence's two halves (r ≥0 , r <0 ) as representations, in the base-m positional number system, of the (x, y) coordinates of a point in S baker . The only trouble is that points of S baker with m-adic rational coordinates have multiple preimages, due to non-unique representations such as 0.5 = 0.49. Fortunately, these points collectively have measure zero, so we would not expect to encounter them on a random draw. On their complement, one can check that the dynamics are equivalent: (β • Ψ)(r) = (Ψ • σ)(r).
In summary, the baker's map β serves as a convenient substitute for classical Hamiltonian dynamics, sharing key features such as determinism, reversibility, volume-preservation, chaos, and the second law of thermodynamics. Motivated by the correspondence Ψ, we will base our models on the shift map σ. If the initial condition is suitably randomized, each term in the sequence r ∈ S shift acts as a random seed, which can be used to emulate stochastic transitions. We will design macroscopic transitions that depend on only one term, say r 0 . σ shifts these terms like a conveyor belt, providing a fresh r 0 at every time step.
As a result, our models' stochastic macroscopic descriptions are exactly observationally equivalent to their deterministic microscopic descriptions. We prove it formally in Theorem 3. This appears to be not quite true of the real world, where microscopic theories have additional predictive power. Nonetheless, Werndl [10] argues that such equivalences do hold, either exactly or approximately, in many settings of practical interest.

D. The Psychological Arrow of Time
Had we only wanted a deterministic reversible model with a second law of thermodynamics, then either of the maps β or σ, suitably initialized, would have sufficed. However, the second law is insufficient for explaining the psychological arrow of time. To begin with, it cannot explain the time-reversal asymmetry of memories.
To see why, we must understand what memories are. Intuitively, they are records of past events. They contain information about the event in question, but that's not all: while we can also collect information that's predictive of future events, we would not call them records. The distinction is clearest with events that depend on highly chaotic interactions, making them hard to predict. The weather is a good example: our records span much of human history (and prehistory, if we include geological evidence of climate variations). In contrast to how much we know about past weather, we cannot reliably forecast even one week into the future. To give another example, all manner of unpredictable scenes can be recorded in a photograph, but only after they occur. In this sense, memories need not even be associated with living beings; rather, their defining feature is the ability to stably capture the information content of an event, no matter how ephemeral.
Just as memories pertain to the past, counterfactuals pertain to the future. Whereas the existence of records suggests that the past is set in stone, the future appears malleable: we imagine various counterfactual possibilities, and plan our lives accordingly. Outside the purview of fundamental physics, nearly all academic disciplines take the arrow of time for granted. This is reflected in their mathematical tools: in particular, Pearl's structural causal models [11] can model both memories and counterfactuals.
Recall that a directed graph is a set of vertices, along with a set of edges (arrows) that point from one vertex to another. A causal graph is a directed graph with no cycles, whose vertices correspond to random variables. Its edges specify causal relationships, pointing from cause to effect. More precisely, they encode two kinds of information [12]: 1. A set of structural independence constraints that the random variables must satisfy.

Rules for modifying the variables' joint distribution under structural interventions.
A graph's structural independence constraints are formally specified by Pearl's d-separation criterion [11, §1.2]. A joint probability distribution over a causal graph's random variables is said to be Markov, relative to the given graph, if it satisfies these constraints. A structural causal model is a causal graph equipped with conditional probability distributions, one for each variable as a function of its parents. These distributions, together with the graph's structural independence constraints, fully determine the variables' joint probability distribution [11, §1.2]. In addition to this joint distribution, a causal model also identifies alternative distributions that would arise, if external influences were to intervene on some of its variables. For an illustrative example, imagine a collection of physical systems that are usually isolated from one another, but occasionally experience pairwise interactions. Let's zoom in on two such systems A and B, whose sole interaction within the time interval [0, 3] occurs at t = 1.5. Their causal graph is as follows: A t is a random variable representing the state of system A at time t, and likewise for B t . At non-interaction times, the two systems are modeled as independent Markov chains. During the interaction, A 1 is said to causally influence B 2 . Two interpretations of this graph offer different insights: either (1) we focus on A, a system whose data is recorded by the memory B; or (2) we focus on B, a system whose dynamics are intervened upon by the causal actor A. Let's discuss each interpretation in turn.

Memories
As a consequence of the d-separation criterion, any pair of random variables without a common ancestor (i.e., a common cause) must be independent. Thus, dependent random variables must carry information about some common cause in the past. In our example, A t and B u share the common ancestor A 1 , for t ≥ 1 and u > 1. Earlier states, such A 0 and B 0 , can only be dependent if they share a common ancestor in the more distant past (implied by the ellipsis).
Motivated by our observation that memories can capture ephemeral events, let's imagine that A is a rapidly mixing system, so that the sequence (A t ) t∈Z is i.i.d. All directed edges (arrows) in the first row are effectively erased, leaving A 1 as the only possible common ancestor. By the d-separation criterion, A t and B u can only be dependent if t = 1 < u. Thus, memories are indeed of the past. Now let's drop the i.i.d. assumption. The dependence between A t and B u can be quantified by their mutual information I(A t ; B u ) (see Definition 3). The data processing inequality [5, §2.8] implies I(A t ′ ; B u ′ ) ≥ I(A t ; B u ) for t ′ ≤ t and u ′ ≤ u, provided that no interactions occur between the times involved. In other words, information loss is unrestricted, but information gain requires interaction. Thus, all dependences can be traced backward through time to some past interaction (or to dependent initial conditions).
The d-separation criterion and the data processing inequality, much like the second law of thermodynamics, impose asymmetries with respect to time reversal. To see how they work in concert together, let's decompose the systems' joint entropy (dropping the subscripts for convenience): The composite system (A, B) is closed throughout the time interval [0, 3], so the second law implies that H(A, B) is non-decreasing. In general, when A and B interact, their joint entropy may arbitrarily redistribute among the three right-hand terms. However, when A and B are closed off from each other, the second law applies to each system individually, so that H(A) and H(B) are also non-decreasing.
Now we see why the second law on its own is insufficient: it permits an increase in I(A; B), provided that either H(A) or H(B) simultaneously undergo an equal or greater increase. In other words, the second law does not rule out spontaneous information gain between isolated systems. Instead, the required time-reversal asymmetry is given by the data processing inequality. Together with the second law, it ensures that all three right-hand contributions in Equation (7) are nondecreasing.
An interesting consequence is that when A and B are closed off from each other, an increase in any one of the right-hand terms cannot be compensated for by a decrease in another; therefore, it necessarily induces an equal or greater increase in H(A, B). This is an extension of Landauer's principle, detailing the irrevocable thermodynamic cost of erasing information; see Section VI B.

Counterfactuals
Let's examine the relationship between cause and effect. We say that rain causes wet grass, whereas wet grass does not cause rain. The inelastic collisions between rain drops and grass increase entropy, rendering them thermodynamically irreversible. Note that while a typical configuration of wet grass does not evolve into rain, our wet grass is decidedly not typical, because evolving it backward reveals a past in which it did rain. The forward evolution is distinguished in that it can be predicted by treating the configuration as if it were typical, using homogeneous transition probabilities. In contrast, the backward evolution seemingly conspires to extract the grass's moisture and blast it up into the sky. The emergence of homogeneous forward dynamics will be a key feature of our models.
However, our causal intuitions are not confined to processes that are intrinsically irreversible. For example, consider a frictionless pendulum with a period of two seconds. Since its trajectory is periodic, any point on the trajectory causes all others; nonetheless, we prefer to think of earlier states as causing later states. This makes sense in the context of exogenous influences: if we place the pendulum to the left of its pivot, then we would find it on the right a second later, whereas the placement has no retroactive effect a second prior.
More generally, we imagine being able to perform an intervention on any random variable of a causal model, assigning it some value and detaching it from its parents in the graph. Effects then propagate to the variable's descendants, yielding a counterfactual outcome. This counterfactual presents an alternative trajectory for the Universe, in apparent violation of determinism. Moreover, since the edges are directed forward in time, the intervention changes its future while holding its past fixed, in apparent violation of CPT symmetry. Despite violating fundamental physics principles, counterfactual reasoning is ubiquitous in real-life applications [11].
At this point, we remark that our investigation inevitably touches upon philosophical themes; nonetheless, all of our questions are scientifically motivated. For instance, while we do not concern ourselves with the question of whether free will is "real", we must reckon with the empirical fact that intelligent life displays the behaviors associated with free will. These include reasoning in terms of counterfactuals, in order to plan for the future (but not for the past). How can physics predict this phenomenon?
Consider that practical models are necessarily incomplete. Returning to our casual model above, rather than draw it in full, we might only model the system B: Viewed in isolation, B is a Markov chain, following its own dynamics in the absence of external influence. For example, B might be our frictionless pendulum. The interaction, then, appears as an exogenous intervention on B 2 , modifying its B 1 -conditioned probability distribution. The unmodeled variable A 1 encodes the nature of the intervention. As we saw when discussing memory, information about A 1 only appears in B's future, explaining why counterfactuals do not alter the past. If some intelligent agent has partial or total control of A 1 's value, then it makes sense for the agent to consider each counterfactual possibility, exercising its "will" to choose A 1 according to the desired effect on B.
In general, the behavior of agents is determined by Darwinian evolution. In Section VI E, we propose an explanation for evolution's arrow of time; thus, agents seek to optimize their future. If an agent possesses sufficient cognitive resources, it may employ a model-based planning algorithm [13]. From the algorithm's point of view, choices are made "freely", in the following sense: the algorithm can simulate the counterfactual outcomes of a variety of different choices, and realize whichever one it prefers. This is true despite the algorithm having a mathematically determined (or possibly randomized) output.
This discussion leaves us in an awkward position: causal models beautifully describe the cognitive world of cause, effect, memory, and planning, i.e., the psychological arrow of time; however, they seem quite far removed from fundamental physics, with its determinism and CPT symmetry. In this article, we extend the shift map, in two stages, toward the ultimate aim of deriving causality as an emergent structure. The result is a type of cellular automaton that, even more so than the baker's and shift maps, exhibits key features of classical mechanics.
By studying these automata, we find that the fundamental time-reversal asymmetry takes one of two forms, depending on whether we take a microscopic or macroscopic view. At the microscopic level, symmetry is broken by a Past Hypothesis, consisting of an absolutely continuous initial condition. At the macroscopic level, this corresponds to dynamics that are homogeneous in space and time, and Markov relative to a causal graph who edges are timelike and future-directed. As a consequence, we can prove generalizations of the second law of thermodynamics. These lead to insights on a variety of topics related to the arrow of time.

E. Article Outline
Section II reviews some literature that provides context for our contributions. Then, Section III sets notational conventions. It also introduces useful lemmas from information theory [5], reformulated to suit the analysis of general Markovian dynamics. Our core mathematical contributions are split into two stages, developed in Sections IV and V respectively.
Section IV presents the first stage, extending the shift map in such a way as to emulate arbitrary time-homogeneous Markov chains. We discuss the extent to which Markov chains exhibit or violate time-reversal symmetry, and prove a precise correspondence between three presentations of the dynamics. Two of these are stochastic, corresponding to macroscopic views of the third, deterministic presentation. We apply this theory to generalize the Past Hypothesis, and then ask what happens at negative times, before the initial condition.
Section V presents the second stage, enriching the Markov chains with spatial structure that turns them into stochastic partitioned cellular automata (SPCAs). The local dynamics of an SPCA makes it possible to discuss multiple systems, each having their own entropy, and correlations between them. We find that SPCAs are Markov relative to a timelike future-directed causal graph. Moreover, they satisfy the Resource and Memory Laws, which correspond to the second law of thermodynamics and the data processing inequality, respectively.
Section VI explores applications of our work to a variety of topics, in and out of physics. In some cases, we obtain novel extensions of existing theory; in others, we simply demonstrate the increased clarity and precision offered by SPCAs and their information-theoretic dynamics.
Finally, Section VII concludes with some suggestions for future work.

II. RELATED WORKS
The arrow of time is too broad a topic to comprehensively review in a few pages. We make our best effort to emphasize the most pertinent literature that provides context for this article.

A. Literature on Dynamical Systems
For simplicity's sake, we focus on the discrete-time (but continuous-state) setting, to which Devaney [14] provides an accessible introduction. In practice, we cannot observe a system's state precisely, so let's imagine we instead observe a discrete-valued function of the state; i.e., the set of possible observations is countable. Then, for all practical purposes, a state may be identified with its trajectory's bi-infinite sequence of past, present, and future observations. The shift map describes the system's dynamics in this sequence representation, the study of which is called symbolic dynamics [15].
Despite the system's determinism, if its initial state is randomly sampled, the corresponding sequence of observations becomes a discrete-state stochastic process. Werndl [10] examines deterministic and stochastic systems that are observationally equivalent, in the sense that the former's observations are distributed like the latter. Under reasonable hypotheses, she proves that Bernoulli dynamical systems are approximately observationally equivalent, at every resolution, to irreducible and aperiodic Markov chains. In Theorem 3, we prove exact observational equivalence, between general Markov chains and an extension of the shift map. Under more general initial conditions, Theorem 4 turns this into an approximate equivalence. We also relate properties between the two systems, showing how measure-preservation and time-reversal (on the deterministic side) map to stationarity and duality (on the stochastic side).
The literature includes several dynamical systems modeling the second law of thermodynamics. Schack and Caves [16] interleave a chaotic system's dynamics with random measure-preserving perturbations. Unfortunately, their perturbations sacrifice determinism and CPT symmetry. For some simple dynamical systems, Nicolis and Nicolis [17] identify suitable initial conditions and coarse-grainings that ensure the Markov property. Pitowsky [9] also studies generalized shift maps, but for the purposes of modeling deterministic Turing machines. More recently, researchers such as Parrondo et al. [18] are looking more closely at the thermodynamics of correlated systems.
Perhaps the closest existing model to ours is the multibaker chain of Gaspard [19]. It employs the baker's map to gradually extract a source of randomness that's set at initialization. By doing so, it deterministically and reversibly emulates a random walk on Z, i.e., a discrete diffusion process. Our first-stage model in Section IV generalizes the multibaker chain, emulating not only random walks, but arbitrary Markov chains.
Continuous-state analogues of the entropy rate [5, §4.2] are given by the Kolmogorov-Sinai entropy [20] and the topological entropy [21]. These quantities measure the rate at which a system's trajectories acquire new information, as a result of expanding once-hidden microscopic variations. For the m-symbol shift map, they equal log m. Latora and Baranger [22] describe some circumstances in which the Kolmogorov-Sinai entropy approximates the rate of entropy growth in dynamical systems.
Some concepts from the computer science literature are helpful. Bennett [2] reviews connections between logical and physical descriptions of entropy and reversibility. We draw upon the design of reversible and partitioned cellular automata (PCAs) [23,24], essentially fusing them with causal models to create SPCAs. In the context of reversible computing, Frank [25] anticipates thermodynamic consequences for the data processing inequality.
Subtle issues come up when comparing Gibbs and Boltzmann entropies, largely revolving around ambiguous coarse-grainings and subjective probabilities [26]. Algorithmic entropy provides a firm theoretical grounding that minimizes these ambiguities. Its foundations date back to Occam's razor, and it appears in some ambitious accounts of inductive inference and artificial intelligence [27][28][29].
Zurek [30] introduces the algorithmic entropy to physics. Wallace [31] describes two-part codes in depth, and adds some speculations on the arrow of time. Last, but not least, Li and Vitányi [6] provide the standard reference on algorithmic information theory, surveying applications to physics in their final chapter.

B. Literature on the Psychological Arrow of Time
The psychological arrow of time is intimately tied to the sense that causes precede effects. Historically, before we had a mathematical language in which to discuss them, causal concepts were subject to misunderstanding, controversy, and even outright dismissal in the scientific community. That changed with the introduction of Pearl's structural causal models, a powerful methodology for causal inference, applicable to a wide range of disciplines [11].
In this article, we understand causality exactly as Pearl does. In particular, we discuss counterfactuals using his structural semantics; though, see Pearl [11, §7.4.1] for a comparison against Lewis' closest-world semantics, and Loewer [32] for semantics based on probabilistic conditioning. One advantage of the structural account is that, because it need not alter the past, it deals more cleanly with implausible (yet still useful) counterfactuals.
Ties between Pearlean causality and dynamical systems are sparser in the literature. The numerical study by Paluš et al. [33] presents insights on some causality detection methods.
Janzing et al. [34] link causality to the algorithmic independence of initial conditions and dynamics. In the deterministic setting, this approach predicts the algorithmic entropy to grow unrealistically slowly: the length of a later state's description, in terms of only the starting state, dynamics, and time elapsed, grows at most logarithmically in the time elapsed. On the other hand, their result makes a lot more sense in the context of random dynamics, where the description length can grow linearly in the time elapsed. Using Definition 7, we offer the same conclusions in probabilistic, rather than algorithmic, terms.
In a deeply thought-provoking treatise, Albert [35] elucidates the philosophical issues in reconciling statistical physics with the psychological arrow of time. He argues, alongside Loewer [32], that the arrow of time emerges from the Mentaculus. This is a probability distribution over Universes, defined by extrapolating a Past Hypothesis in which the Big Bang is sampled uniformly from a lowentropy macrostate. Our article supports this conclusion with rigorous theorems. We also extend the Past Hypothesis to non-uniform continuous distributions, yielding a generalized Mentaculus in Equations (24) and (25).
In the search for rigorous explanations, a common line of attack takes the second law of thermodynamics as given, and focuses on what appears to be a basic component of the psychological arrow: memory. After proposing a definition for memory, some authors proceed to argue that its operation must align with the second law's arrow of time. In light of our observation following Equation (7), that the second law alone is insufficient, this approach is unlikely to succeed. Even so, it's helpful to examine some of these attempts with care.
Wolpert [36] distinguishes between two types of memory systems: computer-type and photographtype. Both types aim to possess information at some time t r , about an event occurring at some other time t e . A computer-type memory has access to so much state information at t r , that it can deduce the event at t e by directly simulating the dynamical evolution of the Universe. Such "memories" have no arrow of time, with both t e < t r and t e > t r being admissible, but they may require unrealistic levels of precision. As such, they are more like weather predictions rather than reliable records.
Our notion of a memory aligns better with Wolpert's photograph-type which, while less demanding in terms of precision and computation, requires initialization. Wolpert argues that real-world initialization procedures result in a net increase in entropy, forcing the memory to align with the thermodynamic arrow. Unfortunately, this is begging the question: the thermodynamic arrow makes it so nearly all real-world processes increase entropy. If anything, the many-to-one mapping that defines an initialization seems predisposed to lose entropy, which can only be done in reverse; in order to initialize forward, entropy must be released into the environment just to stay in accor-dance with the second law. A perfectly efficient initialization procedure would be reversible, with the entropy gains and losses exactly canceling [2].
Mlodinow and Brun [37] argue that even a reversibly implemented memory can only function in the direction of the thermodynamic arrow. Their thought experiment consists of a pair of connected chambers containing elastic particles, and a counter that tracks the net flow of particles from one chamber to the other. Instead of treating initialization explicitly, the counter is assumed to have a known value at t e . Thus, reading the counter's value at t r is enough to infer the net flow of particles during the time interval between t e and t r , acting as a memory of this interval. In order for this memory to be useful, it should be capable of recording more than one possible answer, which the authors ensure by applying a small random perturbation to the particles at t e . This directs the thermodynamic arrow of time away from t e , presumably toward t r , thus aligning the two arrows.
Their argument has a few loose ends. Firstly, it doesn't apply if the particles are at thermodynamic equilibrium, as no thermodynamic arrow would be discernible from their evolution. Secondly, it's unclear how one arrives at knowledge of the counter's value at t e . And finally, a random perturbation at t e cannot be a realistic model of uncertainty: it would direct the thermodynamic arrow away from t e in both directions, violating the Universe's low-entropy initial condition. While the argument captures a valid intuition, that memories should be robust to counterfactual alternatives, such a principle demands careful justification.
Rovelli [38] presents a physically plausible model consisting of two near-equilibrium systems with long thermalization times: a cooler memory and a hotter environment. In a follow-up paper, Rovelli [39] views the environment as an agent, and its random interactions with the memory as choices. Thus, he concludes that the exercise of free will increases entropy, and must therefore align with the thermodynamic arrow. His account of free will in terms of randomness disagrees with our account in Section I D 2, where we equated free will with counterfactual-based planning. Our account is agnostic to whether the output is deterministic or randomized; thus, it also stands in contrast to accounts of free will that require quantum or Knightian forms of uncertainty, including the freebit picture of Aaronson [40].
On the other hand, since causal models are free to invoke Markovian randomness (e.g., sampling independently of the past), we also question superdeterminism of the sort suggested by 't Hooft [41] in his cellular automaton interpretation of quantum mechanics. Superdeterminism proposes that our actions must somehow conspire to meet certain constraints on future outcomes. The trouble with conspiracies is that one must make them sufficiently powerful to support their proponent theories, while retaining the appearance of "free" Markovian dynamics [42].
In unfinished work independent of our own, Carroll [43] shares our goal of deriving Pearlean causality from a suitable Past Hypothesis. While it's too early for a technical comparison, we disagree with one of his premises. Carroll writes: "Increasing entropy is the sole reason for the asymmetry between past and future states in the macroscopic world." In Section I D 1, we saw that increasing entropy does not imply the data processing inequality. On the other hand, we will find that all of these asymmetries follow from a suitable causal model, which in turn emerges from a suitable pairing of dynamics with a Past Hypothesis.
While entropy's monotonicity makes it convenient to study, Bennett [44] (see also Li and Vitányi [6,§7.7]) argues that since both low-entropy (e.g., all zeros) and high-entropy (e.g., uniformly random) strings can be uninteresting, another quantity is needed to capture the "interestingness" of life's structures, such as its DNA. For Bennett, the interesting strings are those whose most plausible explanations involve long and difficult computations, such as Darwinian evolution on geological scales. Thus, he defines an object's logical depth to be the time it takes to execute its shortest description. Stated differently, a logically deep object is one with low algorithmic entropy, but high time-bounded algorithmic entropy.
Aaronson et al. [45] observe a variety of systems in which logical depth rises during early stages of dynamical evolution, and then falls during the approach to thermodynamic equilibrium. While their evidence is largely empirical, we can understand this phenomenon in terms of Bennett's slow growth law [44]. Under Markovian dynamics, the law states that logical depth cannot (with substantial probability) rise quickly. If the system begins in a logically shallow state, then high logical depth can only arise from a long, slow computation 5 . Thus, logically deep objects cannot exist too early in the system's lifetime. They also cannot exist too late, when the system settles in a very shallow (e.g., uniform) equilibrium distribution. It follows that logically deep objects, if they appear at all, must form gradually at intermediate times.
Quantum entanglement is stronger than classical correlation, in that it can produce a composite system with less entropy than either of its parts. For example, it's possible to produce local entropy by measuring a quantum system, while keeping the global entropy at zero; a global operation can then erase all traces of this measurement and its entropy. Maccone [3] argues that whenever entropy decreases for some local observer (let's name her Alice), any trace or memory must be erased so that she cannot recall the decrease. This argument is imprecise: while it's true that Alice can only retain as much information as the final entropy of her system, a reduction in her entropy need not necessarily eliminate evidence that the entropy used to be higher. Indeed, rather than preserve a high-entropy measurement in its entirety, Alice can simply summarize its entropy, perhaps rounded to a few significant figures. A summary has less entropy than the full measurement, so it can survive a reduction in entropy. If she later measures a lower entropy, she would notice the decrease.
Finally, Heinrich et al. [46] produce simulations as evidence that natural selection favors agents with knowledge of the past, over those with knowledge of the future. However, their arguments do not consider non-living memories (e.g., geological records), nor alternative scenarios in which knowledge of the future may be more advantageous. They also present no plausible mechanism for natural selection between forward-thinking and backward-thinking organisms.
We should emphasize that, despite calling it the psychological arrow, the subject of this article is fundamentally physical (or more abstractly, computational), applying equally well to non-living records. Our physics-first approach has the advantage of applying not only to certain species of animals, but to all possible brains, wherever the laws of physics hold. That being said, we do not treat the animal psychology or neuroscience of time perception. Being ill-positioned to do these literatures justice, we only point to the review of Grondin [47] on the perception of short time intervals, and to the study by Gauthier et al. [48] on perception of the more distant past and future.
Uppercase Latin letters A, B, C denote generic sets or random variables, while lowercase letters denote elements of the corresponding sets a ∈ A, b ∈ B, or realizations of random variables. 2 A denotes A's power set, consisting of all subsets of A. Script letters are used for σ-algebras F , G, as well as for three important sets that are treated as fixed in most contexts: the state space S and the discrete geometry (X , T ). The Greek letters µ, ν, π, Γ denote measures.
B A denotes the set of functions from a domain A to a codomain B. Functions are also called indexed collections or, when A is N or Z, sequences. The notation f : A → B is synonymous with f ∈ B A , and means that each a ∈ A maps to f (a) = f a ∈ B. The image of a set denotes the set of bijections from A onto itself; these functions are synonymously called bijective, invertible, or reversible. The notation x → f (x) is synonymous with f itself, and is useful for quickly referring to "anonymous" functions without naming them. Given either f : Some intuitive shorthands are used: for instance, f A ′ denotes the restriction of f on the set If f takes multiple arguments, we allow partial application from left to right, so that, e.g., We want to make correct use of measure theory without overburdering ourselves with notation and unimportant details. We can usually avoid mentioning σ-algebras by assuming some defaults: for a countable set A, take it to be 2 A ; for subsets of R d , take the Borel σ-algebra; for a product of sets that are each equipped with σ-algebras, take it to be generated by the corresponding cylinder sets. On the implied σ-algebra of A, M 1 (A) denotes the set of probability measures, and M + (A) denotes the set of measures that are finite on singletons and not everywhere zero. Thus, In a slight abuse of notation, we identify singleton sets with their element, so that µ(a) := µ({a}). In this manner, when A is countable, it's convenient to identify measures with real-valued functions of A: A few measures are special enough to merit their own symbols. λ d ∈ M + (R d ) denotes the Lebesgue (i.e., volume) measure. For a ∈ A, δ a ∈ M 1 (A) denotes the point mass that puts probability one on a. ♯ := a∈A δ a denotes the counting measure, i.e., for At times, we describe a collection of conditional distributions consistent with a causal graph, thus uniquely determining the variables' joint distribution. In such cases, it's implied that all the variables live in a common probability space (Ω, F , P). That is, the random variables are assumed to be defined on some sample space Ω, equipped with the σ-algebra F ⊂ 2 Ω generated by the variables, and a probability measure P ∈ M 1 (Ω). When referring to a random variable C : Ω → A, we abuse notation and write C ∈ A. Depending on context, the expression F (C) may refer to either: (1) F (P C ), a function of C's distribution; or (2) ω → F (ω)(C(ω)), a random variable obtained by applying a (possibly random) function to C's realization.
We use some customary shorthands, such as P(C = c) := P({ω ∈ Ω : C(ω) = c}). The marginal and conditional distributions of C are written P C , P C|E ∈ M 1 (A), respectively, for any event E ∈ F . For example, P C (c) := P(C = c), and P C|E (c) := P(C = c | E). Indexed collections of random variables C = (C a ) a∈A may be bolded for emphasis. Via the minor abuse of swapping argument order, the whole collection C can also be thought of as a random variable: C(ω) a := C a (ω).
Finally, the total variation norm of a signed measure µ is denoted by It's used to express the total variation distance between probability measures µ, ν as µ − ν TV .

B. The Kullback-Leibler Divergence
All of our information-theoretic quantities are derived from this definition.
Definition 1. Let S be a countable set, µ ∈ M 1 (S), and π ∈ M + (S). The Kullback-Leibler divergence of µ relative to π is Following standard conventions, terms with µ(s) = 0 are treated as 0, and terms with µ(s) > π(s) = 0 are treated as +∞ 6 . When the logarithm's base is 2, the KL divergence is measured in units of bits; when the base is e, it's measured in nats.
When π is also a probability measure, it's customary to think of D KL (µ π) as a kind of "distance" between µ and π [5, §2.3]. However, in this article, a different interpretation is more useful: D KL (µ π) should be thought of as the precision with which samples from µ are known, meaning, loosely speaking, the smallness of the π-measure of the "typical support" of µ. For a concrete example, let µ be π-uniform on a π-finite support A ⊂ S; that is, suppose π(A) < ∞, and let Then, it's easily verified that D KL (µ π) = log 1 π(A) = log 1 s∈A π(s) . In general, the least precise distributions are those that are spread π-uniformly everywhere, whereas the most precise are focused on a single element with small π-measure: Proof. First, we show that for all µ ∈ M 1 (S), If π(S) = ∞, the left-hand inequality follows from the convention that log 1 ∞ = −∞. Otherwise, .
Finally, to achieve the supremum, choose a sequence (s i ) i∈N such that lim i→∞ π(s i ) = inf s∈S π(s). Then, as i → ∞, When the bounds in Lemma 1 are finite, it's useful to compare them to D KL (µ π).
Note that the information capacity of π, generalized from Frank [25] by does not depend on µ. Thus, each of H π (µ) or J π (µ) is maximal precisely when the other is zero. J π (µ) = 0 iff µ is the π-uniform distribution π/π(S), and H π (µ) = 0 iff µ is a point mass δ s satisfying s ∈ arg min s ′ ∈S π(s ′ ). As a special case, we recover the Shannon entropy and negentropy: It may aid the reader's intuition to specialize the results of this article to the case π = ♯. The additional generality enables analysis of dynamics with non-uniform stationary distributions. The next definition is useful when we discuss memory, and want to quantify how much two systems know about one another. In what follows, let S X , S Y be countable sets.

Definition 3. The mutual information between a pair of random variables
It's often convenient to identify a random variable with its distribution. For example, we may speak of the KL divergence of a random variable, perhaps conditioned on some event, as a shorthand for the KL divergence of its marginal or conditional probability measure. That is, D KL (X π) := D KL (P X π) and D KL (X | Y = y π) := D KL P X|Y =y π . As a further shorthand, let D KL (X | Y π X ) := E y D KL (X | Y = y π X ), where the expectation is over realizations of Y , i.e., E y f (y) := y P(Y = y)f (y).
Proof. From their respective definitions, Therefore, Our first corollary is a generalization of Equation (7) that expresses the joint negentropy as a sum of three non-negative contributions.
Proof. Substitute the second part of Lemma 2 into the first, to get Substituting Equation (9) into Equation (10) yields the desired result.
We close this section with another pair of bounds.
Proof. By Lemma 2, The result now follows from Lemma 1, because

IV. MARKOV CHAINS
In practical applications, when one wishes to model a system that evolves with time, without concern for microscopic details, it's common to use a very simple kind of causal model called a Markov chain. Its random variables are arranged in a linear sequence, like so: Recall that causal graphs encode two things: independence constraints and intervention rules. For a closed system, interventions play no role, so the graph only encodes the independences given by Pearl's d-separation criterion. For a Markov chain, these are nicely summarized by the Markov property, which can be stated in a symmetric fashion: The Markov property is unchanged for the time-reversed Markov chain: Since the two graphs yield identical constraints on the joint probability distribution of C := (C t ) t∈Z + , there is no observation on C that can distinguish between the graphs. Thus, in the general case, Markov chains lack a well-defined causal direction.
There exist graphs in which a causal direction can be inferred from passive observation alone, without interventions: see [11, §2] for a systematic treatment, or Section V for the relevant case of SPCAs. On the other hand, non-graphical constraints may also contribute an arrow of time. We'll soon see that non-stationary time-homogeneous Markov chains cease to be time-homogeneous in the reverse direction. This particular asymmetry is responsible for the second law of thermodynamics; see Theorem 1.
This section has two main purposes. The first is to forge a bridge between Markov chains and deterministic dynamical systems, which allows useful properties to transfer from one to the other. We formally define three ways to specify a Markov chain's dynamics, the last of which provides our bridge: it expresses the sequence C as the macroscopic component of a deterministic system with random initialization.
This section's second purpose is to better understand how the arrow of time arises in Markov chains. We learn how time-homogeneity breaks time-reversal symmetry. Then, using the bridge to deterministic dynamics, we trace the time-homogeneity back to microscopic variations in the initial conditions. Finally, by crossing the bridge to a reversible deterministic system, running that system backward beyond the initial condition, and then crossing back into the world of Markov chains, our Markov chains acquire a natural bidirectional extension: Throughout this section, let S be a fixed countable set. Its elements should be thought of as the fine macrostates discussed in Section I B. S is our Markov chain's state space, which we eventually see as a discretization of some dynamical system's state space.
When speaking of a collection of random variables, such as C, we really only care about their joint distribution P C ∈ M 1 (S Z + ). Thus, we formally define a Markov chain to be any element of M 1 (S Z + ) that satisfies the Markov property. We say a Markov chain is homogeneous in time, or time-homogeneous, if its conditional distribution P(C t+1 = c t+1 | C t = c t ) does not depend on t.
Let Markov(S) ⊂ M 1 (S Z + ) denote the set of time-homogeneous Markov chains. An element of Markov(S) is uniquely determined by (1) its initial distribution P C0 , and (2) its dynamics, i.e., the time-independent conditional distributions P Ct+1|Ct=ct . We always specify the initial distribution directly, but consider three different means of specifying the dynamics. Let's start with the direct approach.

A. Transition Matrix Presentation
Since the conditional distributions P Ct+1|Ct=ct are assumed not to depend on t, we need only specify one distribution for each possible preceding state c t ∈ S. In other words, the dynamics are given by an element of M 1 (S) S or, equivalently, a |S| × |S| stochastic matrix.
Definition 4. Suppose π ∈ M + (S). The set of stochastic matrices, doubly stochastic matrices, and π-stochastic matrices on S are, respectively, Note that SM ♯ (S) = DM(S). π is said to be stationary for p if p ∈ SM π (S). For m ∈ N, a measure µ or matrix p is said to be m-sided if all its entries are multiples of 1 m ; that is, if µ ∈ ( 1 m Z + ) S or p ∈ ( 1 m Z + ) S×S , respectively. If we don't want to specify m, we can also say it is finite-sided. It is said to be strictly positive if none of its entries are zero.
Definition 5. The transition matrix presentation of time-homogeneous Markov chains on S is the surjective map defined as follows. Consider any initial condition µ ∈ M 1 (S) and transition matrix p ∈ SM(S). Let the random variable C = (C t ) t∈Z + be distributed such that, for all c : Z + → S, Or equivalently, Then, Φ matrix (µ, p) := P C .
Now, just as a Markov chain's causal graph can be reversed without affecting P C , one might wonder: can Equation (13) be reversed, or does it represents a true time-reversal asymmetry? This is really a two-part question: (1) can P(C t−1 = c t−1 | C ≥t = c ≥t ) be expressed as a function of only c t and c t−1 , independent of t; and (2) can C be extended to negative times, in such a way that Equation (13) is satisfied there as well?
In general, the answer to both questions is no. Extensions to negative times are not guaranteed to exist, nor be unique if they do: the simplest counterexamples are deterministic transitions that are non-surjective or non-injective, respectively. Even at positive times, the backward probabilities may be inhomogeneous. Let's derive them using the Markov property and Bayes' rule: The analysis is simpler when p is recurrent, meaning that from every s ∈ S, we'll almost surely eventually revisit s. In that case, p has a strictly positive stationary measure π which, on each irreducible component of S, is uniquely determined up to constant multiples [49,Thm 17.48 and Rmk 17.51(i)]. In particular, if p(s ′ , s) > 0, then s ′ , s are in the same irreducible component, and so the ratio π(s ′ )/π(s) is uniquely determined. Therefore, the dual transition matrix is well-defined, and it's easy to check that p dual ∈ SM π (S). If p is not recurrent but has one or more stationary measures, the same expression defines the dual transition matrix with respect to a specific stationary measure π, provided that we delete the states with π(s) = 0. Now, suppose the initial distribution µ is stationary for p. Then, P Ct = µ for all t so, wherever µ(c t ) > 0, the backward dynamics are indeed time-homogeneous. This also grants C a unique extension to negative times, satisfying both Equations (13) and (16) for all t ∈ Z.
On the other hand, when µ is non-stationary, the backward probabilities in Equation (14) may differ from p dual (c t , c t−1 ). Typically, the ratio P(C t−1 = c t−1 )/P(C t = c t ) is time-dependent, rendering the backward probabilities inhomogeneous in time.
It's still possible to extend C in such a way that Equation (16), but not Equation (13), is satisfied at negative times. Section IV E justifies such an extension in terms of reversible microscopic dynamics. Picturing two arrows of time diverging from t = 0 to ±∞, we find homogeneous dynamics (p at positive times, p dual at negative times) along the arrow, and inhomogenous probabilities (inferred using Bayes' rule) against the arrow. Thus, just as "down" always points toward Earth's center, the "past" always points toward the initial condition.
Suppose p ∈ SM π (S). Intuitively, as t increases, the state distribution P Ct moves "closer" to π. To make this precise, we define the thermo-majorization relation π . Definition 6. Suppose µ, ν ∈ M 1 (S) and π ∈ M + (S). We say µ thermo-majorizes ν with respect to π, and write µ π ν, if there exists p ∈ SM π (S) transforming µ into ν, i.e., From the fact that SM π (S) is closed under matrix multiplication, it follows that π is a preorder. Progress along π can be quantified by the KL divergence: Theorem 1 (Second law of thermodynamics). Suppose µ, ν ∈ M 1 (S), π ∈ M + (S), and µ π ν. Then, A proof is provided by Cover and Thomas [5, §4.4], and a broad generalization by Brandão et al. [50,Thm 17]. For a Markov chain C with stationary measure π, it's immediate from Definitions 4 and 6 that C t π C t+1 for all t ∈ Z + . Therefore, Theorem 1 implies D KL (C t π) ≥ D KL (C t+1 π). Using Definition 2, we recover the familiar statement that entropy increases monotonically:

B. Random Function Presentation
In physics, dynamics are not given as transition matrices, but as reversible equations of motion. Integrating equations of motion for a fixed time interval yields their discrete-time analogue: invertible functions on S. These functions should be deterministic; however, as a first step, we present Markov chains in terms of random functions on S. Definition 7. The random function presentation of time-homogeneous Markov chains on S is the map defined as follows. Consider any initial condition µ ∈ M 1 (S) and random dynamics Γ ∈ M 1 (S S ). Let the random variables (C, F) = (C t , F t ) t∈Z + be distributed such that In other words, the random functions (F t ) t∈Z + are i.i.d. samples from a fixed distribution Γ. At each time t ∈ Z + , C ≤t is independent of F ≥t ; applying F t to C t produces the next state C t+1 .
For example, a random walk on S := Z can be described as follows. Let Γ be the uniform distribution on the multiset {ι −1 , ι 0 , ι 0 , ι 1 }, where ι i : Z → Z is defined by ι i (s) := s + i. Let the initial distribution µ ∈ M 1 (Z) be arbitrary. Then, Φ random (µ, Γ) is a random walk that steps left or right on the number line, with 1/4 probability each. The equivalent transition matrix is We extend the definition of m-sidedness to measures whose range is constrained to multiples of 1/m. Thus, Γ ∈ M 1 (S S ) is m-sided iff it is uniform over some multiset of m functions. In our example, both Γ and p are 4-sided. The functions ι i are bijective, whereas the matrix p is doubly stochastic. These parallels are no coincidence: we now prove a general correspondence between the random function and transition matrix presentations.
Proof. Uniqueness of p(s, s ′ ) follows from the fact that it can be read off a Markov chain, by initializing with C 0 = s and checking the probability that C 1 = s ′ : To prove the first implication, fix Γ ∈ M 1 (S S ). For s, s ′ ∈ S, define the sets Then, for all s ∈ S, because the sets A(s, s ′ ), with fixed s, form a partition of S S . Hence, p ∈ SM(S). The roles of s and s ′ become symmetric when restricting to Bij(S), so that the sets A(s, s ′ ) ∩ Bij(S), with either s or s ′ held fixed, form a partition of Bij(S). Therefore, by the same argument, if Γ(Bij(S)) = 1, then p ∈ DM(S). In addition, if Γ is m-sided, then so is p by its definition. Now, fix µ ∈ M 1 (S). Let (C, F) be as in Definition 7, so that P C = Φ random (µ, Γ). By definition, P C0 = µ, so Equation (12) holds. Furthermore, since F t is independent of C ≤t , so Equation (13) holds as well. Therefore, Φ matrix (µ, p) = Φ random (µ, Γ). To prove the converse, fix p ∈ SM(S). Enumerate S = {s 1 , s 2 , . . .}. For each r ∈ [0, 1) and If we take r to be drawn uniformly from [0, 1), then f r is drawn from the pushforward measure Just as in the previous case, this equation implies that Φ matrix (·, p) = Φ random (·, Γ). In the case where p is m-sided, by definition, f r = f ⌊rm⌋/m for all r ∈ [0, 1). Γ is then the uniform distribution over {f 0 , f 1/m , . . . , f (m−1)/m }, making it m-sided as well.
If p ∈ DM(S), special care is needed to construct Γ using only bijections, satisfying Γ(A(s, s ′ ) ∩ Bij(S)) = p(s, s ′ ). The existence of such a Γ is a generalization of the Birkhoff-von Neumann theorem; see the proof by Révész [51]. An easier construction is possible under the additional hypothesis that p is m-sided: consider the bipartite graph with vertex partition (S, S) and, for each s, s ′ ∈ S, m · p(s, s ′ ) edges from s in the left partition to s ′ in the right. Since p ∈ DM(S), the graph is m-regular, meaning that each vertex is incident to exactly m edges. Repeated application of Hall's marriage theorem partitions the edges into m perfect matchings, i.e., bijections on S. We take Γ to be the uniform distribution over these m bijections.

C. Deterministic Function Presentation
To complete our bridge into the theory of dynamical systems, we must derandomize the transition function. Consider again our 4-sided random walk on Z, whose dynamics sample uniformly from the multiset of transition functions {ι −1 , ι 0 , ι 0 , ι 1 } ⊂ Bij(Z). We can simulate one step of the walk by rolling a fair 4-sided die. Denoting the roll at time t by R t,0 ∈ Z 4 , C t+1 becomes a deterministic function of the pair (C t , R t,0 ). Since a deterministic function cannot add new rolls to the state, we should attach an infinite supply of rolls to the initial state C 0 .
The idea, then, is to start with an extended state (C 0 , R 0 ), which includes the bi-infinite sequence Note that T is bijective. The full dynamics consist of two interleaved operations on the expanded state space Z × (Z 4 ) Z . First, T is applied using only the central (i.e., 0'th) die: Note that R ′ t,0 = R t,0 in our example. Then, the 4-symbol shift map σ is applied to the sequence of dice, centering R t,1 in preparation for the next application of T : In a more compact notation, at time t + 1 the sequence becomes By induction, for all t, u, i, j ∈ Z + satisfying t + i = u + j, we have R t,i = R u,j . In particular, R t,Z + = R 0,t+Z + ; therefore, if the initial dice R 0,Z are i.i.d., then the unused dice R t,Z + will continue to be i.i.d. at all later times t ∈ Z + . As a result, C t 's evolution is time-homogeneous in the direction of increasing t. In contrast, if we were to follow C t 's evolution in the direction of decreasing t, toward zero, we would encounter used dice. These dice correlated with C t , in such a way as to return the process to its initial configuration C 0 .
Let's get some geometric intuition, using the correspondence Ψ from Equation (6). It identifies the sequence R t with a point in the unit square; thus, The resulting system is essentially the multibaker chain, first introduced and visualized by Gaspard [19]. Thanks to Ψ, we can think of the sequence as the base-4 digits, in order of decreasing significance, of a continuous state's coordinates. Although the maps T, σ are deterministic and reversible, their result on C t appears stochastic if we ignore R t . σ is chaotic, gradually amplifying formerly insignificant figures in the real-valued coordinates of R t . T uses these as a source of randomness to evolve C t . Since real numbers have infinitely many digits, they can provide an endless supply of entropy by repeating σ.
More generally, we can view any time-homogeneous Markov chain C as the macroscopic part of some chaotic dynamical system (C, R). The initial microscopic variables (R 0,i ) i∈Z are i.i.d. samples from a probability space (R, G, Γ). Adapting Equation (5) to symbols in R, the shift map σ : R Z → R Z is again defined by σ(r) t := r t+1 . Given a macroscopic transition function T : S × R → S × R, the full dynamics T : S × R Z → S × R Z are given by In other words, T first applies T to (s, r 0 ), and then applies σ to the entire sequence r. In the following definition, let Dyn(S) denote the class of all tuples of the form (R, G, Γ, T ), where (R, G, Γ) is a probability space, and T : defined as follows. Consider any initial condition µ ∈ M 1 (S) and deterministic dynamics (R, G, Γ, T ) ∈ Dyn(S). Let the random variables (C, R) = (C t , R t ) t∈Z + be distributed such that with T defined by Equation (19).
We proceed to this section's main result, establishing a general correspondence between the deterministic function and transition matrix presentations. In order to continue thinking of the microscopic variables R as base-m digits of real-valued phase coordinates, we prefer the probability space (R, G, Γ) to be the fair m-sided die (Z m , 2 Zm , 1 m ♯). A necessary and sufficient condition for the existence of such a presentation, is that the transition matrix p be m-sided.
, with π strictly positive and finite-sided, then T can be chosen to be bijective and (π × Γ)-measure-preserving. If p is m-sided, then (R, G, Γ) can be chosen to be the fair m-sided die, with T simultaneously being bijective if p ∈ DM(S).
The proof is based on that of Theorem 2, and is detailed in Appendix A. Theorem 3 expresses every time-homogeneous Markov chain as the macroscopic component of a deterministic system, whose dynamics are given by Equation (19). Conversely, in every dynamical system of this form, the macroscopic component is a time-homogeneous Markov chain. While the dynamics of real physical systems may take other forms, many of them are likewise believed to closely approximate time-homogeneous Markov chains [10].
For ease of analysis, we base our modeling on Equation (19). In order to build further intuition on time and reversibility, the following subsections demonstrate some basic applications. More sophisticated applications, which require the theory of Section V, are postponed until Section VI.

D. The Past Hypothesis
Consider Albert's [35] proposal that the arrow of time requires a Past Hypothesis, i.e., a special initial condition. Within our model, we can investigate exactly which initial conditions are suitable. Theorem 1 says that the entropy of a Markov chain, with respect to a fixed stationary distribution π, cannot decrease. If we want entropy to actually increase rather than stay fixed, it's necessary for µ to have less than maximal entropy. However, sub-maximal entropy alone is insufficient: if the underlying dynamics have a CPT-like symmetry, any configuration that exhibits sub-maximal and increasing entropy, can be converted into one in which entropy is sub-maximal but decreasing.
A closer look at the initial distributionμ = µ×Γ Z from Equation (20) reveals that its microscopic component is assumed to have the special form Γ Z . In the case of the fair m-sided die, we saw that Ψ maps this to the uniform distribution on S baker . This agrees with Albert's Mentaculus, in which the starting distribution is assumed to be uniform over some macrostate.
In fact, we can relax the form of the initial distributionμ: it's sufficient that it be absolutely continuous with respect to ♯ × Γ Z , meaning that it can be written dμ = f d(♯ × Γ Z ). Here, f : S × R Z → R + is called the Radon-Nikodym derivative, or probability density function, of µ with respect to ♯ × Γ Z . Explicitly, this means that for all A ∈ 2 S × G Z , Whenμ has this form, to an increasingly good approximation as t gets large, C behaves like a time-homogeneous Markov chain. To prove it, we first need a technical lemma. In measure theory, a semiring of sets is a collection of sets A, such that ∅ ∈ A and, for all A, B ∈ A, A ∩ B is in A and A \ B is a finite disjoint union of elements of A. We show that probability density functions can be approximated by finite linear combinations of characteristic functions on a semiring. Lemma 3. Let (Ω, F , µ) be a σ-finite measure space, let A be a semiring of sets generating F , and let f : Ω → R + be a probability density with respect to µ, i.e., Ω f dµ = 1. Then, for all ε > 0, there exist k ∈ Z + and (α i , A i ) k i=1 , with α i > 0 and the sets A i ∈ A mutually disjoint, such that g := k i=1 α i 1 Ai is a probability density with respect to µ, satisfying Ω |f − g| dµ < ε.
Proof. By definition of the Lebesgue integral, f can be approximated by a finite linear combination of characteristic functions of sets in F . By the measure approximation theorem [49, Thm 1.65(ii)], these characteristic functions can themselves be approximated by finite linear combinations of characteristic functions of sets in A; putting them together yields Equation (23). Since semirings are closed under set difference and intersection, the sets A i can be made disjoint. Furthermore, Equation (23) implies that so g is almost a probability density. Normalizing g increases the error in Equation (23) to at most 2ε; since ε was arbitrary, the proof is finished.
with T defined by Equation (19). Then, and the convergence rate is uniform in the choice of transition function T .
Proof. Let A consist of all subsets of S × R Z that are of the form where B ′ ⊂ S, B i ∈ G, and, for all but finitely many i ∈ Z, B i = R. A is the semiring of cylinder sets generating the σ-algebra 2 S × G Z .
Fix the approximation error ε > 0. By Lemma 3, there exist positive coefficients α 1 , . . . , α k and disjoint sets A 1 , . . . , A k ∈ A, such that the probability measure dν = g d(♯ × Γ Z ), with density function g := k j=1 α j 1 Aj , satisfies Now, expressing each of the A j ∈ A as in Equation (26), let t be the maximum of 1 + |i|, over all i ∈ Z for which at least one of the A j has B i = R (or 0 if there is no such i). Then, for each j = 1, . . . , k, we can write A j = B ′′ j × R {i∈Z: |i|≥t} , where B ′′ j ∈ 2 S × G {i∈Z: |i|<t} . As a result, under the distribution P g defined by the "dice" (R 0,i ) |i|≥t are i.i.d. with marginals Γ, independent of the other initial variables. Therefore, starting at time t, P g becomes a time-homogeneous Markov chain, satisfying Since the initial variables of Φ determ (µ, R, G, Γ, T ) are distributed according to µ, and its subsequent variables evolve independently of µ, it follows that for all µ, ν ∈ M 1 (S), Putting these equations together yields which we plug into the triangle inequality to get where the middle inequality holds because Equation (25) makes C a deterministic function of (C 0 , R 0 ). Since ε did not depend on T , taking ε → 0 proves the uniform convergence.
For some intuition regarding the proof of Theorem 4, consider the case where (R, G, Γ) is the fair m-sided die. Using Ψ, identify R Z with the unit square, so that G Z , Γ Z become its Borel σ-algebra and Lebesgue (i.e., area) measure, respectively. The cylinder sets A j ∈ A become finite unions of squares whose vertices have m-adic rational coordinates. The absolutely continuous distributionμ is "spread out" in such a way that it appears uniform at scales smaller than the A j 's. After enough iterations of stretching by the baker's map, the x coordinate becomes uniform on large scales as well. T only looks at a coarse description of the x coordinate; thus, for large t, it yields essentially Markovian behavior.
Of course, this result would be much less interesting if processes only became Markovian after attaining heat death. Fortunately, the convergence is uniform in T . Therefore, for fixedμ, we can always choose a T that mixes sufficiently slowly, so that the process becomes Markovian long before its entropy reaches a maximum.
In summary, Equation (22) provides our general Past Hypothesis. While it allows for messy behavior in some neighborhood of t = 0, a stable arrow of time is sure to emerge eventually for t ≫ 0. Of course, if T is invertible, then the argument applies equally well in reverse: a stable arrow of time must also emerge in the opposite direction for t ≪ 0. By Theorem 4, the forward dynamics are ultimately determined by (R, G, Γ, T ), while the backward dynamics are ultimately determined by (R, G, Γ, T −1 ). By Theorem 3, each of these corresponds to some transition matrix; to close out this section, we investigate how the forward and backward matrices are related.

E. Dual Arrows
Fix π ∈ M + (S) and (R, G, Γ, T ) ∈ Dyn(S), with T bijective and (π × Γ)-measure-preserving. Then, T is a deterministic, reversible, chaotic map that acts on the microstate (C t , R t ). The macroscopic transition probabilities P(C t+1 = s ′ | C t = s) depend on how R t is distributed. When R t is "uniform" (i.e., its distribution is Γ Z ) and independent of C t , these probabilities are given by the unique transition matrix p ∈ SM π (S) that Theorem 3 assigns to (R, G, Γ, T ). By Theorem 1, it follows that H π (C t ) ≤ H π (C t+1 ).
In Definition 8, R 0 meets this condition, but R t at later times tends to become correlated with C t . Fortunately, since T thereafter only encounters the terms R t,Z + , which are uniform and independent, the forward dynamics continue to abide by p. Thus, R t has the remarkable property that it appears well-mixed for the purposes of forward evolution, but not for the purposes of backward evolution. Indeed, using Theorem 3 to pass to the transition matrix presentation, Equation (14) shows that the backward probabilities are inhomogeneous.
As an intuition-building (albeit unrealistic) thought experiment, we can imagine perturbing an arbitrary microstate (C t , R t ), perhaps corresponding to the present state of the Universe. That is, without changing C t , we replace R t with a random sample from Γ Z 7 . Since T is chaotic, the evolution of C t is highly sensitive to this microscopic perturbation; nonetheless, the perturbed forward evolution would still appear plausible. To be mathematically precise, the forward transition probabilities would be unchanged; the new trajectory simply resamples from the same matrix p as the unperturbed trajectory.
On the other hand, the perturbed backward evolution would appear truly incredible. The perturbation destroys any correlations in R t that would otherwise conspire to restore the past's low entropy. Reversible phenomena, such as celestial orbits, would rewind to their former configurations relatively unharmed. However, thermodynamically irreversible events would fail to become undone: a shattered vase would no longer enjoy a past in which it was whole, nor would a fried egg return to its raw origins (perhaps it would overcook on the pan instead). We do not presume to guess how bizarrely life on Earth would be afflicted by such a reversal in the arrow of time.
However, the new trajectory can be understood in basic terms. Making R t uniform restores a symmetry between t's past and future: applying Theorem 3 to (R, G, Γ, T ) and (R, G, Γ, T −1 ), respectively, we find that the forward and backward dynamics are both homogeneous in time, corresponding to two different transition matrices.
We now show that these matrices are dual to each other. Recall that, for fixed π ∈ M + (S), the dual of a stochastic matrix p ∈ SM π (S) is defined by Equation (15). If p is recurrent, then it uniquely determines π, hence also p dual ; otherwise, the choice of π must be clarified by context.
Proof. Since DM(S) = SM ♯ (S), the implied choice of stationary measure in the first part is ♯; hence, the dual matrix in Equation (15) is simply the transpose of p. Let (C, F) be as in Definition 7, so that P C = Φ random (µ, Γ dual ). Then, since F t is independent of C ≤t , Similarly, under the second set of hypotheses, let (C, R) be as in Definition 8, so that Therefore, In light of Theorem 5, it's natural to extend Equations (12) and (13) with the dual Equation (16). That is, given µ ∈ M 1 (S) and a recurrent matrix p ∈ SM(S), the bidirectional Markov chain C = (C t ) t∈Z has its joint distribution uniquely determined by: C is effectively two Markov chains glued together at t = 0, and its causal graph is Equation (11). When the functions in question are bijective, the random function and deterministic function presentations have obvious extensions to negative times. Theorem 5 then extends the correspondences of Theorems 2 and 3 to bidirectional Markov chains. These might prove helpful for modeling cosmologies in which the Big Bang is replaced by a temporally bidirectional Big Bounce.

V. STOCHASTIC PARTITIONED CELLULAR AUTOMATA
As a final extension, we supplement the time coordinate with a space coordinate. The initial condition and dynamics now jointly determine the state (or its distribution) at every point in spacetime. We say the dynamics are local if they consist of independent transitions at all points in spacetime; we say they are homogeneous in space and time, or spacetime-homogeneous, if the transition matrix is identical at all points. We seek a model whose forward transitions are both local and spacetime-homogeneous.
In the physical Universe, local interactions propagate no faster than the speed of light, ensuring a form of causal separation between spacelike separated events. When viewed in reverse, however, macroscopic events seem to conspire in a non-local manner: for example, the fragments of a broken vase rise up simultaneously to reassemble. There is no macroscopic indication that the fragments are about to rise because, once at rest, the fragments have lost the memory of their common time of origin. In other words, the fragments decorrelate from each other when they come to rest.
In this section, we identify a new time-reversal asymmetry, the Memory Law, which permits spontaneous decorrelation but forbids spontaneous correlation. It complements the Resource Law, which is a very general and local version of the second law of thermodynamics.

A. Core Definitions
We begin by defining our discrete spatial structure. It consists of a set of positions X linked by a neighbor relation; in other words, a graph. We want X to be homogeneous, meaning that all its elements should have neighborhoods that "look the same". To that end, we color the edges, and require that each x ∈ X have one outgoing and one incoming edge of each color τ ∈ T . Thus, each color corresponds to a bijection on X . By coupling the set of positions X with the set of times Definition 9. A homogeneous discrete spatial geometry (X , T ) is a set of spatial positions or cells X , along with a finite set of local translations or tracks T ⊂ Bij(X ). We assume an identity track: id ∈ T . Associated with (X , T ) is the quasimetric d(x, y) := min{n ∈ Z + : ∃τ 1 , . . . τ n ∈ T , τ n (. . . (τ 1 (x)) . . .) = y}, with d(x, y) := ∞ if no such path exists. d is a metric iff T is closed under inverses. It determines a partial order on 1 2 Z + × X : for times t, u ∈ 1 2 Z + and positions x, y ∈ X , we write (t, x) < (u, y) iff t < u and d(x, y) ≤ ⌈u⌉ − ⌈t⌉. In this case, we say (u, y) is reachable from, or in the future of, (t, x), and that (t, x) is in the past of (u, y).
Also associated with (X , T ) is the causal graph G(X , T ) on the vertex set {O} ∪ 1 2 Z + × X . It has a directed edge from (t, x) to (u, y) iff (t, x) < (u, y) and u = t + 1 2 . To allow for dependences in the initial state, there is also an edge from O to (0, x) for all x ∈ X .
If either (t, x) < (u, y), (t, x) = (u, y), or (t, x) > (u, y), we say the pairs are timelike related; otherwise, they are spacelike related. In analogy with light cones in relativity, for any subset of It's easy to check that G(X , T ) has a path from (t, x) to (u, y) iff (t, x) < (u, y). One example of a spatial geometry is the infinite grid X = Z d , equipped with 2d + 1 tracks: the identity, and the unit displacements. The finite grid X = (Z m ) d can be made into a spatial geometry using a periodic variant of the same tracks, connecting at opposite boundaries.
After choosing a spatial geometry, the next step is to define a dynamical model over it. We have a few options here, with different tradeoffs. For example, if we wish to study how nature breaks the symmetry between space and time, then the dynamics should not distinguish between the space and time axes. For completeness, we include such a model in Appendix B. There, we find that a spacelike initial condition suffices to break the symmetry, leading to a macroscopic description in which causality is strictly timelike. To keep this section simple, however, we take the special status of the time axis for granted, and seek only to break its symmetry between past and future.
Perhaps the most straightforward model is the ordinary cellular automaton (CA), whose dynamics compute the state at coordinate (t, x) ∈ Z + × X , as a function of the previous state of all neighboring cells {(t−1, τ −1 (x)) : τ ∈ T }. For our purposes, the CA has two major drawbacks: (1) it combines neighborhood aggregation and dynamical evolution into a single step, making analysis more difficult; and (2) the question of whether a given CA is reversible is undecidable and, even when the answer is affirmative, a CA's forward and backward dynamics may require drastically different neighborhood sizes [52].
To solve these issues, Morita and Harao [23] invented the partitioned cellular automaton (PCA). Both CAs and PCAs are divided into cells X , but the cells in a PCA are further subdivided along tracks T . Thus, each pair (x, τ ) ∈ X × T is the coordinate of a subcell. The dynamics of a PCA interleave two distinct steps. In a trackwise translation step, the contents of each subcell (x, τ ) move to (τ (x), τ ). Then, in a cellwise evolution step, each cell x evolves independently of all the others. Thanks to this separation, a PCA is reversible iff its cellwise evolution rule is. See Kari [24] for a modern survey of reversible cellular automata, including PCAs.
Just as with the Markov chains in the previous section, we will find macroscopic views of certain PCAs to have homogeneous transition probabilities; we call such a view a stochastic partitioned cellular automaton (SPCA). For the remainder of this section, fix a spatial geometry (X , T ). Additionally, for each track τ ∈ T , fix a countable set S τ of fine macrostates. Subcells on track τ take states in S τ ; therefore, a whole cell's state belongs to S := τ ∈T S τ .
An SPCA's configuration history is a collection of random variables C = (C t,x,τ ) (t,x,τ )∈ 1 2 Z + ×X ×T , such that C t,x,τ ∈ S τ for all t, x, τ . To interpret G(X , T ) as a graphical model on C, replace each vertex (t, x) with the corresponding cell C t,x . Thus, C is Markov relative to G(X , T ) iff the conditional distribution of each vertex C t,x , given all its nondescendants C NonFut(t,x)\{(t,x)} , depends only on its immediate parents. In this case, the joint distribution is uniquely determined as the product of the conditional distributions. We say that C is spacetime-homogeneous if the conditional distributions do not depend on t or x.
Let SPCA(X , T , S) ⊂ M 1 (S 1 2 Z + ×X ×T ) denote the set of spacetime-homogeneous distributions that are Markov relative to G(X , T ) and satisfy the trackwise translation What data are needed to uniquely determine an element of SPCA(X , T , S)? Since Equation (27) determines the behavior at half-integer times, it only remains to specify the behavior at wholeinteger times. By homogeneity, and the fact that (t, x) ∈ N × X in G(X , T ) has (t − 1 2 , x) as its sole parent, this amounts to choosing a pairing of initial condition and cellwise evolution. In analogy with Definitions 5, 7 and 8, the cellwise evolution comes in three presentations.
Markov chains and SPCAs mutually generalize each other. On one hand, every Markov chain can be thought of as an SPCA with the trivial geometry: |X | = 1 and T = {id}. On the other hand, every SPCA with |X | < ∞ can be thought of as a Markov chain, by collapsing all its cells and tracks into a global state C t , taking values in S global := S X .
The correspondences of Theorems 2 and 3 generalize to the SPCA setting verbatim, replacing each Φ in their statements with the corresponding Φ cell-. To see this, note that the initial condition and trackwise translation steps are shared among all three presentations. While the cellwise evolution steps have three separate definitions, each one applies independently at all points (t, x) in spacetime. Thus, consider the evolution at each point in isolation: these are identical to the Markov chain transitions defined in Equations (13), (18) and (21), respectively. Therefore, every SPCA C can be understood as the macroscopic component of some deterministic PCA (C, R), whose identity track has the state space S id ×R Z . Having established this equivalence, we need no longer worry about the microscopic details. From here onward, it's convenient to focus on the transition matrix presentation.
There is just one complication: the dynamical law p ∈ SM π (S), with π ∈ M + (S), is insufficient to guarantee that the global distribution π X ∈ M + (S X ) is stationary for an SPCA. While it's true that p preserves the distribution π in each cell, so that cellwise evolution steps preserve π X , the trackwise translation steps need not share this property. For example, if π has perfectly correlated subcells, then a translation would mix adjacent cells, likely breaking the correlation. To remedy this, we restrict attention to measures that factorize into their subcellular marginals: If we add the condition that π ∈ M + (T , S), then π X distributes all subcells independently and trackwise identically, so it's clear that trackwise translations also preserve π X . π X is truly stationary for the SPCA, making it a suitable reference measure for the entropy-like quantities of Section III B; in particular, applying Theorem 1 to an SPCA's global state yields a global second law of thermodynamics. It has some unfortunate limitations: it only applies to finite-sized SPCAs, and says little about the entropy within specific regions of interest. In order to develop a local version, we need some notation dealing with spatial regions.
A region is a finite set of cells A ⊂ X ; its volume is the set cardinality |A|. When π ∈ M + (T , S), the expressions D KL C t,A π A , H π A (C t,A ), and J π A (C t,A ) are invariant to permutations of the subcells within any track A × {τ }. In these expressions, as well as in the relation π A , we may write π instead of π A ; this notational abuse presents no ambiguity.
A system (or time-varying region) is a collection of regions (A t ) t∈ 1 2 Z + held fixed during cellwise evolutions, meaning that A t = A t− 1 2 for all t ∈ N. The pair (t, A t ) may be abbreviated by (t, A) so that, for example, C t,A := C t,At = (C t,x,τ ) (x,τ )∈At×T .
Let T + (A) denote the set of cells reachable from A ⊂ X in one local translation, and T − (A) denote the set of cells that can be reached only from A in one local translation: formally, Since id ∈ T , it follows that T − (A) ⊂ A ⊂ T + (A). Additionally, iterating T + yields the reachable set at arbitrary future times, so that

B. The Laws of Information Dynamics
Conservation laws, for physical quantities such as energy and charge, have local statements in the form of continuity equations. These equate the decrease (or increase) in a system's quantity, with the net "flux" of the quantity exiting (or entering) the system. Entropy is known to increase spontaneously, so it's not a conserved quantity; thus, while a system's entropy must increase by at least the net incoming flux, it may well increase more. As a result, entropy should satisfy a continuity inequality instead of an equation.
More generally, we derive continuity inequalities for two types of information-theoretic quantity: (1) generic information, measured by the KL divergence, and (2) mutual information about specific random variables. Since these quantities are non-additive, their flux is defined relative to information already contained in the system. Definition 11. Fix a measure π ∈ M + (T , S), an SPCA C, and a random variable Y . The net flux from system A at time t ∈ Z + , relative to π or Y , respectively, is By definition, flux is a change in either D KL or I, over the time interval [t, t+ 1 2 ]. Since t is a whole integer, this time interval is a trackwise translation step (see Equation (27)): it moves, but does not modify, the SPCA's information content. Thus, the fluxes should be thought of as quantifying the net movement of information through a system boundary. F π is generic flux, whereas F Y is the flux of information pertaining to Y .
When stating the inequalities, we tacitly assume that they contain no conflicting infinities (e.g., expressions of the form ∞ − ∞), whose result would be ill-defined. Sufficient (but not necessary) conditions are I(π) < ∞ and H(Y ) < ∞, since then the D KL and I terms are finite.
Our first continuity inequality is a local version of the second law of thermodynamics (cf. Theorem 1). It states that the KL divergence is non-increasing, net of incoming and outgoing fluxes. Hence, the KL divergence can be thought of as a kind of resource: the only way to obtain more of it is to take some from elsewhere.
Theorem 6 (Resource Law). Fix π ∈ M + (T , S), and an SPCA C with dynamics p ∈ SM π (S). For t, u ∈ 1 2 Z + with t ≤ u, and any system A, Proof. For v ∈ Z + , rearranging the definition of net flux relative to π yields For v ∈ Z + + 1 2 , every system satisfies A v = A v+ 1 2 by definition. Cellwise application of the dynamics p corresponds to a single application of the Kronecker product p Av := x∈Av p ∈ SM π Av (S Av ).
Thus, C v,A π C v,A+ 1 2 . By Theorem 1, it follows that Summing these equations and inequalities over all v ∈ [t, u) ∩ 1 2 Z + yields the desired result.
Compared to the famed second law of thermodynamics, the next result seems more mysterious. It concerns information pertaining to an event that is either (1) in the past, or (2) spacelike separated. In the absence of communication through the system boundary, such information cannot increase, though it may spontaneously decrease.
Theorem 7 (Memory Law). Fix an SPCA C. For any t, u ∈ 1 2 Z + with t ≤ u, and any system A, let Y be any function of Proof. For v ∈ Z + , rearranging the definition of net flux relative to Y yields For The cellwise evolution step from Equation (29) is independent of NonFut({v} × A v ), which contains NonFut(A ′ ); thus, any stochasticity in this evolution is independent of Y . By the data processing inequality, it follows that Summing these equations and inequalities over all v ∈ [t, u) ∩ 1 2 Z + yields the desired result.
In order to apply Theorems 6 and 7, we would like to get a handle on the flux terms. In the worst-case, their magnitude is comparable to I(π), multiplied by the system's effective "surface area", i.e., the number of cells worth of content that may cross its boundary. Corollary 2 bounds the contributions to F π arising from addition and removal of arbitrary cells. For a system that expands or contracts at the "speed of light", only additions or removals, respectively, are possible. The one-way nature of such a system's fluxes enables their elimination from the corresponding inequalities.
Corollary 3. Fix π ∈ M + (T , S), and an SPCA C with dynamics p ∈ SM π (S). For t, u ∈ 1 2 Z + with t ≤ u, and any region A, let A + := T Proof. We start with the first inequality. It holds trivially if inf s∈S π(s) = 0, since then H ≡ ∞ by definition. Otherwise, by multiplying π by a constant, we can assume without loss of generality that inf s∈S π(s) = 1, so that D KL (· π) ≡ −H π (·). Extend A into a system by setting A t := A and A v+1 := A v+ 1 2 := T + (A v ) for v ∈ [t, u) ∩ Z + . It follows that A u = A + and, by Theorem 6, The first inequality now follows if the fluxes can be shown to be non-negative. Indeed, since C v+ 1 2 ,A contains all of the subcells in C v,A , Lemma 2 implies The second inequality is proved in a similar manner, assuming without loss of generality that s∈S π(s) = 1, so that D KL (· π) ≡ J π (·). Extend A into a system by setting A t := A and It follows that A u = A − and, by Theorem 6, The second inequality now follows if the fluxes can be shown to be non-negative. Indeed, since C v,A contains all of the subcells in C v+ 1 2 ,A , Lemma 2 implies For the third inequality, apply Theorem 7 to the same system A to get We are done, since C v,A containing all of the subcells in C v+ 1 2 ,A also implies that

C. Closed Systems
Corollary 3 successfully eliminates the flux terms, at the price of needing to grow or shrink the region A at the "speed of light"; this is done to block information from crossing A's boundary in the undesired direction. In practice, we often encounter physical systems of fixed size that are nonetheless well-behaved, experiencing little to no flux. The ideal case is a closed system which has no interaction with its external environment, hence zero flux.
A system and environment can block interactions by working together to maintain an inert medium between them. We do not concern ourselves with the mechanisms for maintaining such a medium, but simply assume every cell on the boundary to be fixed to a quiescent state q ∈ S. If such a system's initial and final volumes are equal, it emits and absorbs equal numbers of copies of q, resulting in a total of zero net flux.
Definition 12. Fix an SPCA C and a system A. For t ∈ Z + , τ ∈ T , define the boundary operator ∂ by Given q ∈ S and t, u ∈ 1 2 Z + , we say that A is q-closed over the time interval Note that, since ∂ is only defined at integer times, q-closedness holds vacuously over cellwise evolution steps. This makes sense, since no information travels across cell boundaries during these steps. We are finally ready to state the laws for closed systems.
Theorem 8 (Resource Law for Closed Systems). Fix π ∈ M + (T , S), and an SPCA C with dynamics p ∈ SM π (S). Given q ∈ S and t, u ∈ 1 2 Z + with t ≤ u, let the system A be q-closed over [t, u]. If |A t | = |A u | or π(q) = 1, then Proof. By definition, ∂ v,τ A consists precisely of the positions on track τ ∈ T , whose contents at time v ∈ Z + are either about to enter A from outside, or exit it from inside. Since A is q-closed, the subcells at these positions are all in the state q τ . The number of such subcells leaving A exceeds the number entering A by precisely |A v | − |A v+1 |. This number does not depend on τ ; hence, up to permutations on each track, the translation step simply emits (or absorbs, if negative) this many whole copies of q from the system. Therefore, .

Substituting into Theorem 6 yields
which reduces to the desired inequality when |A t | = |A u | or π(q) = 1. In order to show that |A t | = |A u | =⇒ C t,A π C u,A , we take advantage of the fact that, from A's point of view, the external Universe might as well be an endless sea of q's. To be precise, let I := [t, u] ∩ 1 2 Z + , B := v∈[t,u] A v , and define the random variable C ′ : I × B → S by The case v ∈ Z + corresponds to a trackwise translation step, with the caveat that each τ ∈ T may map some elements of B to its complement, and vice-versa. Luckily, all such subcells are in the state q τ , so there exists some τ ′ ∈ Bij(B) that produces the same effect as τ on C ′ v . Since π ∈ M + (T , S), π B is stationary with respect to permutations of each track, and therefore C ′ The case v ∈ Z + + 1 2 corresponds to a cellwise dynamics step.
By transitivity of the relation π , it follows that C ′ t π C ′ u . By the definition of C ′ , When |A t | = |A u |, the deterministic q factors drop out and we conclude that C t,A π C u,A .
Theorem 9 (Memory Law for Closed Systems). Fix an SPCA C, q ∈ S, and t, u ∈ 1 2 Z + with t ≤ u. Let the system A be q-closed over [t, u], and let Y be any function of C NonFut(A ′ ) , where Proof. For v ∈ [t, u)∩Z + , C v,A and C v+ 1 2 ,A hold identical data aside from the deterministic addition or removal of q's; hence, F Y (v, A) = 0. The first inequality now follows directly from Theorem 7.
The second inequality will follow by induction if we can show that, for all v ∈ [t, u) ∩ 1 2 Z + , . The case v ∈ Z + follows as in the first inequality, because the trackwise translation step does not change the information content of either system.
The case v ∈ Z + + 1 2 follows from two applications of the first inequality: first with C v,B in place of Y , and then a second time with C v+ 1 2 ,A in place of Y . In the second application, . Chaining the two applications together yields To review what we've learned, the "arrow of time" is an umbrella term for a bundle of important asymmetries with respect to time reversal. For Markov chains, two such asymmetries are time-homogeneity and the second law of thermodynamics. The former may be viewed as more fundamental, since it implies the latter. Indeed, even if the dynamics are not quite homogeneous, provided that they stay within SM π (S), Theorem 1 implies monotonicity of D KL (· π).
For SPCAs, the analogous asymmetries are spacetime-homogeneity and the Resource Law. The fundamental asymmetry, from which all others are derived, is the combination of spacetimehomogeneity and locality that is encoded in Equation (29). In the deterministic presentation, the role of fundamental asymmetry is instead taken by the initial condition in Equation (32). By Theorem 3, the two presentations are equivalent and therefore equally valid.
When the spatial geometry (X , T ) is nontrivial, there are two additional derived asymmetries: the Memory Law, and Pearl's d-separation criterion as applied to G(X , T ). We've seen that a Markov chain's edges can be reversed, and its d-separation criterion expressed as a symmetric Markov property. According to Pearl [11,Thm 1.2.8], this is not the case for the more interesting causal graphs we encounter here. Consequently, an SPCA's backward "dynamics" are not merely inhomogeneous; in failing to be Markov relative to the reversed graph, they are also nonlocal.
Our definition of a closed system is somewhat restrictive; in future work, it may prove useful to develop more general estimates of the flux terms. On the other hand, Theorems 8 and 9 are valid asymmetries, and they are powerful enough to illustrate some key applications of our model. Before turning to those, let's derive one easy extension. Perhaps the main weakness of Definition 12 is that it must occur with probability one, given only the initial condition, i.e., the Big Bang. In practice, we would like to condition on an event E, conveying the preparation of a closed system before some experiment start time t ∈ Z + . Fortunately, if E is a function of C ≤t , it follows from the structure of G(X , T ) that the conditional distribution P C ≥t |E is itself an SPCA with the same dynamics, only its initial condition is changed to P Ct|E . Therefore, our results extend to the setting of P C ≥t |E .

VI. APPLICATIONS
The arrow of time is so deeply ingrained in our intuitions, and even in the language of science and mathematics, that it's hard to reason about from first principles. In the absence of a precise model, it's extremely easy for assumptions to go unchecked, as evidenced by historical debates such as the one over Maxwell's demon [2]. As a partial solution, Pearl [11] brought mathematical precision to causal concepts; however, he did not specify their connection to fundamentally reversible physical laws.
In this article, the SPCA brings a similar degree of mathematical precision to emergent irreversibility, from reversible first principles. It's quite general, being parametrized by (X , T , S, µ, p), and more tractable than realistic field theories from physics. Formerly ambiguous concepts, such as an experimenter's "knowledge" (usually of the past) and "free will" (to influence the future), can be endogenized within such a model, enabling clearer analyses. For maximum generality, rather than constructing specific SPCAs, we utilize the theorems of Sections IV and V.
This section provides a brief overview of some contentious topics that illustrate the clarifying power of our theory. For the sake of brevity, we sometimes blur the distinction between SPCAs and physical reality. Implicit in this approach is the hypothesis that SPCAs make accurate predictions regarding information-theoretic properties of the Universe, at least in some classical limit that evades the peculiarities of quantum information. Some of these predictions may merit future experiments; however, for the purposes of our theoretical exposition, we find assurance in our predictions' consistency with established science and everyday experience.

A. Negentropy as a Resource
Colloquially, energy is often thought of as a resource, to be irreversibly consumed to perform various tasks. Physics describes the situation differently, with conservation laws that forbid the total energy from changing. Instead, energy is irreversibly converted from more useful forms (referred to as free energy) into less useful forms (e.g., ambient heat). While a detailed analysis of conserved quantities is beyond the scope of this article, let's take a moment to summarize their relationship with negentropy, the fundamental resource of statistical mechanics.
A collection of d ∈ N scalar quantities is represented by a vector function E : τ S τ → R d . We say E is conserved for p ∈ SM π (S) if, for all s, s ′ ∈ S with p(s, s ′ ) > 0, we have τ E(s τ ) = τ E(s ′ τ ).
E extends to arbitrary systems by E(C t,A ) := (x,τ )∈At×T E(C t,x,τ ). For conserved E and a closed system A, the distribution of E(C t,A ) is unchanging with t 8 . Now, for any non-intersecting pair of systems A, B, a direct substitution into Corollary 1 decomposes their aggregate negentropy into three non-negative parts: By Definition 2, J π is the amount by which a system's KL divergence (relative to π) exceeds the infimum over all probability distributions. In the presence of conserved quantities, this unconstrained infimum may be unattainable. Consequently, it's more useful to let J E π (X) be the amount by which D KL (X π) exceeds its constrained infimum, subject to keeping P E(X) unchanged. Similarly, let I E (X; Y ) := I(X; Y ) − I(E(X); E(Y )) be the excess mutual information between a pair of systems, beyond that required by their conserved quantities.
When both A and B are closed, the joint distribution P E(Ct,A),E(Ct,B) is fixed. By simultaneously minimizing every term on the right-hand side of Equation (36), subject to this constraint, we find that the KL divergence of C t,A∪B exceeds its constrained infimum by J E π (C t,A ) + J E π (C t,B ) + I E (C t,A ; C t,B ). On the other hand, if the systems A and B are allowed to come into contact, then only the sum's distribution P E(Ct,A∪B ) = P E(Ct,A)+E(Ct,B ) is fixed. Subject to this weaker constraint, the excess KL divergence increases to J E π (C t,A∪B ). Letting F E (C t,A ; C t,B ) denote the difference between the two values, we have Equation (37) generalizes the decomposition of Equation (36), and reduces to it in the case where E is a constant function. In intuitive terms, Equation (37) decomposes the aggregate resource of A ∪ B into four non-negative components: the internal resource (J E π ) in each of A and B, as well as mutual resources due to their correlation (I E ) and their potential to trade conserved quantities (F E ).
Suppose A ∪ B is a closed system to which Theorem 8 applies, so that the left-hand side is nonincreasing. In general, when A and B are in contact, the negentropy may redistribute arbitrarily between the right-hand terms, subject to their total not increasing. However, when A and B are also closed off from each other, we can constrain the individual terms. Indeed, all four terms are non-increasing: the first and second by Theorem 8, and the third by Theorem 9. The fourth term, being a function of the unchanging distribution P E(Ct,A),E(Ct,B) , is constant.
Thus, if the two systems A, B are allowed to relax separately, then the first three resource terms may drop to zero, but the fourth retains its starting value. When both systems are said to be in thermodynamic equilibrium, and Equation (37) simplifies to For example, consider two tanks of inert gas: a hot tank A and a cold tank B. Individually, not much can be done with either tank. However, when they are brought together, a heat engine can extract the jointly held resource F E (C t,A ; C t,B ); this is essentially the free energy, expressed in units of negentropy. For further study of the equilibrium setting, in which only the F E term is positive, we defer to the standard literature in thermodynamics. This article focuses on the remaining terms, so let's dismiss E and return to Equation (36).
The third term I(C t,A ; C t,B ) merits further examination. It's typically much smaller than the other terms: it becomes zero when either of A, B is relaxed to equilibrium, and can only stay high by protecting densely packed data from environmental noise. To get a sense of scale, copying a 125 TB magnetic tape drive filled with random data (e.g., a one-time pad) would yield only 8 · 125 · 10 12 = 10 15 bits of mutual information, whereas the physical entropy of any household object exceeds Avogadro's number (> 10 23 bits). At room temperature, each bit is worth 3 × 10 −21 Joules of free energy [2], so the data on our hypothetical drive is only worth 3 microjoules. This renders the mutual information irrelevant to most thermodynamical calculations; on the other hand, we will see its relevance in some of the topics to follow.

B. Energy-Efficient Computing
In the digital age, the design of computing devices is constrained by limits on power consumption and heat generation. Thus, a question of great practical interest is: how much computation can be performed on a given free energy budget? Von Neumann initially proposed that every elementary computation should cost at least one bit of negentropy, thereby dissipating 3 × 10 −21 Joules at room temperature. Landauer [53] refined this hypothesis, arguing that only irreversible computations, which erase information, carry this cost. Frank [25] gave further refinements; the present subsection is mainly an effort to streamline his arguments using our Theorems 2, 8 and 9.
Landauer's principle must be interpreted with care. Consider the following operations: • FLIP: overwrite a known bit with another known bit • ROLL: overwrite a random bit with an independently random bit • FORGET: overwrite a known bit with a random bit • SET: overwrite a random bit with a known bit Naively, one might expect at least some of these operations to be thermodynamically costly. However, suppose we carry reserves of 0s, 1s, and randomized bits, in specified regions of memory. Then, each of the operations is logically reversible, with the net effect of draining one reserve while replenishing another. In fact, the reserve of 1s is redundant, since 0s and 1s can be reversibly negated.
For the purposes of analysis, it's helpful to simplify the SPCA model. To start with, we imagine an SPCA with doubly stochastic dynamics, whose subcellular state spaces S τ encode fixed-width binary numbers. By the last part of Theorem 8, any closed system of constant volume also inherits doubly stochastic dynamics. Consequently, Theorem 2 implies that no matter how we engineer a system 9 , its effective transition must always be a random mixture of bijections. To avoid the 9 One might wonder how it's possible to engineer a system's behavior at all, when the dynamics p ∈ DM(S) are forever fixed. A straightforward way to embed a variety of dynamics into a single p is to break the state into control and data parts: S = S control × S data . If the control is fixed, i.e., p((c, d), (c ′ , d ′ )) = 0 whenever c = c ′ , then it's easy to show that for every fixed c ∈ S control , we get an effective dynamics p data (c) ∈ DM(S data ). Cellular automata can be very versatile, as evidenced by the universality results surveyed by Kari [24].
trouble of constructing full-fledged SPCAs, we therefore model our hypothetical computer as a grid of binary numbers, on which we are free to apply any random mixture of bijections. We make use of two memory reserves: one containing only zeros, the other containing unbiased i.i.d. bits. The two reserves are jointly modeled by a single system with state space The charge level n indicates the size of the reserve of 0s, or battery, taking up a prefix of m. The reserve of random bits, or heat bath, occupies the trailing end of m. When the system is left alone, its dynamics are as follows: the charge level and battery do not change, but the heat bath mixes rapidly.
To express these dynamics as a mixture of bijections, we treat n as a fixed control. At each position i < n, we preserve the battery by applying the identity to m i . At each position i ≥ n, we randomize the heat bath by choosing randomly between the identity and negation. From any given state with charge level n, this system immediately collapses into a uniform equilibrium over all states compatible with the charge level. With this system in hand, let's see how each of the four listed operations are implemented.
FLIP is clearly a bijection: either the identity, if the initial and target values match, or a negation otherwise. We should clarify the meaning of the requirement that the initial bit be known. Our choice of bijection must not depend on a direct observation of the initial bit, as such a composite operation would not be bijective. We can try to guess the initial value a priori, in which case an incorrect guess would lead to the wrong result.
Alternatively, we might have a copy of the initial bit elsewhere in memory. One way to copy x is to take a 0 from our reserve, and apply the reversible XOR-assignment operation (x, y) → (x, x⊕y). It maps the pair (x, 0) to (x, x), copying x at some expense to our reserve. Thus, knowledge comes from negentropy, a finding that we expand upon in Section VI C. A copy of x, or more generally any data that implies its value, can serve as a control, reversibly allowing for a choice of bijection that depends on x. The battery's charge level n serves the same kind of role, informing its user of the n zeros.
Moving on to the ROLL operation, we'd be tempted to call it irreversible since it erases the initial value. However, it has no effect on the bit's distribution 10 . ROLL can be implemented by choosing randomly between the identity and negation; alternatively, it can be implemented by swapping with a bit from the heat bath, leaving the charge level unchanged.
FORGET increases the entropy (hence decreases the negentropy) by one bit. To make it reversible, we should collect the initial bit's negentropy for future use. First, we apply FLIP if necessary to set its value to zero. Then, we swap it into position n of the reserve system and increment its energy level to n + 1; this has the effect of withdrawing a random bit from the heat bath, while simultaneously depositing a zero into the battery.
SET decreases the entropy from one bit to zero. The second law of thermodynamics forbids this operation in isolation, requiring that we store the entropy elsewhere. The solution is to apply FORGET in reverse, withdrawing a zero from the battery while depositing our random bit into the heat bath. Since FORGET and SET are inverses of one another, neither operation consumes negentropy; they merely transfer negentropy from bit to battery and vice-versa, respectively.
The real issue is that we often want to treat nonrandom bits as if they were random, clearing them with SET instead of FLIP. To see why, consider any long computation that produces a lot of intermediate data. Once this data is no longer needed, we'd like to clear or overwrite it to make room for new data. Since it was deterministically computed, it should in principle be erasable with FLIP, at no thermodynamic cost. On the other hand, if there is no substantially faster way to compute it than to run the source program (i.e., the data has high logical depth as defined by Bennett [44]), then a successful implementation of FLIP requires repeating a similar amount of computation 11 . Such approaches are studied in the field of reversible computing; for references, see Vitányi [54] and Morita [55].
To avoid the extra computations, we can instead pretend the junk data is random and apply SET to it. Once placed into the heat bath, the nonrandom bit is randomized, producing new entropy. Thus, what's costly is not the SET operation per se, but rather, the decision to give up on the bit's deterministic origins and throw it into a noisy environment. In hindsight, the conclusion that randomizing a nonrandom bit increases entropy seems too obvious; however, it was Landauer who first realized that the entropy of digital data is essentially the same as that of thermodynamics, enabling the bit's ejection into a heat bath.
Our reversible implementation of SET, with its controlled exchange of exactly one bit, is quite idealized. Neyman [56] considers a more realistic implementation that imposes an energy differential (say, using an electric field) between a transistor's 0 and 1 states. The transistor is then relaxed to equilibrium with an external heat bath. Conservation of energy implies that, at the low-energy state, the heat bath has more energy, hence also a larger volume of phase space configurations. As a result, the equilibrium distribution favors the low-energy state.
In order to bound the probability of error per such operation by 2 −50 , the high-energy state must occupy a fraction no bigger than 2 −50 of phase space. Thus, relaxing the transistor from that state expands our phase space volume by a factor of at least 2 50 . Even assuming no other imperfections, entropy then increases by not just 1, but 50 bits! In conclusion, if we ever want to dissipate less than 50 bits per operation, we must choose a different sort of implementation; and if we want to dissipate less than 1 bit per operation, the only possibility consistent with thermodynamics is reversible computing.
Finally, we present an extension of Landauer's principle. Consider two closed systems A and B. By Theorems 8 and 9, every term in the decomposition of Equation (36) is non-increasing. Therefore, whenever any term on the right-hand side decreases, the joint negentropy J π (C t,A∪B ) must also decrease by at least the same amount. In particular, any decreases in the mutual information I π (C t,A ; C t,B ) are irreversible and thermodynamically costly.
For example, suppose Alice and Bob know an inside joke, represented as copies of the same random data in their respective memories. While they are apart, if Bob forgets the joke, their mutual information would decrease. As a result, negentropy would decrease, not necessarily in Alice or Bob individually, but certainly in their union. This limitation is lifted when Alice and Bob are together: indeed, they may jointly apply XOR-assignments to freely copy and uncopy data, mapping (x, 0) to (x, x) and vice-versa.
As a consequence of this discussion, we predict that no future technology can eliminate the thermodynamic cost of sensing. While we might hope that reversible computers will someday be able to dispose of junk data arising from internal computations, the external world is much harder to control. To reversibly "unsense" something, we would have to revisit precisely the same scene to perform an uncopy operation. Absent such an opportunity, clearing our senses requires dissipation.

C. Induction and Randomness
It's important to address the use of a probabilistic Past Hypothesis. No matter which of the three presentations we choose, Definition 10 posits a probability measure on an entire ensemble of trajectories. This presents a bit of a paradox: the inhabitants of an SPCA can only gather observations from one trajectory in the ensemble. Empirically speaking, it's meaningless to ask whether or not the remaining trajectories are "real", as we can never access them. Instead, the ensemble expresses the subjective uncertainty within our mind. Now, subjective does not mean arbitrary. If we take it for granted that minds are entirely physical, then any inferences contained therein must be a product of the specific trajectory in which the mind finds itself. In other words, the general ensemble somehow arises as a function of one particular member. To determine which ensemble should be inferred, let's put ourselves in the shoes of an agent inhabiting an SPCA, and ask: what can we infer about our own Universe?

The Oblivious God
To demonstrate the problem's difficulty, let's generously overstate the agent's prior knowledge and physical capabilities. Recalling that an SPCA is parametrized by (X , T , S, µ, p), suppose that X , T , S, p, with |X | < ∞, are all known to the agent a priori. This leaves only the task of inferring the actual state C t ∈ S X , whose initial distribution µ is now unspecified. To be even more generous, we allow the dynamics to be arbitrarily inhomogeneous and nonlocal in the agent's favor. That is, imagine a God-like agent 12 who can choose which transition matrix p(t) ∈ SM π X (S X ) the Universe applies at each time t ∈ N, subject to a fixed stationary measure π ∈ M + (T , S) with I(π) < ∞. The theorems of Section V still apply because, aside from fixing π, their proofs make no specific use of spacetime-homogeneity.
To be clear, when we say that the state is unknown to the agent a priori, we mean that the transition matrices p(t) are chosen independently of the configuration C. This restriction prevents violations of Section V's lawsà la Maxwell's demon. It also means that an agent hoping to exercise state-dependent control over the environment cannot do so by manipulating p(t) directly; instead, state knowledge must be stored in a physical memory. As a result of interactions with such a memory, the environment can be made to evolve in a manner that depends on the memory's contents.
Let's designate some region Mem ⊂ X , in which the agent should store state information. One might imagine that such a powerful agent would have no trouble filling Mem with basic information about the state of its surroundings; at a minimum, it should be able to look around and verify its own physical form to be more than a disembodied brain! Formally, can the agent ensure that, at some future time t, To gain intuition, consider the case π = ♯. By Theorem 2, the allowed operations are random mixtures of bijections. Unfortunately, a measurement that overwrites the previous contents of Mem, 12 While realistic agent models are beyond the scope of this article, we should intuitively convince ourselves that the God-agent can emulate all such agents. To sketch the idea, model an agent by some system A living inside the SPCA. Let's imagine the agent maintains a periodic internal homeostasis, in which for some pair of times t < u, with probability one, C t,A = C u,A (so in particular, |At| = |Au|). The agent's presence acts as a control on X \ A, manipulating its dynamics in a manner that depends on the specific contents of C t,A . Regardless, if P(Cu | Ct) is doubly stochastic, then so is P(C u,X \A | C t,X \A ). As a result, the agent can be emulated by a disembodied God-agent living in X \ A, with the tracks T mended to skip through the "hole" made by removing A.
with a copy of external data, would be non-bijective. Therefore, it cannot be implemented without additional assumptions on the contents of the memory and/or environment. In the general case, we might model our ignorance about the current state C t with a maximum entropy (hence, zero negentropy) Bayesian prior over all possible states. By Theorem 6, the Universe's negentropy will thereafter always remain zero. By Equation (36), our knowledge about other systems, as measured by the mutual information, cannot exceed the aggregate negentropy; hence, it too is stuck at zero. In other words, if we start with a zero negentropy prior, then no experimental evidence could ever persuade us to improve our posterior belief. This prior is effectively an epistemic heat death. Even if we assume a priori that Mem is zeroed out, this would only grant as much negentropy as the size of the memory. We could then use XOR-assignments to copy small amounts of data into our memory; however, we would never acquire the considerable levels of free energy that life requires.
This thought experiment is a variant of the famous Boltzmann brain paradox. A Boltzmann brain is a short-lived formation of a person's entire mental state, complete with senses and memories, arising from sheer chance in an unstructured environment such as a gas cloud. The paradox is that, under a heat death prior, it would be a much bigger coincidence to find a large section of structured Universe, than to find a smaller section (e.g., Mem) encoding only your current state of consciousness. Since the latter is deemed more likely, you should not believe that your senses or memories are at all indicative of any reality outside your mind. As we've seen, not even the physics-bending God-agent can escape epistemic heat death.
There is a static variant of this problem, in which we drop the dynamical structure of p ∈ SM π (S) and simply ask: is it possible to extrapolate knowledge from part of an object (e.g., Mem), to the whole object (e.g., X )? For suitable choices of "object", this is addressed in philosophy as the problem of induction, and in statistical learning theory by No Free Lunch theorems. Unfortunately, without some prior bias, the answer appears to be negative [57].

Universal Induction
If the preceding conclusions seem counterintuitive, it's because everyday inductive reasoning is not based on zero negentropy priors. Instead, our priors contain biases, learned from experiences collected throughout our lives. Unfortunately, this merely regresses the problem to another instance of itself: the lifelong learning of good priors is itself an inductive procedure, subject to the same No Free Lunch theorem, requiring that we carry a biased prior from birth. At the next level of regress, we turn to Darwinian evolution, which is yet another inductive procedure, again subject to the No Free Lunch theorem! Which prior does evolution use?
To illustrate, consider a Darwinian contest among abstract creatures tasked with predicting an unknown function f : N → Z m . On day n, the creatures are asked to produce guesses of f (1), f (2), . . . , f (n). The creatures who correctly guess all n values survive, and repopulate for the next day. As a conceptual aid, we can identify each creature with the guessesf : N → Z m that it would produce. Note that any given creature's guesses are deterministic.
Suppose the creatures randomly mutate in such a way that, without selective pressure, the values (f (n)) n∈N would be i.i.d. and uniform on Z m . Now, the filter of natural selection amounts to conditioning the population distribution on the constraintsf (i) = f (i), for all i ≤ n. The surviving agents would satisfy all n constraints, but be uniformly distributed on all arguments larger than n. Even if f has some convenient structure, such as periodicity, it appears that natural selection fails to promote generalization.
Why is this failure not reflected in the real world? According to Johnston et al. [58], mutations actually produce highly non-uniformly distributed phenotypes (e.g., functionsf ). This is because mutations do not act directly on the phenotypef , but on encodings known as genotypes, which are algorithmically mapped into phenotypes. Iff is simple, meaning it corresponds to a short genotype, then it's much easier for random mutations to chance upon it.
Thus, evolution is biased toward simplicity 13 . How can we know if this is a good bias? Obviously, we get a Free Lunch if the truth happens to agree with our bias; however, mismatched biases would just as easily blind us to truths. The situation appears no better than guessing! Fortunately, the simplicity bias, also known as Occam's razor, has an exceptionally strong theoretical justification. If we accept the Church-Turing thesis, then any practical inference procedure must be computable. An environment that defeats all computable inference procedures (e.g., a typical sample from a heat death distribution), is one in which inference is impossible. In all other environments, one can only hope to do as well as the computable procedure that's best suited for that environment. The most celebrated discovery of Solomonoff [27] is that all computable probability distributions are dominated, up to constant factors, by a universal prior.
Without going into formal definitions, we give a generative description of Solomonoff's universal prior. First, a random computer program (or genotype) is generated by uniformly sampling an infinite sequence of 0s and 1s. The program is mapped through a universal computer (or genotypephenotype map), to get a non-uniformly distributed output (or phenotype). Despite its infinite length, the program can contain instructions to stop reading after a finite prefix; thus, a finite program p is read with probability 2 −|p| , giving more weight to shorter programs. Just as in our discussion of the algorithmic entropy in Section I A, the constant factor hidden in the choice of universal computer can be bounded by restricting to computers with small physical implementations.
Solomonoff induction can be applied to any partially observed dataset, essentially treating it as the output of a uniformly random computer program. The dataset should include any prior information that we want to take into account. Performing Bayesian updates on the observed part yields posterior inferences on the unobserved part. Despite its Bayesian character, Rathmanner and Hutter [28,29] survey some frequentist guarantees of Solomonoff induction. Moreover, they explain how the universal prior can serve as an interpretation of probability.
The universal prior's major drawback is that it can only be computed in the limit of infinite computation time; as such, it is not a practical inference procedure. Instead, it provides a mathematically well-defined ideal against which all inference procedures may be compared. Its role for induction is analogous to that of a brute force search algorithm that plays perfect chess.
After replacing the uniform prior on C t with the universal prior, Boltzmann brains cease to pose a problem. This is because simpler extrapolations, in which the external Universe C t,X \Mem is consistent with our senses C t,Mem , are weighted higher. Despite the concerns expressed by Carroll [60], it's even possible to handle theories of physics that predict many more Boltzmann brains than real brains, because the universal prior does not weigh the brains equally. We leave a detailed estimation of the relevant posteriors to future work.
Note that Solomonoff's posterior amounts to a weighted sum over all theories consistent with observation. Individual probabilistic theories, such as our SPCAs, Albert's Mentaculus, and even quantum theories, can be understood in terms of the two-part codes from Section I A. The code's first part is a theory, detailing a "typical set" of possible outcomes, often (though not always) arising from a well-behaved probability measure. The second part is an index into this set, specifying one of its elements 14 . Practical considerations demand that the theory's description be much shorter than the index.
In the case of quantum theories, the index would use Born's rule to optimally encode measurements. An SPCA's snapshot C t ∈ S X also has a canonical two-part code. The theory part consists of (X , T , S, µ, p, t), which together determine the probability distribution P Ct . The index part encodes the snapshot C t in a manner optimized for this distribution. If the resulting code is approximately incompressible, its weight in Solomonoff's posterior can be shown to be substantial; hence, the theory is considered a good explanation of the observed data. In practice, compressibility is checked using statistical tests [6, §2.4]. For more on two-part codes, see Wallace [31].

D. Compressibility as a Resource
The universal prior has fractal-like non-uniformities, precluding the existence of a typical set in the sense of Section I A. Its Shannon entropy is infinite [6,Exer 4.3.5] and, even for posteriors where it's finite, the Shannon entropy need not be physically meaningful. For example, suppose we have an electric vehicle battery that is either full or empty, and the evidence puts equal odds on the two possibilities. This is modeled by a composite statistical ensemble: an equal mixture of a low-entropy and a high-entropy ensemble. Its Shannon entropy is roughly the average of the two, equivalent to a half-full battery. However, it's common sense that the mystery battery is not operationally equivalent to a half-full battery.
The algorithmic entropy, on the other hand, assigns the battery either a low entropy or a high one, depending on its particular state. Moreover, by definition, the universal prior concentrates on states with low algorithmic entropy. The definitions also imply the following link to data compression: if a string s is losslessly compressed to a small size by a small algorithm, then its algorithmic entropy K(s) is small. The connection between Shannon entropy and algorithmic entropy, from Section I A, suggests a dual connection between Shannon negentropy and the algorithmic compressibility |s| − K(s). By analogy, one might expect compressible strings to be exploitable as a resource.
We demonstrate that this is indeed the case. As a result, compressibility is an objective thermodynamic resource that does not depend on a choice of probability distribution (as in Shannon's entropy) or coarse partition (as in Boltzmann's entropy). Compressibility depends on a choice of universal Turing machine but, as explained in Section I A, the laws of physics narrow the options to within a margin that's negligible on macroscopic scales.
We return to the SPCA-inspired digital Universe of Section VI B, consisting of a grid of binary data on which we are allowed to apply arbitrary bijections. Let {0, 1} * denote the set of finite-length binary strings. Lossless compression algorithms can be used to fill a bank of zeros, which serve as an "information battery". To see how, start with a computable injective function f : {0, 1} * → {0, 1} * , with finite worst-case blowup Fix the battery capacity C ≫ c. Assuming |x| ≤ C, a fixed-length binary encoding of |x| takes 1 + ⌊log C⌋ bits. Therefore, for all such x, the concatenation e(x) := (|x|, x, 0 C−|x| ) takes exactly 1 + ⌊log C⌋ + C bits. By the injectivity of f , there exists a bijection g : {0, 1} 1+⌊log C⌋+C → {0, 1} 1+⌊log C⌋+C such that, for all x satisfying |x| ≤ C − c, g(e(x)) := e(f (x)).
In words, g applies the compression algorithm f to the battery, changing its state from e(x) to e(f (x)). Since C is fixed, the prefix |x| indicates the battery's charge level C −|x|, i.e., the number of known zeros in the suffix of e(x). Even if there are additional zeros at the end of x, these cannot be used, because the battery's usage is controlled on its charge indicator. Moreover, since g has undefined behavior when |x| > C − c, the battery should be considered dead if the charge ever falls below c. Let's see how an agent can recharge and consume this battery.
Suppose the current battery state is e(y). To recharge, the agent "hunts" its environment for a source of candidate strings to compress. After finding a fresh string x with |x| ≤ |y|, the agent "eats" it by reversibly swapping x with a substring of y in the battery. Then, the agent "digests" the string by applying g. In the case where |x| = |y|, the resulting state transformation is summarized as follows: The (hopefully compressed) output f (x) is treated as waste, to be swapped out in the next application of this procedure. If f successfully compresses x, the battery's charge increases; in the worst case, it decreases by up to c. Hence, the agent's performance depends on how well f compresses the strings that it finds. The algorithmic entropy corresponds to ideal compression, in the sense that K(x) < |f (x)| + O(1) 15 .
The battery's charge can be consumed to perform various manipulations. For example, to clear a variable in some memory, we simply swap it with a prefix of the battery's bank of zeros, simultaneously incrementing the indicator |x| by the length of the swapped strings. To reproduce, the agent first clears a section of its environment in this way. Then, it reversibly XOR-assigns a copy of itself onto this section. More generally, the battery can be used to emulate non-injective (i.e., many-to-one) computations as bijections. This is necessary for error correction, e.g., to repair physical damage to the agent, as multiple possibly-"bad" states must be mapped to a smaller set of "good" states. As we saw in Section VI B, an information battery is also helpful for sensing and irreversible computing.
We close with a general comment on the thermodynamics of life. Since the ability to sense, repair, and reproduce is so closely tied to negentropy (i.e., compressibility), life has a natural drive to collect as much negentropy as possible. Ideally, negentropy would be reversibly collected from the environment. However, from a living agent's perspective, the environment's negentropy is an economic externality for which the agent does not suffer fully. When presented with an opportunity to take negentropy, even at the cost of destroying negentropy elsewhere, the agent is driven to take advantage of it; and the higher the potential for gain, the higher the tolerance for waste. Thus, it's quite natural for life to produce a lot of entropy, not out of an explicit drive to do so, but as a result of inefficient efforts to acquire more negentropy for itself.
Advanced life can cooperate to internalize, or otherwise control, some of these externalities. To cite a famous example, multi-cellular organisms have evolved mechanisms to resist the evolution of cancer cells, whose short-term success would ultimately destroy the organism [61]. As a larger-scale example, human societies negotiate systems of law and ethics.

E. The Paradoxes of Time
Arguably, the air of mystery surrounding the arrow of time is owed to the abundance of emergent phenomena that appear to conflict with the underlying physics. While these paradoxes present no formal contradiction, they nonetheless demonstrate cases where our intuitive conclusions go astray, implying gaps in our understanding. Without making any claims to rigor, we now make an effort to mend these gaps by examining five such paradoxes.
1. Boltzmann brains: in the vast majority of Universe configurations consistent with our current thoughts and senses, we are nothing more than ephemeral thermal fluctuations.
2. Loschmidt's paradox: the laws of physics have CPT symmetry, and yet we experience asymmetries with respect to time reversal, most notably the second law of thermodynamics.
3. Information acquisition: the negentropy decreases with time, and yet we seem to learn more as time passes; typically, we only know about an event or discovery after it occurs.
4. Darwinian evolution: life seems to prefer order, collecting negentropy for itself, and yet proceeds in the temporal direction that favors decreasing negentropy.

5.
Dualism / free will: we feel free to make the choices we desire, despite being subject to laws of physics that are either deterministic or probabilistically determined.
Earlier in this article, we resolved the first two paradoxes. The Boltzmann brain paradox's resolution in Section VI C justifies the use of probabilities in a Past Hypothesis. A suitable Past Hypothesis then breaks the symmetry between past and future, resolving Loschmidt's paradox. By building on this idea, SPCAs model the emergent thermodynamic and causal asymmetries associated with time, as summarized at the end of Section V. Now, we turn to the information acquisition paradox. To be concrete, "information" in this context refers to either of two distinct concepts: (1) knowledge about a distant event in the past or present, as quantified by the mutual information; and (2) abstract knowledge obtained by a difficult computation, as quantified by Bennett's logical depth. It's no coincidence that these concepts correspond precisely to two of the three mechanisms for "hiding" entropy (and negentropy), listed at the end of Section I A. They represent a form of negentropy that's almost lost, in a sense.
For example, consider the acquisition of mutual information. Sensational news spreads like wildfire, its content being copied onto numerous listeners' memories, perhaps by XOR-assigning onto blank sections. The negentropy of a blank section provides the raw resource needed to collect memories. Although the copying is theoretically reversible, to uncopy requires careful coordination with the memory's original source. In practice, such opportunities are scarce (cf. the sensing example at the end of Section VI B), leaving dissipation as the primary means of clearing a memory for future use.
The same is true for logical depth: while reversible computing methods can in principle "uncompute" a deep string, to do so requires careful coordination as well as a repeated computation. In most settings, the only practical option is to dissipate.
Note that all we've done here is explain why information acquisition requires (and typically consumes) negentropy, assuming it operates along the arrow of time. The latter assumption was implicit in the need to use the macroscopically reversible XOR-assignment operation (e.g., using Theorem 2). The fact that information acquisition does indeed follow the arrow of time was previously addressed in Section I D 1 for the mutual information, and in Section II B for the logical depth.
The latter argument about logical depth also helps explain the paradox of Darwinian evolution. Modern genomes are logically deep, as a result of billions of years optimizing for survival. Assuming the Universe has shallow initial conditions and Markovian dynamics, Bennett's slow growth law [44] therefore implies that life must have had a long history.
In addition, evolution's two primary mechanisms seem to depend on the dynamics being Markovian and spacetime-homogeneous: (1) genetic mutations must be sampled according to a fairly consistent distribution, and (2) natural selection must progress toward fairly consistent objectives. As a thought experiment, consider the trajectory of the world's first microorganism, during the time interval [0, 100]. Let A t be the event that the organism is alive at time t. Then, the probability of survival over the whole interval is Technically, it's equally valid to decompose this expression in terms of backward probabilities P(A t−1 | A t ); however, the latter are inhomogeneous and may conspire in strange ways. The forward probabilities P(A t+1 | A t ), being derived from homogeneous dynamics, are much easier to estimate. Now, suppose the organism is built to survive "forward in time". To compensate for damage incurred from noisy interactions with the environment, the organism may consume negentropy found in the environment to perform error correction. Thus, the probabilities P(A t+1 | A t ) are large, and overall the trajectory is not too much less likely than the abiogenesis event A 0 .
On the other hand, suppose the organism is built to survive "backward in time". One might imagine performing the same error connection procedure to sustain its existence, backward from t = 100 to t = 0. To estimate such a trajectory's probability, we still use Equation (38). Seen forward in time, the error correction becomes error production. That is, the agent becomes selfdestructive, while the noisy environment must conspire to undo the destruction. Naturally, P(A t+1 | A t ) becomes very low. The situation is even worse if the organism reproduces, requiring the initial event A 0 to account for the simultaneous appearance of multiple copies.
In hindsight, paradoxes 3 and 4 arise from attempts to explain all asymmetries in terms of the second law of thermodynamics. Instead, the SPCA model suggests taking the local homogeneous Markovian transitions as fundamentally responsible, for both the thermodynamic and psychological arrows of time. Framed this way, it's no longer surprising to find that the arrows align.
Finally, let's address the nature of free will. There is an ancient idea in philosophical tradition called mind-body dualism; some versions propose that minds are capable of causally influencing the future, along mechanisms independent from the rest of physics. Although this view has largely fallen out of favor, a pragmatic form of dualism persists in some of the most useful models of agent (e.g., human or robot) behavior. Why do such abstractions have explanatory power in the physical Universe?
For example, causal decision theory (CDT) [62] models the relevant set of variables on a causal graph. Vertices corresponding to unintelligent physical processes are modeled in the usual probabilistic manner, conditional on their parents. However, CDT gives special treatment to decision nodes, which are vertices whose realization is chosen by intelligent agents. While other vertices have their dynamics endogenized and made immutable, each decision node is treated as exogenous and associated with some agent. To derive the node's value, one must consider the counterfactual result of each possible value, and select one that optimizes the agent's objective.
Decision nodes appear to serve as a useful shortcut to whatever physical processes really underlie an agent's behavior. In order for them to work, it should be the case that Darwinian evolution creates agents that behave according to CDT. This seems plausible: among all possible agents, the one whose behavior follows CDT makes the optimal counterfactual come to fruition, and therefore is naturally selected for. Sufficiently intelligent life can compute CDT, mentally simulating each counterfactual to choose the preferred one. Such an agent would likely appear to us to have free will.
Two remarks are in order. Firstly, structural counterfactuals can also model settings without intelligent agents: in Section I D 2, a local model used counterfactuals to account for an exogenous influence. Secondly, our argument for CDT here is not sufficiently rigorous to verify in full generality. Future work should investigate the precise conditions under which counterfactuals and free will, as modeled by CDT, arise as emergent features of an SPCA-like Universe.
Indeed, there may exist important counterexamples. Yudkowsky and Soares [63] consider a class of Newcomb-like problems, in which causal decision theorists tend to underperform. In these multiagent scenarios, each agent's decision depends on its prediction of other agents' decisions. The authors provide some plausible human examples, but their concerns are sharpened in the context of advanced artificial intelligence.
For example, suppose we design a highly intelligent robot. Before letting it roam the world freely, we decide to test its trustworthiness inside a simulation. The robot, having deduced this, must at all times consider the possibility that it might currently be in a simulation. In order to survive, its behavior should appear favorable to the simulation's human operator. Arguably, the simplest way for a causal model to account for such an influence is with an edge directed backward in time: even after the robot is free, its decisions can affect whether the robot attains freedom! By developing similar thought experiments in more detail, Yudkowsky and Soares find CDT to be inconsistent in the following sense: given the ability to do so, a causal decision theorist would prefer to rewire its own brain so as to cease to follow CDT. The authors' proposed alternative, functional decision theory (FDT), is still based on Pearlean causal graphs, but its edges need not always align with the physical arrow of time.
If this seems absurd, one should bear in mind that neither CDT nor FDT are written into the known laws of physics. CDT already depends on counterfactuals which, if taken literally, constitute violations of physics. In our view, decision theories should primarily be judged on their ability to parsimoniously predict the behavior of Darwinian evolution's winners. On the road toward a formal justification of any decision theory, we propose that SPCAs, as well as the thought experiments of Yudkowsky and Soares, can serve as helpful conceptual tools.

VII. CONCLUSIONS
In order to model the emergence of irreversibility, we introduce the stochastic partitioned cellular automaton (SPCA). Its microscopic description shares many properties with classical dynamical systems: it is deterministic, chaotic, reversible, and measure-preserving. Its trajectory is determined by a choice of initial condition (i.e., Past Hypothesis); this is where the symmetry is broken.
As a result, we find a macroscopic view that is local, homogeneous in space and time, and Markovian, but only when its dynamics are described along an arrow of time that is directed away from the initial condition. The conditions of being local and Markovian are precisely summarized by Pearl's d-separation criterion, relative to a causal graph whose edges are timelike and futuredirected. Thus, an SPCA is a Pearlean causal model with a certain homogeneous structure.
The microscopic and macroscopic views inherit features from one another. For example, if the microscopic dynamics preserve the measure π×Γ, then π is stationary for the macroscopic dynamics. In addition, we can take advantage of the microscopic description's reversibility to extrapolate an SPCA to negative times; a duality relation holds between the macroscopic transition probabilities at positive and negative times.
Within the setting of SPCAs, we study the dynamical evolution of entropy, negentropy, and mutual information. Our findings are summarized by the Resource and Memory Laws, which generalize the second law of thermodynamics. In particular, the Memory Law plays a role in explaining records of past events, as well as in extending Landauer's principle.
As a mathematical convenience, we rely heavily on the Shannon theory of information. On the other hand, we find that entropy is more generally and concretely understood in algorithmic terms. Just as the opposite of entropy is negentropy, the opposite of algorithmic entropy is algorithmic compressibility. Thus, underlying all physical notions of free energy, we propose that the fundamental information-theoretic resource is compressibility. To support this hypothesis, we describe a rudimentary agent powered by algorithmic string compression.
The empirical side of SPCAs remains unexplored. In future work, one might design SPCAs with convenient properties, such as computational universality or a sparse causal structure. By simulating these, one might demonstrate aspects of irreversible phenomena, such as memory acquisition or Darwinian evolution. Conjectures derived from simulations may later be tested in the real world or proved in general.
We hope that such investigations will yield further insight on a variety of topics, potentially ranging from transistor design to the philosophy of mind. To give one specific possibility, consider a binary counter programmed to reversibly increment at fixed time intervals. If initialized to zero, it provides an accurate measurement of elapsed time, consuming no more negentropy than is needed to store a binary representation of the number of ticks. If such a counter can be implemented in the real world, it would represent a drastic efficiency gain over the thermodynamic clocks of Pearson et al. [64]. On the other hand, if such a counter turns out to be infeasible, understanding the limitation can lead to better models.
There are many interesting differences between SPCAs and modern field theories, and it remains an open question to what extent they affect the conclusions of this article. Differences worth examining include conservation laws, continuous spacetimes, quantum information, and more general forms of microscopic dynamics. Perhaps analogous laws will be discovered in each of these settings, but with additional nuances.
Finally, our conceptual tools have the potential to impact other fields. Part of the SPCA's modeling power comes from its ability to endogenize information-processing agents, such as human experimenters. We've only briefly outlined the implications of this approach. In future work, endogenous agents can be modeled in full detail; this may lead to additional insights on all the topics we touched, from reversible computing to decision theory.

ACKNOWLEDGMENTS
I am grateful to everyone with whom I've had the chance to talk. Deep inquiries from Jason Li helped to refine some key arguments. Xianda Sun's review of the manuscript pointed out many passages in need of clarification. Thanks also to Danica Sutherland, David Wakeham, Paul Liu, and William Evans for related conversations and advice.
If p ∈ SM π (S), with π strictly positive and finite-sided, then T can be chosen to be bijective and (π × Γ)-measure-preserving.
The argument is more straightforward when π = ♯. By Theorem 2, the dynamics p ∈ SM ♯ (S) = DM(S) can be represented by a sequence of i.i.d. random bijections (F 0 , F 1 , . . .), with F t being applied at time step t. By absorbing this sequence into the initial state C 0 , the dynamics can be made deterministic. To be specific, the dynamics interleave two steps: (1) the bijection (c, f ) → (f (c), f ), applied to the pair consisting of the macrostate and first bijection; and (2) the shift map, applied to the sequence of bijections to move its next element into place.
More generally, we are interested in p ∈ SM π (S) with π ∈ ( 1 m N) S . In order to obtain random bijections using Theorem 2, we need a related Markov chain that is doubly stochastic. Its construction is fairly intuitive: we think of the positive integer m · π(s) as the "size" of each state s ∈ S. We split s into unit-sized pieces, such that any time spent in s would instead be uniformly distributed among its pieces. The result is our desired dynamics p dup ∈ DM(S dup ), on a new state space S dup , consisting of m · π(s) duplicates of each s ∈ S.
We must verify that T is (2 S × G)-measurable, where the implied σ-algebra G ⊂ 2 S S is generated by cylinder sets of the form B = {f ∈ S S : f (s 1 ) = s ′ 1 , . . . , f (s n ) = s ′ n } ∈ G, with n ∈ N and s i , s ′ i ∈ S. The product σ-algebra 2 S ×G is generated by sets of the form {s ′ 0 }×B. Measurability now follows by observing that the preimage is itself a countable union of cylinder sets, hence is in 2 S × G. By Theorem 2, there exists Γ ∈ M 1 (S S ) such that Φ matrix (·, p) = Φ random (·, Γ). Now, (S S , G, Γ, T ) ∈ Dyn(S) and, since A(s, s ′ ) = {f ∈ S S : ∃f ′ ∈ S S , T (s, f ) = (s ′ , f ′ )} = {f ∈ S S : f (s) = s ′ }, we have Γ(A(s, s i )) = p(s, s i ). This equality implies, by the same argument used in the forward implication, that Φ matrix (·, p) = Φ determ (·, S S , G, Γ, T ).
In the case where p is m-sided, the Γ that we obtained using Theorem 2 can be taken to be msided. That is, Γ is the uniform distribution over some multiset {f 0 , f 1 , . . . , f m−1 }, which becomes the fair m-sided die after encoding each function f i by its index i. In terms of this encoding, the map T : S × Z m → S × Z m becomes T (s, i) := (f i (s), i).
If we also have p ∈ DM(S), Theorem 2 allows choosing the functions f i to be bijections, making T bijective as well.
As usual, this amounts to verifying the state transition probabilities. For the transition matrix presentation, they are given simply by p(s, s ′ ). For the deterministic function presentation, a metaphorical die (r, f ) ∈ [0, 1) × Bij(S dup ) is sampled from λ × Γ, and plugged into T . Then, the state s transitions to s ′ iff T (s, r, f ) = (s ′ , r ′ , f ) for some r ′ . The probability of this event is · mπ(s) · mπ(s ′ ) · p(s, s ′ ) mπ(s ′ ) = p(s, s ′ ).

Appendix B: Breaking the Symmetry Between Space and Time
An SPCA's deterministic presentation provides microscopic dynamics that are symmetric between past and future, but asymmetric between space and time. Throughout this article, we've taken it for granted that influences travel along the timelike edges of G(X , T ), and sought only to orient these edges forward or backward by imposing an appropriate Past Hypothesis. There was never any question of a "sideways" arrow of time because, by design, influences were not allowed to travel along spacelike paths.
On the other hand, in the theory of general relativity, Einstein's field equations treat spacetime as a four-dimensional Lorentzian manifold. While the roles of space and time are not completely symmetric in this theory, the distinction between the two is more subtle. It's natural to wonder why causality, in the Pearlean sense, is timelike.
In this appendix, we propose that the initial condition serves to break the symmetry, not only between past and future, but also between space and time. To demonstrate this, we construct a new symbolic dynamics which, unlike an SPCA's, treats all the axes symmetrically. The time axis is only identified by the initial condition. We will find that the resulting model is Markov, relative to a causal graph whose edges are directed along this axis.
For concreteness, fix the dimension d ∈ N of our discrete spacetime Z d . For i ∈ {1, . . . , d}, let e i ∈ Z d denote the i'th basis vector, i.e., (e i ) j := δ ij . Let 0 denote the zero vector. Let consist of all unit-length vectors in Z d , and N := N 1 ∪ {0}. Given a set S, an S-relation is any subset P ⊂ S N . We say P is deterministic if, for all n ∈ N 1 and g : N \ {n} → S, the following equivalent conditions hold: • There exists a unique f ∈ P whose restriction to N \ {n} equals g.
• There exists a unique s ∈ S such that the function f := g n←s is in P .
For example, is a deterministic Z m -relation, because each f ∈ P mod m is uniquely determined by specifying f at all but one point of its domain N . We denote the set of all deterministic S-relations by Rel(S) ⊂ 2 S N . As the name suggests, a deterministic relation can take the role of a system's dynamics, to evolve it uniquely from some initial condition.
Our system is a kind of second-order cellular automaton. Begin by fixing a time axis i ∈ {1, . . . , d}; in other words, for arbitrary spacetime coordinates x ∈ Z d , x i takes the role of time. We set initial conditions that specify the state at not just one, but two adjacent times, say x i = 0 and x i = 1. That is, an initial state is specified at each point of the initial set Given an initial condition U : I → S and a deterministic relation P ∈ Rel(S), there exists a unique configuration C : Z d → S satisfying (n → C x+n ) ∈ P ∀x ∈ Z d .
To see this, note that Equation (B3) determines the state at times 0 and 1. Since P is deterministic, Equation (B4) uniquely determines C x+ei as a function of the state at all other neighbors of x. Therefore, given the states at times t − 1 and t, applying Equation (B4) at all x ∈ Z d with x i = t uniquely determines the states at time t + 1. By induction on t, we conclude that for all x ∈ Z d with x i ≥ 1, C x is determined and Equation (B4) is satisfied. The case x i ≤ 0 is symmetric, since C x−ei is also uniquely determined as a function of all the other neighbors.
At this point, we make two remarks. Firstly, the only place where i entered Equations (B3) and (B4) was in the definition of the initial set I. Thus, it is the initial condition, not the dynamics, that gave time its distinguished role. Secondly, we can allow U to be randomly distributed. For every realization of U , Equations (B3) and (B4) uniquely determine a realization of C; thus, the random variable C is uniquely determined.
Mirroring our work on SPCAs, let's now enhance the state with microscopic variables R: at every spacetime coordinate x ∈ Z d , let the complete state at x be given by (C x , R x ) ∈ S × (Z m ) Z d . The initial microscopic variables R I = (R x,y ) (x,y)∈I×Z d are uniform and i.i.d., while the macroscopic variables C I are drawn from an arbitrary distribution µ. as follows. Consider any initial condition µ ∈ M 1 (S I ) and macroscopic dynamics T ∈ Rel(S × Z m ). Let the random variables (C, R) = (C x , R x ) x∈Z d be distributed such that (n → R x+n, y−n ) ∈ P mod m ∀x, y ∈ Z d , y = 0, (n → (C x+n , R x+n, −n )) ∈ T ∀x ∈ Z d , with P mod m ∈ Rel(Z m ) defined by Equation (B1). Then, Φ rel-determ (µ, T ) := P C .
Equations (B6) and (B7) can be combined into a single deterministic relation constraining (n → (C x+n , R x+n )), for every x ∈ Z d . Thus, Equations (B5) to (B7) are a special case of Equations (B3) and (B4), from which it follows that the random variables (C, R) are uniquely determined.
Note that R has two Z d -valued subscripts: the first is a spacetime coordinate, while the second is a d-dimensional generalization of the SPCA shift index. P mod m takes a role analogous to the shift map, putting fresh "dice" into place as needed. Just as in Section IV C, indices closer to 0 should be considered more significant, with T acting only on the most significant indices.
Alternatively, we can do away with the shifting by substituting R ′ x, y+x := R x, y . Equations (B5) to (B7) then reduce to the equivalent form: (n → R ′ x+n, y ) ∈ P mod m ∀x, y ∈ Z d , x = y, The macroscopic component C has an arrow of time, which we will express in terms of a sparse causal graph G satisfying the following: • The vertex set is {O} ∪ Z d , where we identify O with C I , and each x ∈ Z d with C x .
• With these identifications, C is Markov relative to G.
• On each side of I, G and its conditional probabilities are homogeneous in spacetime.
By symmetry, we can focus on the side with positive times: that is, restrict the vertices and spacetime indices x ∈ Z d to x i ≥ 0, and restrict Equations (B6) and (B7) to x i ≥ 1. For t, u ∈ Z ∪ {−∞, ∞}, let I(t, u) := {x ∈ Z d : t ≤ x i ≤ u}, so that I = I(0, 1). We now prove that, for all t, u ∈ Z + with t < u, .

(B11)
In other words, the random variables R ′ x, y , with x i ∈ {t, t + 1} and y i ≥ u, are uniform on Z m , i.i.d., and jointly independent of C I(0, t) .
Independence of R ′ I(t, t+1), I(u, ∞) from C I(0, u) follows from the fact that they are functions of disjoint sets of independent variables: specifically, the former is a function of R ′ I, I(u, ∞) , whereas the latter is a function of (C I , R ′ I, I(0, u−1) ). It only remains to show that .
Solving for the new term at time coordinate t + 1, Since every term in the sum has time coordinate (x + n) i = x i + n i = x i = t, these terms are included in R ′ I(t,t)×I(u,∞) . Conditioning on the latter, the new term R ′ x+ei, y at time t + 1 is a bijective function of the corresponding term R ′ x−ei, y at time t − 1. By the inductive hypothesis, all the terms at time t − 1 are uniform, i.i.d., and independent of the terms at time t; hence, the same is true of all the terms at time t + 1. Therefore, Equation (B12) holds for t. This completes the induction, and the proof of Equation (B11).
To see why this matters, recall that Equation (B10) lets us uniquely compute the macrostate C x+ei as a function of (C x+n , R ′ x+n, x ) n∈N \{ei} , one time step at a time. At time step t, the microscopic variables in question have subscripts {(x + n, x) : x ∈ I(t, t), n ∈ N \ {e i }} ⊂ I(t − 1, t) × I(t, t).
By Equation (B11), these variables are uniform on Z m , i.i.d., and independent of all prior macrostates. Therefore, C x+ei has homogeneous transition probabilities in terms of its Markovian parents (C x+n ) n∈N \{ei} . Explicitly, the required causal graph G has the initial edges {(O, x) : x ∈ I(0, 1)}, along with the additional edges {(x + n, x + e i ) : x ∈ I(1, ∞), n ∈ N \ {e i }}.
The edges of G characterize the arrow of time: they point away from the initial set, forward along the time axis i at positive times, and backward at negative times.