# Transforming a proof into blocks – part 1

I believe every mathematician has a favorite proof, or several. If you don’t, maybe it exists but you just don’t know about it (given that Kurt Friedrich Gödel proved that there are uncountable proofs, the hypothesis that your favorite proof exists, you just don’t know about it, can never be refuted). In my case, some of my favorite proofs are those that prove the infinity of prime numbers. The most famous of them, presented by Euclid more than 2300 years ago, I believe it marked me for helping me understand the “power” of demonstrations… after all, trivial demonstrations give us a certain feeling that they didn’t need to exist… but this one, answers a really fun question, is the set of prime numbers finite?

The other two demonstrations that stand out to me involve the proof of this same statement, but using different strategies. This struck me because I realized that there really are very different paths (I mean by this that they are not equal paths unless the choice of words or order of procedures) that allow us to prove a given statement (these three demonstrations have already appeared in other posts here, Demonstrate with charm, Principium tertii exclusi and Reductio ad absurdum: ancient mathematical “spells”.

But the subject today is how to transform this beautiful text into a collection of nesting blocks? I’m not kidding anyone, but this is not going to be a very simple process, although it’s about 10x simpler than it was a year ago when I started programming this thing…

To start, choose a fun demo. In my case, I chose the constructive proof that the set of prime numbers is infinite.

The blocks vary in 4 colors (chosen for easier distinction by people with color blindness, I used the https://colorbrewer2.org/ software for this), each with a specific function.

- Light blue: regular text (with a function to aid understanding or make it more readable)
- Light green: mathematical text (with the function of relating sets, indicating steps, procedures)
- Dark blue: algebraic expressions (composed of numbers, coefficients, variables, unknowns)
- Dark green: math symbols (or words with symbol function)

Well, now we need to “break” the demonstration into these 4 types of text. The software allows us to assemble demonstrations with up to 95 blocks, although for better mobility of the blocks on the screen it would be good if the demonstration was divided into up to 50 parts.

When we are going to create the blocks, we have the benefit that any block can be duplicated by the user, so it is interesting to try to keep pieces of text the same, as in the case of the second and fourth line, we have “relative primes”, in the third and fifth line we have “must have at least”, in addition to expressions and symbols that are repeated several times. Another interesting detail is thinking about simplifying the text to reduce the number of blocks. For example, the text “they are” in the second line and “and for this” in the fourth line and “Thus” in the fifth line, have the same meanings, indicate an immediate consequence to something that was presented, therefore, they could be replaced ( in relation to its meaning) by the “then” block. Similarly, the word “Analogously” in the fourth line has the same meaning as the word “Being” in the second line. And the expression “consecutive integers on the second line” has the same function as the expression “they are consecutive integers”. To make these substitutions, it is interesting to think about how the text will look, looking for terms that best fit the reading (this will depend on your taste and experience with mathematical writing). See how I did it in the example below:

With that, we have our original demo broken down into 35 text segments of 23 different types.

**part 2 →**

Cover image adapted from the meme known as “sayori drake meme”