## Monday, November 2, 2015

### What is this Boole's Google Doodle?

I imagine the scene. You wake up this morning (yes, you), dizzy after a brave night of questionable choices, you fire up Google, and here it is! A new doodle! What is it?

Wait! There is the play button! Maybe it's another game! Like that time Pac-Man's Doodle made the world losing 120 million dollars in productivity! (Well, maybe this is not true). Or like the Halloween one, where you collected candy avoiding bats and ghosts. You passed the day collecting yellow candies. (Because you are a despicable person. Blue should have won!). Let's play!

Huh. What's that? Blinking... stuff? How do you play? You cannot. Green, red, yellow... Maybe it's a traffic light? You try to do the robot in rhythm, but no, it doesn't make sense. You click on it, and it goes to the search results page of "George Boole". Humph! "Who is this guy?" you say, reddened from rage "That's... that's... that's booloney, Google!" (The questionable choices are really catching up on you).

Yes, probably this doodle is not the most perspicuous. The people who knows who Boole is, I guess won't be too much excited by it, and the people who don't know the adjective boolean will not understand what's going on. Well, if you stumbled on this page with this question in mind, I'm here to help you!

So, the doodle of today is to celebrate the 200 years of George Boole's birth. Who is George Boole? This guy:

Boole, when it was not busy cultivating his magnificent sideburns (i.e., rarely), was a mathematician. A rather classical one, actually, he collected some results on differential equations and analysis that are still used. Yet, nothing to google-doodle about. His most important works are instead a small pamphlet called Mathematical Analysis of Logic, and the big budget sequel An Investigation of the Laws of Thought on Which are Founded the Mathematical Theories of Logic and Probabilities (hopefully the book is longer than the title). His idea was to pick Aristotelian logic and systematizing it, formalizing it. Conjunctions and disjunctions (and, or...) were not considered anymore grammatical structures, but mathematical ones. They were operations between sets. It was huge: Boole just kicked out the philosophers from logic, and made it a mathematical concept, in fact an algebraic one, therefore making possible all sorts of applications (and computer science is just one of the most famous).

How does it work? It's called Boolean algebra. In the most basic instance, it's just "true" and "false", and the operations AND, OR and NOT between them.
- AND is like multiplication: true AND true is true, all the others are false, e.g. false AND true is false
- OR is more or less like addiction: false OR false is false, all the others are true, e.g. true OR false is true
- NOT is clear: NOT true is false, and NOT false is true.

Now see again the doodle: it's just showing this operations! When x appears, it means x is true, otherwise x is false. So the "G" (i.e., x AND y) lights up only when both x and y appear, the "l"  (NOT x) only when x does not appear, and so on. There is another operation I haven't talked about: XOR. It's the "exclusive or", and x XOR y only if x or y appear, but not at the same time.

Wait, there's more! If you substitute "true" and "false" with "on" and "off", then you have how all the circuits in all the computers function. They are true physical manifestations of boolean operations: if you open your laptop* you look into it, you will find XOR gates, AND gates, and so on.

*I'm not going to be responsible for this.

But is this logic? Why are they called like conjuctions and disjunctions? In a more complicated instance, AND, OR and NOT are operations among sentences. If you have two sentences, "sentence A" and "sentence B", then "sentence A AND sentence B" is the conjunction of the two. That is... "sentence A and sentence B". Whoah, deep.

I don't think that clarified anything. The parallel is: "sentence A AND sentence B" is true if and only if both sentences are true, and x AND y is true if and only if x is true and y is true. So the operations respect the logic, and the logic defines the operations: AND is really just "and", OR is just "or", but instead of connecting sentences, they give you the truth value of the sentences connected. Move on.

You can see here that boolean operations are also operations on sets. AND is just the intersection, OR the union, XOR the symmetric difference. Try it on Google! Search for "Google is awesome" AND "Yog-Sothoth evocation ritual", and then for "Google is awesome" OR "Yog-Sothoth evocation ritual". Now! Or else! (Google is watching you trying). So you know now why a search engine is so grateful to Boole (and why you should always have in handy the mystic scimitar of Barzai).

Don't be less evil

There are many "boolean" things around. The aforementioned boolean algebras, but also boolean circuits, boolean expressions (those things in Excel that permits you to do magic), boolean functions, boolean models, boolean processors... Even a crater on the Moon named Boole!

