"Fractals are the simplest means of creating complexity" (Jorge Wagensberg).
"The geometry of nature has a fractal face" (Mandelbrot).
"Fractality primarily colonizes. It is a way to fill the space, it is a way to grow" (Jorge Wagensberg).
Definition
A fractal is a recursive graph in which the same pattern, which is the complete graph itself, is repeated at different levels. Analogously, a fractal expression is a type of multilevel recursive expression in which at one or more points in each level reference is made to the original expression, such that the same pattern (the complete expression) is repeated at those points. These points are called "self-references". Fractal expressions are also called "self-referenced expressions".
A fractal expression can have one or several self-references and a finite or infinite number of levels. Let's look at some examples.
Fractal arithmetic expressions.
The golden ratio (1.618...) is equivalent to the value of the fractal expression of an infinite-level self-reference
This expression is an example of what in mathematics is called a continued fraction, and can be expressed recursively as follows:
(Φ =: (1 + 1.÷Φ))
Another equivalent way of expressing the golden ratio is by the fractal expression (also of a self-reference and infinite levels)
(Φ =: (1.+Φ)v2) // (xvy is y√x)
The square root of 2 (r) can be expressed recursively:
( r =: (1 + 1.÷(1+r)) )
(x =: a + b÷x)
This is an arithmetic expression with a self-reference and infinite levels. It represents the continued fraction
(x =: (a+x)÷(b+x))
This is an arithmetic expression with two self-references and infinite levels. Its expansion would produce a continued fraction of the form
(s = "This sentence has five words.")
( s =: (s# = 5) ), which represents the fractal expression.
((((s# = 5)# = 5)# = 5)# = 5)#...
Fractal Sequences
(x =: axbx)
This example contains two self-references. The different levels are as follows:
(r1_r2 is a continuous range representing the real numbers between r1 and r2.)
General specification of finite fractal expressions.
The previous examples correspond to fractal expressions of infinite levels and where each self-reference is the same original expression. But we can specify in a general way fractal expressions of a given number of levels.
If we call:
p the pattern of the fractal expression (initial expression).
v to the subexpression of p to be expanded (usually a variable within the pattern).
n to the number of levels.
we have the following general expression of a fractal expression of a variable: