A fake proof for a function taking on all reals in any interval

109 Views Asked by At

It is established that there exist functions that, on any interval, take on all real values (see Function whose image of every open interval is $(-\infty,\infty)$ and Is there a function $f\colon\mathbb{R}\to\mathbb{R}$ such that every non-empty open interval is mapped onto $\mathbb{R}$? ).

Below is a facile proof, which I believe incorrect: Any interval in $\mathbb{R}$ has cardinality $C$, equal to the cardinality of $\mathbb{R}$ itself. By definition of equal cardinality, a function exists between the two sets creating a one-to-one correspondence. QED.

I believe this proof is incorrect, because it shows $f$ exists for any particular interval, but doesn't show that the same $f$ can be defined over multiple overlapping intervals. However, I don't find this objection to be very robustly formulated.

Can you strengthen my objection to the "proof"? Can you provide another objection?

1

There are 1 best solutions below

1
On BEST ANSWER

Your argument just proves that for each interval, there is a function for that interval.

This is not the same as proving there is one function which works for all intervals.

For example, if $f : (-1, 1)\to \mathbb R$ is $\tan\left(\frac{\pi}2x\right)$ then $f$ works for $(-1,1),$ but it doesn’t work for $(0, 1)$ – you’d need a different function for $(0,1).$


This is an example which shows that you can’t, in general, swap existential quantifiers without changing the meaning of a statement.

$$\exists f:\forall (a,b): f((a,b))=\mathbb R$$

is not the same thing as:

$$\forall (a,b):\exists f: f((a,b))=\mathbb R.$$