Module 01
What a law is
Flip a coin and slap it onto the back of your hand. Before you peek: is the answer already there? You know it is. The coin stopped moving the instant your palm came down, and peeking changes nothing.
Now take a die and invent a rule for it. The rule: whatever face is up, turn the die until the one is up. Run it. The one is up. Run it again. Still the one. A friend walks in and asks what face you started with. You have no idea. The rule never failed; it ran exactly as written. It also burned every trace of where the die had been.
One question circles this whole volume: if the universe runs on rules, are they coin rules or die rules?
The takeaway
A physical law is a rule that computes the next moment from this one. The laws of mechanics will turn out to be coin rules: nothing they do erases where the world has been.
A universe of six lamps
Strip the word law down to its working parts and two ideas are left. The first is the state: everything you would need to write down about a system, right now, for its future to be someone else's problem. The second is the rule: the machine that eats the state of this moment and produces the state of the next.
Build the smallest universe worth arguing about: a row of six lamps, each on or off. One pattern of lamps is one state, and there are 64 patterns in all. Now give this universe a law. Rule R says: move every lamp's setting one position to the left, and the setting that falls off the end wraps around to the last lamp, flipped. Strange, but lawful. Every pattern leads to exactly one next pattern, and, if you think it through backward, exactly one pattern could have come before. Rule R is the coin.
Rule Z says: switch everything off. It is every bit as deterministic as Rule R. Run it and you know precisely what happens next, every time. But run it once and ask where the universe was a moment ago, and 64 different yesterdays all answer at once. Rule Z is the die.
The lamp universe is an analogy, and here is where it breaks: six lamps have 64 states you can list on a page, while a marble rolling across a table needs numbers that vary smoothly, position and speed among them, and there are infinitely many of those. The listing trick dies; the arrow-counting idea survives. Hold on to the idea, not the lamps.
One quiet subtlety hides in the word state, and it will matter for the rest of the volume. The state has to be complete: it must carry everything the rule needs, with no help from memory. Watch a ball at one instant, three meters up. Is it rising or falling? You cannot tell, and neither can the rule, because height alone is not the full state of a thrown ball. Two futures pass through that same height. Classical mechanics will end up settling this by carrying two kinds of numbers at once, where things are and how fast they move, and the payoff for that choice arrives in module 04. For the lamps, the pattern alone is the whole story. That is what made them a good starting universe.
Run the ring diagram backward in your head and nothing goes wrong: follow each arrow against its direction and every state still has exactly one place to come from. A reversible universe watched in reverse is a lawful universe. Keep that thought; it returns in module 11 wearing better clothes.
In 1814, Pierre-Simon Laplace imagined an intellect that knew the exact state of everything in the universe, and knew the rule. Given those, he argued, it could compute the entire future and the entire past: nothing uncertain, nothing hidden. This volume keeps that intellect around as a working tool and calls it the demon. Every module will end by asking how the demon is doing. Fair warning: its fate hangs on the difference between Rule R and Rule Z.
The math
Write the state as . Write the set of all possible states as . A law is a function from to .
Read it as a machine. Feed in the state now. Get out the state one tick later.
The law is deterministic when is a function: one input, one output. Both lamp rules pass this test.
The law is reversible when a second function undoes it:
Rule R is reversible. Shift every setting one position to the right, unflip the wrapped lamp, and you are back where you started.
Rule Z is not. Every state maps to lamps-all-off. The states 2 and 5 give . No function can send one output back to two different inputs.
For a finite state space there is a counting test. A reversible rule pairs the states off, one to one. Arrows in equal arrows out at every state. The moment two arrows land on one state, reversibility is dead.
Play with it
The six-lamp universe, live. Step it forward under either rule. Then try to step it backward and watch the counter that matters: how many yesterdays are consistent with what you see.
Check yourself
Problem 1. A rule replaces a number with its square. Is the rule deterministic? Is it reversible?
Reveal the solution
Deterministic: yes. Each number has exactly one square.
Reversible: no. Start from 3 or from -3 and the rule lands on 9 either way. Two arrows share a target, so no inverse exists.
Problem 2. A rule replaces a number with that number plus 3. Same two questions.
Reveal the solution
Deterministic: yes. Reversible: yes. Subtract 3 and you are back. Every output comes from exactly one input.
Problem 3. A rule acts on pairs: (a, b) becomes (b, a + b). Same two questions.
Reveal the solution
Deterministic: yes. Reversible: yes. If the rule produced (p, q), the pair before it was (q - p, p). The first slot of the output hands you the old second slot, and the difference recovers the old first slot.
What this did to the demon
The demon is born, and it looks unbeatable: give it the state and the rule, and history in both directions is a calculation. But before it can compute anything it has to write the state down, and module 02 opens with two people who write down the same arrow and refuse to agree.
Coordinates and vectors