Here's my two cents. It can indeed be confusing.
First, simple definition: a point x
is "fixed point" of a function f
, if f(x) == x
.
To put it the other way around, x = f(x)
.
Can the above have any sense? Seems unlikely. It uses the value being defined, after all.
x
is not necessarily a simple number though. It can be a function, or a lazy infinite list, and f
can have an effect of partially defining it. Then, by repeated evaluation of
x = f(x) = f( f(x)) = f( f( f(x))) = f( f( f( f(x)))) = ....
the value is being defined more and more. Now this does remind us of the numeric example of calculating the fixed point of f(y) = (y + n/y)/2
through iterated calculation,
n=25; f(1.0)=13.0; f(13.0)=7.4615383; f(7.4615383)=5.406027;
f(5.406027)=5.0152473, f(5.0152473)=5.0152473; f(5.0152473)=5.0
The crucial part is not to wait until the infinite chain of evaluations is over (it never is), but to have a lazy list recording the progression of evaluation steps. Then, our value the infinite list is being progressively defined: first it is undefined at all; then its first (head) element is defined and the rest still isn't; then its two first elements are defined; etc. etc. : [1.0,13.0,7.4615383,5.406027,5.0152473,5.000023,5.0,5.0,5.0 ...]
.
And just as the numeric values are converging to some number, becoming closer and closer to the "final" value (which is never quite reached, but the distance gets smaller and smaller), so is the infinite list of results converging to its ultimate value, the fully-defined infinite list with all its elements defined (quite an impossible feat, of course), getting closer and closer in definedness to that ultimate value (saying it simply, having its elements defined one by one, but mathematicians like it complicated).
Similarly with functions. If g(h,n) = n<2 -> 1 ; else -> n*h(h,n-1)
then g(error)
is a (curried) function of one argument defined only for n < 2
, as for any other argument it will diverge (cause an error). But g( g(error))
is defined for all n < 3
; g( g( g(error)))
- for all n < 4
, etc. Again we have a progression of values being more and more defined... And so the limit of that progression, the "ultimate value", the fixed point of the function g
is such a function f
that f = g(f)
which is defined for any n
, however big. Which coincidentally, is a factorial function, defined without the use of recursion.