Given the metric space C([-1,1]) (continuous functions on the closed interval [-1,1]) with the metric defined by:
This code checks with the help of a color map, if a given function sequence is or not a Cauchy sequence in C([-1,1]), (See 1), where this function sequence is defined recursively, that is
Here T is the 'rule' of the sequence, given an initial function we can compute any other term of the sequence. In this code, the initial condition must be a user-defined function, 'initial_func'. The composition process is computed by 'comp_func' using recursion.
In order to determining if the term
is as small as possible whenever n,m>N for N>>0, we need to determine the maximum (due to the way the norm is defined) of
for t in [-1,1], this is accomplished by the 'norm' function, minimizing -f(t).
The result is a color map and it must be interpreted as:
- If colors for n and m being big numbers does fit zero, then T is likely to be a Cauchy sequence.
- If colors for n and m being big numbers doesn't fit zero, then T isn't likely to be a Cauchy sequence.
The given example shows that
Isn't likely to be a Cauchy sequence.