3 ms·
I tried asking ChatGPT about a math question I thought of that I don't know the answer to: Is there a function f: R -> R such that for all real x1, x2 and y wh
by rogual 4y ago
I tried asking ChatGPT about a math question I thought of that I don't know the answer to:
Is there a function f: R -> R such that for all real x1, x2 and y where x1 < x2, there exists an x where x1 < x < x2 and f(x) = y ?
I was hoping it might at least point me in the right direction but, although it always attempts a proof, most of its answers contain something trivially incorrect like "A set cannot be infinite, therefore..."
That said, it did give me a reasonable proof that such a function can't exist if it has to be continuous, because of a thing called the intermediate value theorem, which I hadn't heard of before. But when I asked about noncontinuous functions, it went back to bullshitting.
(If anyone here does know the answer, I'd love to hear it!)
- solveit 4y agoYou're looking for the Conway base 13 function (https://en.wikipedia.org/wiki/Conway_base_13_function https://en.wikipedia.org/wiki/Conway_base_13_function).
- deleted 4y ago[deleted]
- quasisphere 4y agoHere's sketch how to construct such a function: Let's start by defining f on Q (the rational numbers) by first splitting Q into countable number of disjoint dense subsets A_n of R (e.g. look at reduced fractions whose denominators are of the form p^k for some prime p, for fixed p every such set is dense and for different p's they are disjoint). As rationals themselves are countable, we may then set f(x) = q_n for all x in A_n, where q_n is an enumeration fo the rationals. This construction already gives us a function such that every interval (x_1, x_2) contains a point x such that f(x) = y for every rational number y. Now, in a similar way we may consider a set of the form s + Q where s is an irrational number. Setting f(x) = s + q_n for all x in s + A_n, we get a function which also attains all numbers of the form y = s + q for some rational q on every interval. Finally, let's say that two real numbers s and t are equivalent if they differ by a rational number. By the axiom of choice we can choose a representative from every equivalence class, so that for every two representatives s and t the sets s + Q and t + Q are disjoint. Using the above construction for every representative lets you define a function with the property you wanted.