Euler, Church and Mandelbrot – a study of beauty and mathematics

Mathematical Beauty from Midjourney's Perspective

Mathematical Beauty from Midjourney’s Perspective

Quite often on the Internet you can find the expression “Beauty is in the eye of the beholder.” Is beauty really subjective, or is there something objective and common to all in it? Is it possible that alien beings from the other end of the Universe, completely different from us, with whom we are never even destined to meet during the entire existence of our civilizations, see beauty in the same thing that we see it in?

In the early 1990s, the German computer scientist Jurgen Schmidhuber presented an incredibly beautiful and mathematically rigorous theory of mathematical beauty. According to this theory, complex objects that have the least algorithmic complexity seem beautiful to people. This quantity, also known as the Kolmogorov complexity, is named after the Soviet mathematician Andrei Kolmogorov who first described it.

The algorithmic complexity of a row of data is the smallest possible description needed to reproduce that row. For example, the following line has a high algorithmic complexity, since its shortest description is itself:

4c1j5b2p0cv4w1x8rx2y39umgw5q85s7uraqbjfdppa0q7nieieqe9noc4cvafzf

But the next line has low algorithmic complexity, since it can be briefly described as “repeat ab 32 times”:

abababababababababababababababababababababababababababababababab

It is obvious that for an exact numerical definition of algorithmic complexity, one must decide on the formal language in which strings are written. Any programming language is great for this purpose. For example, in JavaScript, the above lines could be written as follows:

'4c1j5b2p0cv4w1x8rx2y39umgw5q85s7uraqbjfdppa0q7nieieqe9noc4cvafzf'
'ab'.repeat(32)

In this case, in JavaScript, the algorithmic complexity of the first string is 66 (64 characters and 2 quotes), and the complexity of the second is 15. Schmidhuber believes that the second expression seems more beautiful to us, because, generating a data string equal in number of bits, it is given by the expression with much lower algorithmic complexity.

The main idea of ​​the theory of mathematical beauty can be summarized as:

Beauty is complexity born of simplicity

It clearly follows from this postulate that the most beautiful things in the universe must be of infinite complexity and born of incredible simplicity.

Everything from scratch

During the dawn of Greek civilization in southern Italy, in a small town called Crotona, the philosopher and mathematician Pythagoras founded his famous school. In the Pythagorean school, the teaching of geometry was inextricably linked with the mystical interpretation of its figures, axioms and theorems. The greatest honor among the Pythagoreans was the monad – a symbol of a circle circled around a brightly highlighted central point.

Monad of Pythagoras

Monad of Pythagoras

The monad was considered a divine sign – a symbol of unity in its very heart of all that exists and the origin of the world from the void. Freely interpreting the views of the Pythagoreans, we can say that at the very beginning of the world there was nothing – there was a complete zero. But since there is nothing, then there are no restrictions that prevent the emergence and triumph of being – the unit. Thus, non-existence, which lies at the very beginning of the Universe, “explodes” in all directions – into an infinite number of logically possible options. When the existent appears for each thing, its opposite arises – one always corresponds to minus one. An ideal illustration of this cosmogonic myth is the figure of a circle – after all, on its circumference there is an infinite number of points equidistant from the center, and for each of these points there is a point opposite to it.

The ancient Greek engineer Archimedes, who lived several centuries after Pythagoras, spent most of his life in Sicily – not very far from the place where the Pythagorean school was once located. There, Archimedes developed a way to calculate the ratio of a circle’s circumference to its radius by inscribing the circle into more and more complex polygons. This quantity, whose exact value Archimedes tried to find, we now call the number π (“pi”). This name, however, was popularized relatively recently – in the works of the outstanding German and Russian mathematician Leonhard Euler, who treated the circle with the piety characteristic of him, like Pythagoras, and devoted a huge part of his works to the study of the circle.

Exploring the properties of sines and cosines on the complex plane, Euler came across an elegant formula that, when substituting the number π into it, leads to an incredibly beautiful result:

e^{i\pi}+1=0

