Extraordinary claims

# Summary

What makes something count as an 'extraordinary claim' for the purposes of determining whether it [requires extraordinary evidence](https://arbital.com/p/21v)?

Broadly speaking:

- Not-yet-supported complexity or precise details; by [Occam's Razor](https://arbital.com/p/occams_razor), this requires added support from the evidence.
- Violation of (deep, causal) generalizations; behaving in a way that's out of character for (the lowest level of) the universe.

Some properties that do *not* make a claim inherently 'extraordinary' in the above sense:

- Having future consequences that are important, or extreme-sounding, or that would imply we need to take costly policies.
- Whether few or many people already believe it.
- Whether there might be bad reasons to believe it.

The ultimate grounding for the notion of 'extraordinary claim' would come from [Solomonoff induction](https://arbital.com/p/11w), or some generalization of Solomonoff induction to handle more [https://arbital.com/p/-naturalistic](https://arbital.com/p/-naturalistic) reasoning about the world.  Since this page is a [Work In Progress](https://arbital.com/p/4v), it currently only lists out the derived heuristics, rather than trying to explain in any great detail how those heuristics might follow from Solomonoff-style reasoning.

# Example 1: Anthropogenic global warming

Consider the idea of [anthropogenic global warming](https://en.wikipedia.org/wiki/Global_warming) as it might have been analyzed in *advance* of observing the actual temperature record.  Would the claim, "Adding lots of carbon dioxide to the atmosphere will result in increased global temperatures and climate change", be an 'extraordinary' claim requiring extraordinary evidence to verify, or an ordinary claim not requiring particularly strong evidence?  We assume in this case you can do all the physics reasoning or ecological reasoning you want, but you can't actually look at the temperature record yet.

The core argument (in *advance* of looking at the temperature record) will be:  "Carbon dioxide is a greenhouse gas, so adding sufficient amounts of it to the atmosphere ought to trap more heat, which ought to raise the equilibrium temperature of the Earth."

To evaluate the ordinariness or extraordinariness of this claim:

We *don't* ask whether the future consequences of the claim are extreme or important.  Suppose that adding carbon dioxide actually did trap more heat; would the Standard Model of physics think to itself, "Uh oh, that has some extreme consequences" and decide to let the heat radiate away anyway?  Obviously not; the laws of physics have no privileged tendency to avoid consequences that are, on a human scale, very important in a positive or negative direction.

We *don't* ask whether the policies required to address the claim are very costly - this isn't something that would prevent the causal mechanisms behind the claim from operating, and more generally, reality doesn't try to avoid inconveniencing us, so it doesn't affect the prior probability we assign to a claim in advance of seeing any evidence.

We *don't* ask whether someone has a motive to lie to us about the claim, or if they might be inclined to believe it for crazy reasons.  If someone has a motive to lie to us about the evidence, this affects the strength of evidence, rather than lowering the [prior probability](https://arbital.com/p/1rm).  Suppose somebody said, "Hey, I own an apartment in New York, and I'll rent it to you for $2000/month."  They might be lying and trying to trick you out of the money, but this doesn't mean "I own an apartment in New York" is an extraordinary claim.  Lots of people own apartments in New York.  It happens all the time, even.  The monetary stake means that the person might have a motive to lie to you, but this affects the likelihood ratio, not the prior odds.  If we're just considering their unsupported word, the probability that they'll say "I own an apartment in New York", given that they *don't* own an apartment in New York, might be unusually high because they could be trying to run a rent scam.  But this doesn't mean we have to call in physicists to check out whether the apartment is really there - we just need stronger, but ordinary, evidence.  Similarly, even if there was someone tempted to lie about global warming, we'd consider this as a potential weakness of the evidence they offer us, but not a weakness in the prior probability of the proposition "Adding carbon dioxide to the atmosphere heats it up."

(Similarly, wanting strong evidence about a subject doesn't always coincide with the underlying claim being improbable.  Maybe you're considering *buying* a house in San Francisco, and *millions* of dollars are at stake.  This implies a high [value of information](https://arbital.com/p/value_of_information) and you might want to invest in extra-strong evidence like having a third party check the title to the house.  But this isn't because it's a Lovecraftian anomaly for anyone to own a house in San Francisco.  The money at stake just means that we're willing to pay more to eliminate small residues of improbability from this very ordinary claim.)

We *do* ask whether "adding carbon dioxide warms the atmosphere" or "carbon dioxide doesn't warm the atmosphere" seems more consonant with the previously observed behavior of carbon dioxide.

After we finish figuring out how carbon dioxide molecules and infrared photons usually behave, we *don't* give priority to generalizations like, "For as long as we've observed it, the average summer temperature in Freedonia has never gone over 30C."  It's true that the predicted consequences of carbon dioxide behaving like it usually does, are violating another generalization about how Freedonia usually behaves.  But we generally give priority to *deeper* generalizations continuing, i.e., generalizations that are *lower-level* or *closer to the start of causal chains.*

- The behavior of carbon dioxide is lower-level - it's generalizing over a class of molecules that we can observe in very great detail and make very precise generalizations about.  The weight of a carbon dioxide molecule (with the standard isotopes in both cases), or the amount of infrared light the corresponding gas allows to pass, is something that varies much less than the summer temperature in Freedonia - it's a very precise, very strong generalization.
- The behavior of carbon dioxide is closer to the start of the chain of cause and effect.  The summer temperature in Freedonia is something that's caused by, or happens as a result of, a particular level of carbon dioxide in Freedonia's atmosphere.  We'd expect changes that happened toward the start of the causal chain to produce changes in the effects at the end of the causal chain.  Conversely, it would be very surprising if the Freedonia-surface-temperature generalization can reach back and force carbon dioxide to have a different permeability to infrared.

We *don't* consider whether lots of prestigious scientists believe in global warming.  If you expect that lots of prestigious scientists usually won't believe in a proposition like global warming in worlds where global warming is false, then observing an apparent scientific consensus might be moderately strong *evidence* favoring the claim.  But that isn't part of the *prior probability* before seeing any evidence.  For that, we want to ask about how complicated the claim is, and whether it violates or obeys generalizations we already know about.

Another way of looking at a test of extraordinariness is to ask whether the claim's truth or falsity would imply learning more about the universe that we didn't already know.  If you'd never observed the temperature record, and had only guessed *a priori* that adding carbon dioxide would warm the atmosphere, you wouldn't be too surprised to go look at the temperature record and find that nothing seemed to be happening.  In this case, rather than imagining that you were wrong about the behavior of infrared light, you might suspect, for example, that plants were growing more and absorbing the carbon dioxide, keeping the total atmospheric level in equilibrium.  But in this case you would have learned *a new fact not already known to you (or science)* which explained why global temperatures were not rising.  So to expect that outcome in *advance* would be a more extraordinary claim than to not expect it.  If we can imagine some not-too-implausible ways that a claim could be wrong, but they'd all require us to postulate new facts we don't solidly know, then this doesn't make the original claim 'extraordinary'.  It's still a very ordinary claim that we'd start believing in after seeing an ordinary amount of evidence.

Eric Bruylant
Eliezer Yudkowsky
Alexei Andreev

To determine whether something is an 'extraordinary claim', for purposes of deciding whether it [requires extraordinary evidence](https://arbital.com/p/21v), we consider / don't consider these factors:

- Do consider:  Whether the claim requires lots of complexity that isn't already implied by other evidence.
- Don't consider:  Whether the claim has future consequences that are extreme or important-sounding.
- Don't consider:  Whether the claim's truth would imply that we ought to do costly or painful things.
- Do consider:  Whether the claim violates low-level or causal generalizations.
- Don't consider:  Whether the claim, if locally true, would imply downstream effects that violate high-level or surface generalizations.

We don't automatically *believe* claims that pass such tests; we just consider them as ordinary claims which we'd believe on obtaining ordinary evidence.


Prior

Our (potentially rich or complex) state of knowledge and *propensity to learn,* before seeing the evidence, expressed as a [probability function](https://arbital.com/p/1zj).  This is a deeper and more general concept than '[https://arbital.com/p/-1rm](https://arbital.com/p/-1rm)'.  A prior probability is like guessing the chance that it will be cloudy outside, in advance of looking out a window.  The more general notion of a Bayesian prior would include probability distributions that answered the question, "*Suppose* I saw the Sun rising on 999 successive days; would I afterwards think the probability of the Sun rising on the next day was more like 1000/1001, 1/2, or 1 - 10^-6?"  In a sense, a baby can be said to have a 'prior' before it opens its eyes, and then to develop a model of the world by updating on the evidence it sees after that point.  The baby's 'prior' expresses not just its current ignorance, but the different kinds of worlds the baby would end up believing in, depending on what sensory evidence they saw over the rest of their lives.  Key subconcepts include [ignorance priors](https://arbital.com/p/219) and [inductive priors](https://arbital.com/p/21b), and key examples are [Laplace's Rule of Succession](https://arbital.com/p/21c) and [Solomonoff induction](https://arbital.com/p/11w).


Kevin Clancy

summary: Nothing here yet.

Automatically generated page for "Kevin Clancy" user.
If you are the owner, click [here to edit](https://arbital.com/edit/299).


Travis Rivera

summary: Machine Learning and statistics expert.


Uncountability

Sizes of infinity fall into two broad classes: *countable* infinities, and *uncountable* infinities.

A set $S$ is *uncountable* if it is not [countable](https://arbital.com/p/6f8).

Alexei Andreev
Malcolm McCrimmon
Patrick Stevens
Jason Gross
Eric Bruylant
Jaime Sevilla Molina


Uncountability: Intro (Math 1)

[Collections of things](https://arbital.com/p/3jz) which are the same [size](https://arbital.com/p/4w5) as or smaller than the collection of all [natural numbers](https://arbital.com/p/-45h) are called *countable*, while larger collections (like the set of all [real numbers](https://arbital.com/p/-4bc)) are called *uncountable*.

All uncountable collections (and some countable collections) are [infinite](https://arbital.com/p/infinity). There is a meaningful and [well-defined](https://arbital.com/p/5ss) way to compare the sizes of different infinite collections of things %%note: Specifically, mathematical systems which use the [https://arbital.com/p/69b](https://arbital.com/p/69b), see the [technical](https://arbital.com/p/4zp) page for details.%%. To demonstrate this, we'll use a 2d grid.

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

## Real and Rational numbers

[Real numbers](https://arbital.com/p/4bc) are numbers with a [decimal expansion](https://arbital.com/p/4sl), for example 1, 2, 3.5, $\pi$ = 3.14159265...  Every real number has an infinite decimal expansion, for example 1 = 1.0000000000..., 2 = 2.0000000000..., 3.5 = 3.5000000000...  Recall that the rational numbers are [fractions](https://arbital.com/p/fraction) of [integers](https://arbital.com/p/48l), for example $1 = \frac11$, $\frac32$, $\frac{100}{101}$, $\frac{22}{7}$.  The positive integers are the integers greater than zero (i.e. 1, 2, 3, 4, ..).

There is a [https://arbital.com/p/-theorem](https://arbital.com/p/-theorem) in math that states that the rational numbers are *countable* %%note: You can see the theorem [here](https://arbital.com/p/511).%%, that is, that the set of rational numbers is the same size as the set of positive integers, and another theorem which states that the real numbers are *uncountable*, that is, that the set of real numbers is strictly bigger.  By "same size" and "strictly bigger", we mean that it is possible to match every rational number with some positive integer in a way so that there are no rational numbers, nor positive integers, left unmatched, but that any matching you make between real numbers and positive integers leaves some real numbers not matched with anything.

## Rational grid

If you imagine laying the rational numbers out on a two-dimensional grid, so that the number $p / q$ falls at $(p, q)$, then we may match the positive integers with the rational numbers by walking in a spiral pattern out from zero, skipping over numbers that we have already counted (or that are undefined, such as zero divided by any number).  The beginning of this sequence is $\frac01$, $\frac11$, $\frac12$, $\frac{-1}{2}$, $\frac{-1}{1}$, ...  Graphically, this is:

![A counting of the rational numbers](//i.imgur.com/OS5hr4U.png?1)

This shows that the rational numbers are countable.

## Reals are uncountable

The real numbers, however, cannot be matched with the positive integers.  I show this by [contradiction](https://arbital.com/p/46z). %%note:That is to say, I show that if there is such a matching, then we can conclude nonsensical statements (and if making a new assumption allows us to conclude nonsense, then the assumption itself must be nonsense.%%

Suppose we have such a matching.  We can construct a new real number that differs in its $n^\text{th}$ decimal digit from the real number matched with $n$.

For example, if we were given a matching that matched 1 with 1.8, 2 with 1.26, 3 with 5.758, 4 with 1, and 5 with $\pi$, then our new number could be 0.11111, which differs from 1.8 in the first decimal place (the 0.1 place), 1.26 in the second decimal place (the 0.01 place), and so on.  It is clear that this number cannot be matched with any number under the matching we are given, because, if it were matched with $n$, then it would differ from itself in the $n^\text{th}$ decimal digit, which is nonsense.  Thus, there is no matching between the real numbers and the positive integers.

## See also

If you enjoyed this explanation, consider exploring some of [Arbital's](https://arbital.com/p/3d) other [featured content](https://arbital.com/p/6gg)!

Arbital is made by people like you, if you think you can explain a mathematical concept then consider [https://arbital.com/p/-4d6](https://arbital.com/p/-4d6)!

Eric Bruylant
Mark Chimes
Patrick Stevens
Jason Gross

[Collections of things](https://arbital.com/p/3jz) which are the same [size](https://arbital.com/p/4w5) as or smaller than the collection of all [natural numbers](https://arbital.com/p/-45h) are called *countable*, while larger collections (like the set of all [real numbers](https://arbital.com/p/-4bc)) are called *uncountable*.

All uncountable collections (and some countable collections) are [infinite](https://arbital.com/p/infinity). There is a meaningful and [well-defined](https://arbital.com/p/5ss) way to compare the sizes of different infinite collections of things, and some infinite collections are larger than others.


Uncountability: Intuitive Intro

[Collections ](https://arbital.com/p/3jz) which have less than or the same [number of items](https://arbital.com/p/4w5) than the collection of all [natural numbers](https://arbital.com/p/-45h) are called *countable*, while larger collections (like the set of all [real numbers](https://arbital.com/p/-4bc)) are called *uncountable*.

All uncountable collections (and some countable collections) are [infinite](https://arbital.com/p/infinity) and some infinite collections are larger than others %%note: At least, within mathematical systems which include the [https://arbital.com/p/69b](https://arbital.com/p/69b), see the [technical](https://arbital.com/p/4zp) page for details.%%. To demonstrate this, we'll explore a graphical demonstration with tiles and paths.

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

## Tiles and paths

![A colored sidewalk, the top row red, the bottom row blue](//i.imgur.com/8HDHt19.png)

Consider, as shown above, a sidewalk that goes on forever in one direction, which is made up of equal-sized square tiles.  The sidewalk is two squares across.  Consider a person who walks forever on it, obeying the following rule: Each step the person takes must be to one of the two tiles immediately in front of that person; no going backwards, no skipping tiles, no going sideways, no standing in place forever. The following is the beginning of one possible path:
![A zig-zagging path that begins on blue.](//i.imgur.com/1oO6YeD.png)

Now let's ask two questions:

 1. How many tiles are there?
 2. How many possible paths are there?

In both cases, you could just say that there are infinitely many, and that would be correct. But now let's consider a third question:

 3. Is the number of tiles the same as the number of possible paths?

It turns out that there is a meaningful and [well-defined](https://arbital.com/p/5ss) way to compare the sizes of different infinite [collections of things](https://arbital.com/p/3jz), and some infinite collections are larger than others. In particular, some infinite collections are *countable* (like the [set](https://arbital.com/p/3jz) of all [https://arbital.com/p/-45h](https://arbital.com/p/-45h)s), while others are *uncountable* (like the set of all [https://arbital.com/p/-4bc](https://arbital.com/p/-4bc)s). As we will see, it can be shown that the number of tiles on our infinite sidewalk is countable, but that the number of possible paths one could take, following the rules above, is uncountable. So there are in fact *more* possible paths than there are tiles.

Let's dig into exactly what this means and why it's true.

## Pairing off

We say that two collections of things are the "same size" if you can match the items together completely: you can pair each of the things in the first collection with exactly one of the things in the second collection, in such a way that there is nothing left unpaired. For example, given two sets of three things each, we may pair them.  Here is an example of such a pairing:

![Example pairing showing that 3 = 3: Three things on each side, all matched up: a cow (http://www.faqs.org/photo-dict/phrase/348/cow.html) matched to a racecar (http://www.zcars.com.au/wrc/), an airplane (http://www.penziononyx.cz/) matched to a watermelon (http://www.free-extras.com/tags/1/watermelon.htm),the earth (http://www.treehugger.com/2010/04/18-week/) matched to a computer (http://www.sb.fsu.edu/~xray/Xrf/anaconda.html)](//i.imgur.com/JphY27q.png)

You might think it obvious, then, that the number of paths our person can walk is bigger than the number of tiles.  We can match each tile with the path that starts on a tile the same color as it, and changes to the other color after it hits this tile.  For example, we would match the third red tile with the path
![An example of a path](//i.imgur.com/s7yjGBX.png)

It is important to note, however, that it is not sufficient that we find some matching that leaves things left over.  We must show that *every* matching leaves things left over.  For example, an infinite sidewalk that is one tile across has just as many tiles as an infinite sidewalk that is two tiles across, as we can see from the picture below by matching the 1R on top with the 1R on bottom, the 1B on top with the 1B on bottom, the 2R on top with the 2R on bottom, and so on.

![A two-tile-wide sidewalk, with each column having a B tile and an R tile](//i.imgur.com/4YecTkO.png)
![A one-tile-wide sidewalk, alternating B and R tiles](//i.imgur.com/DDGBX7G.png)

In fact, if we were only to require that *some* matching leave extra tiles, then the number of tiles in a sidewalk that is one tile wide would not be equal to itself, for we could match the first tile with 1B (in the bottom picture above), the second tile with 2B, and so on, and we would leave over half the tiles!

In fact, even if we had a *field* of tiles that is infinite in every direction, we would still have no more tiles than if we had only a sidewalk that is one tile across.  The following matching shows this:

![A one-tile-wide sidewalk, with each tile numbered starting at 1](//i.imgur.com/P4b0CPc.png)
![A field of tiles](//i.imgur.com/glPTsSG.png)

## An unpairable path

You might wonder, given that there are so many different ways to match up infinitely many things, how we can know that there is no matching that catches everything.  I will now prove that, no matter how you try to match paths (ways of walking) and tiles, you will miss some paths.  Since we have already seen that the number of tiles in a sidewalk two tiles wide is the same as the number of tiles in a sidewalk one tile wide, I will show that any matching between paths and tiles in a sidewalk one tile wide misses some paths.  I will do this by creating a path that does not match the path we have chosen for any tile %%note: This type of proof is known as a [https://arbital.com/p/-46z](https://arbital.com/p/-46z).%%.

Suppose we are given a matching between tiles and paths.  Since we have numbered the tiles in a sidewalk one tile wide ($\fbox{1}\fbox{2}\fbox{3}\fbox{4}\fbox{5}\fbox{6}\fbox{7}\fbox{8}\overline{\underline{\vphantom{1234567890}\cdots}}$), we also have a numbering of the paths in our matching.  Consider a new path that differs from the [$n^\text{th}$](https://arbital.com/p/nth) path in our matching on the $n^\text{th}$ tile, that is, the $n^\text{th}$ step that you take.  For example, if our first eight paths are

![8 paths: 1: BRBRBRBR, 2: BBBBBBBB, 3: RRRRRRRR, 4: BRRRRRBB, 5: RBBRBRRB, 6: RBRRBBRR, 7: BRRRRRRB, 8: BRRBBBBB](//i.imgur.com/0Snexa1.png)

then our new path is

![The path RRBBRRBR](//i.imgur.com/s7yjGBX.png)

Clearly, this path is not any of the ones in the matching, because it differs from every single path at some point (in particular, it differs from the $n^\text{th}$ path on the $n^\text{th}$ tile, the $n^\text{th}$ step you take, which is highlighted in yellow).

Because we can repeat this exercise no matter what matching we're given, that means *any* possible matching will always leave out at least one path.  Thus, the number of paths a person can take must be strictly larger than the number of tiles in the sidewalk.

## See also

If you enjoyed this explanation, consider exploring some of [Arbital's](https://arbital.com/p/3d) other [featured content](https://arbital.com/p/6gg)!

Arbital is made by people like you, if you think you can explain a mathematical concept then consider [https://arbital.com/p/-4d6](https://arbital.com/p/-4d6)!

Malcolm McCrimmon
Eric Rogstad
Jason Gross
Eric Bruylant
Joe Zeng


Gödel encoding and self-reference

A Gödel encoding is a way of using the formal machinery of proving theorems in arithmetic to discuss that very machinery. [Kurt Gödel](https://en.wikipedia.org/wiki/Kurt_G%C3%B6del) rocked the world of mathematics in 1931 by showing that this was possible, and that it had surprising consequences for the sort of things that could ever be formally proven in a given system.

The original formulation of this self-referential framework was really messy (involving prime factorizations of huge numbers), but we can think about it more easily now by thinking about computer programs. In order to get mathematical statements that refer to themselves, we can first show that we can talk interchangeably about mathematical proofs and computer programs, and then show how to write computer programs that refer to themselves.

To be specific about the machinery of proving theorems, we'll use the formal system of [Peano Arithmetic](https://arbital.com/p/3ft).

What kind of self-reference do we want for our computer program? We would like to be able to write a program that takes its own source code and performs computations on it. But it doesn't count for the program to access its own location in memory; we'd like something we could write directly into an interpreter, with no other framework, and get the same result.

This kind of program is known as a [quine](https://arbital.com/p/322).

Gödel encoding is equivalent to an encoding of a computer program as a binary string.

If we think about any conjecture in mathematics that can be stated in terms of arithmetic, you can write a program that loops over all possible strings, checks whether any of them is a valid proof of the conjecture, and halts if and only if it finds one. In the other direction, we can imagine proving a theorem about whether a particular computer program ever halts.


Nate Soares

Automatically generated page for "Nate Soares" user. Click [here to edit](https://arbital.com/edit/32).


Quine

A quine is a computer program that 'knows' its own entire source code via indirect self-reference, rather than by getting it as input. The classic exercise in this domain is writing a (non-empty) program that takes no input and which outputs its own entire source code. But the same trick can be used to do more than that; for any program that takes a string as input and performs some operations on it, we can write a quining program that takes no input and performs the same operations on the program's own source code.

The trick to write a quining program is to take a recipe for substituting a string into various places in a program, and then to apply this recipe to itself.  If you've not encountered this idea before, but you know a programming language, it is a nice exercise to try and write a quine which prints its own source code.

An example of a quine in Python (due to [https://arbital.com/p/32](https://arbital.com/p/32)) which prints its own source code:

	template = 'template = {hole}\nprint(template.format(hole=repr(template)))'
	print(template.format(hole=repr(template)))

Wikipedia has a [list of examples of quining programs](https://en.wikipedia.org/wiki/Quine_) (computing)#Examples) in various languages.

Named after the logician [W.V.O. Quine](https://en.wikipedia.org/wiki/Willard_Van_Orman_Quine), as coined by [Douglas Hofstadter](https://en.wikipedia.org/wiki/Douglas_Hofstadter) in [Gödel, Escher, Bach](https://en.wikipedia.org/wiki/G%C3%B6del,_Escher,_Bach), in the informal context of English phrases like

> "Yields falsehood when preceded by its quotation" yields falsehood
> when preceded by its quotation.

Quining has been used for practical purposes and even seen in the wild, most famously in [Ken Thompson's illustration of a C compiler Trojan backdoor](http://en.wikipedia.org/wiki/Backdoor_) (computing)#Compiler_backdoors).

Nate Soares
Jaime Sevilla Molina
Patrick LaVictoire


Math playpen

$$\mathcal{P}e^{i \oint_C A_\mu dx^\mu} \to g(x) \mathcal{P}e^{i \oint_C A_\mu dx^\mu} g^{-1}(x)\,$$

Numbers, woo!

Can I bork the page? Trying to bork the page… 3

asdf

Eric Rogstad
Kevin Clancy
Patrick Stevens
Alexei Andreev


Order theory

Introduction
==========

Order pervades mathematics and the sciences. Often, a reader's intuitive notion of order is all that is necessary for understanding a particular invocation of the notion of order. However, a deeper examination of order reveals a rich taxonomy over the types of orderings that can arise and leads to powerful theorems with applications in mathematics, computer science, the natural sciences, and the social sciences.

The following are examples of orders that one might encounter in life:

- In a work place, employees may have a *rank* that determines which other employees they have authority over. IT workers report to the IT manager, marketers report to the marketing manager, managers report to the CEO, etc.

- In a grocery store, someone planning to buy corn flake cereal may consider the ordering on the *prices* of various brands of shredded wheat to decide which to purchase.

- At lunchtime, someone with a craving for burritos may order the nearby burrito restaurants by their *distance* from her workplace. She may also order these burrito joints by *quality*, and consider both orderings in her decision.

Now that we've seen some concrete examples of order, we can begin working toward a rigorous mathematical definition. In each of the above examples, we have some *underlying set* of objects that we are comparing: employees, corn flake brands, and burrito restaurants, respectively. We also have an *ordering*, which is a [binary relation](https://arbital.com/p/3nt) determining whether or not one object is "less than" another. This suggests that order esentially a pair of a set and some binary relation defined on it. Is this all we need to capture the notion of order?

Here are a few examples of binary relations which may or may not be orderings. Do they agree with your intuitive notion of ordering?

* 1.) The relation which includes all pairs of people $(a,b)$ such that $a$ and $b$ are friends.
* 2.) The relation of pairs of people $(a,b)$ such that $a$ is a genetic descendant of $b$.
* 3.) The relation on days of the week which contains the exactly pairs $(a,b)$ such that a directly precedes b: $\{ (Monday, Tuesday), (Tuesday, Wednesday), ... \}$

It turns out that only item 2 agrees with the mathematical definition of ordering. Intuitively, item 1 is not an ordering because of its symmetry: a friendship between two people does not distinguish one friend as being "less than" the other (not a healthy friendship, at least). Friendship is actually an instance of another important class of binary relations called the [equivalence relations](https://arbital.com/p/equivalence_relation_mathematics). Item 3 is not an ordering because it lacks transitivity: Monday directly precedes Tuesday and Tuesday directly precedes Wednesday, but Monday does not directly precede Wednesday.

Posets
=====

We're now ready to provide a formal, mathematical definition, for a class of objects called *posets* (a contraction of partially ordered set), which captures the idea of ordering.

--

__Definition: Poset__

A *poset* is a pair $\langle P, \leq \rangle$ of a set $P$ and a binary relation $\leq$ on $P$ such that for all $p,q,r \in P$, the following properties are satisfied:

- Reflexivity: $p \leq p$
- Transitivity: $p \leq q$ and  $q \leq r$ implies $p \leq r$
- Anti-Symmetry: $p \leq q$ and $q \leq p$ implies $p = q$

$P$ is referred to as the poset's *underlying set* and $\leq$
 is referred to as its *order relation*.

--

The above definition may strike some readers as more general than expected. Indeed, in both mathematics and conversational English, when someone states that a set of objects is ordered, they often mean that it is totally ordered. A total order is a poset for which any two elements of $a$ and $b$ of the underlying set are *comparable*; that is, $a \leq b$ or $b \leq a$. But our definition of a poset allows the possibility that two elements are *incomparable*. Recall our example of employees in a work place. In our *reports-to* relation, both an IT manager and a marketing manager report to the CEO; however, it would not make sense for an IT manager to report to a marketing manager or vice versa. The marketing and IT managers are thus incomparable. We write $a \parallel b$ to state that two poset elements $a$ and $b$ are incomparable.

Another important distinction must be made. Partial orders as we have described them are not *strict* orders. From any poset $\langle P, \leq \rangle$, we can derive an strict order relation $<$, which includes exactly those pairs of $\leq$ relating two elements of $P$ that are distinct. It should be noted that, while strict orders are transitive and vacuously anti-symmetric, they are *not* partial orders because they are not reflexive. In everyday situations, strict orders seem to be more useful, but in mathematics non-strict orderings are of more use, and so non-strictness is built into the definition of poset.

The study of binary relations that are reflexive, transitive, and anti-symmetric.


Group theory

Group theory is the study of the [algebraic structures](https://arbital.com/p/3gx) known as "[groups](https://arbital.com/p/3gd)". A group $G$ is a collection of elements $X$ paired with an operator $\bullet$ that combines elements of $X$ while obeying certain laws. Roughly speaking, $\bullet$ treats elements of $X$ as composable, invertible actions.

Group theory has many applications. Historically, groups first appeared in mathematics as groups of "substitutions" of mathematical functions; for example, the group of [integers](https://arbital.com/p/48l) $\mathbb{Z}$ [acts](https://arbital.com/p/3t9) on the set of functions $f : \mathbb{R} \to \mathbb{R}$ via the substitution $n : f(x) \mapsto f(x - n)$, which corresponds to translating the graph of $f$ $n$ units to the right. The functions which are invariant under this group action are precisely the functions which are periodic with period $1$, and group theory can be used to explain how this observation leads to the expansion of such a function as a [Fourier series](https://arbital.com/p/Fourier_series) $f(x) = \sum \left( a_n \cos 2 \pi n x + b_n \sin 2 \pi n x \right)$.

Groups are used as a building block in the formalization of many other mathematical structures, including [fields](https://arbital.com/p/481), [vector spaces](https://arbital.com/p/3w0), and [integers](https://arbital.com/p/48l). Group theory has various [applications to physics](https://arbital.com/p/group_theory_and_physics). For a list of example groups, see the [examples page](https://arbital.com/p/algebraic_group_examples). For a list of the key theorems in group theory, see the [main theorems page](https://arbital.com/p/algebraic_group_theorems).

# Interpretations, visualizations, and uses

Group theory abstracts away from the elements in the [underlying set](https://arbital.com/p/3gz) $X$: the group axioms do not care about what sort of thing is in $X$; they care only about the way that $\bullet$ relates them. $X$ tells us how many elements $G$ has; all other information resides in the choices that $\bullet$ makes to combine two group elements into a third group element. Thus, group theory can be seen as the study of possible relationships between objects that obey the group laws; regardless of what the objects themselves are. To visualize a group, we need only visualize the way that the elements relate to each other via $\bullet$. This is the approach taken by [group multiplication tables](https://arbital.com/p/group_multiplication_table) and [group diagrams](https://arbital.com/p/cayley_diagram).

Group theory is interesting in part because the constraints on $\bullet$ are at a "sweet spot" between "too lax" and "too restrictive." Group structure crops up in many areas of physics and mathematics, but the group axioms are still restrictive enough to make groups fairly easy to work with and reason about. For example, if the [order](https://arbital.com/p/3gg) of $G$ is prime then there is only one possible group that $G$ can be (up to isomorphism). There are only 2, 2, 5, 2, and 2 groups of order 4, 6, 8, 9, and 10 (respectively). There are only 16 groups of order 100. If a group structure can be found in an object, this makes the behavior of the object fairly easy to analyze (especially if the order of the group is small). Group structure is relatively common in math and physics; for example, the solutions to a polynomial equation are acted on by a group called the [Galois group](https://arbital.com/p/Galois_group) (a fact from which the [unsolvability of quintic polynomials by radicals](https://arbital.com/p/unsolvability_of_the_quintic) was proven). Group theory is thus a useful tool for figuring out how various mathematical and physical objects behave. For more on this idea, see the page on [group actions](https://arbital.com/p/3t9).

Roughly speaking, the constraints on $\bullet$ can be interpreted as saying that $\bullet$ has to treat the elements like they are a "complete set of transformations" of a physical object. The axiom of identity then says "one of the elements has to be interpreted as a transformation that does nothing"; the axiom of inversion says "each transformation must be invertible;" and so on. In this light, group theory can be seen as the study of possible complete sets of transformations. Because the set of possible groups is relatively limited and well-behaved, group theory is a useful tool for studying the relationship between transformations of physical objects. For more discussion of this interpretation of group theory, see [https://arbital.com/p/groups_and_transformations](https://arbital.com/p/groups_and_transformations).

Groups can also be seen as a tool for studying symmetry. Roughly speaking, given a set $X$ and some redundant structure atop $X$, a symmetry of $X$ is a function from $X$ to itself that preserves the given structure. For example, a physicist might build a model of two planets interacting in space, where an arbitrary point picked out as the origin. The behavior of the planets in relation to each other shouldn't depend on which point they label $(0, 0, 0)$, but many questions (such as "where is the planet now?") depend on the choice of origin. To study facts that are true regardless of where the origin is (rather than being artifacts of the representation), they might let $X$ be the possible states of the model, with then ask what properties of $X$ are preserved when the origin is shifted — i.e., they ask "what facts about this model would still be true if I had picked a different origin?" Translation of the origin is a "symmetry" of those properties: It takes one state of $X$ to another state of $X$, and preserves all properties of the physical system that are independent of the choice of origin. When a model has multiple symmetries (such as rotation invariance as well as translation invariance), those symmetries form a group under  composition. Group theory tells us about how those symmetries must relate to one another. For more on this topic, see [https://arbital.com/p/groups_and_symmetries](https://arbital.com/p/groups_and_symmetries).

In fact, laws of physics can be interpreted as "properties of the universe that are true at all places and all times, regardless of how you label things." Thus, the laws of physics can be studied by considering the properties of the universe that are preserved under certain transformations (such as changing labels). Group theory puts constraints on how these symmetries in the laws of physics relate to one another, and thus helps constrain the search for possible laws of physics. For more on this topic, see [https://arbital.com/p/groups_and_physics](https://arbital.com/p/groups_and_physics).

Finally, in a different vein, groups can be seen as a building block for other mathematical concepts. As an example, consider numbers. "Number" is a fairly fuzzy concept; the term includes the integers [$\mathbb Z$](https://arbital.com/p/48l), the rational numbers [$\mathbb Q$](https://arbital.com/p/4zq) (which include fractions), the real numbers [$\mathbb R$](https://arbital.com/p/4bc) (which include numbers such as $\sqrt{2}$), and so on. The arrow from $\mathbb Z \to \mathbb Q \to \mathbb R$ points in the direction of _specialization:_ Each step adds constraints (such as "now you must include fractions") and thus narrows the scope of study (there are fewer things in the world that act like real numbers than there are that act like integers). Group theory is the result of following the arrow in the opposite direction: groups are like integers but _more permissive._ Groups have an identity element that corresponds to $0$ and an operation that corresponds to $+$, but they don't need to be infinitely large and they don't need to have anything corresponding to multiplication. From this point of view, "group" is a generalization of "integer", and from that generalization, we can build up many different mathematical objects, including [rings](https://arbital.com/p/3gq), [fields](https://arbital.com/p/481), and [vector spaces](https://arbital.com/p/3w0). Empirically, many interesting and useful mathematical objects use groups as one of their building blocks, and thus, some familiarity with group theory is helpful when learning about other mathematical structures. For more on this topic, see the [tree of algebraic structures](https://arbital.com/p/5dz).

Stephanie Zolayvar
Eric Rogstad
Tsvi BT
Alexei Andreev
Patrick Stevens
Nate Soares
Qiaochu Yuan

Group theory is the study of the [algebraic structures](https://arbital.com/p/3gx) known as "[groups](https://arbital.com/p/3gd)". A group $G$ is a collection of elements $X$ paired with an operator $\bullet$ that combines elements of $X$ while obeying certain laws. Roughly speaking, $\bullet$ treats elements of $X$ as composable, invertible actions. Group theory has many applications in pure and applied mathematics, as well as in the hard sciences like physics and chemistry. Groups are used as a building block in the formalization of many other mathematical structures, including [vector spaces](https://arbital.com/p/3w0) and [integers](https://arbital.com/p/48l).


Group

summary(technical): A group $G$ is a pair $(X, \bullet)$ where $X$ is a [set](https://arbital.com/p/3jz) and $\bullet$ is a [operation](https://arbital.com/p/3h7) obeying the following laws:

 1. **[Closure](https://arbital.com/p/3gy):** The operation is a function. For all $x, y$ in* $X$, $x \bullet y$ is defined and in $X$. We abbreviate $x \bullet y$ as $xy$.
 2. **[Associativity](https://arbital.com/p/3h4):** $x(yz) = (xy)z$ for all $x, y, z \in X$.
 3. **[Identity](https://arbital.com/p/54p):** There is an element $e$ such that $xe=ex=x$ for all $x \in X$.
 4. **[Inverses](https://arbital.com/p/-inverse_element):** For each $x$ in $X$, there is an element $x^{-1} \in X$ such that $xx^{-1}=x^{-1}x=e$.

The operation need not be [commutative](https://arbital.com/p/-3jb), but if it is then the group is called [abelian](https://arbital.com/p/-3h2).

A group is an abstraction of a collection of symmetries of an object. The collection of symmetries of a triangle (rotating by $120^\circ$ or $240^\circ$ degrees and flipping), rearrangements of a collection of objects (permutations), or rotations of a sphere, are all examples of groups. A group abstracts from these examples by forgetting what the symmetries are symmetries of, and only considers how symmetries behave.

A group $G$ is a pair $(X, \bullet)$ where:

 - $X$ is a [set](https://arbital.com/p/3jz), called the "underlying set." By abuse of notation, $X$ is usually denoted by the same symbol as the group $G$, which we will do for the rest of the article.
 - $\bullet : G \times G \to G$ is a binary [operation](https://arbital.com/p/3h7). That is, a function that takes two elements of a set and returns a third. We will abbreviate $x \bullet y$ by $xy$ when not ambiguous.  This operation is subject to the following axioms:
- **[Closure](https://arbital.com/p/3gy):** $\bullet$ is a function. For all $x, y$ in $X$, $x \bullet y$ is defined and in $X$. We abbreviate $x \bullet y$ as $xy$.
- **[Identity](https://arbital.com/p/-54p):** There is an element $e$ such that $xe=ex=x$ for all $x \in X$.
- **[Inverses](https://arbital.com/p/-inverse_element):** For each $x$ in $X$, there is an element $x^{-1} \in X$ such that $xx^{-1}=x^{-1}x=e$.
- **[Associativity](https://arbital.com/p/3h4):** $x(yz) = (xy)z$ for all $x, y, z \in X$.

1) The set X is the collection of abstract symmetries that this group represents. "Abstract," because these elements aren't necessarily symmetries *of* something, but almost all examples will be.

2) The operation $\bullet$ is the abstract composition operation.

3) The axiom of closure is redundant, since $\bullet$ is defined as a function $G \times G \to G$, but it is useful to emphasize this, as sometimes one can forget to check that a given subsets of symmetries of an object is closed under composition.

4) The axiom of identity says that there is an element $e$ in $G$ that is a do-nothing symmetry: If you apply $\bullet$ to $e$ and $x$, then $\bullet$ simply returns $x$. The identity is unique: Given two elements $e$ and $z$ that satisfy axiom 2, we have $ze = ez = z.$ Thus, we can speak of "the identity" $e$ of $G$. This justifies the use of $e$ in the axiom of inversion: axioms 1 through 3 ensure that $e$ exists and is unique, so we can reference it in axiom 4.

$e$ is often written $1$ or $1_G$, because $\bullet$ is often treated as an analog of multiplication on the set $X$, and $1$ is the multiplicative [identity](https://arbital.com/p/54p). (Sometimes, e.g. in the case of [rings](https://arbital.com/p/3gq), $\bullet$ is treated as an analog of addition, in which case the identity is often written $0$ or $0_G$.)

5) The axiom of inverses says that for every element $x$ in $X$, there is some other element $y$ that $\bullet$ treats like the opposite of $x$, in the sense that $xy = e$ and vice versa. The inverse of $x$ is usually  written $x^{-1}$, or sometimes $(-x)$ in cases where $\bullet$ is analogous to addition.

6) The axiom of associativity says that \bullet behaves like composition of functions. When composing a bunch of functions, it doesn't matter what order the individual compositions are computed in. When composing $f$, $g$, and $h$, we can compute $g \circ f$, and then compute $h \circ (g \circ f)$, or we can compute $h \circ g$ and then compute $(h \circ g) \circ f$, and we will get the same result.

%%%knows-requisite([https://arbital.com/p/3h3](https://arbital.com/p/3h3)):
Equivalently, a group is a [monoid](https://arbital.com/p/3h3) which satisfies "every element has an inverse".
%%%

%%%knows-requisite([https://arbital.com/p/4c7](https://arbital.com/p/4c7)):
Equivalently, a group is a category with exactly one object, which satisfies "every arrow has an inverse"; the arrows are viewed as elements of the group. This justifies the intuition that groups are collections of symmetries. The object of this category can be thought of an abstract object that the isomorphisms are symmetries of. A functor from this category into the category of sets associates this object with a set, and each of the morphisms a permutation of that set.
%%%

# Examples

The most familiar example of a group is perhaps $(\mathbb{Z}, +)$, the integers under addition. To see that it satisfies the group axioms, note that:

1. (a) $\mathbb{Z}$ is a set, and (b) $+$ is a function of type $\mathbb Z \times \mathbb Z \to \mathbb Z$
2. $(x+y)+z=x+(y+z)$
3. $0+x = x = x + 0$
4. Every element $x$ has an inverse $-x$, because $x + (-x) = 0$.

For more examples, see the [examples page](https://arbital.com/p/3t1).

# Notation

Given a group $G = (X, \bullet)$, we say "$X$ forms a group under $\bullet$." $X$ is called the [underlying set](https://arbital.com/p/3gz) of $G$, and $\bullet$ is called the _group operation_.

$x \bullet y$ is usually abbreviated $xy$.

$G$ is generally allowed to substitute for $X$ when discussing the group. For example, we say that the elements $x, y \in X$ are "in $G$," and sometimes write "$x, y \in G$" or talk about the "elements of $G$."

The [order of a group](https://arbital.com/p/3gg), written $|G|$, is the size $|X|$ of its underlying set: If $X$ has nine elements, then $|G|=9$ and we say that $G$ has order nine.

# Resources

Groups are a ubiquitous and useful algebraic structure. Whenever it makes sense to talk about symmetries of a mathematical object, or physical system, groups pop up. For a discussion of group theory and its various applications, refer to the [group theory](https://arbital.com/p/3g8) page.

A group is a [monoid](https://arbital.com/p/3h3) with inverses, and an associative [loop](https://arbital.com/p/algebraic_loop). For more on how groups relate to other [algebraic structures](https://arbital.com/p/3gx), refer to the [tree of algebraic structures](https://arbital.com/p/5dz).

Daniel Satanove
m g
Dylan Hendrickson
Eric Rogstad
Patrick Stevens
Louis Paquin
Nate Soares
Qiaochu Yuan
Eric Bruylant
Mark Chimes
Joe Zeng

A group is an abstraction of a collection of symmetries of an object. The collection of symmetries of a triangle (rotating by $120^\circ$ or $240^\circ$ degrees and flipping), rearrangements of a collection of objects (permutations), or rotations of a sphere, are all examples of groups.

A group abstracts from these examples by forgetting what the symmetries are symmetries *of*, and only considers how symmetries behave.

- Any two symmetries can be composed. For the symmetries of flipping and rotating a triangle, the whole action of rotating, and then flipping a triangle at once is a symmetry. So there is an **[operation](https://arbital.com/p/3h7)** on a group which represents composition of symmetries.
- There is always a do-nothing symmetry. When composed with another symmetry, the do-nothing symmetry doesn't change that symmetry. So the operation has an **[identity](https://arbital.com/p/-54p)**.
- Any symmetry can be reversed. That is, for any symmetry, there is another symmetry which when composed with the first, gives the do-nothing symmetry. Flipping a triangle, and then flipping it again, is the same as doing nothing. So the operation has an **[inverse](https://arbital.com/p/-inverse_mathematics)** operation.
- Like any collection of functions, when composing a bunch of functions, it doesn't matter what order the individual compositions are computed in, as long as the *overall* composition ends up in the right order. When composing $f$, $g$, and $h$, we can compute $g \circ f$, and then compute $h \circ (g \circ f)$, or we can compute $h \circ g$ and then compute $(h \circ g) \circ f$, and we will get the same result. So the operation is **[associative](https://arbital.com/p/-3h4)**.

Note that it is not necessarily the case that the operation is [commutative](https://arbital.com/p/-3jb). Flipping and then rotating a triangle will give different symmetry than rotating and then flipping. If it is commutative, then the group is called [abelian](https://arbital.com/p/-3h2).


Order of a group

The order $|G|$ of a [group](https://arbital.com/p/3gd) $G$ is the size of its [underlying set](https://arbital.com/p/3gz). For example, if $G=(X,\bullet)$ and $X$ has nine elements, we say that $G$ has order $9$. If $X$ is infinite, we say $G$ is infinite; if $X$ is finite, we say $G$ is finite.

The [order of an element](https://arbital.com/p/4cq) $g \in G$ of a group is the smallest nonnegative integer $n$ such that $g^n = e$, or $\infty$ if there is no such integer. The relationship between this usage of order and the above usage of order is that the order of $g \in G$ in this sense is the order of the [https://arbital.com/p/subgroup](https://arbital.com/p/subgroup) $\langle g \rangle = \{ 1, g, g^2, \dots \}$ of $G$ [generated by](https://arbital.com/p/generating_set) $g$ in the above sense.

Alexei Andreev
Patrick Stevens
Nate Soares
Qiaochu Yuan
Eric Bruylant


Ring

summary(Technical): A ring $R$ is a triple $(X, \oplus, \otimes)$ where $X$ is a [set](https://arbital.com/p/3jz) and $\oplus$ and $\otimes$ are binary [operations](https://arbital.com/p/set_theory_operation) subject to the ring axioms. We write $x \oplus y$ for the application of $\oplus$ to $x, y \in X$, which must be defined, and similarly for $\otimes$. Terminology varies across sources; our rings will have both operations [commutative](https://arbital.com/p/3jb) and will have an [https://arbital.com/p/-54p](https://arbital.com/p/-54p) under multiplication, denoted $1$.

A ring $R$ is a triple $(X, \oplus, \otimes)$ where $X$ is a [set](https://arbital.com/p/3jz) and $\oplus$ and $\otimes$ are binary [operations](https://arbital.com/p/set_theory_operation) subject to the ring axioms. We write $x \oplus y$ for the application of $\oplus$ to $x, y \in X$, which must be defined, and similarly for $\otimes$. It is standard to abbreviate $x \otimes y$ as $xy$ when $\otimes$ can be inferred from context. The ten ring axioms (which govern the behavior of $\oplus$ and $\otimes$) are as follows:

1. $X$ must be a [commutative group](https://arbital.com/p/3h2) under $\oplus$. That means:
   * $X$ must be [closed](https://arbital.com/p/3gy) under $\oplus$.
   * $\oplus$ must be [associative](https://arbital.com/p/associative_function).
   * $\oplus$ must be [commutative](https://arbital.com/p/commutative_function).
   * $\oplus$ must have an identity, which is usually named $0$.
   * Every $x \in X$ must have an inverse $(-x) \in X$ such that $x \oplus (-x) = 0$.
2. $X$ must be a [monoid](https://arbital.com/p/3h3) under $\otimes$. That means:
   * $X$ must be [closed](https://arbital.com/p/3gy) under $\otimes$.
   * $\otimes$ must be [associative](https://arbital.com/p/associative_function).
   * $\otimes$ must have an identity, which is usually named $1$.
3. $\otimes$ must [distribute](https://arbital.com/p/distributive_property) over $\oplus$. That means:
  * $a \otimes (x \oplus y) = (a\otimes x) \oplus (a\otimes y)$ for all $a, x, y \in X$.
  * $(x \oplus y)\otimes a = (x\otimes a) \oplus (y\otimes a)$ for all $a, x, y \in X$.

Though the axioms are many, the idea is simple: A ring is a [commutative group](https://arbital.com/p/3h2) equipped with an additional operation, under which the ring is a [monoid](https://arbital.com/p/3h3), and the two operations play nice together (the monoid operation [distributes](https://arbital.com/p/distributive_property) over the group operation).

A ring is an [algebraic structure](https://arbital.com/p/3gx).  To see how it relates to other algebraic structures, refer to the [tree of algebraic structures](https://arbital.com/p/5dz).

# Examples

The integers $\mathbb{Z}$ form a ring under addition and multiplication.

[Add more example rings.](https://arbital.com/p/fixme:)
\[in progress.\](https://arbital.com/p/work)

# Notation

Given a ring $R = (X, \oplus, \otimes)$, we say "$R$ forms a ring under $\oplus$ and $\otimes$." $X$ is called the [underlying set](https://arbital.com/p/3gz) of $R$. $\oplus$ is called the "additive operation," $0$ is called the "additive identity", $-x$ is called the "additive inverse" of $x$. $\otimes$ is called the "multiplicative operation," $1$ is called the "multiplicative identity", and a ring does not necessarily have multiplicative inverses.

# Basic properties

[Add the basic properties of rings.](https://arbital.com/p/fixme:)
\[in progress.\](https://arbital.com/p/work)

# Interpretations, Visualizations, and Applications

[Add ](https://arbital.com/p/fixme:)
\[in progress.\](https://arbital.com/p/work)

Dylan Hendrickson
Eric Bruylant
Nate Soares
Patrick Stevens

A ring is a kind of [https://arbital.com/p/-3gx](https://arbital.com/p/-3gx) which we obtain by considering [groups](https://arbital.com/p/3gd) as being "things with addition" and then endowing them with a multiplication operation which must interact appropriately with the pre-existing addition. Terminology varies across sources;  we will take "ring" to refer to "commutative ring with $1$".


Algebraic structure

Roughly speaking, an algebraic structure is a set $X$, known as the [underlying set](https://arbital.com/p/3gz), paired with a collection of [operations](https://arbital.com/p/3h7) that obey a given set of laws. For example, a [group](https://arbital.com/p/3gd) is a set paired with a single binary operation that satisfies the four group axioms, and a [ring](https://arbital.com/p/3gq) is a set paired with two binary operations that satisfy the ten ring axioms.

In fact, algebraic structures can have more than one underlying set. Most have only one (including [monoids](https://arbital.com/p/3h3), [groups](https://arbital.com/p/3gd), [rings](https://arbital.com/p/3gq), [fields](https://arbital.com/p/algebraic_field), [lattices](https://arbital.com/p/algebraic_lattice), and [arithmetics](https://arbital.com/p/algebraic_arithmetic)), and differ in how their associated operations work. More complex algebraic structures (such as  [algebras](https://arbital.com/p/algebraic_algebra), [modules](https://arbital.com/p/algebraic_module), and [vector spaces](https://arbital.com/p/3w0)) have two underlying sets. For example, vector spaces are defined using both an underlying [field](https://arbital.com/p/algebraic_field) of scalars and an underlying [commutative group](https://arbital.com/p/3h2) of vectors.

For a map of algebraic structures and how they relate to each other, see the [tree of algebraic structures](https://arbital.com/p/algebraic_structure_tree).

Eric Rogstad
Eric Bruylant
Nate Soares
Alexei Andreev


Closure

A [set](https://arbital.com/p/3jz) $S$ is _closed_ under an [operation](https://arbital.com/p/3h7) $f$ if, whenever $f$ is fed elements of $S$, it produces another element of $S$. For example, if $f$ is a trinary operation (i.e., a function of three arguments) then "$S$ is closed under $f$" means "if $x, y, z \in S$ then $f(x, y, z) \in S$".

For example, the set [$\mathbb Z$](https://arbital.com/p/integer) is closed under addition (because adding two integers yields another integer), but the set $\mathbb Z_5 = \{0, 1, 2, 3, 4, 5\}$ is not (because $1 + 5$ is not in $\mathbb Z_5$).


Underlying set

What do a [https://arbital.com/p/-3gd](https://arbital.com/p/-3gd), a [https://arbital.com/p/-3rb](https://arbital.com/p/-3rb), and a [topological space](https://arbital.com/p/) have in common? Each is a [https://arbital.com/p/-3jz](https://arbital.com/p/-3jz) with some structure built on top of it, and in each case, we call the set the *underlying set*. %%note: A group is a set with an [operation](https://arbital.com/p/3h7), a poset is a set with an [ordering](https://arbital.com/p/3dt), and a topological space is a set with a collection of subsets that satisfy a [certain property](https://arbital.com/p/).%%

###Algebraic structures###

An [algebraic structure](https://arbital.com/p/3gx) is a set equipped with operators that follow certain laws, such as a [group](https://arbital.com/p/3gd), which is a pair $(X, \bullet)$ where $X$ is a [set](https://arbital.com/p/3jz) and $\bullet$ is an operator that follows certain laws. Given an algebraic structure,  we can simply throw away the operators and recover the set ($X$, in this case), which is known as the "underlying set" of the structure.

The underlying set is sometimes known as the "carrier set." Some algebraic structures have more than one underlying set; for example, a vector space is an algebraic structure built out of a [field](https://arbital.com/p/481) of scalars and a [commutative group](https://arbital.com/p/3h2), in which case the term "underlying set" is ambiguous.

Alexei Andreev
Eric Rogstad
Patrick Stevens
Nate Soares
Eric Bruylant


Abstract algebra

Abstract algebra is the study of [algebraic structures](https://arbital.com/p/3gx), including [groups](https://arbital.com/p/3gd), [rings](https://arbital.com/p/3gq), [fields](https://arbital.com/p/algebraic_field), [modules](https://arbital.com/p/algebraic_module), [vector spaces](https://arbital.com/p/vector_space), [lattices](https://arbital.com/p/algebraic_lattice), [arithmetics](https://arbital.com/p/algebraic_arithmetic), and [algebras](https://arbital.com/p/algebraic_algebra).

The main idiom of abstract algebra is [abstracting away from the objects](https://arbital.com/p/abstract_over_objects): Abstract algebra concerns itself with the manipulation of objects, by focusing not on the objects themselves but on the relationships between them.

If you find any collection of objects that are related to each other in a manner that follows the laws of some algebraic structure, then those relationships are governed by the corresponding theorems, regardless of what the objects are. An abstract algebraist does not ask "what are numbers, really?"; rather, they say "I see that the operations of 'adding apples to the table' and 'removing apples from the table' follow the laws of numbers (in a limited domain), thus, theorems about numbers can tell what to expect as I add or remove apples (in that limited domain)."

For a map of algebraic structures and how they relate to each other, see the [tree of algebraic structures](https://arbital.com/p/algebraic_structures_tree).


Abelian group

An abelian group is a [group](https://arbital.com/p/3gd) $G=(X, \bullet)$ where $\bullet$ is [commutative](https://arbital.com/p/3jb). In other words, the group operation satisfies the five axioms:

1. [Closure](https://arbital.com/p/3gy): For all $x, y$ in $X$, $x \bullet y$ is defined and in $X$. We abbreviate $x \bullet y$ as $xy$.
2. [Associativity](https://arbital.com/p/3h4): $x(yz) = (xy)z$ for all $x, y, z$ in $X$.
3. Identity: There is an element $e$ such that for all $x$ in $X$, $xe=ex=x$.
4. Inverses: For each $x$ in $X$ is an element $x^{-1}$ in $X$ such that $xx^{-1}=x^{-1}x=e$.
5. [Commutativity](https://arbital.com/p/3jb): For all $x, y$ in $X$, $xy=yx$.

The first four are the standard [group axioms](https://arbital.com/p/3gd); the fifth is what distinguishes abelian groups from groups.

Commutativity gives us license to re-arrange chains of elements in formulas about commutative groups. For example, if in a commutative group with elements $\{1, a, a^{-1}, b, b^{-1}, c, c^{-1}, d\}$, we have the claim $aba^{-1}db^{-1}=d^{-1}$, we can shuffle the elements to get $aa^{-1}bb^{-1}d=d^{-1}$ and reduce this to the claim $d=d^{-1}$. This would be invalid for a nonabelian group, because $aba^{-1}$ doesn't necessarily equal $aa^{-1}b$ in general.

Abelian groups are very well-behaved groups, and they are often much easier to deal with than their non-commutative counterparts. For example, every [https://arbital.com/p/576](https://arbital.com/p/576) of an abelian group is [normal](https://arbital.com/p/4h6), and all finitely generated abelian groups are a [direct product](https://arbital.com/p/group_theory_direct_product) of [cyclic groups](https://arbital.com/p/47y) (the [structure theorem for finitely generated abelian groups](https://arbital.com/p/structure_theorem_for_finitely_generated_abelian_groups)).

Alexei Andreev
Eric Rogstad
Patrick Stevens
Nate Soares
Qiaochu Yuan

An abelian group is a [group](https://arbital.com/p/3gd) where the operation is [commutative](https://arbital.com/p/3jb). That is, an abelian group $G$ is a pair $(X, \bullet)$ where $X$ is a [set](https://arbital.com/p/3jz) and $\bullet$ is a binary [operation](https://arbital.com/p/3h7) obeying the four group axioms plus an axiom of commutativity:

1. [Closure](https://arbital.com/p/3gy): For all $x, y$ in $X$, $x \bullet y$ is defined and in $X$. We abbreviate $x \bullet y$ as $xy$.
2. [Associativity](https://arbital.com/p/3h4): $x(yz) = (xy)z$ for all $x, y, z$ in $X$.
3. Identity: There is an element $e$ such that for all $x$ in $X$, $xe=ex=x$.
4. Inverses: For each $x$ in $X$ is an element $x^{-1}$ in $X$ such that $xx^{-1}=x^{-1}x=e$.
5. [Commutativity](https://arbital.com/p/3jb): For all $x, y$ in $X$, $xy=yx$.

Abelian groups are very "well-behaved" groups that are often easier to deal with than their non-commuting counterparts.


Monoid

A monoid $M$ is a pair $(X, \diamond)$ where $X$ is a [set](https://arbital.com/p/set_theory_set) and $\diamond$ is an [associative](https://arbital.com/p/associative_function) binary [operator](https://arbital.com/p/3h7) with an identity. $\diamond$ is often interpreted as concatenation; data structures that support concatenation and have an "empty element" (such as lists, strings, and the natural numbers under addition) are examples of monoids.

 Monoids are [algebraic structures](https://arbital.com/p/3gx). We write $x \diamond y$ for the application of $\diamond$ to $x, y \in X$, which must be defined. $x \diamond y$ is commonly abbreviated $xy$ when $\diamond$ can be inferred from context. The monoid axioms (which govern the behavior of $\diamond$) are as follows.

1. (Closure) For all $x, y$ in $X$, $xy$ is also in $X$.
1. (Associativity) For all $x, y, z$ in $X$, $x(yz) = (xy)z$.
2. (Identity) There is an $e$ in $X$ such that, for all $x$ in $X$, $xe = ex = x.$

The axiom of closure says that $x \diamond y \in X$, i.e. that combining two elements of $X$ using $\diamond$ yields another element of $X$. In other words, $X$ is [closed](https://arbital.com/p/3gy) under $\diamond$.

The axiom of associativity says that $\diamond$ is an [associative](https://arbital.com/p/3h4) operation, which justifies omitting parenthesis when describing the application of $\diamond$ to many elements in sequence..

The axiom of identity says that there is some element $e$ in $X$ that $\diamond$ treats as "empty": If you apply $\diamond$ to $e$ and $x$, then $\diamond$ simply returns $x$. The identity is unique: Given two elements $e$ and $z$ that satisfy the axiom of identity, we have $ze = e = ez = z.$ Thus, we can speak of "the identity" $e$ of $M$. $e$ is often written $1$ or $1_M$.

%%%knows-requisite([https://arbital.com/p/4c7](https://arbital.com/p/4c7)):
Equivalently, a monoid is a category with exactly one object.
%%%

Monoids are [semigroups](https://arbital.com/p/algebraic_semigroup) equipped with an identity. [Groups](https://arbital.com/p/3gd) are monoids with inverses. For more on how monoids relate to other [algebraic structures](https://arbital.com/p/algerbraic_structure), refer to the [tree of algebraic structures](https://arbital.com/p/algebraic_structure_tree).

# Notation

Given a monoid $M = (X, \diamond)$, we say "$X$ forms a monoid under $\diamond$." For example, the set of finite bitstrings forms a monoid under concatenation: The set of finite bitstrings is closed under concatenation; concatenation is an associative operation; and the empty bitstring is a finite bitstring that acts like an identity under concatenation.

$X$ is called the [underlying set](https://arbital.com/p/3gz) of $M$, and $\diamond$ is called the _monoid operation_. $x \diamond y$ is usually abbreviated $xy$. $M$ is generally allowed to substitute for $X$ when discussing the monoid. For example, we say that the elements $x, y \in X$ are "in $M$," and sometimes write "$x, y \in M$" or talk about the "elements of $M$."

# Examples

Bitstrings form a monoid under concatenation, with the empty string as the identity.

The set of finite lists of elements drawn from $Y$ (for any set $Y$) form a monoid under concatenation, with the empty list as the identity.

The natural numbers [$\mathbb N$](https://arbital.com/p/45h) form a monid under addition, with $0$ as the identity.

Monoids have found some use in functional programming languages such as [https://arbital.com/p/https://en.wikipedia.org/wiki/Haskell_](https://arbital.com/p/https://en.wikipedia.org/wiki/Haskell_) and [https://arbital.com/p/https://en.wikipedia.org/wiki/Scala_](https://arbital.com/p/https://en.wikipedia.org/wiki/Scala_), where they are used to generalize over data types in which values can be "combined" (by some operation $\diamond$) and which include an "empty" value (the identity).

Nate Soares
Eric Bruylant
Louis Paquin
Patrick Stevens


Associative operation

An **associative operation** $\bullet : X \times X \to X$ is a [binary](https://arbital.com/p/3kb) [operation](https://arbital.com/p/3h7) such that for all $x, y, z$ in $X$, $x \bullet (y \bullet z) = (x \bullet y) \bullet z$. For example, $+$ is an associative function, because $(x + y) + z = x + (y + z)$ for all values of $x, y,$ and $z$. When an associative function is used to combine many elements in a row, parenthesis can be dropped, because the order of application is irrelevant.

Imagine that you're trying to use $f$ to combine 3 elements $x, y,$ and $z$ into one element, via two applications of $f$. $f$ is associative if $f(f(x, y), z) = f(x, f(y, z)),$ i.e., if the result is the same regardless of whether you apply $f$ to $x$ and $y$ first (and then apply that result to $z$), or whether you apply $f$ to $y$ and $z$ first (and then apply $x$ to that result).

Visualizing $f$ as a [physical mechanism](https://arbital.com/p/3mb), there are two different ways to hook up two copies of $f$ together to create a function $f_3 : X \times X \times X \to X,$ which takes three inputs and produces one output:

![Two ways of combining f](http://i.imgur.com/Ezs1P8l.png)

An associative function $f$ is one where the result is the same no matter which way the functions are hooked up, which means that the result of using $f$ twice to turn three inputs into one output yields the same output regardless of the order in which we combine adjacent inputs.

![3-arity f](http://i.imgur.com/WCT9HaA.png)

By similar argument, an associative operator $f$ also gives rise (unambiguously) to functions $f_4, f_5, \ldots,$ meaning that [associative functions can be seen as a family of functions on lists](https://arbital.com/p/3ms).

This justifies the omission of parenthesis when writing expressions where an associative operator $\bullet$ is applied to many inputs in turn, because the order of application does not matter. For example, multiplication is associative, so we can write expressions such as $2 \cdot 3 \cdot 4 \cdot 5$ without ambiguity. It makes no difference whether we compute the result by first multiplying 2 by 3, or 3 by 4, or 4 by 5.

By contrast, the function `prependx` that sticks its inputs together and puts an `x` on the front is not associative: `prependx(prependx("a","b"),"c") = "xxabc"`, but `prependx("a",prependx("b","c"))=xaxbc`.

Eric Rogstad
Eric Bruylant
Dylan Hendrickson
Nate Soares


Operator

An operation $f$ on a [set](https://arbital.com/p/3jz) $S$ is a function that takes some values from $S$ and produces a new value. An operation can take any number of values from $S$, including zero (in which case $f$ is simply a constant) or infinitely many (in which case we call $f$ an "infinitary operation"). Common operations take a finite non-zero number of parameters. Operations often produce a value that is also in $S$ (in which case we say $S$ is [closed](https://arbital.com/p/3gy) under $f$), but that is not always the case.

For example, the function $+$ is a binary operation on [$\mathbb N$](https://arbital.com/p/45h), meaning it takes two values from $\mathbb N$ and produces another. Because $+$ produces a value that is also in $\mathbb N$, we say that $\mathbb N$ is closed under $+$.

The function $\operatorname{neg}$ that maps $x$ to $-x$ is a unary operation on [$\mathbb Z$](https://arbital.com/p/48l): It takes one value from $\mathbb Z$ as input, and produces an output in $\mathbb Z$ (namely, the negation of the input). $\operatorname{neg}$ is also a unary operation on $\mathbb N$, but $\mathbb N$ is not closed under $\operatorname{neg}$ (because $\operatorname{neg}(3)=-3$ is not in $\mathbb N$).

The number of values that the operator takes as input is called the [arity](https://arbital.com/p/3h8) of the operator. For example, the function $\operatorname{zero}$ which takes no inputs and returns $0$ is a zero-arity operator; and the operator $f(a, b, c, d) = ac - bd$ is a four-arity operator (which can be used on any [ring](https://arbital.com/p/3gq), if we interpret multiplication and subtraction as ring operations).

Eric Bruylant
Nate Soares
Patrick Stevens


Arity (of a function)

The arity of a [function](https://arbital.com/p/3jy) is the number of parameters that it takes. For example, the function $f(a, b, c, d) = ac - bd$ is a function with arity 4, and $+$ is a function with arity 2; 2-arity functions are known as [binary functions](https://arbital.com/p/3kb).

A function is said to take multiple parameters when its [domain](https://arbital.com/p/3js) is the product of multiple sets. For example, consider the function `is_older_than` that takes (as input) a person and an age and returns `yes` if the person is older than that age, and `no` otherwise. The domain of `is_older_than` is the set of all pairs of people and ages, which we might write as $(\mathrm{People} \times \mathrm{Ages})$. Because this set is a product of two sets, we say that `is_older_than` is a function of two parameters, and that it has arity 2.


Commutative operation

A commutative function $f$ is a [function](https://arbital.com/p/3jy) that takes multiple inputs from a [set](https://arbital.com/p/3jz) $X$ and produces an output that does not depend on the ordering of the inputs. For example, the binary operation $+$ is commutative, because $3 + 4 = 4 + 3.$ The string concatenation function [`concat`](https://arbital.com/p/3jv) is not commutative, because `concat("3","4")="34"` does not equal `concat("4","3")="43"`.

Dylan Hendrickson
Eric Bruylant
Nate Soares


Commutativity: Intuition

# Commutativity as an artifact of notation

Instead of thinking of a commutative function $f(x, y)$ as a function that takes an ordered pair of inputs, we can think of $f$ as a function that takes an unordered [bag](https://arbital.com/p/3jk) of inputs, and therefore _can't_ depend on their order. On this interpretation, the fact that functions are always given inputs in a particular order is an artifact of our definitions, not a fundamental property of functions themselves. If we had notation for functions applied to arguments in no particular order, then commutative functions would be the norm, and non-commutative functions would require additional structure imposed on their inputs.

In a world of linear left-to-right notation, where $f(x, y)$ means "$f$ applied to $x$ first and $y$ second", commutativity looks like a constraint. In an alternative world where functions are applied to their inputs in parallel, with none of them distinguished as "first" by default, commutativity is the natural state of affairs.

# Commutativity as symmetry in the output

Commutativity can be seen as a form of symmetry in the output of a [binary](https://arbital.com/p/3kb) [function](https://arbital.com/p/3jy). Imagine a binary function as a physical mechanism of wheels and gears, that takes two inputs in along conveyer belts (one on the left, one on the right), manipulates those inputs (using mechanical sensors and manipulators and tools), and produces a result that is placed on an outgoing conveyer belt.

The output of a commutative function is symmetric in the way it relates to the inputs. Consider a function that takes two wooden blocks and glues them together. The function might _manipulate_ them in a symmetric fashion (if both blocks are picked up simultaneously, and have glue applied simultaneously, and are pushed together simultaneously), but the output is not symmetric: If a red block comes in on the left and a blue block comes in on the right, then the resulting block is red on the left and blue on the right, and the function is not commutative (though it is [associative](https://arbital.com/p/3h4)).

By contrast, a function that mixes the red and blue together — producing, for example, the uniform color purple or the unordered [set](https://arbital.com/p/3jz) $\{b, d, e, l, u, r\}$ — would be commutative, because the way that the output relates to each input is independent of which side the input came in on.

A function is probably commutative if you can visualize the output itself as left/right symmetric, even if the left input was very different from the right input. For example, we can use the following visualization to show that multiplication is commutative. Imagine a function that takes in two stacks of poker chips, one on the left conveyer belt and one on the right conveyer belt. The function has a square of wet plaster in the middle. On each conveyer belt, an arm removes chips from the stack of poker chips until the stack only has one chip left, and for each chip that is removed, a perpendicular cut is put in the plaster (as in the diagram below). The plaster is then allowed to set, and the plaster pieces are then shaken out into a big bag. A third arm removes plaster pieces from the bag one at a time, and adds a poker chip to the outgoing conveyer belt for each one. To visualize this, see the diagram below:

![Why multiplication commutes](http://i.imgur.com/Q3QBUT6.png)

If the input conveyer belts had 4 and 6 poker chips on them (respectively), then the output belt will have 24 chips on it (because 24 different chunks of plaster will have fallen into the bag), but the chips don't necessarily come from any one particular side: The output relates to each input in a manner that doesn't depend on which side they came in.

%%%knows-requisite([https://arbital.com/p/1r6](https://arbital.com/p/1r6)):
In mathematics, a [symmetry](https://arbital.com/p/symmetry_mathematics) is some structure on a set that is preserved under some transformation of that set. In our case, the structure is the value of the output, which is preserved under the transformation of changing which side the inputs come in on. Formally, let $X^2$ be the set of all pairs of two values from the set $X;$ each point in $X^2$ is a pair $(x_1, x_2).$ $X^2$ can be visualized as an [$|X|$](https://arbital.com/p/4w5) by $|X|$ grid. Consider a function $f : X^2 \to Y$ as a structure on $X^2$ that assigns a value $f(x_1, x_2)$ to each point $(x_1, x_2);$ this can be visualized as a terrain atop $X^2$ induced by $f$. Consider the transformation $\operatorname{swap} : X^2 \to X^2$ that maps $(x_1, x_2)$ to $(x_2, x_1),$ and the set $\operatorname{swap}(X^2)$ generated by applying $\operatorname{swap}$ to all points in $X^2$. This can be visualized as reflecting $X^2$ along a diagonal. $f$ also induces a structure on $\operatorname{swap}(X^2).$ If the structure of $f$ on $X^2$ is identical to the structure of $f$ on $\operatorname{swap}(X^2),$ then $f$ is a symmetry of $X^2$ under the transformation $\operatorname{swap}$. This occurs exactly when $f(x_1, x_2)=f(x_2, x_1)$ for all $(x_1, x_2)$ pairs, which is the formal definition of commutativity.
%%%

We can think of commutativity either as an artifact of notation, or as a symmetry in the output of a function (with respect to the ordering of the inputs).


Bag

In mathematics, a "bag" is an unordered list. A bag differs from a [set](https://arbital.com/p/set_mathematics) in that it can contain the same value more than once. A bag differs from a list in that its elements are not ordered. For example, $\operatorname{Bag}(1, 1, 2, 3) = \operatorname{Bag}(2, 1, 3, 1) \neq \operatorname{Bag}(1, 2, 3).$


String (of text)

A string (of text) is a series of letters (often denoted by quote marks), such as `"abcd"` or `"hello"` or `"this is a string"`. For example, the function [concat](https://arbital.com/p/3jv) takes two strings as inputs and puts them together, i.e., `concat("one","two")="onetwo"`.


Domain (of a function)

The domain $\operatorname{dom}(f)$ of a [function](https://arbital.com/p/3jy) $f : X \to Y$ is $X$, the set of valid inputs for that function. For example, the domain of $+$ is the set of all pairs of numbers, and the domain of the division operation is the set of all pairs $(x, y)$ of numbers where $y$ is non-zero.

Visualizing a function as a map that takes every point in an input set to one point in an output set, the domain is the input set (pictured on the left in red in the image below).

![Domain, Codomain, and Image](http://i.imgur.com/ZZgVHaI.png)


concat (function)

The string concatenation function `concat` puts two [strings](https://arbital.com/p/3jr) together, i.e., `concat("one","two")="onetwo"`.


Function

Intuitively, a function $f$  is a procedure (or machine) that takes an input and performs some operations to produce an output. For example, the function "+" takes a pair of numbers as input and produces their sum as output: on input (3, 6) it produces 9 as output, on input (2, 18) it produces 20 as output, and so on.

Formally, in mathematics, a function $f$ is a relationship between a [set](https://arbital.com/p/3jz) $X$ of inputs and a set $Y$ of outputs, which relates each input to exactly one output. For example, $-$ is a function that relates the pair $(4, 3)$ to $1,$ and $(19, 2)$ to $17,$ and so on. In this case, the input set is all possible pairs of [numbers](https://arbital.com/p/number), and the output set is numbers. We write [$f : X \to Y$](https://arbital.com/p/3vl) (and say "$f$ has the [type](https://arbital.com/p/type_mathematics) $X$ to $Y$") to denote that $f$ is some function that relates inputs from the set $X$ to outputs from the set $Y$. For example, $- : (\mathbb N \times \mathbb N) \to \mathbb N,$ which is read "subtraction is a function from [natural number](https://arbital.com/p/natural_number)-pairs to natural numbers."

$X$ is called the [domain](https://arbital.com/p/3js) of $f.$ $Y$ is called the [codomain](https://arbital.com/p/3lg) of $f$. We can visualize a function as a mapping between domain and codomain that takes every element of the domain to exactly one element of the codomain, as in the image below.

![Domain, Codomain, and Image](http://i.imgur.com/ZZgVHaI.png)

[Talk about how they're a pretty dang fundamental concept.](https://arbital.com/p/fixme:)
[Talk about how we can think of functions as mechanisms.](https://arbital.com/p/fixme:)
[Add pages on set theoretic and type theoretic formalizations.](https://arbital.com/p/fixme:)
[Talk about their relationships to programming.](https://arbital.com/p/fixme:)
[Talk about generalizations including partial functions, multifunctions, etc.](https://arbital.com/p/fixme:)
[Give some history, e.g. Church-Turing, Ackerman, recursion, etc. ](https://arbital.com/p/fixme:)

# Examples

There is a function $f : \mathbb{R} \to \mathbb{R}$ from the [real numbers](https://arbital.com/p/real_number) to the real numbers which sends every real number to its square; symbolically, we can write $f(x) = x^2$.

(TODO)

Eric Rogstad
Patrick Stevens
Nate Soares
Eric Bruylant
Mark Chimes


Set

A __set__ is an unordered collection of distinct [objects](https://arbital.com/p/-5xx). The objects in a set are typically referred to as its __elements__. A set is usually denoted by listing all of its elements between braces. For example, $\{1, 3, 2\}$ denotes a set of three numbers, and because sets are unordered, $\{3, 2, 1\}$ denotes the same set. $\{1, 2, 2, 3, 3, 3\}$ does not denote a set, because the elements of a set must be distinct.

Another way to denote sets is the so-called abstraction method, in which the members of a set are given an explicit description, leaving no need for listing them. For example, the set from the example above $\{1, 3, 2\}$ can be described as the set of all natural numbers $x$ which are less than $4$. Formally that is denoted as $\{x \mid (x < 4) \text{ and } (x \text{ is a natural number})\}$.

[I am new to using Latex for editing, so I am not sure if this is the best way to display what's above. Also, "x is a natural number" is the same as x∈N but we did not get to the membership operator yet.](https://arbital.com/p/comment:)

Using the abstraction method allows for denoting sets with infinitely many elements, which would be impossible by listing them all. For example, the set $\{x \mid x = 2n \text{ for some natural } n \}$ is the set of all even numbers.

A set doesn't need to contain things of the same type, nor does it need to contain things that can all be brought to the same place: We could define a set $S$ that contains the apple nearest you, the left shoe which you wore last, the number 17, and London (though it's not clear why you'd want to). Rather, a set is an arbitrary boundary that we draw around some collection of objects, for our own purposes.

The use of sets is that we can manipulate representations of sets and study relationships between sets without concern for the actual objects in the sets. For example, we can say "there are 35 ways to choose three objects from a set of seven objects" regardless of whether the objects in the set are apples, people, or abstract concepts. %%note: This is an example of [abstracting over the objects](https://arbital.com/p/abstract_over_objects).%%

It's also worth noting that a set of elements is itself a single distinct object, different from the things it contains, and in fact, one set can contain other sets among its elements. For example, $\{1,2,\{1,2\}\}$ is a set containing three elements: $1$, $2$ and $\{1,2\}$.

##Examples

 - $\{1,5,8,73\}$ is a set, containing numbers $1$, $5$, $8$ and $73$;
 - $\{\{0,-3,8\}\}$ is a set, containing __one__ element — the set $\{0,-3,8\}$;
 - $\{\text{Mercury}, \text{Venus}, \text{Earth}, \text{Mars} \}$ is a set of four planets;
 - $\{x \mid x \text{ is a human, born on 01.01.2000} \}$ is a set all people whose age is the same as the current year number;
 - $\{\text{author's favorite mug}, \text{Arbital's main page}, 73, \text{the tallest man born in London}\}$ is a set of four seemingly random objects.

## Set membership
*Main page: [Set membership](https://arbital.com/p/set_membership)*

Set membership can be stated using the symbols $∈$ and $∉$. They describe the contents of a set. $∈$ indicates what is in a set.  $∉$ indicates what is **not** in a set. For example, "$x ∈ A$" translated into English is "$x$ is a member of the set $A$." and "$x ∉ A$" translates to "$x$ is **not** in the set $A$."

##Set cardinality
*Main page: [https://arbital.com/p/4w5](https://arbital.com/p/4w5)*

The size of a set is called its __cardinality__. If $A$ is a finite set then the cardinality of $A$, denoted $|A|$, is the number of elements $A$ contains. When $|A| = n$, we say that $A$ is a set of cardinality $n$. There exists a [bijection](https://arbital.com/p/499) from any finite set of cardinality $n$ to the set $\{0, ..., (n-1)\}$ containing the first $n$ natural numbers. We can generalize this idea to infinite sets: we say that two infinite sets have the same cardinality if there exists a bijection between them. Any set in bijective correspondence with [$\mathbb N$](https://arbital.com/p/45h) is called __countably infinite__, while any infinite set that is not in bijective correspondence with $\mathbb N$ is call __uncountably infinite__. All countably infinite sets have the same cardinality, whereas there are multiple distinct uncountably infinite cardinalities.

## See also

* [https://arbital.com/p/5s5](https://arbital.com/p/5s5) - Common [operations](https://arbital.com/p/3jy) in set theory.
* [https://arbital.com/p/sets_examples](https://arbital.com/p/sets_examples) - Examples of significant sets.
* [https://arbital.com/p/2w0](https://arbital.com/p/2w0) - A concrete exercise in comparing the cardinalities of infinite sets

Kevin Clancy
Ilia Zaichuk
Alexei Andreev
Eric Rogstad
Patrick Stevens
Nate Soares
Eric Bruylant
Travis Rivera


Binary function

A binary function $f$ is a [function](https://arbital.com/p/3jy) of two inputs (i.e., a function with [arity](https://arbital.com/p/3h8) 2). For example, $+,$ $-,$ $\times,$ and $\div$ are all binary functions.

Eric Bruylant
Nate Soares
Alexei Andreev