Boolean algebras, by the way, are essential in Set Theory. They are the basic of the forcing method, the paradigm-changing method that in recent years permitted to prove many independency results, therefore establishing once and for all that mathematics is incomplete, many questions have no answer. It's easy: build a boolean algebra that does the trick, then find an ultrafilter of it (it should be generic, mind you!), then in the generic extension...

You know what? This is not the time to talk about this. This needs a whole other posts. So that's it, for now! Enjoy your Boole day AND have fun! OR NOT! Ha!

(wait for it...)

XOR.

(I think I blew it)

## Monday, June 22, 2015

### The Truth about The Zero Theorem

The other day I have seen The Zero Theorem, a recent movie by Terry Gilliam. The movie was not really appreciated by the critics, but if you are reading here, probably you have already seen it, so it doesn't really matter. Also, it was greatly imaginative, and Gilliam's fans will appreciate it. But if you've seen the movie, then you could ask: how much of it is mathematically true? Of course, it's all pretty surreal and it must not be taken at face value, but is there a kernel of truth? Maybe. Let's see.

Q. What is the Zero Theorem? Is it something mathematicians are really trying to prove?
A. The movie is rather vague, so I cannot know for certain. I have three hypotheses:

The rational zero theorem, or rational root theorem, is a classical algebra theorem that indicates all the possible rational solutions to a polynomial equation. Now there is a rule: if there is a proof of it on Wikipedia, it means that in the spectrum of sureness, it is between death and the protests following a new Facebook layout:

so probably this is not what Gilliam had in mind.

In the movie, Bob tries to explain what is going on: proving the Zero Theorem would be proving the Big Crunch, that is the cosmological idea that the universe at a certain point will stop expanding and will start to collapse, ultimately disappearing. This is opposed to the Big Freeze, where the universe will continue to expand and therefore cool off, at a certain point too cold for life, and the Big Rip, where the expanding universe will rip, and two points will be at infinite distance between each other. Whatever notorious B.I.G. the scientists are trying to prove, probably it cannot be solved just with a theorem, it needs practical experiments. So, yeah, probably that is what Gilliam had in mind, even if it doesn't hold much water. Yet there is space for another hypothesis...

At a certain point we learn that Qohen managed to prove that 0 equals 93.78926%, and the objective is 100%.

The Mainframe! I must access the Mainframe!

