14

I was wondering if someone might know whether there exists (or whether it is even possible) for a computer program to process a given function and determine whether it is uniformly continuous.

I have tried to search for a question that might have asked the same thing, but it seems like no one has asked this yet. I have used Python libraries like SymPy and they seem to only be capable of performing computations, etc.

I am thinking that the determination of a uniformly continuous function might be something out of the capability of computer programs as of yet, and so there does not exist such a feature.

  • 10
    There isn't even an algorithm deciding if an expression is identical zero (https://en.wikipedia.org/wiki/Richardson%27s_theorem), so it isn't possible, never. –  Apr 01 '25 at 08:37
  • 1
    Oh... I see @ProfessorVector . That's interesting, I'll take a read. Appreciate the response a lot. – Ang Ming Wen Apr 01 '25 at 09:14
  • 1
    Nice try! But nothing on a computer is solvable, pretty much. Anything interesting you want to do, remember for the future, the answer will always be no, it can't be done. So you have to restrict to approximations and / or special cases. On the other hand if you encode some things at the theorem level instead of axiom level, then maybe you could creatively combine the theorems using a computer. After all, if you start with axiomatics, it becomes extremely hard to prove even basic arithmetic identities without some advanced tinkering. So treat your problem as if some things are given. – Daniel Donnelly Apr 02 '25 at 02:44
  • One way would be to start with the closure properties of uniformly continuous functions, if there are any (like composition e.g.) But don't try to prove the properties, just use them as if they're part of an abstract CAS (but a CAS that has a proof search mechanism). Then when you output a proof in human form, you can just refer to known properties & theorems, and the human mind knows what to do with that data anyway. Then when you're done you'll have defined the grammar essentially of an infinite class of functions that can be proven to be uniformly continuous by your program. – Daniel Donnelly Apr 02 '25 at 02:48
  • 3
    As per the answer of W. Bangerth, much depends on what "given function" is. If it is a evaluation procedure with a finite number of branchings, then the function is piecewise analytical. Thus if it is continuous, it will also be uniformly continuous over finite intervals. Note that over unbounded intervals, even polynomials are not uniformly continuous. Please sharpen your question to exclude these trivial cases/trivial answers. – Lutz Lehmann Apr 02 '25 at 08:21
  • @LutzLehmann You need to restrict yourself to a finite number of branchings over contiguous parts of the domain. If you allow to branch based on whether $x\in{\mathbb Q}$, for example, the function is not piecewise analytical. – Wolfgang Bangerth Apr 03 '25 at 00:03
  • Yes, of course... And how would one implement such a decision in a computer? Meaning, one would have to further restrict the setup by specifying if the numbers at hand need to have finite representations or if one considers an abstract machine that operates on real numbers. – Lutz Lehmann Apr 03 '25 at 06:09
  • @ProfessorVector that's a nice theorem, but why would it imply that uniform continuity is not decidable either? – Atticus Stonestrom Apr 03 '25 at 17:14

2 Answers2

19

Questions like this are studied in the field Computable Analysis. The gist of the answer is that there are no non-trivial decidable properties of functions $f \in \mathcal{C}(\mathbb{R},\mathbb{R})$. Being uniformly continuous is not even semi-decidable.

Of course the picture can change if you restrict the class of functions you consider, or ask for additional information about the functions. However, I am not aware of any natural setting where being uniformly continuous becomes a semi-decidable property in an interesting way.

Mason
  • 4,489
Arno
  • 4,983
  • 1
    That's interesting! Was not aware of the existence of this field. Definitely something I will dig into a bit more. Appreciate the response a lot. – Ang Ming Wen Apr 01 '25 at 09:15
  • 1
    @AngMingWen You might want to take a look at this and this – Rodrigo de Azevedo Apr 02 '25 at 09:21
  • 1
    If one considers the class of polynomial or rational functions (away from singularities), would Tarski–Seidenberg make it decidable? – Rodrigo de Azevedo Apr 02 '25 at 09:24
  • @RodrigodeAzevedo Tarski-Seidenberg doesnt really help you here, as any concrete polynomial or rational function would include real-number constants in their definitions. And for example, to determine that $\varepsilon x^2$ is uniformly continuous, we'd need to determine that $\varepsilon$ is $0$. – Arno Apr 02 '25 at 09:44
  • @Arno I am thinking in terms of quantifier elimination (QE). If one takes the quantified formula that defines uniform continuity and focuses on, say, polynomial functions with rational coefficients, then one has a quantified formula with polynomial equations and inequalities, which should be "decidable", though it might consume 1 billion years for the program to terminate and require more bits of memory than the number of atoms in the Milky Way. Arbitrary real numbers cannot even be written as a finite string, so I am not worried about those at all. – Rodrigo de Azevedo Apr 02 '25 at 09:56
  • @RodrigodeAzevedo Sure, if you look at polynomials with rational (or even algebraic) coefficients, you could do that. Or you just test if there is a non-zero coefficients of some $x^n$ with $n > 1$, which is enough. – Arno Apr 02 '25 at 10:04
  • @Arno And would you consider such polynomials interesting? I haven't touched QE in a while and am wondering if there is an interesting polynomial, perhaps defined over $[a,b]$ rather than $\Bbb R$, that can serve as an example. Last time I tried QE in Mathematica, I got a quantified formula that was roughly 100 pages long. – Rodrigo de Azevedo Apr 02 '25 at 10:21
  • Thanks @RodrigodeAzevedo. I will take a look at the links. – Ang Ming Wen Apr 03 '25 at 04:02
17

When you say

whether there exists (or whether it is even possible) for a computer program / code to process a given function and determine whether it is a uniform continuous.

then the key issue here is how exactly you are going to present the "given function" to that program. If you present it in the form of a formula expression, say $f(x)=\sin(x) + x^2$, then programs can indeed determine structural properties such as uniform continuity. If, however, you present the function only in a way so that the program can send in an $x$, and the function returns a value $f(x)$ and nothing else, you will have a much harder time. That's because if all you have is this input-output relationship, you can't even determine questions such as continuity: It would require you to be able to sample the function at (uncountably) infinitely many points, and that's clearly computationally not possible.

At its core, therefore, you need to precisely state what kind of information it is the program can inquire about the function. Only then is it possible to say whether there can even be a program to do what you want.

  • 1
    I'd like a proof or cite for a formula expression letting a program determine uniform continuity; as Amo says, this gets impossible very quickly. Let the formula be f(x) = 1 if x < 5, f(x/2) if x % 2 = 0 and f(3x+1) otherwise. Then f(x) just having a value everywhere is the Collatz conjecture, which has been unsolved for 85 years. – prosfilaes Apr 03 '25 at 01:06
  • 2
    @prosfilaes That's not what I'm trying to say. What I'm trying to say is that when you provide a formula, you can determine some structural properties. Which these are will depend on the formula you provide. For the example I show, a program can determine continuity, for example; for your example, it will likely not. The point I wanted to make is that if you don't provide a formula, the problem becomes much more difficult. – Wolfgang Bangerth Apr 03 '25 at 16:27