### Engineering as the theory of airlocks

In this post, I will describe four different objects or systems, from seemingly unrelated concrete situations. They achieve purposes that are in some sense analogous, and they act by mechanisms that are in some sense analogous. You are recommended to figure out, by yourself, before I explain, what this "sense" is, what the precise connection between these concrete notions are, what the purpose of this article is, and why I am asking you to figure all this out for yourself (and recursion thereof).

The vacuum's bodyguard

We wish to maintain a vacuum uninterrupted in a room. However, we also wish to allow people to enter this room, and worry that when we open the door for people to enter, air will rush in along with them.

It is clear that if we open the door, anything outside will enter. So we need to make sure there is no air directly outside the door. So we install a small chamber (with its own door) right outside this door, so that both doors are never simultaneously open, and the chamber has a mechanism to pump out any air in it.

The security guard

Perhaps the title of the previous example was already too revealing. But yes, we do have a trivial analogy to a security guard who filters out uninvited visitors, or to a biological containment room, or a shoe stand outside a temple.

The AI box

You have created a General AI, and decided to put it in a box, a Faraday cage to prevent it from talking to anyone.

(You have also put Eliezer Yudkowsky in a box, to drown out the horrified yelling.)

But you want to be able to talk with the AI, but worry that in opening the door to the box, you will give the AI a brief period of time to communicate with the outside world.

So you come up with the idea of putting the box in another box, so that both boxes are never open at the same time. You enter the outside box, close it, then open the inside box and talk to the AI.

Please allow passengers to alight before boarding.

You see an elevator (or a train), and observe that alighting an boarding passengers keep crashing into each other instead of letting one happen before the other.

You're a busybody, but a creative one, so instead of taking pictures of it and expressing outrage on Facebook, you decide to come up with a solution.

It seems like a difficult problem at first -- a door is fundamentally symmetric, it doesn't care about what direction you're moving in.

But well, a door is fundamentally symmetric, but that doesn't mean systems of doors have to be.

You create intermediary entry and exit chambers as above (you really only need an exit chamber, I just like the symmetrical-looking drawing), and operate the doors in the sequence as labeled above: (initially all closed) open 1, close 1, open 2, close 2, open 3, close 3.

Variable swaps

You're writing some code, and want to interchange the values of two variables x and y, for some reason. Unfortunately, writing x=y; y=x will just set both of them to the original value of y, because the first assignment eliminated the original value of x.

So you create a third variable z, and write z=x; x=y; y=z (or alternatively if you want something that looks symmetric, use a "quad swap": x1=x; y1=y; x=y1; y=x1).

(Similarly, exchanging the positions of two physical objects.)

The wolf, the goat and the cabbage

This is a classic, of course. A farmer must carry a wolf, goat and cabbage across a river. The boat holds only one of these items at a time, and neither the wolf and goat, or goat and cabbage, can be left unattended together at once.

(Why does a farmer need a wolf? To attack his competition's goats and establish a monopoly, of course. But that's not important to us.)

The solution, you may recall, is to first take the goat across, then come back and take the wolf across, bring back the goat and take the cabbage across, then come back for the goat.

Sanitation protocols

You have two pieces of dirty cutlery to clean: a bowl and a spoon. You can only hold/wash one item at a time, and the spoon must be kept in a bowl if it is not being held. Solution: you introduce a new piece of cutlery, a clean bowl, to store the spoon after it's washed, as the dirty bowl is being washed.

(The original example involved washing a car and a carpark, but there are too many additional complications there like how you move a dirty car from one place to another. Nonetheless, you are welcome to spend a few seconds thinking about this alternative example, and exactly how you would "abstract away" the irrelevant complications.)

You're eating food from a large container with a spoon, but do not wish to contaminate it as you re-insert the spoon. Solution: You transfer the quantity you wish to eat to another container and eat from that.

You're showering in a public toilet, and you must wear clothes while going into and out of the toilet -- but that will reintroduce germs to your person. Solution: You bring a change of clothes.

You must touch the tap again after you wash your hands to shut it off, thus reintroducing germs to your hands. Solution: You observe the following protocol -- switch on the tap, clean your hands, clean the tap, clean your hands again, switch off the tap.

Scaffolding in Photoshop

You're editing an image. You want to edit something-something using something-something-else but then the two things will mix, or something like that. So Photoshop allows you to make multiple layers which you can view in overlay, then delete the ones you used as scaffolding.

Do you see the connection?

In all these examples, we needed to enforce a specific desired mechanism of transport or action, across a door that was fundamentally symmetric. And the solution involved creating a temporary chamber to do some sorting.

In the first few examples, this was obvious, but notions of "transport", "doors" and "chambers" became increasingly more abstract. In the last example, the "temporary chamber" was the first time you washed your hands.

These are all applications of the same principle, the principle of the airlock.

You see the same principle appear, for instance with semiconductor technology and logic gates, public key encryption, and escrows (aka "How do I know you won't run off with the money and that you know I won't run off with the money?").

In a sense, the airlock is the fundamental unit of the modern world -- in the sense that engineering is the theory of airlocks. The principle of the airlock underlies any task of imposing a specific order on something disorderly or chaotic, to exercise control for a specific purpose, over the natural, unaligned, nihilistic behaviour of nature.

Suppose someone asked you the question "Does an airlock really exist? Or is it just an intellectual tool?" Surely each specific concrete manifestation of the airlock -- the security guard, or the change of clothes -- exists. But the abstraction?

But no one would actually ask that. It is a meaningless question -- it is something in the grammatical form of a question, but the possible answers "yes, the airlock really exists" and "no, the airlock doesn't really exist" don't mean anything, if you don't precisely specify the meaning of "exist".

Except when it isn't an airlock, but instead the set of imaginary numbers, people actually do ask that question.

Like the airlock is the abstraction of the idea of setting up mechanisms to impose an order to something symmetric, the imaginary number (at least multiplicatively) is the abstraction of the idea of right-angle rotations.

It is pretty common to answer "imaginary numbers exist in the same way that the number 3 exists" or "imaginary numbers exist in the same way that triangles exist". But instead, I propose we answer "imaginary numbers exist in the same way that the airlock exists".