100% of what? What about... everything? Then yes, that would be bad, it would destroy all mathematics. There is a catch, though: it would not be a slow climbing like in the movie, one percentage point at the time, but a sudden death! One just needs a very small percentage of things to be 0, and then everything would be 0. In fact, one needs just 1=0. Think about it: if 1=0, then 2=1+1=0, and 3=0, and so on, every number is 0. Also, if you have a triangle, what would be its area? 0, so it's a point, so any geometric shape would not exists. Using the principle of explosion (yes, I linked a xkcd comic and not the Wikipedia page, good enough) one could falsify any theorem. In fact, it's an inside joke between set theorists that 1=0 is the strongest axiom, because it can prove everything and its opposite (and this also answers the final question of one previous post of mine! this is an eight-months Chekov's gun!)

Q. Is it possible to prove that everything is 0? Can it really happen?
A. Yes, it can definitely happen. If you read this post, then you'd know that mathematics is a list of things we say are true (axioms) and everything that can be logically derived by them. Gödel proved with his Second Incompleteness Theorem that we cannot be sure that such a list doesn't prove a contradiction, ever. Tomorrow one smart guy can wake up, and prove that all mathematics is 0.

Q. What would happen if the Zero Theorem is true? Everything would be meaningless, like in the movie?

A. Well, my life surely. Your life will probably be fine. Sure, a lot of the things we do depend on mathematics, but there is maybe a way to save it, it depends how deep the contradiction is. What brings a contradiction? Is it very complex formulas? Then maybe limiting the complexity of formulas we are safe (again, we can never be sure). Too big numbers? Then we can limit the numbers (here you are again, ultrafinitist! You happy, now?). A contradiction is like gangrene (yikes, what a bad metaphor): sure, it can infect all the body, but you can cut just the part affected. If it is the little toe, then mathematics will be pretty much unscathed. Of course, it can happen that the problem is in the heart, for example in the basic arithmetic of numbers. That would mean that the basic mathematics does not work like we predict, for example computers could not work as expected and we would need a team of mathematicians that put order in the disorder (like in the movie) and rethink mathematics. But it is very implausible,

Q. Is the name of the protagonist relevant to mathematics?
A. There is a Cohen that is extremely important in mathematics, Paul Cohen, his work on the continuum problem (see this post) was unprecedented and changed mathematics completely, thanks to his technique, called forcing. But this has nothing to do with the Zero Theorem, and as the surname of Qohen is Leth, probably Gilliam was referring to Qoheleth, the Ecclesiastes.

Q. What is the Transfinite Paradox?
A. Yes, at the beginning Qohen solves the Transfinite Paradox. Transfinite is how mathematicians call an infinite that is not absolute, but all such paradoxes are already solved, so I have no idea what he meant.

Also, can we please, please, please avoid every time there is someone doing something mathematical avoid to picture him (because it's always a male) as a disturbed, asocial and in general a few cards short of a deck? Of course, mathematicians are a odd bunch, just like musicians, artists, writers and every job where you need a lot of passion to survive. But there are many ways to be odd, and not only this Asperger-like grumpiness: probably the worst case, bordering libel, was in the recent The Imitation Game, where they used the usual palette to paint Turing, that in reality was a fun, sociable and likeable person. Come on, moviemakers! De-Sheldonize mathematics!

Infinity is a staple of science fiction, like in Futurama or Artemis Fowl.  But if you want to know more about its limits, then go no further then here.

## Monday, May 18, 2015

### An Answer to the Ultrafinitist Below

This post is an answer to this one (yes, I am answering myself, please wait before calling the mental house). If you read that one, you probably noticed that the style was, um, different. That is because that should have been an April fools' joke (you could guess it because the words fools and joke were bold, and because it was the 1st of April). It was a collection of arguments that people against infinity use. I wanted to answer immediately, but life finds a way... to kill your plans. So let's answer them now.

Who is right, then? I wrote 20 posts about infinity, but the arguments against it are pretty convincing, aren't they? Well, in fact thery are not really wrong, they are just too partial. Let's see them.

Q. Is it true that the universe is not infinite?
A. I am not a physicist, so I cannot answer this question in all the details (that's a bad start). In this interview Prof. Joseph Silk says that simply we don't know. It can be either way, with our current knowledge it's not possible to know. According to Wikipedia, one of the models of the Universe with most consensus is the Friedmann–Lemaître–Robertson–Walker metric, that appears to be infinite, but I have no idea. Anyway, it seems like it doesn't matter, The time we have here is finite, therefore even if the Universe is infinite, we will be able to observe just a finite part of it.

Q. But is it true that between two points there is just a finite amount of space?
A. Again, we don't know. I found this nice discussion on StackExchange, and the models we are using now to calculate stuff do have infinite points between two points (are continuous). The consensus seems to be that this is the case, but we cannot know.

Q. Ok, so we don't know if the infinite exists in this Universe, and maybe we will never know. But is it used in physics practice?
A. Constantly. The language of physics is mathematics, and there infinity is a necessary tool. If you think about it, nothing in mathematics really exists. There is no real number, there are no points, no lines. Triangles do not exist.
And yet we use them every day, because they work.

Q. Therefore infinity is used in maths.
A. That is not a question. Anyway, yes. math is practically founded on the infinite. Leibniz, Newton & co., while founding calculus, were using it just like any other quantity. Now we know better, and we actually can get rid of it, decide a maximum number and stay there. But the problem is: which one?

As an example, let's take computer science. In 1936 Turing invented the Turing machine, that is not a real machine, but a hypothetical one that is infinite and that can mimic the behaviour of any computer. It has been a fundamental tool for the understanding of computer science (well, it was the invention of the idea of computer). Now suppose that Turing, instead of conceiving an infinite machine, invented a finite one. How big do you think it would have been? 2000 possible numbers? 20000?

The Z3, built in 1941, could memorize only 64 words of 22 bit

It was surely unconceivable at that time more space, but now we can easily and cheapily have 137438953472 numbers hidden under our nails. If the Turing machine was finite, every year a bunch of people would have to meet to raise its size. Instead, we have a reliable and universal way to represent all computers, past and future, thanks of infinity. For example, now we now if something is just not possible to calculate with a computer. If we just deal with finite stuff, one can say "Heh, maybe if our computers are bigger/faster, we can calculate that", and spend millions of real world money for an impossible task.

The same is true for mathematics. Deciding a limit number is ridiculous. Also many concepts first start with infinity, and then become finite. Without the infinity part, we probably just wouldn't have such concepts, as "calculus" or "computer".

Q. Can we imagine the infinite?
A. That's an interesting question!
Q. Thank you.
A. I mean, even kids know perfectly well what infinity is, right? Yet, we cannot possibly think all the numbers. Our brain is finite. But we can think of the totality of the numbers. For example, think of a glass of water. In that glass, say, there are 8 x 10^24 molecules of water (that is more than 8 septillions for an American). Our mind cannot possibly think of each molecule, there are too many. Yet, you had no problem in thinking of a glass of water, am I correct?

So, that's it! Infinity is safe and alive! You can continue to infinity-and-beyond your stuff, people! Oh, one more thing...

Q. Are all finitists so obnoxious, like in the previous post?
A. Yes. Well, that's unfair, just the more vocal ones. I don't know what's wrong with them. At the mere hint of infinity, they unleash an anger and spite usually reserved to breast-feeding forums and Ben Affleck's Batman. They call people who use infinity "mystics", "religious" or even "fetishists". They stalk all famous mathematicians, ready to attack (I am not famous, but I do have a finitist that comes into my office). They feel like the whole world is wrong, and they're frustrated that no one listens to them, before it's too late. They are not stupid or ignorant, mind you, sometimes they are brilliant thinkers. It's just that we work on a different fundamental assumption, and there is no way to please both. But can we nonetheless aceept each other and be friends? Please?

## Wednesday, April 1, 2015

### Some infinities don't exist more than other infinities (an ultrafinitist point of view)

Attention! This was an April Fools' post, so it says the exact opposit of what I think. Still, it's food for thought, and I answer to this in this post.

Hahaha. Infinity.

What a joke.

Only fools would really believe that such a thing exists. Don't you see it? It's just a ruse to make you question the reality you are seeing with your own eyes! Wake up sheeple!

Infinity is just an illusion. God is dead, so why we don't do the same to infinity, huh? Time to get ride of it. Well, we are already doing it. We thought the universe was infinite, well, not so much. We thought the speed of light was infinite, not even close. We thought that between two points there were infinite points, or that between two instants there were infinite moments of time, wrong again and again. Everything around us is finite. You don't go to the pet shop and buy infinite kittens. That would be too cuteness for anybody.

Spoiler alert: this is not possible.

Then love is infinite? Sorry lovey-dovey couples, at the very least one of you will die, so you can just start to delete that tattoo right away. But then death is infinite? No, it's not: everybody is always dead for a finite amount of time. Julius Caesar has been dead for 2059 years and 17 days, Marvin Gaye for exactly 31 years. Give it up, infinitists!

So what about the numbers? Are they infinite? Of course not. Just pick the number of particles in the universe, its time and calculate all the possible combinations of them. It will be a finite number, the biggest on. What do you say? What about that number +1? Pfft, that does not exist. Just because you can imagine a number, it doesn't mean it exists. I can imagine a unicorn, but still not receiving it for Christmas. Because it does not exist.

Ok, so you're saying that one can imagine infinite numbers. Come on, try it. Start: 10, 100, 1000... At a certain point you cannot go on anymore. Some numbers are so huge, that we cannot conceive them, But then, where do they exist, if not in nature or in anybody's mind? Answer: they don't.

So you like tortoises and Achilleses, right? If you think about it, the solution is easy: the world is like a Monopoly table. There will be a moment when Achille and the Tortoise will be one step close. Then the tortoise should do half a step, but it cannot, so it stays, and Achille does one step and reaches the tortoise. Easy peasy!

Enough with this infinite foolishness, then! Eat your vegetables, and embrace the world as it is! (Vegetables are delicious, too! Especially the Brussels Sprouts.)

## Sunday, January 25, 2015

### Infinite Mess (Part Two)

This is the second part of a post that started here. Go read it, if you still haven't done so. Or don't, and try to guess what is going on. It'll be enlightening anyway.

So, what did DFW wrote(*)? Here is the source, verbatim:

The Continuum Hypothesis gets characterized in all kind of different ways: [...](**) Is the same as

Let me first try to explain to you what is the Continuum Hypothesis, let's see if I am better in this than Foster Wallace. First, let's get the objects straight:

Natural numbers are the numbers like 0, 1, 2 and so on. Basically, if you hear a number and you can imagine the same amount of zebras (or any other object, but I prefer zebras), it's a natural number. You can't imagine pi zebras, or 1.25 zebras. This are the numbers that we all learned in school, and I really shouldn't have spent 67 words on this.

And one picture

Real numbers are all the numbers. Period. Even with infinite digits after the digital point. 2, 3.45, square root of 2, pi are all real numbers.

Now, Cantor proved that some infinities are bigger than other infinities, right? Well, he was more specific: he proved that the real numbers are more than the natural numbers. Pretty cool. Then he asked, in his Ein Beitrag zur Mannigfaltigkeitslehere, whether the real numbers are immediately larger than the natural numbers, or if there is something in between, larger than the natural number but smaller than the real numbers. This is called Continuum Problem, because continuum was fancy -talk for real numbers. Then Cantor said: you know what? I think that there is nothing in between. This is called Continuum Hypothesis, and as it is formulated, it's just an opinion, a hypothesis (hence the name): we don't know the answer to the continuum problem, so let's suppose it's this.

So? Understood? If you read DFW's book I'd really like to know if it was easier to understand than this.

You can already see the first problem: the Continuum Hypothesis asserts something, so it cannot be a question! DFW is confusing it for the Continuum Problem. Already annoying. But let's go on: what are those strange symbols in DFW's quote?
is the size of the set of the real numbers, i.e., how many real numbers there are.

is the size of the set of the sets of natural number (I'll stop you before you start Xzibit memes), i.e., how many sets of natural numbers there are.

DFW is showing something completely different than the Continuum Problem, then, he's asking if there is the same quantity of real numbers and sets of integers, like it is a great mistery.

It is not! It's Set Theory 101: they are the same! It's not a mistery, it's almost trivial! What were you thinking, DFW? He got everything completely confused, he wanted to show the Continuum Hypothesis and he showed an exercise for students that involves objects that have nothing to do with the Continuum Hypothesis.

You want to know why they are the same? Mmm... this is not immediate, unfortunately one has really to write down a mathematical proof. So put on your favorite thinking hat...

This is mine. Don't judge me, the situation at the office is awkward enough.

and concentrate on the following (***).

To prove that two sets have the same size, one should be able to connect every object of one set to only one other object on the other set,

Try as you might, this doesn't work in this case. What to do then? Mathematicians know a weird simple trick (doctors HATE it!!): what if we connect all the apples to the oranges and there are oranges left? This means that the oranges cannot be less than the apples, right? (****)  And if we connect, in another way, all the oranges to the apples and there are apples left, this means that the apples cannot be less than the oranges! So they are the same quantity!

Let's see first that the real numbers cannot be less than the sets of natural numbers. Pick a set of natural numbers

then draw it in the number line

write a 0 when it's empty, 1 when it's full

and finally add 0. at the front.

There you are, for each set of natural number, you can write a different real number. So real numbers cannot be less.

Now to see that the set of natural numbers cannot be less than the real numbers, I won't describe it, I'll just show it:

Therefore the two things do have the same size, and the climax of DFW's booklet is an epic fail.

Really, it's disappointing. It started so well, with Zeno's paradox of the turtle and everything...

Wait a minute, where did I see the turtle paradox and Cantor work together in the wrong way? John Green is a big fan of David Foster Wallace, right? Maybe...

Now that I think about it, the book-in-the-book An Imperial Affliction has many things in common with Infinite Jest, like the non-ending. But oh! Of course! The writer of AIA, Van Houten, is so similar to the prose of DFW! His obscurity, his way of talking encyclopedic but hard to understand... and it is Van Houten that connects (wrongly) the turtle paradox and Cantor's Theorem! Also, John Green has surely read Everything and More, he even reviewed it for Booklist Magazine!

John Green has put Cantor's Theorem in The Fault in Our Stars because he read it on Everything and More, and he did it wrongly because it was confusing already in the original book! That's where everything starts! That's a scoop!

Oh.

I'll see myself out.

(*) Since I am taking for granted that you, reader, are a DFW fan, I am adding lots of footnotes. Have fun!
(**) I skipped the other three characterizations of Foster Wallace, without context it's pretty useless. For the curious: one is wrong and the other two are characterizations of the Continuum Problem, not the Continuum Hypothesis.
(***) Or don't. Really, you can just skip the whole paragraph, you, reader, are the king, because I am so post-modern.
(****) In the finite case, it means that the apples are less than the oranges, but infinity is weird.

Thanks to Gabriel for pointing this out to me.

## Monday, January 12, 2015

### Infinite Mess (Part One)

Uh-oh. That's it. I'm going to do it. I am going to criticize a very well-beloved author, an author that touched the hearts of millions of people, one of the most influential and innovative writers of the last 20 years, according to the Los Angeles Times, also one that met a tragic and untimely end, and therefore untouchable.

The reactions of literary fans are known to be sober

I'm not going to be only critical, I am going to destroy one of his works (well, at least some lines). I am talking about David Foster Wallace, the brilliant mind behind Infinite Jest, an encyclopedic, metamodernist, hysterical realist novel that almost single-handedly put him in the curriculum of English literature courses. He's edgy, irreverent, inventive and also sweet, how can I possibly go against him (especially since he cannot defend himself)? Not only that, but I'll even claim that I am better than him in explaining some stuff! Oh my, some little blogger really went over his head, now.

I will use his words to defend myself:

The Mentally Ill Mathematician seems now in some ways to be what the Knight Errant, Mortified Saint, Tortured Artist, and Mad Scientist have been for other eras: sort of our Prometheus, the one who goes to forbidden places and returns with gifts we can all use but he alone pays for.

Well, here I am; as a Prometheus (and maybe Mentally Ill Mathematician, as this blog seems to attest) I can be forgiven if I bash a literary genius, as I am also bringing gifts for everybody, guys! They come from forbidden places!

Unfortunately, it seems that Foster Wallace didn't go where I've been. In 2003 he wrote a booklet, Everything and More, about the history of infinity, and especially the work of our good old Cantor. Great, right? Finally some popular recognition to our hero! So, is it any good?

Disclaimer: I haven't read it. What I read are the critical reviews of Rudy Rucker and Michael Harris, the second one being really interesting as it is more forgiving to the author, and some other snippet caught here and there in some preview, It was enough to bum me. There is always a misunderstanding when writers try to explain mathematical concepts: the literary way of dealing with concepts is through vagueness.  The beauty of a poem is that the words carry with them many, many meanings, and elicit in our mind different responses, therefore being able with this overlap to create sensations that would be impossible to explain in plain words. Mathematics is the opposite: its beauty is in the perfection of its concepts. It's a huge mechanism full of cogs and wheels, and yet everything works perfectly, every minimal part is on time. It's like juggling, or rock balancing: the slightest error can ruin everything.

Literature vs Mathematics
(Left: (c) Frank Grisdale)

You can see, then, how treating mathematical concepts with literary tools just doesn't work. It's even worse in this case: DFW is aggressively post-modern, and one of the staples of aggressive post-modernism is the unreliability of the narrator. And he admits that in this book! So, what's the point of reading a mathematical book where the writer always tries to trick you? Not only that, but he's trying to invent a new style, called "pop technical writing", that uses tons of footnotes (of course) and abbreviations that no one ever used. A complete mess.

Well, then, that is how it is written. But what about the content? Surely there is a lot to learn reading this book, right?

No.

Unfortunately, there are many, many errors. There are websites that list all of them. There is enough material to publish one post per day, for a year. Now I cannot do that, I have already very few readers without actively alienate them with DFW marathons, so I'll choose just one. But it's a big one. Imagine: you spent hours and hours trudging through this book, through all the ridiculous fake notations, through hundreds of pages on convergent series, when finally you are realizing that the book had a direction, that all of this was to reach a particular point, You turn the page ready to read it, no, to experience it...

and it is wrong.

The musical equivalent