Object identity via interactions

Central to the mindset of category theory is the idea that we don't really care what an object is; we only care about the interactions between them. But if we don't care what an object is, how can we tell even the most basic properties of the objects? For instance, how can we even tell two objects apart? But we *can* do it, and we do it by looking at the interactions with *other* objects.

# How to tell sets apart

If we're allowed to look at maps between sets, but not at the structure of the sets themselves, how can we tell whether two sets are the same?
We aren't allowed to look at the elements of the set directly, so it would be very optimistic to hope to do better than telling the sets apart "up to isomorphism"; indeed, it turns out not to be possible to tell whether two sets are literally identical without looking at their elements.

But how about telling whether there is a [bijection](https://arbital.com/p/499) between two sets or not? That is the next best thing, because a bijection between the sets would tell us that they "behave the same in all reasonable ways".

It turns out we can do this!
Let $A$ and $B$ be two sets; we want to tell if they're different or not.

Let's make a clever choice: we'll pick a kind of "anchor" set, such that the maps involving $A$, $B$ and the "anchor" set are enough to determine whether or not $A$ and $B$ are the same.
It will turn out that $\{1\}$ works.

Consider all possible maps $\{1\} \to A$ and $\{1\} \to B$.
A map from $\{1\}$ to $A$ is just a function $f$ which takes the input value $1$ (there's no choice about that) and returns a value in $A$.
So we can think of it as being "a mappy way of specifying an element of $A$": for every element of $A$, there is one of these functions, while every one of these functions denotes an element of $A$.

So $A$ is isomorphic to this collection of maps, and the key thing is that we don't need to know about $A$'s elements to say this!
If we only have access to the maps and we know nothing about the internal structure of $A$, we can still say $A$ is isomorphic to the set of all the maps from $\{1\}$ to $A$.

%%hidden(Example):
Let $A = \{ 5, 6 \}$.

Then the functions $\{1\} \to A$ are precisely the two following:

- $f: 1 \mapsto 5$;
- $g: 1 \mapsto 6$.

So we have the "mappy" way of viewing $5 \in A$: namely, $f$.
Similarly, we have the "mappy" way of viewing $6 \in A$: namely, $g$.

And $A$ is isomorphic to the set $\{ f, g \}$.
So we've specified $A$ up to isomorphism without having to look at its elements!
%%

Given access to the maps, then, we have worked out what $A$ is (up to isomorphism, which is the best we can do if we're not allowed to look into the internal structure of $A$); and we can similarly work out what $B$ is by looking at the maps $\{1\} \to B$.

## Less structure

That previous construction was rather contrived, and it doesn't seem at all practical.


Universal property of the product

summary(Technical): The *product* of objects $A$ and $B$ is a certain tuple $(P, \pi_A, \pi_B)$, where $\pi_A$ is an arrow $P \to A$ and $\pi_B$ is an arrow $P \to B$. We require the product to satisfy the following [https://arbital.com/p/-600](https://arbital.com/p/-600): for every object $X$ and every pair of arrows $f: X \to A, g: X \to B$, there must be a unique factorisation $\gamma: X \to P$ satisfying $\pi_A \gamma = f$ and $\pi_B \gamma = g$.

Just as we can define the [https://arbital.com/p/-5zc](https://arbital.com/p/-5zc) by means of a [https://arbital.com/p/-600](https://arbital.com/p/-600) ([like this](https://arbital.com/p/5zr), in fact), so we can define the general notion of a "product" by referring not to what is in the product, but instead to how the product interacts with other objects.

# Motivation

The motivating example here is the [product of two sets](https://arbital.com/p/5zs).

Remember, the product of two sets $A$ and $B$ consists of all ordered pairs, the first element from $A$ and the second element from $B$.
Category theory likes to think about *maps involving an object* rather than *elements of an object*, though, so we'd like a way of thinking about the product using only maps.

What maps can we find? Well, there's an easy way to produce an element of $A$ given an element of $A \times B$: namely, "take the first coordinate".
Concretely, if we are given $(a,b) \in A \times B$, we output $a$.
And similarly, we can take the second coordinate to get an element of $B$.

So we have two maps, one which we will denote $\pi_A: A \times B \to A$, and one denoted $\pi_B : A \times B \to B$.
%%note: We use the Greek letter $\pi$ to stand for the word "[projection](https://arbital.com/p/projection_map)", because the operation "take a coordinate" is often called "projection".%%

Now, this is certainly not enough to characterise the product.
For one thing, there is a map from the [https://arbital.com/p/-5zc](https://arbital.com/p/-5zc) to every other set ([proof](https://arbital.com/p/5zr)), so if all we knew about the product was that it had a map to $A$ and a map to $B$, then we might deduce that the empty set was a perfectly good product of $A$ and $B$.
That's definitely not something we want our definition of "product" to mean: that the empty set is the product of every pair of sets!
So we're going to have to find something else to add to our putative definition.

What else do we know about the product?
To try for a universal property, we're going to want to talk about *all* the maps involving the product.
It turns out that the correct fact to note is that a map $f$ from any set $X$ to $A \times B$ may be defined exactly by the first coordinate and the second coordinate of the result.
Concretely, if we know $\pi_A(f(x))$ and $\pi_B(f(x))$, then we know $f(x)$: it's just $\langle \pi_A(f(x)), \pi_B(f(x)) \rangle$. %%note: I've used $\langle \text{angled brackets}\rangle$ to indicate the ordered pair here, just because otherwise there are confusingly many round brackets.%%

Another way of stating the universal property of the product is that maps $h : A \to B \times C$ are naturally in bijection with pairs of maps $f : A \to B$, $g : A \to C$. That is, a [generalized element](https://arbital.com/p/61q) (of shape $A$) of $B \times C$ is a pair consisting of a generalized element (of the same shape) of $B$ and a generalized element of $C$; this is the same as the usual description of the product in sets, but now since we use generalized elements instead of elements it makes sense in any category. Under this correspondence, $h$ being the identity on $B \times C$ corresponds to $f$ being the projection $B \times C \to B$ and $g$ being the projection $B \times C \to C$. On the other hand, if $h$ corresponds to $f$ and $g$ via this bijection, we have $h = \langle f, g\rangle$. Naturality of the isomorphism turns out to imply that $\pi_{B} \langle f, g \rangle = f$ and $\pi_C \langle f, g \rangle = g$, as well as $\langle \pi_{B}, \pi_{C} \rangle = \text{id}$.

# The universal property

From the above, we can extract the following universal property, which really *does* define the product (up to [https://arbital.com/p/-4f4](https://arbital.com/p/-4f4)):

> 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$.

If you're anything like me, you're probably a bit lost at this point.
Trust me that once you've set up the right structures in your mind, the property is quite simple.
At the moment it probably feels more like I've given you a sentence in Swahili, and I've just told you it doesn't mean anything difficult.

Category theory contains lots of things like this, where it takes a lot of words to write them out and some time to get your head around them properly. %%note: In this particular instance, one unavoidable annoyance is that the object $X$ isn't really playing any interesting role other than "[domain](https://arbital.com/p/3js) of an arbitrary function", but we have to include the words "for every object $X$" because otherwise the definitions of $f_A$ and $f_B$ don't make sense. %%
One learns category theory by gradually getting used to examples and pictures; in particular, the idea of the **commutative diagram** is an extremely powerful tool for improving understanding.

The following "commutative diagram" (really just a picture showing the objects involved and how they interact) defines the product.

![Product universal property](http://i.imgur.com/AcdaqkI.png)

The dashed arrow indicates "the presence of all the other arrows forces this arrow to exist uniquely"; and the diagram is said to **commute**, which means that if we follow any chain of arrows round the diagram, we'll get the same answer.
Here, "the diagram commutes" %%note: That is, "the diagram is a *commutative* diagram".%% is exactly expressing $\pi_A \circ f = f_A$ (following one of the triangles round) and $\pi_B \circ f = f_B$ (following the other triangle).
And the dashed-ness of the line is exactly expressing the words "there is a *unique* map $f: X \to A \times B$".

We'll see several examples now, some related to each other and some not.
Hopefully in working through these, you will pick up what the property means; and maybe you will start to get a feel for some underlying intuitions.

# Example: finite sets

(This discussion works just as well in the category of *all* sets, not just the finite ones, but finite sets are much easier to understand than general sets.)

The motivation above took some properties of the set-product, and turned them into a new general definition.
So we should hope that when we take the new general definition and bring it back into the world of sets, we recover the original set-product we started with.
That is indeed the case.

Let $A$ and $B$ be finite sets; we want to see what $A \otimes B$ %%note: Because $\times$ already has a meaning in set theory, we'll use $\otimes$ to distinguish this new concept. Of course, the aim of this section is to show that $\otimes$ is actually the same as our usual $\times$. %% is (using the universal-property definition), if it exists.

Well, it would be the finite set $A \otimes B$ (whatever that might be), together with two maps $\pi_A: A \otimes B \to A$ and $\pi_B: A \otimes B \to B$, such that:

> For every finite set $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 \otimes B$ such that $\pi_A \circ f = f_A$ and $\pi_B \circ f = f_B$.

Let's try and identify what set this universal property describes %%note: If such a set exists. (Spoiler: it does.)%%.
The property is very general, talking about the entire "universe" of finite sets, so to get a grasp of it, it should help to specialise to some simple sets $X$.

You might like to work out for yourself why letting $X = \emptyset$ doesn't tell us anything about $A \otimes B$.

But a much more enlightening choice of $X$ arises if we take $X = \{ 1 \}$.
In that case, a map from $X$ to $A$ is just identifying a specific element of $A$, so for example we may refer to $f_A: X \to A$ as a "choice of element of $A$".
Indeed, if $g: \{1\} \to A$, then we have an element $g(1)$ in $A$, because there's no choice about which element of the [domain](https://arbital.com/p/3js) we use: there's only the element $1$, so the only possible output of $g$ is the element $g(1)$ of $A$.

Specialising to this instance of $X$, then, the universal property requires that:

> For every pair of choices of element, $f_A: \{ 1 \} \to A$ and $f_B : \{ 1 \} \to B$, there is a *unique* choice of element $f: \{1\} \to A \otimes B$ such that $\pi_A \circ f = f_A$ and $\pi_B \circ f = f_B$.

(What does it mean to compose a function with a choice of element? Well, $\pi_A \circ f$ is a function from $\{1\}$ to $A$, so it's also just a choice of element of $A$; it's basically just $\pi_A$ applied to the choice-of-element embodied by $f$.)

More familiarly stated:

> For every pair of elements $a \in A$ and $b \in B$, there is a *unique* element $x \in A \otimes B$ such that $\pi_A(x) = a$ and $\pi_B(x) = b$.

That's just saying "$A \otimes B$ consists of objects which $\pi_A$ and $\pi_B$ allow us to interpret as ordered pairs"!
Specifically, it's saying that for every ordered pair of objects in $A \times B$, we can find a unique element of $A \otimes B$ which gets interpreted by $\pi_A$ and $\pi_B$ as having the same components as that ordered pair.

# Example: natural numbers

To give you an idea of where we're aiming for, in this section, we're going to use the fact that a [https://arbital.com/p/-3rb](https://arbital.com/p/-3rb) may be viewed as a [category](https://arbital.com/p/4cx), by letting there be a single arrow $a \to b$ if and only if $a \leq b$ in the poset.
That is, instead of maps $f: A \to B$, we have "facts that $A \leq B$ in the poset" which we interpret as "arrows from $A$ to $B$"; there is only ever at most one fact that $A \leq B$, so there is only ever at most one arrow from $A$ to $B$.

We'll examine what the category-theoretic product means in this category, and hopefully this should help indicate how versatile the "universal property" idea is.

## Specific poset: "less than"

Let us work in a specific poset: $\mathbb{N}$ the [natural numbers](https://arbital.com/p/45h), ordered by the usual "less than".
For example, $1$ is less than or equal to every number except $0$, so there is an arrow from $1$ to every number except $0$.
There is an arrow from $2$ to every number bigger than or equal to $2$, and so on.
There is an arrow from $0$ to every number.

The universal property of the category-theoretic product %%note: I'll emphasise "category-theoretic" in this section, because it will turn out that in this context, "product" *doesn't* mean "usual product of natural numbers".%% here is:

> Given natural numbers $m$ and $n$, we define the *category-theoretic product* $\otimes$ %%note: Because $\times$ already has a meaning in the naturals, we'll use $\otimes$ to distinguish this new concept.%% to be the following collection of three objects, if it exists:

> - $m \otimes n$
> - The fact that $m \otimes n$ is less than or equal to $m$ %%note: In the sets case, this was the map $\pi_A$; but here, we're in a poset category, so instead of "a function from $A$ to $B$", we have "the fact that $A \leq B$".%%
> - The fact that $m \otimes n$ is less than or equal to $n$ %%note: This is corresponding to what was the map $\pi_B$.%%.

> We also have the requirement that for every natural number $x$ and every instance of the fact that $x \leq m, x \leq n$ %%note: Such an instance corresponds to the pair of maps $f_A: X \to A$ and $f_B: X \to B$.%%, there is a *unique* instance of the fact that $x \leq m \otimes n$. %%note: This corresponds to the map $f: X \to A \times B$. In fact we can omit "unique", because in a poset, there is never more than one arrow between any two given objects; in this context, there is only one way to express $x \leq m \otimes n$.%%

You might want to spend a little time convincing yourself that the requirement in the posets case is the same as the requirement in the general category-theoretic case.
Indeed, we can omit the "compositions" part entirely.
For example, half of the compositions part reads "$\pi_A \circ f = f_A$"; when translated into poset language, that is "the instance of the fact that $m \otimes n \leq m$, together with the instance of the fact that $x \leq m \otimes n$, yields the instance of the fact that $x \leq m$".
But this is immediate anyway because posets already let us deduce that $A \leq C$ from $A \leq B$ and $B \leq C$.

To summarise, then, we define $m \otimes n$, if it exists, to be the natural number which is less than or equal to $m$ and to $n$, such that for every natural $x$ with $x \leq m, x \leq n$, we have $x \leq m \otimes n$.

If you think about this for a few minutes, you might work out that this is just referring to the minimum of $m$ and $n$.
So we have defined the minimum of two natural numbers in a category-theoretic "universal properties" way: it's the category-theoretic product in this particular poset.

Notice, by the way, that in this case, the category-theoretic product (i.e. the minimum) does always exist.
Remember, the universal property comes with a caveat: it defines the product to be a certain triple of $(A \times B, \pi_A, \pi_B)$, *if those three things exist*.
It's by no means a given that the triple always *does* exist; but in this particular instance, with the natural numbers under the "less than" relation, it so happens that it does always exist.
For every pair $m, n$ of naturals, there *is* a triple $(m \otimes n, \pi_m, \pi_n)$ satisfying the universal property: namely, letting $m \otimes n$ be the minimum of $m$ and $n$, and letting $\pi_m$ and $\pi_n$ be "instances of the facts that $m \otimes n \leq m$ and $m \otimes n \leq n$" respectively.

## Specific example: divisibility

Let's now use the poset which is given by the *nonzero* naturals $\mathbb{N}^{\geq 1}$ but using the order relation of divisibility: $a \mid b$ if and only if $a$ divides $b$.
For example, $1$ divides every nonzero natural so there is an arrow $1 \to n$ for every $n$;
there are arrows $2 \to n$ for every *even* positive natural $n$, and so on.

We'll give the product definition again:

> Given natural numbers $m$ and $n$, we define the *category-theoretic product* $\otimes$ to be the following collection of three objects, if it exists:

> - $m \otimes n$
> - The fact that $m \otimes n$ divides $m$ %%note: In the sets case, this was the map $\pi_A$; but here, we're in a poset category, so instead of "a function from $A$ to $B$", we have "the fact that $A \mid B$".%%
> - The fact that $m \otimes n$ divides $n$.

> We also have the requirement that for every natural number $x$ such that $x \mid m, x \mid n$, it is the case that $x \mid m \otimes n$.

Again, a few minutes of pondering might lead you to discover that this is referring to the [https://arbital.com/p/-5mw](https://arbital.com/p/-5mw), and again it so happens that it always exists.

## Moral things to notice about the above examples

Working in a poset, the nature of the category-theoretic product as some kind of "optimiser" is a bit clearer.
It is the "optimal" object such that certain conditions hold.

- In the first example, it is optimal in the sense that it is the *biggest* natural $a$ such that $a \leq m$ and $a\leq n$.
- In the second example, it is optimal in the sense that it is the natural $a$ with the *most factors* such that $a \mid m$ and $a \mid n$.

In fact this is true in general posets: the category-theoretic product of $X$ and $Y$ in a poset is the [https://arbital.com/p/-greatest_lower_bound](https://arbital.com/p/-greatest_lower_bound) of $X$ and $Y$ in the poset.

# The property characterises the product up to isomorphism

This is what makes our new definition really make sense: this theorem tells us that our construction really does pick out a specific object.
The proof appears [on a different page](https://arbital.com/p/60v); it follows a similar pattern to the "maps" way of proving that [the empty set is uniquely characterised by its universal property](https://arbital.com/p/603).

If we can show that some easy-to-specify property (such as the universal property of the product) characterises things uniquely or up to isomorphism, we can be pretty hopeful that the property is worth thinking more about.
While the product's universal property is wordy, it has a simple diagram which defines it; the property itself is not very complicated, and the main difficulty is in understanding the background.

# Why is the product interesting?

Why should we care about having this object defined by the universal property?
Well, if we stop defining things by their internal properties (for instance, if we stop defining the product of sets $A$ and $B$ as the collection of ordered pairs) and use a universal property instead, we get a definition which doesn't care about internal properties.
It's immediately applicable to other situations.
If we make sure that, in proving things about the product, we only use the universal property (or things that can be derived from the universal property), we'll instantly get theorems that are true not just for set-products but also for more general situations.
Category theory, and its beginnings in the idea of the universal property, is in some ways the art of finding where in mathematics we're just doing the same things in a slightly different way, and seeing if we can show why they're *actually* the same rather than merely looking similar.

Ultimately, this viewpoint shows us that the following ideas are "basically the same" (and it doesn't matter if you don't know what some of these mean):

- Product of natural numbers %%note: The easiest way to obtain this is by interpreting a [natural number as a category itself](https://arbital.com/p/natural_number_as_category). The product of natural numbers $m$ and $n$, in the colloquial sense of "product", is then given by the [https://arbital.com/p/-product_category](https://arbital.com/p/-product_category) of the two categories representing $m$ and $n$.%%
- [Product of sets](https://arbital.com/p/5zs) %%note: We showed in this very page that the set product is captured by the category-theoretic product.%%
- Product of [topological spaces](https://arbital.com/p/topological_space)
- Direct product of [groups](https://arbital.com/p/3gd)
- Direct sum of [abelian groups](https://arbital.com/p/3h2)
- Greatest lower bounds in [posets](https://arbital.com/p/3rb) %%note: We showed two examples of this above, looking at the minimum and greatest common divisor of two naturals.%%
- [Segre embedding](https://arbital.com/p/segre_embedding) of two [projective varieties](https://arbital.com/p/projective_variety), in [https://arbital.com/p/algebraic_geometry](https://arbital.com/p/algebraic_geometry). This is an example where the existence of the product is decidedly non-trivial.

I personally took algebraic geometry and didn't understand a word of it, including about the Segre embedding. The lecturer didn't tell me at the time that the Segre embedding is a product, so I just went on thinking it was incomprehensible.
But now I know that the Segre embedding is "just" a product.
That immediately tells me that in some deep moral sense it's "not too difficult": even though algebraic geometry is fiendishly hard, the Segre embedding is not at its heart one of the really difficult bits, and if I chose to learn it properly, I wouldn't need to do too much mental gymnastics to understand it.

Alexei Andreev
Eric Rogstad
Patrick Stevens
Luke Sciarappa
Eric Bruylant

We can define the general notion of "product" to coincide with the product of natural numbers and with the [https://arbital.com/p/-5zs](https://arbital.com/p/-5zs), by means of a [https://arbital.com/p/-600](https://arbital.com/p/-600) that the product has.
Specifically, the product of objects $A$ and $B$ is an object denoted $A \times B$ together with maps $\pi_A : A \times B \to A$ and $\pi_B: A \times B \to B$, such that for every object $X$ and every pair of maps $f_A: X \to A$ and $f_B: X \to B$, there is a unique map $\gamma: X \to A \times B$ such that $\pi_A \circ \gamma = f_A$ and $\pi_B \circ \gamma = f_B$.


Finite set

summary(Technical): A finite [set](https://arbital.com/p/3jz) $X$ is a set which is not infinite: that is, there is some $n \in \mathbb{N}$ such that the [https://arbital.com/p/-4w5](https://arbital.com/p/-4w5) of $X$ is equal to $n$. Examples: $\{ 1,2 \}$ and $\{ \mathbb{N} \}$. Non-examples: $\mathbb{N}$, $\mathbb{R}$.

A __finite set__ is like a package for a group of things. The package can be monstrously big to fit the amount of things it needs to hold but ultimately there is a limit to the amount of items in the package. This means that if you were to go by each item in this package one by one and count them you would eventually reach the last item. (Incidentally this number that you counted would be the cardinality of the set)

More formally a Finite set is a set that also has a bijection with one of the natural numbers.

A finite [set](https://arbital.com/p/3jz) is a set which is not infinite. That is, we could go through its members one by one, seeing a new member every minute, writing a mark on a piece of paper each time, and eventually we'd be done and stop writing.


Universal property

In [https://arbital.com/p/-4c7](https://arbital.com/p/-4c7), we attempt to avoid thinking about what an object *is*, and look only at how it interacts with other objects.
It turns out that even if we're not allowed to talk about the "internal" structure of an object, we can still pin down some objects just by talking about their interactions.
For example, if we are not allowed to define the [https://arbital.com/p/-5zc](https://arbital.com/p/-5zc) as "the set with no elements", we [can still define it](https://arbital.com/p/5zr) by means of a "universal property", talking instead about the *functions* from the empty set rather than about the elements of the empty set.

This page is not designed to teach you any particular universal properties, but rather to convey a sense of what the idea of "universal property" is about.
You are supposed to let it wash over you gently, without worrying particularly if you don't understand words or even entire sentences.

# Examples

- The [https://arbital.com/p/-5zc](https://arbital.com/p/-5zc) can be [defined by a universal property](https://arbital.com/p/5zr). Specifically, it is an instance of the idea of an [https://arbital.com/p/-initial_object](https://arbital.com/p/-initial_object), in the category of sets. The same idea captures the trivial [group](https://arbital.com/p/3gd), the [ring](https://arbital.com/p/3gq) $\mathbb{Z}$ of [integers](https://arbital.com/p/48l), and the natural number $0$.
- The [product](https://arbital.com/p/5zv) has a universal property, generalising the [https://arbital.com/p/-5zs](https://arbital.com/p/-5zs), the product of integers, the [https://arbital.com/p/-greatest_lower_bound](https://arbital.com/p/-greatest_lower_bound) in a [https://arbital.com/p/-3rb](https://arbital.com/p/-3rb), the products of many different [algebraic structures](https://arbital.com/p/3gx), and many other things besides.
- The [free group](https://arbital.com/p/-6gd) has a universal property (we refer to this property by the unwieldy phrase "the free-group [functor](https://arbital.com/p/functor_category_theory) is *left-[adjoint](https://arbital.com/p/adjoint_category_theory)* to the [https://arbital.com/p/-forgetful_functor](https://arbital.com/p/-forgetful_functor)"). The same property can be used to create free rings, the [https://arbital.com/p/-discrete_topology](https://arbital.com/p/-discrete_topology) on a set, and the free [semigroup](https://arbital.com/p/algebraic_semigroup) on a set. This idea of the *left adjoint* can also be used to define initial objects (which is the generalised version of the universal property of the empty set). %%note: Indeed, an initial object of category $\mathcal{C}$ is exactly a left adjoint to the unique functor from $\mathcal{C}$ to $\mathbf{1}$ the one-arrow category.%%

The above examples show that the ideas of category theory are very general.
For instance, the third example captures the idea of a "free" object, which turns up all over [https://arbital.com/p/-3h0](https://arbital.com/p/-3h0).

# Definition "up to isomorphism"

# Universal properties might not define objects

Universal properties are often good ways to define things, but just like with any definition, we always need to check in each individual case that we've actually defined something coherent.
There is no silver bullet for this: universal properties don't just magically work all the time.

For example, consider a very similar universal property to that of the [https://arbital.com/p/-5zc](https://arbital.com/p/-5zc) (detailed [here](https://arbital.com/p/5zr)), but instead of working with sets, we'll work with [fields](https://arbital.com/p/481), and instead of [functions](https://arbital.com/p/3jy) between sets, we'll work with field homomorphisms.

The corresponding universal property will turn out *not* to be coherent:

> The *initial field* %%note: Analogously with the empty set, but fields can't be empty so we'll call it "initial" for reasons which aren't important right now.%% is the unique field $F$ such that for every field $A$, there is a unique field homomorphism from $F$ to $A$.

%%%hidden(Proof that there is no initial field):
(The slick way to communicate this proof to a practised mathematician is "there are no field homomorphisms between fields of different [characteristic](https://arbital.com/p/field_characteristic)".)

It will turn out that all we need is that there are two fields [$\mathbb{Q}$](https://arbital.com/p/4zq) and $F_2$ the field on two elements. %%note: $F_2$ has elements $0$ and $1$, and the relation $1 + 1 = 0$.%%

Suppose we had an initial field $F$ with multiplicative identity element $1_F$; then there would have to be a field homomorphism $f$ from $F$ to $F_2$.
Remember, $f$ can be viewed as (among other things) a [https://arbital.com/p/-47t](https://arbital.com/p/-47t) from the *multiplicative* group $F^*$ %%note: That is, the group whose [https://arbital.com/p/-3gz](https://arbital.com/p/-3gz) is $F$ without $0$, with the group operation being "multiplication in $F$".%% to $F_2^*$.

Now $f(1_F) = 1_{F_2}$ because [the image of the identity is the identity](https://arbital.com/p/49z), and so $f(1_F + 1_F) = 1_{F_2} + 1_{F_2} = 0_{F_2}$.

But field homomorphisms are either [injective](https://arbital.com/p/4b7) or map everything to $0$ ([proof](https://arbital.com/p/76h)); and we've already seen that $f(1_F)$ is not $0_{F_2}$.
So $f$ must be injective; and hence $1_F + 1_F$ must be $0_F$ because $f(1_F + 1_F) = 0_{F_2} = f(0_F)$.

Now examine $\mathbb{Q}$.
There is a field homomorphism $g$ from $F$ to $\mathbb{Q}$.
We have $g(1_F + 1_F) = g(1_F) + g(1_F) = 1 + 1 = 2$; but also $g(1_F + 1_F) = g(0_F) = 0$.
This is a contradiction.
%%%

In [https://arbital.com/p/-4c7](https://arbital.com/p/-4c7), we attempt to avoid thinking about what an object *is*, and look only at how it interacts with other objects. A universal property is a way of defining an object not in terms of its "internal" properties, but instead by its interactions with the "universe" of other objects in existence.


The empty set is the only set which satisfies the universal property of the empty set

Here, we will prove that the only [set](https://arbital.com/p/3jz) which satisfies the [https://arbital.com/p/-5zr](https://arbital.com/p/-5zr) is the [https://arbital.com/p/-5zc](https://arbital.com/p/-5zc) itself.
This will tell us that defining the empty set by this [https://arbital.com/p/-600](https://arbital.com/p/-600) is actually a coherent thing to do, because it's not ambiguous as a definition.

There are three ways to prove this fact: one way looks at the objects themselves, one way takes a more maps-oriented approach, and one way is sort of a mixture of the two.
All of the proofs are enlightening in different ways.

Recall first that the universal property of the empty set is as follows:

> The empty set is the unique set $X$ such that for every set $A$, there is a unique function from $X$ to $A$.
(To bring this property in line with our usual definition, we denote that unique set $X$ by the symbol $\emptyset$.)

# The "objects" way

Suppose we have a set $X$ which is not empty.
Then it has an element, $x$ say.
Now, consider maps from $X$ to $\{ 1, 2 \}$.

We will show that there cannot be a unique [https://arbital.com/p/-3jy](https://arbital.com/p/-3jy) from $X$ to $\{ 1, 2 \}$.
Indeed, suppose $f: X \to \{ 1, 2 \}$.
Then $f(x) = 1$ or $f(x) = 2$.
But we can now define a new function $g: X \to \{1,2\}$ which is given by setting $g(x)$ to be the *other* one of $1$ or $2$ to $f(x)$, and by letting $g(y) = f(y)$ for all $y \not = x$.

This shows that the universal property of the empty set fails for $X$: we have shown that there is no unique function from $X$ to the specific set $\{1,2\}$.

# The "maps" ways

We'll approach this in a slightly sneaky way: we will show that if two sets have the universal property, then there is a [bijection](https://arbital.com/p/499) between them. %%note: The most useful way to think of "bijection" in this context is "function with an inverse".%%
Once we have this fact, we're instantly done: the only set which bijects with $\emptyset$ is $\emptyset$ itself.

Suppose we have two sets, $\emptyset$ and $X$, both of which have the universal property of the empty set.
Then, in particular (using the UP of $\emptyset$) there is a unique map $f: \emptyset \to X$, and (using the UP of $X$) there is a unique map $g: X \to \emptyset$.
Also there is a unique map $\mathrm{id}: \emptyset \to \emptyset$. %%note: We use "id" for "identity", because as well as being the empty function, it happens to be the identity on $\emptyset$.%%

The maps $f$ and $g$ are inverse to each other. Indeed, if we do $f$ and then $g$, we obtain a map from $\emptyset$ (being the domain of $f$) to $\emptyset$ (being the image of $g$); but we know there's a *unique* map $\emptyset \to \emptyset$, so we must have the composition $g \circ f$ being equal to $\mathrm{id}$.

We've checked half of "$f$ and $g$ are inverse"; we still need to check that $f \circ g$ is equal to the identity on $X$.
This follows by identical reasoning: there is a *unique* map $\mathrm{id}_X : X \to X$ by the fact that $X$ satisfies the universal property %%note: And we know that this map is the identity, because there's always an identity function from any set $Y$ to itself.%%, but $f \circ g$ is a map from $X$ to $X$, so it must be $\mathrm{id}_X$.

So $f$ and $g$ are bijections from $\emptyset \to X$ and $X \to \emptyset$ respectively.

# The mixture

This time, let us suppose $X$ is a set which satisfies the universal property of the empty set.
Then, in particular, there is a (unique) map $f: X \to \emptyset$.

If we pick any element $x \in X$, what is $f(x)$?
It has to be a member of the empty set $\emptyset$, because that's the codomain of $f$.
But there aren't any members of the empty set!

So there is no such $f$ after all, and so $X$ can't actually satisfy the universal property after all: we have found a set $Y = \emptyset$ for which there is no map (and hence certainly no *unique* map) from $X$ to $Y$.

This method was a bit of a mixture of the two ways: it shows that a certain map can't exist if we specify a certain object.

Here we give three proofs that the only [set](https://arbital.com/p/3jz) which satisfies the [https://arbital.com/p/-5zr](https://arbital.com/p/-5zr) is the [https://arbital.com/p/-5zc](https://arbital.com/p/-5zc) itself.


Product is unique up to isomorphism

Recall the [https://arbital.com/p/-600](https://arbital.com/p/-600) of the [product](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$.

We wish to show that if the collections $(R, \pi_A, \pi_B)$ and $(S, \phi_A, \phi_B)$ satisfy the above condition, then there is an [https://arbital.com/p/-4f4](https://arbital.com/p/-4f4) between $R$ and $S$. %%note: I'd write $A \times_1 B$ and $A \times_2 B$ instead of $R$ and $S$, except that would be really unwieldy. Just remember that $R$ and $S$ are both standing for products of $A$ and $B$.%%

# Proof

The proof follows a pattern which is standard for these things.

Since $R$ is a product of $A$ and $B$, we can let $X = S$ in the universal property to obtain:

> For every pair of maps $f_A: S \to A, f_B: S \to B$ there is a unique map $f: S \to R$ such that $\pi_A \circ f = f_A$ and $\pi_B \circ f = f_B$.

Now let $f_A = \phi_A, f_B = \phi_B$:

> There is a unique map $\phi: S \to R$ such that $\pi_A \circ \phi = \phi_A$ and $\pi_B \circ \phi = \phi_B$.

Doing the same again but swapping $R$ for $S$ and $\phi$ for $\pi$ (basically starting over with the line "Since $S$ is a product of $A$ and $B$, we can let $X = R$…"), we obtain:

> There is a unique map $\pi: R \to S$ such that $\phi_A \circ \pi = \pi_A$ and $\phi_B \circ \pi = \pi_B$.

Now, $\pi \circ \phi: S \to S$ is a map which we wish to be the identity on $S$; that would get us halfway to the answer, because it would tell us that $\pi$ is left-inverse to $\phi$.

But we can use the universal property of $S$ once more, this time looking at maps into $S$:

> For every pair of maps $f_A: S \to A, f_B: S \to B$ there is a unique map $f: S \to S$ such that $\phi_A \circ f = f_A$ and $\phi_B \circ f = f_B$.

Letting $f_A = \phi_A$ and $f_B = \phi_B$, we obtain:

> There is a unique map $f: S \to S$ such that $\phi_A \circ f = \phi_A$ and $\phi_B \circ f = \phi_B$.

But I claim that both the identity $1_S$ and also $\pi \circ \phi$ satisfy the same property as $f$, and hence they're equal by the uniqueness of $f$.
Indeed,

- $1_S$ certainly satisfies the property, since that would just say that $\phi_A = \phi_A$ and $\phi_B = \phi_B$;
- $\pi \circ \phi$ satisfies the property, since we already found that $\phi_A \circ \pi = \pi_A$ and that $\phi_B \circ \pi = \pi_B$.

Therefore $\pi$ is left-inverse to $\phi$.

Now to complete the proof, we just need to repeat *exactly* the same steps but with $(R, \pi_A, \pi_B)$ and $(S, \phi_A, \phi_B)$ interchanged throughout.
The outcome is that $\phi$ is left-inverse to $\pi$.

Hence $\pi$ and $\phi$ are genuinely inverse to each other, so they are both isomorphisms $R \to S$ and $S \to R$ respectively.

# The characterisation is not unique

To show that we can't do better than "characterised up to isomorphism", we show that the product is not characterised *uniquely*.
Indeed, if $(A \times B, \pi_A, \pi_B)$ is a product of $A$ and $B$, then so is $(B \times A, \pi'_A, \pi'_B)$, where $\pi'_A(b, a) = a$ and $\pi'_B(b, a) = b$.
(You can check that this does satisfy the universal property for a product of $A$ and $B$.)

Notice, though, that $A \times B$ and $B \times A$ are isomorphic as guaranteed by the theorem.
The isomorphism is the map $A \times B \to B \times A$ given by $(a,b) \mapsto (b,a)$.

Here, we prove that the [https://arbital.com/p/-5zv](https://arbital.com/p/-5zv) characterises objects uniquely up to [https://arbital.com/p/4f4](https://arbital.com/p/4f4). That is, if two objects both satisfy the universal property of the product of $A$ and $B$, then they are isomorphic objects.


Category of finite sets

[This page is more of a definition page; it's not really intended to explain anything, because all the necessary explanations should already have been done in finite_set.](https://arbital.com/p/comment:)

The category of finite sets is a nice easy [category](https://arbital.com/p/4c7) to work in. Its objects are the finite sets, and its arrows are the [functions](https://arbital.com/p/3jy) between the [finite sets](https://arbital.com/p/5zy).This makes it a very concrete and understandable category to present some of the basic ideas of category theory.


Extensionality Axiom

The axiom of extensionality is one of the fundamental axioms of set theory. Basically, it postulates the condition, by which two sets can be equal. This condition can be described as follows: *if any two sets have exactly the same members, then these sets are equal*. A formal notation of the extensionality axiom can be written as:

$$ \forall A \forall B : ( \forall x : (x \in A \iff x \in B) \Rightarrow A=B)$$

##Examples

 - $\{1,2\} = \{2,1\}$, because whatever object we choose, it either belongs to both of these sets ($1$ or $2$), or to neither of them (e.g. $5$, $73$)

%%comment:

- If $A = \{x \mid x = 2n \text{ for some integer } n \}$ and $B = \{x \mid x \text{ is even } \}$, then $A=B$. The proof goes as follows: $\forall x : (x \in A \Leftrightarrow (x = 2n \text{ for some integer } n ) \Leftrightarrow (x/2 = n \text{ for some integer } n) \Leftrightarrow (x/2 \text{ is an integer}) \Leftrightarrow (x \text{ is even}) \Leftrightarrow x \in B)$

that, if simplified, gives $\forall x : (x \in A \iff x \in B)$, which, by extensionality, implies $A=B$

%%

[Fix the formatting in the currently commeneted example. Every new statement needs to be in a new line, lined up.](https://arbital.com/p/fixme:)

##Axiom's converse

Note, that the axiom itself only works in one way - it implies that two sets are equal **if** they have the same elements, but does not provide the converse, i.e. any two equal sets have the same elements. Proving the converse requires giving a precise definition of equality, which in different cases can be done differently. %note: Sometimes the extensionality axiom itself can be used to define equality, in which case the converse is simply stated by the axiom.% However, generally, the converse fact can always be considered true, as the equality of two sets means that they are the same one thing, obviously consisting of a fixed selection of objects. [The substitution property of equality?](https://arbital.com/p/comment:)


Comprehensive guide to Bayes' Rule

Click below to start reading!

Eric Rogstad
Eliezer Yudkowsky
Alexei Andreev


Generalized element

In [https://arbital.com/p/-4c7](https://arbital.com/p/-4c7), a **generalized element** of an object $X$ of a category is any morphism $x : A \to X$ with [codomain](https://arbital.com/p/3lg) $X$. In this situation, $A$ is called the **shape**, or **domain of definition**, of the element $x$. We'll unpack this.

## Generalized elements generalize elements ##
 We'll need a set with a single element: for concreteness, let us denote it $I$, and say that its single element is $*$. That is, let $I = \{*\}$.
 For a given set $X$, there is a natural correspondence between the following notions: an element of $X$, and a function from the set $I$ to the set $X$. On the one hand, if you have an element $x$ of $X$, you can define a function from $I$ to $X$ by setting $f(i) = x$ for any $i \in I$; that is, by taking $f$ to be the constant function with value $x$. On the other hand, if you have a function $f : I \to X$, then since $*$ is an element of $I$, $f(*)$ is an element of $X$. So in the category of sets, generalized elements of a set $X$ that have shape $I$, which are by definition maps $I \to X$, are the same thing (at least up to isomorphism, which as usual is all we care about).

## Generalized elements in sets ##
 In the category of sets, if a set $A$ has $n$ elements, a generalized element of shape $A$ of a set $X$ is an $n$-tuple of elements of $X$.

## Sometimes there is no `best shape' ##
Based on the case of sets, you might initially think that it suffices to consider generalized elements whose shape is the terminal object  $1$. However, in the category of groups, since the terminal object is also initial , each object has a unique generalized element of shape $1$. However, in this case, there is a single shape that suffices, namely the integers $\mathbb{Z}$. A generalized element of shape $\mathbb{Z}$ of an abelian group $A$ is just an ordinary element of $A$.

However, sometimes there is no single object whose generalized elements can distinguish everything up to isomorphism. For example, consider $\text{Set} \times \text{Set}$ . If we use generalized elements of shape $(X,Y)$, then they won't be able to distinguish between the objects $(2^A, 2^{X + B})$ and $(2^{Y + A}, 2^{B})$, up to isomorphism, since maps from $(X,Y)$ into the first are the same as elements of $(2^A)^X\times(2^{X+B})^Y \cong 2^{X\times A + Y \times (X + B)} \cong 2^{X \times A + Y \times B + X \times Y}$, and maps from $(X,Y)$ into the second are the same as elements of $(2^{Y+A})^X \times (2^B)^Y \cong 2^{X\times(Y+A) + Y \times B} \cong 2^{X \times A + Y \times B + X \times Y}$. These objects will themselves be non-isomorphic as long as at least one of $X$ and $Y$ is not the empty set; if both are, then clearly the functor still fails to distinguish objects up to isomorphism. (More technically, it does not reflect isomorphisms. )
Intuitively, because objects of this category contain the data of two sets, the information cannot be captured by a single homset. This intuition is consistent with the fact that it can be captured with two: the generalized elements of shapes $(0,1)$ and $(1,0)$ together determine every object up to isomorphism.

## Morphisms are functions on generalized elements ##
 If $x$ is an $A$-shaped element of $X$, and $f$ is a morphism from $X$ to $Y$, then $f(x) := f\circ x$ is an $A$-shaped element of $Y$. The Yoneda lemma  states that every function on generalized elements which commutes with reparameterization, i.e. $f(xu) = f(x) u$, is actually given by a morphism in the category.

Dylan Hendrickson
Eric Bruylant
Luke Sciarappa


Introduction to Bayes' Rule odds form

Click below to start reading!


Bayes' Rule and its different forms

Click below to start reading!


Bayes' Rule and its implications

Click below to start reading!


Examination through isomorphism

[Isomorphism](https://arbital.com/p/4f4) is the correct notion of equality between objects in a [category](https://arbital.com/p/4cx). From the category-theoretic point of view, if you want to distinguish between two objects which are isomorphic but not equal, it means that the morphisms in your category don't preserve whatever aspect of the objects allows you to make this distinction, and hence the category doesn't really capture what you want to be working with. If you want to talk about it categorically, you should consider a category with morphisms that preserve all of the structure you care about, including whatever allowed the distinction to be made.

For example (this example is due to [Qiaochu Yuan](https://www.quora.com/In-what-sense-are-topological-spaces-a-generalization-of-metric-spaces/answer/Qiaochu-Yuan-1)), consider the category with objects [metric spaces](https://arbital.com/p/metric_space), and morphisms [continuous maps](https://arbital.com/p/continuous_function). The diameter of a metric space $(X,d)$, which is the maximum value of $d(x,y)$ for $x,y \in X$, is a feature of metric spaces which is not invariant under isomorphism in this category; for example, the subsets $[https://arbital.com/p/0,1](https://arbital.com/p/0,1)$ and $[https://arbital.com/p/0,2](https://arbital.com/p/0,2)$ of $\mathbb{R}$, equipped with the usual metrics inherited from $\mathbb{R}$, are isomorphic in this category. There is a continuous map $f : [https://arbital.com/p/0,1](https://arbital.com/p/0,1)  \to [https://arbital.com/p/0,2](https://arbital.com/p/0,2)$ and a continuous map $g : [https://arbital.com/p/0,2](https://arbital.com/p/0,2) \to [https://arbital.com/p/0,1](https://arbital.com/p/0,1)$ such that $fg$ and $gf$ are identities. For example, one could take $f$ to be multiplication by $2$, and $g$ to be division by $2$. However, the diameter of $[https://arbital.com/p/0,1](https://arbital.com/p/0,1)$ is $1$, and the diameter of $[https://arbital.com/p/0,2](https://arbital.com/p/0,2)$ is $2$. Therefore, insofar as "diameter" is a property of metric spaces, the objects of these categories are not metric spaces. The correct name for them is "metrizable spaces", since this category is [equivalent](https://arbital.com/p/equivalence_of_categories) to the category whose objects are topological spaces whose topology is induced by some metric and whose morphisms are continuous maps.

For a less realistic (but more obvious) example, consider the category of [groups](https://arbital.com/p/3gd) and arbitrary functions between their [underlying sets](https://arbital.com/p/3gz). The objects of this category are, supposedly, groups, but properties of groups, such as "simple", do not respect isomorphism in this category.

Another example of this is the [product](https://arbital.com/p/4mj) of, say, sets. It determines a functor $\text{Set}\times\text{Set}\to\text{Set}$. We would like to say that this is [associative](https://arbital.com/p/3h4), but this is false; a typical element of $A \times (B \times C)$ looks like $(a,(b,c))$, while a typical element of $(A \times B) \times C$ looks like $((a,b),c)$. Since these sets have different elements, they are not [equal](https://arbital.com/p/618). However, they are [isomorphic](https://arbital.com/p/4f4). In fact, the two functors $\text{Set}\times\text{Set}\times\text{Set}\to\text{Set}$  given by $(A,B,C) \mapsto A \times (B \times C)$ and $(A,B,C) \mapsto (A \times B) \times C$ are isomorphic in the category of functors $\text{Set}\times\text{Set}\times\text{Set}\to\text{Set}$. That is, they are naturally isomorphic.

Eric Rogstad
Kevin Clancy
Luke Sciarappa


Modal combat

Modal combat is a way of studying the special case of the [one-shot prisoner's dilemma](https://arbital.com/p/5py) in which the players are programs which have read access to each other source code. There is a class of such agents, defined by expressions in modal logic, which can do general provability reasoning about themselves and each other, and furthermore there is a quick way to evaluate how two such agents will behave against each other.

While they are not allowed to run each other's source code %%note: Otherwise we risk infinite regression as $A$ simulates $B$ that simulates $A$...%%, we are going to generously give each of them access to a [halting oracle](https://arbital.com/p/) so that they can make powerful reasoning about each other's behavior.

Wait, why is this interesting? Are not your assumptions a bit overpowered? Well, they are. But thinking about this machines which are obviously way more powerful than our current capabilities is a useful, albeit unrealistic, proxy for superintelligence. We should furthermore remark that while we are going to stick with halting oracles through this article there exist bounded versions of some of the results.

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

##Optimality in modal combat

We are especially interested in figuring out how would one go about making ideal competitors in this setup, because that may shed light on [decision theory](https://arbital.com/p/) issues.

For that, we need a good optimality criterion to allow us to compare different players. Let's think about some conditions we would like our player to satisfy:

1. **Unexploitability**: We would like our player to never end in the sucker's payoff (we cooperate and the opponent defects).
2. **Robust cooperation**: Whenever it is possible to achieve mutual cooperation, we would like to do so. A particular way of highly desirable robust cooperation is achieving cooperation with one self. We call this property of self-trust **Löbian cooperation**.
3. **Robust exploitation**: Whenever it is possible to exploit the opponent (tricking him into cooperating when we defect) we wish to do so.

The question now becomes: it is possible to design a program which performs optimally according to all those metrics? How close can we get?

##DefectBot and CliqueBot

The simplest program that achieves unexploitability is the program which defects against every opponent, commonly known as $DefectBot$. This is a rather boring result, which does not manage to even cooperate with itself.

Taking advantage of the access to source codes, we could build a program $CliqueBot$ which cooperates if and only if the opponent's source code is equal to his own code (wait, how do you do that? With the magic of [quining](https://arbital.com/p/322) we can always treat our own code as data!). Unexploitable? Check. Achieves Löbian cooperation? Check. But can't we do better? Innocuous changes to $CliqueBot$'s source code (such as adding comments) result in agents which fail to cooperate, which is rather lame.

##Modal agents
Before we start making more complicated program designs we need to develop a good reasoning framework to figure out how the matches will end. Simple simulation will not do, because we have given them access to a halting oracle to make proofs about their opponent's program.

Fortunately, there is one formal system which nicely handles reasoning about provability: cue to [https://arbital.com/p/5l3](https://arbital.com/p/5l3).

in provability logic we have a modal operator $\square$ which [Solovay's theorem](https://arbital.com/p/5n5) tells us can be read as "it is provable in $PA$ that". Furthermore, this system of logic is fully decidable, though that comes at the expense of some expressive power (we, for example, do not have quantifiers in modal logic).

The next step is to express agents in modal combat as expressions of modal logic.

For that we need to extend provability logic with second-order formulas. A second-order formula $\phi(x)$ is a fixed point expression in the language of modal logic in which $x$ appears as a formula and $\phi$ can be used as a variable.

For example, we could have the formula $\phi(x) \leftrightarrow \square x(\phi)$ and the formula $\psi(x)\leftrightarrow \neg\square x(\psi)$. To evaluate a formula with its free variable instantiated we substitute their variables its fixed point expression its body as many times as required until the formula with its argument its expressed in terms of itself, and then we compute its [fixed point in GL](https://arbital.com/p/5lx).

For example, $\psi(\phi)\leftrightarrow \neg\square\phi(\psi)\leftrightarrow  \neg\square\square\psi (\phi)$, and the fixed point can be calculated to be $GL\vdash \psi(\phi)\leftrightarrow \neg [ \bot \vee  \square\square\bot \wedge \neg\square \bot](https://arbital.com/p/\square) $, which is arithmetically false and thus we say that $\phi(\psi)$ evaluates to false.

It is possible to reference other formulas in the fixed point expression of a formula, though one precaution must be taken of lest we fall into circular dependencies. We are going to say that a formula is of rank $0$ if it is defined in terms of itself and no other formula. Then we say that a formula can only be defined in terms of itself and lower rank formulas, and define the rank of a formula as the biggest rank in its definition plus one. If the rank is well defined, then the formula is also well defined. To guarantee the existence of a fixed point it will also be convenient to restrict ourselves to [fully modalized](https://arbital.com/p/5m4) formulas.

>A **modal agent** of rank $k$ is a one place [fully modalized](https://arbital.com/p/5m4) modal formula of the kind we have just defined of rank $k$, whose free variable represents the opponent's source code. To simulate a match, we substitute the free variable by the opponents formula, and evaluate it according to the procedure described in the previous paragraph. If the fixed point is arithmetically true, then the agent cooperates, and if it is false it defects. The rank of the agent is the maximum number of nested boxes that occur in the sentence.

Thus we have that we can express $DefectBot$ as a modal agent with the modal formula $DB(x)\leftrightarrow \bot$.

##FairBot and PrudentBot
To try to beat CliqueBot's performance, we will define a bot which takes advantage of the halting oracle to achieve robust cooperation with a greater class of agents.

    FairBot(x): if Prv(x(FairBot))=C then output C else return D

$FairBot$ tries to find a proof in $PA$ that its opponent is going to cooperate with him, and if it succeeds then it cooperates as well.

We can express $FairBot$ as a modal agent represented by the modal formula $FB(x) \leftrightarrow \square x(FB)$.

So, does $FairBot$ cooperate with himself? Let's find out!

The result of the match against itself is the same as the fixed point of $FB(FB)\leftrightarrow \square FB(FB)$. According to the methods for computing fixed points, the fixed point is thus $\top$, which is of course arithmetically true%%note: This can also be figured out using [https://arbital.com/p/55w](https://arbital.com/p/55w)%%. Thus $FairBot$ satisfies the Löbian cooperation condition!

Furthermore, this holds no matter how $FairBot$ is implemented, so it is way more robust than $CliqueBot$!

What happens if $FairBot$ faces $DefectBot$? Then we have to find the fixed point of $FB(DB)\leftrightarrow \square \bot$, which is obviously $\square \bot$, and since this expression is arithmetically false %%note: PA+1 disproves it!%%, then it is the case that FairBot does not cooperate with $DefectBot$.

$FairBot$ is an impressive formalism, and it achieves very robust cooperation. However, it fails to exploit other agents. For example, it fails to exploit the simple program $CooperateBot$ %%note: $CB(x)\leftrightarrow \top$%%, which always cooperates.

An improvement can be made by considering the program represented by the rank $1$ modal formula $PB(x)\leftrightarrow\square [https://arbital.com/p/x](https://arbital.com/p/x)$, which we call $PrudentBot$. By its definition, $PrudentBot$ cooperates with another modal agent if and only if it can prove that the opponent will cooperate with him, and furthermore $PA+1$ proves that its opponent will not cooperate with $DefectBot$.

Thus $PrudentBot$ cooperates against itself and with $FairBot$, but defects against $DefectBot$ and $CooperateBot$. In fact, $PrudentBot$ dominates $FairBot$.

##Can we do better?
One question that comes to mind: is it possible to design a modal agent which achieves cooperation with every agent for which there is at least an input which will make it cooperate without being exploitable? Sadly no. Consider the bot TrollBot$ defined by $TB(x)\leftrightarrow \square x(DB)$%%note: Exercise for the reader: does $TrollBot$ cooperate with himself?%%. That is, $TrollBot$ cooperates with you if and only if you cooperate with $DefectBot$.

Then $CooperateBot$ achieves cooperation with $TrollBot$, but no bot cooperates with $TrollBot$ while defecting against $DefectBot$.

In general, there is no good optimality criteria developed. An open question is to formalize a good notion of optimality in the class of modal agents and design a bot which achieves it.

Jaime Sevilla Molina
Eric Bruylant
Patrick LaVictoire


Least common multiple

Given two positive natural numbers $a$ and $b$, their **least common multiple** $\text{LCM}(a,b)$ is the smallest natural number divided by both $a$ and $b$. As an example take $a=12, b=10$, then the smallest number divided by both of them is $60$.

There is an equivalent definition of the LCM, which is strange at first glance but turns out to be mathematically much more suited to generalisation: the LCM $l$ of $a$ and $b$ is the natural number such that for every number $c$ divisible by both $a$ and $b$, we have $l$ divides $c$.
This describes the LCM as a [poset least upper bound](https://arbital.com/p/3rc) (namely the [https://arbital.com/p/-3rb](https://arbital.com/p/-3rb) $\mathbb{N}$ under the relation of divisibility).

Note that for $a$, $b$ given, their product $ab$ is a natural number divided by both of them. The least common multiple $\text{LCM}(a,b)$ divides the product $ab$ and for $\text{GCD}(a,b)$ the [https://arbital.com/p/-5mw](https://arbital.com/p/-5mw) of $a, b$ we have the formula
$$a\cdot b = \text{GCD}(a,b) \cdot \text{LCM}(a,b). $$
This formula offers a fast way to compute the least common multiple: one can compute $\text{GCD}(a,b)$ using the [https://arbital.com/p/euclidean_algorithm](https://arbital.com/p/euclidean_algorithm) and then divide the product $ab$ by this number.

In practice, for small numbers $a,b$ it is often easier to use their factorization into [prime numbers](https://arbital.com/p/4mf). In the example above we have $12=2 \cdot 2 \cdot 3$ and $10=2 \cdot 5$, so if we want to build the smallest number $c$ divided by both of them, we can take $60=2 \cdot 2 \cdot 3 \cdot 5$. Indeed, to compute $c$ look at each prime number $p$ dividing one of $a,b$ (in the example $p=2,3,5$). Then writing $c$ as a product we take the factor $p$ the maximal number of times it appears in $a$ and $b$. The factor $p=2$ appears twice in $12$ and once in $10$, so we take it two times. The factor $3$ appears once in $12$ and zero times in $10$, so we only take it once, and so on.

Kevin Clancy
Johannes Schmitt
Patrick Stevens

The **least common multiple (LCM)** of two positive  [natural numbers](https://arbital.com/p/45h)  a, b is the smallest natural number that both a and b divide, so for instance LCM(12,10) = 60.


Up to isomorphism

summary: "The property $P$ holds up to isomorphism" is a phrase which means "we might say an object $X$ has property $P$, but that's an abuse of notation. When we say that, we really mean that there is an object [isomorphic](https://arbital.com/p/4f4) to $X$ which has property $P$". Essentially, it means "the property might not hold as stated, but if we replace the idea of *equality* by the idea of *isomorphism*, then the property holds".

Relatedly, "The object $X$ is [well-defined](https://arbital.com/p/5ss) up to isomorphism" means "if we replace $X$ by an object isomorphic to $X$, we still obtain something which satisfies the definition of $X$."

"The property $P$ holds up to isomorphism" is a phrase which means "we might say an object $X$ has property $P$, but that's an abuse of notation. When we say that, we really mean that there is an object [isomorphic](https://arbital.com/p/4f4) to $X$ which has property $P$". Essentially, it means "the property might not hold as stated, but if we replace the idea of *equality* by the idea of *isomorphism*, then the property holds".

Relatedly, "The object $X$ is [well-defined](https://arbital.com/p/5ss) up to isomorphism" means "if we replace $X$ by an object isomorphic to $X$, we still obtain something which satisfies the definition of $X$."

# Examples

## Groups of order $2$

There is only one [https://arbital.com/p/-3gd](https://arbital.com/p/-3gd) of [order](https://arbital.com/p/3gg) $2$ *up to isomorphism*.
We can define the object "group of order $2$" as "the group with two elements"; this object is well-defined up to isomorphism, in that while there are several different groups of order $2$ %%note: Two such groups are $\{0,1\}$ with the operation "addition [modulo](https://arbital.com/p/5ns) $2$", and $\{e, x \}$ with [https://arbital.com/p/-54p](https://arbital.com/p/-54p) $e$ and the operation $x^2 = e$.%%, any two such groups are isomorphic.
If we don't think of isomorphic objects as being "different", then there is only one distinct group of order $2$.

A phrase mathematicians use when saying "we only care about the [structure](https://arbital.com/p/structure_mathematics) of an [object](https://arbital.com/p/object_mathematics), not about specific implementation details of the object".


Greatest lower bound in a poset

In a [https://arbital.com/p/-3rb](https://arbital.com/p/-3rb), the greatest lower bound of two elements $x$ and $y$ is the "largest" element which is "less than" both $x$ and $y$, in whatever ordering the poset has.
In a rare moment of clarity in mathematical naming, the name "greatest lower bound" is a perfect description of the concept: a "lower bound" of two elements $x$ and $y$ is an object which is smaller than both $x$ and $y$ (it "bounds them from below"), and the "greatest lower bound" is the greatest of all the lower bounds.

Formally, if $P$ is a [set](https://arbital.com/p/3jz) with partial order $\leq$, and given elements $x$ and $y$ of $P$, we say an element $z \in P$ is a **lower bound** of $x$ and $y$ if $z \leq x$ and $z \leq y$.
We say an element $z \in P$ is the **greatest lower bound** of $x$ and $y$ if:

- $z$ is a lower bound of $x$ and $y$, and
- for every lower bound $w$ of $x$ and $y$, we have $w \leq z$.


An introductory guide to modern logic

Welcome! We are about to start a journey through modern logic, in which we will visit two central results of this branch of mathematics, which are often misunderstood and sometimes even misquoted: [Löb's theorem](https://arbital.com/p/) and [Gödel's second incompleteness theorem](https://arbital.com/p/).

Modern logic can be said to have been born in the ideas of Gödel regarding the amazing property of self-reference that plagues arithmetic. Badly explained, this means that we can force an interpretation over natural numbers which relates how deductions are made in arithmetic to statements about arithmetical concepts such as divisibility.

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

This guide is targets people who are already comfortable with mathematical thinking and mathematical notation. It requires however no specific background knowledge about logic or math to be read. The guide starts lightweight and gets progressively more technical.

#Formal proofs
What is logic anyway? A short explanation refers to the fact that we humans happen to be able to draw conclusions about things we have not experienced by using facts about how the world is. For example, if you see somebody entering the room and is dripping water, then you infer that it is raining outside, even though you have not seen the rain yourself.

This may seem trivial, but what if we are trying to program that into a computer? How can we capture this intuition of what reasoning is and write down the rules for proper reasoning in a way precise enough to be turned into a program?

To accomplish that is to do logic. The ultimate goal is to have an efficient procedure that if followed will allow to **deduce** every true consequence of a set of premises, so simple that it could be taught to a dumb machine which only follows mechanical operations.

So let's try to formalize reasoning!

We are going to draw inspiration from mathematicians and see what they are doing when proving a result.

Though the method is often convoluted, non linear and hard to understand, in essence what they are doing is writing down some hypothesis and facts that they assume to be true. Then they apply some manipulation rules which they assume that when applied on true premises allow to derive true facts. After iterating this process, they arrive to the wanted result.

## Getting formal

Well, let's wrap together this intuitive process in a formal definition.

> A [proof of a sentence $\phi$](https://arbital.com/p/)  is a sequence of [well formed sentences](https://arbital.com/p/) such that every sentence in the sequence is either an [https://arbital.com/p/-6cd](https://arbital.com/p/-6cd) or can be derived of the previous sentences using a [derivation rule](https://arbital.com/p/), and the final sentence in the sequence is $\phi$. A sentence which has a proof is called a [theorem](https://arbital.com/p/).

Don't be scared by all the new terms! Let's go briefly over them.

A **well formed sentence** is just a combination of letters which satisfies a certain criteria which makes them easy to interpret. The sentences we will be dealing with are logical formulas, which use a particular set of symbols such as $=, \wedge, \implies$. Our goal is to assign truth values to sentences. That is, to say if particular sentences are true or false.

An **axiom** is something that we assume to be true without requiring a proof. For example, a common axiom in arithmetic is assuming that $0$ is different than $n+1$ for all natural numbers $n$. Or expressed as a well formed sentence, $\forall n. 0 \not = n+1$. %%note:The symbol $\forall$ is an upside-down A and means "[for all](https://arbital.com/p/)".%%

A **derivation rule** is a valid basic step in a proof. Perhaps the simplest example is [modus ponens](https://arbital.com/p/) . Modus ponens tells you that if you have deduced somehow that $A\implies B$ and also $A$, then you can deduce from both facts $B$.

Those three components constitute the basis of a **logical system** for reasoning: a criteria for constructing [well formed sentences](https://arbital.com/p/), a set of  [axioms](https://arbital.com/p/6cd) which we know to be true %%note: The set of axioms does not have to be finite! In particular, we can specify a criteria to identify infinitely many axioms. This is called an [axiom schema](https://arbital.com/p/)%% and some [derivation rules](https://arbital.com/p/) which allow us to deduce new conclusions.

%%hidden(Show example):
For a rather silly example, let's consider the system $A$ with the following components:
* Well formed sentences: the set of words in the Webster dictionary.
* Axioms: The word 'break'.
* Deduction rules: If a word $w$ is a theorem of $A$, then so it is a word which only differs in one letter of $w$, either by adding, substracting or replacing it anywhere in $w$.

Thus the word 'trend' is a theorem of $A$, as shown by the 4 steps long proof 'break - bread - tread - trend'. The first sentence in the proof is an axiom. Every sentence after is deduced from our deduction rule using the previous sentence as a premise.
%%

## Interpretations

Given how we defined a logical system, there is a certain degree of freedom we have, as we can choose the underlying sets of well formed sentences, the axioms and the deduction rules. However, as shown in the example above, if we want to make meaningful deductions we should be careful in what components do we choose for our logical system.

The criteria we use to choose these components is intertwined with the [https://arbital.com/p/-model](https://arbital.com/p/-model) we are trying to reason about. Models can be anything that captures an aspect of the world, or just a mathematical concept. To put it simply, they are the thing we are trying to reason *about*.

Depending on what kind of entities the model has, we will lean towards a particular choice of sentences. For example, if our model consists in just facts which are subject to some known logical relations we could use the language of [https://arbital.com/p/-propositional_logic](https://arbital.com/p/-propositional_logic). But if our model contains different objects which are related in different ways, we will prefer to use the language of [https://arbital.com/p/first_order_logic](https://arbital.com/p/first_order_logic).

Each model has an interpretation associated, which relates the terms in the sentences to aspects of the model. For all practical purposes, a model and its interpretation are the same once we have fixed the language, and thus we will use the terms as synonyms.

Then, depending on how the model evolves and what things can we infer from what facts we should choose some deduction rules. Together, the sentences and the deduction rules specify a class of possible models. If the deduction rules correctly capture the properties of the class of models we had in mind, in the sense that from true premises we really derive true consequences, then we will say that they are [https://arbital.com/p/-sound](https://arbital.com/p/-sound).

Intuitively, we say that the choice of language and deduction rules decides the "shape" that our models will have. Every model with such a shape will be part of the universe of models specified by those components of a logical system.

With this imagery of a class of models, we can think of axioms as an attempt to reduce the class of models and pin down the concrete model we are interested in, by choosing as axioms sentences whose interpretation is true in only the model we are interested in and in no other model %%note: sadly, there are occasions in which this is just not possible%%.

A property tightly related to soundness is [https://arbital.com/p/-completeness](https://arbital.com/p/-completeness). A system is complete if every sentence which is true under all interpretations which satisfy our axioms has a proof.

It is important to realize that logical systems can be talking about many models at once. In particular, if two interpretations satisfy the axioms but disagree on the truth of a particular sentence, then that sentence will be [undecidable](https://arbital.com/p/) in our model.

This suggest a technique for proving independence of logical statements. To show that a certain sentence is independent from some axioms, construct two models which satisfy those axioms but contradict each other on the value of the statement. A nice example of this is how Lobachevsky showed that [Euclides Fifth postulate is independent from the other four postulates](https://en.wikipedia.org/wiki/Parallel_postulate#History).

## Introducing PA

For our purposes, we will stick to a particular logical system called [Peano arithmetic](https://arbital.com/p/3ft). This particular choice of axioms and deduction rules is interesting because it reflects a lot of our intuitions about how numbers work, which in turn can be used to talk about many phenomena in the real world. In particular, *they can talk about themselves*.

Before we move on to this "talking about themselves" business I am going to introduce more notation. We will refer to Peano Arithmetic as $PA$. If a sentence $\phi$ follows from the axioms of $PA$ and its deduction rules %%note: ie, there is a proof of $\phi$ using only axioms and deduction rules from $PA$%%, we will say that $PA\vdash \phi$, read as "$PA$ proves $\phi$".

#Self reference and the provability predicate
Let's try to get an intuition of what I mean when I say that numbers can talk about themselves.

The first key intuition is that we can refer to arbitrary sequences of characters using numbers. For example, I can declare that from now onwards the number $1$ is going to refer to the sequence of letters "I love Peano Arithmetic". Furthermore, using a clever rule to relate numbers and sentences I can make sure that every possible finite sentence gets assigned a number %%note: This is called [https://arbital.com/p/-encoding](https://arbital.com/p/-encoding)%%.

A simple encoding goes by the name of **Gödel encoding**, and consists of assigning to every symbol we are going to allow to be used in sentences a number. For example, $=$ could be $1$, and $a$ could be $0$, and so on and so forth. Then we could encode a sentence consisting of $n$ symbols as the number $2^{a_1}3^{a_2}5^{a_3}\cdots p(n)^{a_n}$. That is, we take the number which is the product of the $n$th first primes with exponents equal to the assigned numbers.%%note:This is possible because every number can be [decomposed as a unique product of primes](https://arbital.com/p/-5rh).%%

The process can be repeated to encode sequences of sentences as single numbers. Thus, we can encode whole proofs as single numbers. We could also encode sequences of sequences of sentences, but that is going too far for our purposes.

So the point is, we can exchange sentences by numbers and vice versa. Can we also talk about deduction using numbers?

It turns out we can! With the encoding we have chosen it is cumbersome to show, but we can write a **predicate** $Axiom(x)$ %%note: A predicate is a well formed sentence in which we have left one or more "holes" in the form of variables which we can substitute for literal numbers or quantify over. For example, we can have the predicate $IsEqualTo42(x)$ of the form $x = 42$. Then $PA\vdash IsEqualTo42(42)$ and $PA\vdash \exists x IsEqualTo42(x)$, but $PA\not\vdash IsEqualTo42(7)$%% in the language of Peano Arithmetic such that $PA\vdash Axiom(\textbf{n})$ if and only if $n$ is a number which encodes an axiom of $PA$.

Furthermore, deduction rules which require $n$ premises can be represented by $n+1$ predicates $Rule(p_1, p_2,..., p_n, r)$ which is provable in $PA$ if and only if $p_1, ...., p_n$ are numbers encoding valid premises for the rule and $r$ is the corresponding deduced fact.

A bit more of work and we can put together a predicate $Proof(x,y)$, which is provable in $PA$ if and only if $x$ encodes the valid proof of the sentence $y$. Isn't that neat!?

Since we are not too interested in the proof itself, and more in the fact that there is a proof at all, we are going to construct the **provability predicate** $\exists x. Proof(x,y)$,  which we will call $\square_{PA}(y)$.%%note: $\exists$ is a backwards E and means "there exists"%%. So then, $\square_{PA}(x)$ literally means "There is a proof in $PA$ of $x$".

Thus we can say that if the number $\ulcorner 1+1=2 \urcorner$ corresponds to the sentence $1+1=2$%%note: This notation remains in effect for the rest of the article.%%, then $PA\vdash \square_{PA}(\ulcorner 1+1=2 \urcorner)$. That is, $PA$ proves that there is a proof in $PA$ of $1+1=2$.

Now, the predicates we have seen so far are quite intuitive and nicely behaved, in the sense that their deducibility from $PA$ matches quite well what we would expect from our intuition. However, adding the existential quantifier in front of $Proof(x,y)$ we get some nasty side effects.

Warning! Really bad analogy incoming!

The thing is that $PA$ "hallucinates" numbers which it is not sure whether they exist or not. Those are no mere natural numbers, but infinite numbers further in the horizon of math. While $PA$ cannot prove their existence, it neither cannot prove its non existence. So $PA$ becomes wary of asserting that proofs do not exist for a certain false sentence. After all, one of those **non standard** numbers may encode the proof of the false sentence! Who is to prove otherwise?

Can we patch this somehow? Maybe by adding more axioms or deduction rules to $PA$ so that it can prove that those numbers do not exists? The answer is yes but not really. While it is doable in principle, the resulting theory becomes too difficult to manage, and we can no longer use it for effective deduction %%note: Technically, $PA$ loses its [semidecidability](https://arbital.com/p/) that way.%%.

We will now proceed to prove two technical results which better formalize this idea: Löb's theorem and Gödel's Second Incompleteness Theorem.

#Löb's theorem

Löb's result follows from the intuitive properties of deduction that the provability predicate actually manages to capture. This points to the fact that it is not our definition what is wrong, but rather to a fundamental impossibility in logic.

The intuitive, good properties of $\square_{PA}$ are known as the Hilbert-Bernais derivability conditions, and are as follows:

1. If $PA\vdash A$, then $PA\vdash \square_{PA}(\ulcorner A\urcorner)$.
2. $PA\vdash \square_{PA}(\ulcorner A\rightarrow B\urcorner) \rightarrow [https://arbital.com/p/\square_{PA}](https://arbital.com/p/\square_{PA})$
3. $PA\vdash \square_{PA}(\ulcorner A\urcorner) \rightarrow \square_{PA} \square_{PA} (\ulcorner A\urcorner)$.

Let's go over each of them in turn.

1) says reasonably that if $PA$ proves a sentence $A$, then it also proves that there is a proof of $A$.

2) affirms that if you can prove that $A$ implies $B$ then the existence of a proof of $A$ implies the existence of a proof of $B$. This is quite intuitive, as we can concatenate a proof of $A$ with a proof of $A\rightarrow B$ and deduce $B$ from an application of *modus ponens*.

3) is a technical result which states that the formalization of 1) is provable when we are dealing with sentences of the form $\square_{PA}(\ulcorner A \urcorner)$.

One more ingredient is needed to derive Löb's: the [https://arbital.com/p/-59c](https://arbital.com/p/-59c), which states that for all predicates $\phi(x)$ there is a formula $\psi$ such that $PA\vdash \psi \leftrightarrow \phi(\ulcorner \psi \urcorner)$.

The details of the proof can be found in [https://arbital.com/p/59b](https://arbital.com/p/59b).

The details are not essential to the main idea, but it can be illustrative to work through the formal proof. Plus the intuition behind related to the non-standard numbers we talked about before.

What is really interesting is that now we are in position to enunciate and understand Löb's theorem!

> **Löb's theorem**

> If $PA\vdash \square_{PA}(\ulcorner A\urcorner) \rightarrow A$, then $PA\vdash A$.

> (or equivalently, if $PA\not\vdash A$ then $PA\not\vdash \square_{PA}(\ulcorner A\urcorner) \rightarrow A$).

Talk about an unintuitive result! Let's take a moment to ponder about its meaning.

Intuitively, we should be able to derive from the existence of a proof of $A$ that $A$ is true. After all, proofs are guarantees that something really follows from the axioms, so if we got those right and our derivation rules are correct then $A$ should be true. However, $PA$ does not trust that being able to find the existence of a proof is enough to make $A$ true!

Indeed, he needs to be able to see by himself the proof. In other words, there must be a $n$ such that $PA\vdash Proof(\textbf n, \ulcorner A\urcorner)$. Then he will trust that it is indeed the case that $A$.

I will repeat that again because it looks like a tongue twister. Suppose somebody came and assured $PA$ that from the axioms of $PA$ it follows that there exists a number $n$ satisfying $Proof(\textbf n,\ulcorner A\urcorner)$. Then $PA$ would say, show me the proof or I am going to assume that that $n$ is actually a non standard number and you a friggin' liar.

If somebody just comes saying he has a proof, but produces none, $PA$ becomes suspicious. After all, the proof in question could be a non-standard proof encoded by one of the dreaded non standard numbers! Who is going to trust that!

#Gödel II
And finally we arrive to Gödel's Second Incompleteness Theorem, perhaps the most widely misunderstood theorem of all mathematics.

We first need to introduce the notion of [consistency.](https://arbital.com/p/) Simply enough, a logical system is consistent if it does not prove a contradiction, where a contradiction is something impossible. For example, it cannot ever be the case that $P\wedge \neg P$, so $P\wedge \neg P$ is a contradiction no matter what $P$ is. We use the symbol $\bot$ to represent a contradiction.

The statement of GII is as follows:

> Gödel Second Incompleteness Theorem (concrete form)
> If $PA$ is consistent, then $PA\not \vdash \neg \square_{PA}(\bot)$

Notice that GII follows quite directly from Löb's theorem. Actually, it is the case that Löb's theorem also follows from GII, so [both results are equivalent](https://arbital.com/p/5hs).

This result can be interpreted as follows: you cannot make a system as complex as $PA$ in which you can talk about deduction with complete certainty, and thus about consistency. In particular, such a system cannot prove that he himself is consistent.

The result is startling, but in the light of our previous exposition is clear what is going on! There is always the shadow of non standard numbers menacing our deductions.

#Summary
And that concludes our introduction to formal logic!

To recall some important things we have learned:

* Logical systems capture the intuition behind deductive reasoning. They are composed of axioms and deductive rules that are chained to compose proofs.
* Simple logical systems that are used to talk about numbers, such as $PA$, can be interpreted as talking about many things through encodings, and in particular they can talk about themselves.
* There are expressions in logic that capture the concepts involved in deductions. However, the most important of them, the provability predicate $\square_{PA}$, fails to satisfy some intuitive properties due to the inability of $PA$ to prove that non standard numbers do not exists.
* Löb's theorem says that if $PA$ cannot prove $A$, then it can neither prove that from $\square_{PA}(\ulcorner A\urcorner$ follows $A$.
* $PA$ cannot prove its own consistency, in the sense that it cannot prove that the standard predicate is never satisfied by a contradiction.

If you want to get deeper in the rabbit hole, read about [model theory](https://arbital.com/p/) and [https://arbital.com/p/-semantics](https://arbital.com/p/-semantics) or [https://arbital.com/p/-534](https://arbital.com/p/-534).

Eric Bruylant
Mark Chimes
Jaime Sevilla Molina


Wants to get straight to Bayes

A simple requisite page to mark whether the user has selected wanting to get straight into Bayes on the [Bayes' Rule Guide start page](https://arbital.com/p/1zq).