This equality, named after the mathematician Euler’s identity, is rightfully considered the most beautiful formula in mathematics – it displays a truly incredible relationship between the five basic constants of mathematics – zero, one, the base of a natural algorithm ethe number π and the imaginary unit i.

In this formula, all mathematics and philosophy seemed to converge – non-existence, being, harmony, infinity and unknowability. Speaking of the last one. imaginary unit i for a long time was considered an imaginary, as if not real entity, a neat mathematical trick, nothing more, until at the beginning of the 20th century the brilliant Austrian physicist Erwin Schrödinger published his famous equation describing the wave function, in which the imaginary unit plays a key role.

Imaginary and real units on the complex plane

Imaginary and real units on the complex plane

By definition, the imaginary unit is the root of minus one. We cannot conceive of this number in the same way in which we usually conceive of ordinary numbers. An imaginary dozen of apples is an unimaginable picture. However, imaginary numbers are a very important part of mathematics. Together with ordinary real numbers, imaginary numbers form complex numbers, which are written as a+biWhere a And b- valid. It was during the study of complex numbers that Euler came to the discovery of the formula named after him. But he was not the only one who found great beauty in complex numbers.

The Belgian mathematician Benoit Mandelbrot, who explored recursive formulas with complex numbers, discovered the most strikingly beautiful thing – an infinitely self-similar structure, so named after the discoverer – the Mandelbrot set.

Mandelbrot set of points c on complex plane is given by the incredibly simple formula:

z_{n+1}=z_n^2+c, z_0=0

By visualizing this formula on a computer and giving each point a color depending on the number of iterations for which it turns out to determine whether it belongs to the set or not, Benoit Mandelbrot obtained incredibly beautiful images. As if thousands of galaxies shone inside the received pictures.

The incredible beauty of the Mandelbrot set is amazing – a fascinating fractal structure, in which each level is similar to the others, contains an infinite number of different images. All this incredible beauty pours into the world from absolute zero. The Mandelbrot set is like our own universe in miniature – the greatest complexity born of no less great simplicity.

Everything from a function

At the beginning of the 20th century, the brightest minds of our planet unraveled the laws by which our world works at its most elementary level. The discoveries of physicists struck not only the inhabitants, but also themselves. It turned out that elementary particles are not point objects and often behave not at all like particles, but rather like waves.

Simplified considering the principle of wave-particle duality, we can say that particles are only events that we register in the world of binary facts. These events are generated by the interaction of waves – some ideal entities that live according to strict mathematical laws, but are inaccessible to our direct perception. We cannot cognize the waves with our minds, since the same unimaginable imaginary unit is present in the Schrödinger wave equation.

Drawing an analogy with computer programs, we can say that particles are data, and waves are functions that process this data. We can easily see a bit of data, because a bit (binary digit), as well as particles, exists in the world of binary facts accessible to our perception. The light is on – true, off – false. Functions, on the other hand, are some kind of ideal Platonic entities: we can see their input data and the results of their work in the form of data, but they themselves are only an invisible mathematical law.

This analogy can be illustrated like this:

Input -> Function -> Output

Particle State -> Wave Equation -> Particle State

Around the same time that physicists were working hard to create quantum mechanics, the American mathematician Alonzo Church was investigating problems in the theory of computer computing. In the course of one of his works, Church created his greatest creation – lambda calculus – a concise but incredibly powerful formal system for describing algorithms.

This system consists of only two operations – application and abstraction. An abstraction is a declaration of a function, and an application is its application. In this post, for the sake of simplicity, I will not use the notation adopted by Church himself, but I will use the more widely used lambda function notation adopted in JavaScript and many other programming languages.

Abstraction I will denote as follows:

(a, b) => a + b

I will designate the application as follows:

f(a, b)

While experimenting with the lambda calculus, Church found that all it took to reproduce all of mathematics was just the concept of a function and nothing else. The resulting system in honor of the discoverer is called Church coding.

In the beginning, Church defined the fundamental abstractions of his logical system as two functions:

true  = (x, y) => x
false = (x, y) => y

Church further defined the basic logical operations as functions:

and = (p, q) => p(q, p)
or  = (p, q) => p(p, q)
not = (p) => (x, y) => p(y, x)
if  = (p, x, y) => p(x, y)

