Diamond maximizer

A difficult, far-reaching open problem in [https://arbital.com/p/2v](https://arbital.com/p/2v) is to specify an [unbounded](https://arbital.com/p/) formula for an agent that would, if run on an [unphysically large finite computer](https://arbital.com/p/), create as much diamond material as possible.  The goal of 'diamonds' was chosen to make it physically crisp as to what constitutes a 'diamond'.  Supposing a crisp goal plus hypercomputation avoids some problems in value alignment, while still invoking many others, making it an interesting intermediate problem.

### Importance

The diamond maximizer problem is to give an [unbounded](https://arbital.com/p/) description of a computer program such that, if it were instantiated on a sufficiently powerful but [physical computer](https://arbital.com/p/), the result of running the program would be the creation of an immense amount of diamond - around as much diamond as is physically possible for an agent to create.

The fact that this problem is still extremely hard shows that the value alignment problem is not just due to the [https://arbital.com/p/5l](https://arbital.com/p/5l).  As a thought experiment, it helps to distinguish value-complexity-laden difficulties from those that arise even for simple goals.

It also helps to [illustrate the difficulty of value alignment](https://arbital.com/p/) by making the more clearly visible point that we can't even figure out how to create lots of diamond using unlimited computing power, never mind creating [value](https://arbital.com/p/55) using [bounded computing power](https://arbital.com/p/).

### Problems avoided

If we can crisply define exactly what a 'diamond' is, in theory it seems like we should be able to avoid issues of [Edge Instantiation](https://arbital.com/p/2w), [Unforeseen Maximums](https://arbital.com/p/47), and trying to convey [complex values](https://arbital.com/p/5l) into the agent.

The amount of diamond is defined as the number of carbon atoms that are covalently bonded, by electrons, to exactly four other carbon atoms.  A carbon atom is any nucleus containing six protons and any number of neutrons, bound by the strong force.  The utility of a universal history is the total amount of Minkowskian interval spent by all carbon atoms being bound to exactly four other carbon atoms.  More precise definitions of 'bound', or the amount of measure in a quantum system that is being bound, are left to the reader - any crisp definition will do, so long as we are confident that it has no [unforeseen maximum](https://arbital.com/p/47) at things we don't intuitively see as diamonds.

### Problems challenged

Since this diamond maximizer would hypothetically be implemented on a very large but physical computer, it would confront [reflective stability](https://arbital.com/p/), the [anvil problem](https://arbital.com/p/), and the problems of making [subagents](https://arbital.com/p/).

To the extent the diamond maximizer might need to worry about other agents in the environment that have a good ability to model, or that it may need to cooperate with other diamond maximizers, it must resolve [Newcomblike problems](https://arbital.com/p/) using some [logical decision theory](https://arbital.com/p/).  This would also require it to confront [logical uncertainty](https://arbital.com/p/) despite possessing immense amounts of computing power.

To the extent the diamond maximizer must work well in a rich real universe that might operate according to any number of possible physical laws, it faces a problem of [naturalized induction](https://arbital.com/p/) and [ontology identification](https://arbital.com/p/5c).  See the article on [ontology identification](https://arbital.com/p/5c) for the case that even for the goal of 'make diamonds', the problem of [goal identification](https://arbital.com/p/) remains difficult.

### Unreflective diamond maximizer

As a further-simplified but still unsolved problem, an **unreflective diamond maximizer** is a diamond maximizer implemented on a [Cartesian hypercomputer](https://arbital.com/p/) in a [causal universe](https://arbital.com/p/) that does not face any [Newcomblike problems](https://arbital.com/p/).  This further avoids problems of reflectivity and logical uncertainty.  In this case, it seems plausible that the primary difficulty remaining is *just* the [ontology identification problem](https://arbital.com/p/5c).  Thus the open problem of describing an unreflective diamond maximizer is a central illustration for the difficulty of ontology identification.

Eliezer Yudkowsky
Nate Soares
Eric Bruylant


Introductory guide to logarithms

Welcome to the Arbital introduction to logarithms! In modern education, logarithms are often mentioned but rarely motivated. At best, students are told that logarithms are just a tool for inverting [exponentials](https://arbital.com/p/4ts). At worst, they're told a bunch of properties of the logarithm that they're expected to memorize, just because. The goal of this tutorial is to explore what logarithms are actually doing, and help you build an intuition for how they work.

For example, one motivation we will explore is this: Logarithms measure how long a number is when you write it down, for a generalized notion of "length" that allows fractional lengths. The number 139 is three digits long:

$$\underbrace{139}_\text{3 digits}$$

and the logarithm (base 10) of 139 is pretty close to 3. It's actually closer to 2 than it is to 3, because 139 is closer to the largest 2-digit number than it is to the largest 3-digit number. Specifically, $\log_{10}(139) \approx 2.14$. We can interpret this as saying "139 is three digits long in [https://arbital.com/p/-4sl](https://arbital.com/p/-4sl), but it's not really using its third digit to the fullest extent."

You might be thinking "Wait, what do you mean it's closer to 2 digits than it is to 3? It plainly takes three digits: '1', '3', and '9'. What does it mean to say that 139 is 'almost' a 2-digit number?"

You might also be wondering what it means to say that a number is "two and a half digits long," and you might be surprised that it is 316 (rather than 500) that is most naturally seen as 2.5 digits long. Why? What does that mean?

These questions and others will be answered throughout the tutorial, as we explore what logarithms actually do.

%box:
This path contains 9 pages:

1. [What is a logarithm?](https://arbital.com/p/40j)
2. [Log as generalized length](https://arbital.com/p/416)
3. [Exchange rates between digits](https://arbital.com/p/427)
4. [Fractional digits](https://arbital.com/p/44l)
5. [Log as the change in the cost of communicating](https://arbital.com/p/45q)
6. [The characteristic of the logarithm](https://arbital.com/p/47k)
7. [The log lattice](https://arbital.com/p/4gp)
8. [Life in logspace](https://arbital.com/p/4h0)
9. [The End ](https://arbital.com/p/4h2)
%

Alexei Andreev
Eric Rogstad
Eric Bruylant
Daniel Satanove
Nate Soares


summary(Technical): The [https://arbital.com/p/-5z9](https://arbital.com/p/-5z9) may be described as the [https://arbital.com/p/-coproduct](https://arbital.com/p/-coproduct) in the [category](https://arbital.com/p/4c7) of [sets](https://arbital.com/p/3jz). Specifically, the disjoint union of sets $A$ and $B$ is a set denoted $A \sqcup B$ together with maps $i_A : A \to A \sqcup B$ and $i_B: B \to A \sqcup B$, such that for every set $X$ and every pair of maps $f_A: A \to X$ and $f_B: B \to X$, there is a unique map $\gamma: A \sqcup B \to X$ such that $\gamma \circ i_A = f_A$ and $\gamma \circ i_B = f_B$.

Where could we start if we were looking for a nice "easy" [https://arbital.com/p/-600](https://arbital.com/p/-600) describing the [union of sets](https://arbital.com/p/5s8)?

The first thing to notice is that universal properties only identify objects up to [https://arbital.com/p/-4f4](https://arbital.com/p/-4f4), but there's a sense in which the union is *not* [https://arbital.com/p/-5ss](https://arbital.com/p/-5ss) [https://arbital.com/p/-65y](https://arbital.com/p/-65y): it is possible to find sets $A$ and $B$, and sets $A'$ and $B'$, with $A$ isomorphic to $A'$ and $B$ isomorphic to $B'$, but where $A \cup B$ is not isomorphic to $A' \cup B'$. %%note: In this case, when we're talking about [sets](https://arbital.com/p/3jz), an isomorphism is just a [bijection](https://arbital.com/p/499).%%

%%hidden(The union is not well-defined up to isomorphism in this sense):
Consider $A = \{ 1 \}$ and $B = \{ 1 \}$.
Then the union $A \cup B$ is equal to $\{1\}$.

On the other hand, consider $X = \{1\}$ and $Y = \{2\}$.
Then the union $X \cup Y = \{1,2\}$.

So by replacing $A$ with the isomorphic $X$, and $B$ with the isomorphic $Y$, we have obtained $\{1,2\}$ which is *not* isomorphic to $\{1\} = A \cup B$.
%%

So it's not obvious whether the union could even in principle be defined by a universal property.%%note: Actually [it *is* possible](https://arbital.com/p/union_universal_property).%%

But we can make our job easier by taking the next best thing: the *[disjoint union](https://arbital.com/p/5z9)* $A \sqcup B$, which is well-defined up to isomorphism in the above sense: the definition of $A \sqcup B$ is constructed so that even if $A$ and $B$ overlap, the intersection still doesn't get treated any differently.

Before reading this, you should make sure you grasp the [https://arbital.com/p/-5z9](https://arbital.com/p/-5z9) well enough to know the difference between the two sets $\{ 2, 3, 5 \} \cup \{ 2, 6, 7 \}$ and $\{ 2, 3, 5 \} \sqcup \{ 2, 6, 7 \}$.

%%hidden(Brief recap of the definition):
Given sets $A$ and $B$, we define their disjoint union to be $A \sqcup B = A' \cup B'$, where $A' = \{ (a, 1) : a \in A \}$ and $B' = \{ (b, 2) : b \in B \}$.
That is, "tag each element of $A$ with the label $1$, and tag each element of $B$ with the label $2$; then take the union of the tagged sets".
%%

The important fact about the disjoint union here is that if $A \cong A'$ and $B \cong B'$, then $A \sqcup B \cong A' \sqcup B'$.
This is the fact that makes the disjoint union a fairly accessible idea to bring under the umbrella of category theory, and it also means we are justified in using a convention that simplifies a lot of the notation: we will assume from now on that $A$ and $B$ are disjoint.
(Since we only care about them up to isomorphism, this is fine to do: we can replace $A$ and $B$ with some disjoint pair of sets of the same size if necessary, to ensure that they *are* disjoint.)

[https://arbital.com/p/toc:](https://arbital.com/p/toc:)

# Universal property of disjoint union

How can we look at the disjoint union solely in terms of the maps to and from it?
First of all, how can we look at the disjoint union *at all* in terms of those maps?

There are certainly two maps $A \to A \sqcup B$ and $B \to A \sqcup B$: namely, the [inclusions](https://arbital.com/p/inclusion_map) $i_A : a \mapsto a$ and $i_B : b \mapsto b$.
But that's not enough to pin down the disjoint union precisely, because those maps exist not just to $A \sqcup B$ but also to any superset of $A \sqcup B$. %%note: If this is not obvious, stop and think for a couple of minutes about the case $A = \{ 1 \}$, $B = \{ 2 \}$, $A \sqcup B = \{1,2\}$, and the superset $\{1,2,3\}$ of $A \sqcup B$.%%
So we need to find some way to limit ourselves to $A \sqcup B$.

The key limiting fact about the disjoint union is that any map *from* the disjoint union can be expressed in terms of two other maps (one from $A$ and one from $B$), and vice versa.
The following discussion shows us how.

- If we know $f: A \sqcup B \to X$, then we know the [restriction maps](https://arbital.com/p/restriction_map) $f \big|_A : A \to X$ %%note: This is defined by $f \big|_A (a) = f(a)$; that is, it is the function we obtain by "restricting" $f$ so that its [domain](https://arbital.com/p/3js) is $A$ rather than the larger $A \sqcup B$.%% and $f \big|_B : B \to X$.
- If we know two maps $\alpha: A \to X$ and $\beta: B \to X$, then we can *uniquely* construct a map $f: A \sqcup B \to X$ which is "$\alpha$ and $\beta$ glued together". Formally, the map is defined as $f(x) = \alpha(x)$ if $x \in A$, and $f(x) = \beta(x)$ if $x \in B$.

The reason this pins down the disjoint union exactly (up to isomorphism) is because the disjoint union is the *only* set which leaves us with no choice about how we construct $f$ from $\alpha$ and $\beta$:

- We rule out *strict subsets* of $A \sqcup B$ because we use the fact that every element of $A$ is in $A \sqcup B$ and every element of $B$ is in $A \sqcup B$, to ensure that the restriction maps make sense.
- We rule out *strict supersets* of $A \sqcup B$ because we use the fact that any element in $A \sqcup B$ is either in $A$ or it is in $B$ %%note: If we replaced $A \sqcup B$ by any strict superset, this stops being true: by passing to a superset, we introduce an element which is neither in $A$ nor in $B$.%%, to ensure that $f$ is defined everywhere on its [domain](https://arbital.com/p/3js). Moreover, we use the fact that every element of $A \sqcup B$ is in *exactly one* of $A$ or $B$, because if $x$ is in both $A$ and $B$, then we can't generally decide whether we should define $f(x)$ by $\alpha(x)$ or $\beta(x)$.

## The property

One who is well-versed in category theory and universal properties would be able to take the above discussion and condense it into the following statement, which is the **universal property of the disjoint union**:

> Given sets $A$ and $B$, we define the *disjoint union* to be the following collection of three objects: $$\text{A set labelled }\ A \sqcup B \\ i_A : A \to A \sqcup B \\ i_B : B \to A \sqcup B$$ with the requirement that for every set $X$ and every pair of maps $f_A: A \to X$ and $f_B: B \to X$, there is a *unique* map $f: A \sqcup B \to X$ such that $f \circ i_A = f_A$ and $f \circ i_B = f_B$.

[Imgur was down when I made this picture, so I'm hosting it instead.](https://arbital.com/p/comment:)
![Disjoint union universal property](https://www.patrickstevens.co.uk/images/Coproduct.png)

## Aside: relation to the product

Recall the [https://arbital.com/p/-5zv](https://arbital.com/p/-5zv):

> Given objects $A$ and $B$, we define the *product* to be the following collection of three objects, if it exists: $$A \times B \\ \pi_A: A \times B \to A \\ \pi_B : A \times B \to B$$ with the requirement that for every object $X$ and every pair of maps $f_A: X \to A, f_B: X \to B$, there is a *unique* map $f: X \to A \times B$ such that $\pi_A \circ f = f_A$ and $\pi_B \circ f = f_B$.

Notice that this is just the same as the universal property of the disjoint union, but we have reversed the [domain](https://arbital.com/p/3js) and [codomain](https://arbital.com/p/3lg) of every function, and we have correspondingly reversed any function compositions.
This shows us that the product and the disjoint union are, in some sense, "two sides of the same coin".
If you remember the [https://arbital.com/p/-5zr](https://arbital.com/p/-5zr), we saw that the empty set's universal property also had a "flip side", and this flipped property characterises the one-element sets.
So in the same sense, the empty set and the one-point sets are "two sides of the same coin".
This is an instance of the concept of [duality](https://arbital.com/p/duality_category_theory), and it turns up all over the place.

# Examples

## {1} ⊔ {2}

Let's think about the very first example that came from the top of the page: the disjoint union of $A=\{1\}$ and $B=\{2\}$.
(This is, of course, $\{1,2\}$, but we'll try and tie the *universal property* point of view in with the *elements* point of view.)

The definition becomes:

> The *disjoint union* of $\{1\}$ and $\{2\}$ is the following collection of three objects: $$\text{A set labelled } \{1\} \sqcup \{2\} \\ i_A : \{1\} \to \{1\} \sqcup \{2\} \\ i_B : \{2\} \to \{1\} \sqcup \{2\}$$ with the requirement that for every set $X$ and every pair of maps $f_A: \{1\} \to X$ and $f_B: \{2\} \to X$, there is a *unique* map $f: A \sqcup B \to X$ such that $f \circ i_A = f_A$ and $f \circ i_B = f_B$.

This is still long and complicated, but remember from [when we discussed the product](https://arbital.com/p/5zv) that a map $f_A: \{1\} \to X$ is precisely picking out a single element of $X$: namely $f_A(1)$.
To every element of $X$, there is exactly one such map; and for every map $\{1\} \to X$, there is exactly one element of $X$ it picks out.
(Of course, the same reasoning goes through with $B$ as well: $f_B$ is just picking out an element of $X$, too.)

Also, $i_A$ and $i_B$ are just picking out single elements of $A \sqcup B$, though we are currently pretending that we don't know what $A \sqcup B$ is yet.

So we can rewrite this talk of *maps* in terms of *elements*, to make it easier for us to understand this definition in the specific case that $A$ and $B$ have just one element each:

> The *disjoint union* of $\{1\}$ and $\{2\}$ is the following collection of three objects: $$\text{A set labelled }\ \{1\} \sqcup \{2\} \\ \text{An element } i_A \text{ of } \{1\} \sqcup \{2\} \\ \text{An element }i_B \text{ of } \{1\} \sqcup \{2\}$$ with the requirement that for every set $X$ and every pair of elements $x \in X$ and $y \in X$, there is a *unique* map $f: A \sqcup B \to X$ such that $f(i_A) = x$ and $f(i_B) = y$.

From this, we can see that $i_A$ and $i_B$ can't be the same, because $f$ acts differently on them (if we take $X = \{x,y\}$ where $x \not = y$, for instance).
But also if there were any $z$ in $\{1\} \sqcup \{2\}$ *other* than $i_A$ and $i_B$, then for any attempt at our unique $f: A \sqcup B \to X$, we would be able to make a *different* $f$ by just changing where $z$ is sent to.

So $A \sqcup B$ is precisely the set $\{i_A, i_B\}$; and this has determined it up to isomorphism as "the set with two elements".

### Aside: [https://arbital.com/p/-4w5](https://arbital.com/p/-4w5)

Notice that the disjoint union of "the set with one element" and "the set with one element" yields "the set with two elements".
It's actually true for general finite sets that the disjoint union of "the set with $m$ elements" with "the set with $n$ elements" yields "the set with $m+n$ elements"; a few minutes' thought should be enough to convince you of this, but it is an excellent exercise for you to do this from the category-theoretic *universal properties* viewpoint as well as from the (much easier) *elements* viewpoint.
We will touch on this connection between "disjoint union" and "addition" a bit more later.

## The empty set

What is the disjoint union of the [https://arbital.com/p/-5zc](https://arbital.com/p/-5zc) with itself?
(Of course, it's just the empty set, but let's pretend we don't know that.)
The advantage of this example is that we already know a lot about the [https://arbital.com/p/-5zr](https://arbital.com/p/-5zr), so it's a good testing ground to see if we can do this without thinking about *elements* at all.

Recall that the empty set is defined as follows:

> The empty set $\emptyset$ is the unique set such that for every set $X$, there is precisely one function $\emptyset \to X$.

The disjoint union of $\emptyset$ with itself would be defined as follows (where I've stuck to using $A$ and $B$ in certain places, because otherwise the whole thing just fills up with the $\emptyset$ symbol):

> The following collection of three objects: $$\text{A set labelled }\ A \sqcup B \\ i_A : \emptyset \to A \sqcup B \\ i_B : \emptyset \to A \sqcup B$$ with the requirement that for every set $X$ and every pair of maps $f_A: \emptyset \to X$ and $f_B: \emptyset \to X$, there is a *unique* map $f: A \sqcup B \to X$ such that $f \circ i_A = f_A$ and $f \circ i_B = f_B$.

Now, since we know that for every set $X$ there is a *unique* map $!_X: \emptyset \to X$ %%note: In general, the exclamation mark $!$ is used for a uniquely-defined map.%%, we can replace our talk of $f_A$ and $f_B$ by just the same $!_X$:

> The following collection of three objects: $$\text{A set labelled }\ A \sqcup B \\ i_A : \emptyset \to A \sqcup B \\ i_B : \emptyset \to A \sqcup B$$ with the requirement that for every set $X$, there is a *unique* map $f: A \sqcup B \to X$ such that $f \circ i_A = (!_{X})$ and $f \circ i_B = (!_{X})$.

Moreover, we know that $i_A$ and $i_B$ are also uniquely defined, because there is only one map $\emptyset \to A \sqcup B$ (no matter what $A \sqcup B$ might end up being); so we can remove them from the definition because they're forced to exist anyway.
They're both just $!_{A \sqcup B}$.

> The set $$A \sqcup B$$ with the requirement that for every set $X$, there is a *unique* map $f: A \sqcup B \to X$ such that $f \circ (!_{A \sqcup B}) = (!_X)$.

A diagram is in order.

![Universal property of the disjoint union of the empty set with itself](http://i.imgur.com/B72uW9o.png)

The universal property is precisely saying that for every set $X$, there is a unique map $f: A \sqcup B \to X$ such that $f \circ (!_{A \sqcup B})$ is the map $!_X : \emptyset \to X$.

But since $!_X$ is the *only* map from $\emptyset \to X$, we have $f \circ (!_{A \sqcup B}) = (!_X)$ *whatever $f$ is*.
Indeed, $f \circ (!_{A \sqcup B})$ is a map from $\emptyset \to X$, and $!_X$ is the only such map.
So we can drop that condition from the requirements, because it automatically holds!

Therefore the disjoint union is:

> The set $$A \sqcup B$$ with the requirement that for every set $X$, there is a *unique* map $f: A \sqcup B \to X$.

Do you recognise that definition?
It's just the universal property of the empty set!

So $A \sqcup B$ is the empty set in this example.

# More general concept

We saw earlier that the disjoint union is characterised by the "reverse" (or "[dual](https://arbital.com/p/duality_category_theory)") of the universal property of the product.
In a more general [category](https://arbital.com/p/4c7), we say that something which satisfies this property is a *[https://arbital.com/p/-coproduct](https://arbital.com/p/-coproduct)*. %%note: Prepending "co" to something means "reverse the maps".%%

In general, the coproduct of objects $A$ and $B$ is written not as $A \sqcup B$ (which is specific to the category of [sets](https://arbital.com/p/3jz)), but as $A + B$.
Among other things, the coproduct unifies the ideas of addition of [integers](https://arbital.com/p/48l), [least upper bounds](https://arbital.com/p/least_upper_bound) in [posets](https://arbital.com/p/3rb), disjoint union of sets, [https://arbital.com/p/-65x](https://arbital.com/p/-65x) of [naturals](https://arbital.com/p/45h), [https://arbital.com/p/-3w3](https://arbital.com/p/-3w3), and [https://arbital.com/p/-free_product](https://arbital.com/p/-free_product) of [groups](https://arbital.com/p/3gd); all of these are coproducts in their respective categories.

Patrick Stevens
Eric Rogstad
Eric Bruylant

The [https://arbital.com/p/-5z9](https://arbital.com/p/-5z9) may be described by a [https://arbital.com/p/-600](https://arbital.com/p/-600) which is very similar to that of the [universal property of the product](https://arbital.com/p/5zv). Specifically, the disjoint union of sets $A$ and $B$ is a set denoted $A \sqcup B$ together with maps $i_A : A \to A \sqcup B$ and $i_B: B \to A \sqcup B$, such that for every set $X$ and every pair of maps $f_A: A \to X$ and $f_B: B \to X$, there is a unique map $\gamma: A \sqcup B \to X$ such that $\gamma \circ i_A = f_A$ and $\gamma \circ i_B = f_B$.