{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# What is an atom?\n", "## 3. An Integer?\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Well, naturally we'd be interested in having multiple piles of pebbles to play with.\n", "\n", "What does it mean to group pebbles into piles? We could imagine bringing the pebbles closer and closer together until actually they're in the \"same place,\" but since that's tricky, we signify grouping instead by drawing a circle around the pebbles, or just kind of making a little stack of them in a pile. The order/placement of the pebbles doesn't matter, just the fact that the pebbles are all in there, and there is some number of them. And just as we can have multiple pebbles in a pile, we can have multiple piles lying around.\n", "\n", "What's the most basic thing we could do with piles? Well, we could combine piles. This is called \"addition.\"\n", "\n", "$ \\Large \\{ \\Large\\bullet, \\Large\\bullet \\} + \\Large \\{ \\Large\\bullet, \\Large\\bullet, \\Large\\bullet \\} = \\Large \\{ \\Large\\bullet, \\Large\\bullet, \\Large\\bullet, \\Large\\bullet, \\Large\\bullet \\} $\n", "\n", "In other words, $2 + 3 = 5$. We could think of this like \"iterated counting up\": we count up by as many pebbles are in the pile, \"all at once,\" as opposed to one at a time, and if we think in terms of combining piles obviously: $2 + 3 = 3 + 2 = 5$. But if we want an inverse operation, \"iterated counting down\", where we count down by as many pebbles are in a pile, we suddenly have a problem: what if we subtract past past 0 to land at--what? A \"negative number.\" For example, $2 - 3 = -1$:\n", "\n", "$ \\Large \\{ \\Large\\bullet, \\Large\\bullet \\} - \\Large \\{ \\Large\\bullet, \\Large\\bullet, \\Large\\bullet \\} = \\Large \\{ \\Large{\\color{red} \\bullet} \\} $\n", "\n", "Clearly, we have to introduce a second kind of pebble (with its own kind of absence) to keep track of our \"debts.\" The rule is that if a $\\Large\\bullet$ and a $\\Large{\\color{red} \\bullet}$ are in a pile together, we can remove them both: $\\Large \\{ \\Large\\bullet, \\Large{\\color{red} \\bullet} \\} \\rightarrow \\Large\\{ \\}$. So now we can represent an empty pile, $0$, just a circle with nothing in it. Or with any pile with an equal number of $\\Large\\bullet$'s and $\\Large{\\color{red} \\bullet}$'s. Black and red pebbles can't coexist in a pile together, and so eventually after all the credits and debts cancel out, the pebbles in a pile are all red, all black, or 0. And so we have a new kind of freedom in our representation: we can add arbitrary pairs of black and red pebbles to any pile and this won't change the number that it represents: $\\Large \\{ \\Large\\bullet, \\Large\\bullet, \\Large{\\color{red} \\bullet}, \\Large{\\color{red} \\bullet}, \\Large{\\color{red} \\bullet}, \\Large{\\color{red} \\bullet}\\} \\rightarrow \\Large\\{ \\Large{\\color{red} \\bullet}, \\Large{\\color{red} \\bullet} \\}$.\n", "\n", "We started with an atomic pebble. We then joined pebbles into a complex we called a pile, in which multiple pebbles coexisted. We then decided to work at an even higher level where we can have multiple piles, just as before we had multiple pebbles, and can combine them with addition and subtraction. We've invented the \"integers\": $ \\ldots -3, -2, -1, 0, 1, 2, 3, \\ldots$." ] } ], "metadata": { "kernelspec": { "display_name": "VPython", "language": "python", "name": "vpython" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.7" } }, "nbformat": 4, "nbformat_minor": 4 }