Let’s see how the resulting system works:

result1 = and(true, false)
// подставляем значения true и false в виде функций
result1 = and((x, y) => x, (x, y) => y)
// подставляем параметры в значение and в виде функции 
result1 = ((x, y) => x)((x, y) => y, (x, y) => x)
// применяемая функция возвращает первый параметр, то есть 
result1 = (x, y) => y
// сравнив эту функцию с нашими двумя логическими значениями, мы понимаем, что
result1 = false
result2 = or(true, false)
// подставляем значения true и false в виде функций
result2 = or((x, y) => x, (x, y) => y)
// подставляем параметры в значение or в виде функции 
result2 = ((x, y) => x)((x, y) => x, (x, y) => y)
// применяемая функция возвращает первый параметр, то есть 
result2 = (x, y) => x
// сравнив эту функцию с нашими двумя логическими значениями, мы понимаем, что
result2 = true
result3 = not(true)
// подставляем значение true в виде функции
result3 = not((x, y) => x)
// подставляем параметры в значение not в виде функции
result3 = (x, y) => ((x, y) => x)(y, x)
// применяемая функция возвращает первый параметр, то есть 
result3 = (x, y) => y
// сравнив эту функцию с нашими двумя логическими значениями, мы понимаем, что
result3 = false
result4 = if(false, 1, 2)
// подставляем значение false в виде функции
result4 = if((x, y) => y, 1, 2)
// подставляем параметры в значение if в виде функции
result4 = ((x, y) => y)(1, 2)
// применяемая функция возвращает второй параметр, то есть 
result4 = 2

In addition to Boolean logic, Church implemented arithmetic in his system – he took Peano arithmetic and translated it into the language of lambda calculus.

In the beginning, Church defined the fundamental abstractions of his arithmetic system as two functions:

0 = (f, x) => x
next = (n) => (f, x) => f(n(f, x))

Thus, the numbers in the Church system look like this:

0 = (f, x) => x
1 = (f, x) => f(x)
2 = (f, x) => f(f(x))
3 = (f, x) => f(f(f(x)))
...

Church further defined the basic arithmetic operations as functions:

plus     = (m, n) => (f, x) => m(f, n(f, x))
multiply = (m, n) => (f, x) => m(n(f), x)

Let’s see how the resulting system works:

result5 = plus(1, 2)
// подставляем значения 1 и 2 в виде функций
result5 = plus((f, x) => f(x), (f, x) => f(f(x)))
// подставляем параметры в значение plus в виде функции
result5 = (f, x) => ((f, x) => f(x))(f, ((f, x) => f(f(x)))(f, x))
// упрощаем выражение
result5 = ((f, x) => f(x))(f, f(f(x)))
// упрощаем выражение еще раз
result5 = f(f(f(x)))
// сравнив эту функцию с нашими числами, мы понимаем, что
result5 = 3

Church added a lot more to his system: subtraction, division, real numbers, strings. He even added recursive function calls with the famous Y combinator.

Based on the lambda calculus, one of the very first programming languages ​​\u200b\u200bwas created – LISPwho is still alive today. There are a huge number of dialects of Lisp, and many of its elements have been inherited by other programming languages. Even I myself once created my own Lisp dialect that works in the JavaScript ecosystem. For brevity, incredible power and inner harmony, programmers often call LISP the language of God.

In Church coding, the most powerful mathematical apparatus is built on two simple operations of lambda calculus and Alonzo Church’s brilliant idea that everything is a function. Just as our physical world is a sea of ​​countless quantum waves, mathematics is an ocean of countless functions. What incredible beauty lies in the fact that all the great complexity of mathematics can be reduced to the simplest, but intangible element – a function!

Conclusion

One of the most famous paintings by Dutch artist Maurits Escher shows an art gallery flowing into a city, which in turn flows back into an art gallery.

Picture gallery, Maurits Escher, 1956

Picture gallery, Maurits Escher, 1956

This endless artistic recursive loop would not be possible without one element – an empty white spot in the center of the picture. This emptiness is the same zero, the very non-existence from which our Universe originates…

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *