(Originally from MSE, but crossposted here upon suggestion from the comments)
In this MSE post, user Moishe Kohan provides an example of a non-continuous open and closed ("clopen") function $\mathbb R^n \to \mathbb R^n$ for $n\geq 3$ by citing and using the following propositions of David Wilson:
Wilson Setup: for $(X,d)$ a metric space, some subsets $A,B \subseteq X$, and $\scr G$ a collection of subsets of $X$, we use the notation
- $\mathscr G^*:= \bigcup_{G\in \mathscr G} G$;
- $N_\epsilon(A):= \{x\in X: \exists a\in A \text{ s.t. } d(x,a)<\epsilon\},$ the $\epsilon$-neighborhood of $A$;
- $\newcommand{\diam}{\operatorname{diam}} \diam[A]:= \sup_{x,y\in A} d(x,y)$ is the diameter of $A$;
- $d[A,B]:= \inf\{\epsilon>0: A \subseteq N_\epsilon(B) \text{ and } B \subseteq N_\epsilon(A)\}$ is the Hausdorff distance;
- $\mu(\mathscr G) := \max\{\diam[G]:G\in \scr G\}$.
Wilson Prop. 1: let $Z_1,Z_2$ be compact metric spaces with $X\subseteq Z_1$ and $Y\subseteq Z_2$ compact subsets (of course themselves metric spaces, with metrics induced by $Z_1,Z_2$ resp.). Suppose there exist 2 sequences $(\mathscr F_n)_{n=1}^\infty, (\mathscr G_n)_{n=1}^\infty$ where each $\mathscr F_n, \mathscr G_n$ is a finite collections of compact subsets of $Z_1,Z_2$ resp. (i.e. $\mathscr F_n = \{F_{n,1},\ldots, F_{n, m_n}\}$ for compact $F_{n,i} \subseteq Z_1$; analogous for $\mathscr G_n$), satisfying the following 5 properties:
[The $\mathscr F_n$ are a sequence of covers decreasing down to $X$]: $$Z_1 \supseteq \mathscr F_n^* \supseteq \mathscr F_{n+1}^* \supseteq X \text{ for all $n$,} \quad \text{ and } \bigcap_{n=1}^\infty \mathscr F_n^* = X.$$
[The $\mathscr G_n$ are a sequence of covers decreasing down to $Y$]:
same as (1.) but with $Z_2$, $\mathscr G_n$, and $Y$ replacing $Z_1, \mathscr F_n, X$ resp.
[The covers $\mathscr G_n$ are made up of ever smaller compact sets]: $$\forall \epsilon>0, \exists N>0 \quad \text{ s.t. } \quad n>N \implies \mu(\mathscr G_n)<\epsilon.$$
[There exist functions $\phi_n : \mathscr F_n \to \mathscr G_n$, preserving inter-level nestings and nontrivial intra-level intersections]:
- for compact sets $F_{n-1} \in \mathscr F_{n-1}, F_n \in \mathscr F_n$, $$F_{n-1}\supseteq F_n \implies \phi_{n-1}(F_{n-1}) \supseteq \phi_n(F_n)$$
- If $F_n, F_n' \in \mathscr F_n$, then $$F_n \cap F_n' \neq \varnothing \implies \phi_n(F_n) \cap \phi_n(F_n') \neq \varnothing$$
[Nested sequence of compact $F_n$ around each point]: $$\forall x\in X, \quad \exists (F_n)_{n=1}^\infty \in (\mathscr F_n)_{n=1}^\infty \quad \text{ s.t. } \forall n, \quad x \in F_n \subseteq F_{n-1}.$$
----THEN:---- there exists a continuous function $g:X\to Y$ defined by using (5.) to choose a nested sequence $(F_n)_n\in (\mathscr F_n)_n$ around $x$, and setting
$$g\left(\bigcap_{n=1}^\infty F_n\right) := \bigcap_{n=1}^\infty \phi_n(F_n),$$ i.e. setting $g$ on the intersection $\bigcap_{n=1}^\infty F_n$ to be the point in the singleton set $\bigcap_{n=1}^\infty \phi_n(F_n)$ (by (3.), the $\phi_n(F_n)$ are necessarily shrinking in diameter).
Propositions 1 and 3 of
D. Wilson, Open mappings of the universal curve onto continuous curves. Trans. Amer. Math. Soc. 168 (1972), 497–515.
[Moishe Kohan's] Proposition [cooked up from Wilson's propositions]. Let $I^n$ be the closed $n$-dimensional cube, $n\ge 3$, and $J^n\subset int(I^n)$ is a closed subcube. Let $Q$ denote the
interior of $J^n$. Then, there exists an open continuous map $g: I^n\setminus Q\to I^n$ which equals the identity on the boundary of $I^n$ and
sends $\partial Q$ to the interior of $I^n$.
I am interested in the $2$-dimensional case, for which I propose the following conjecture:
Conjecture: there are no continuous open (w.r.t. subspace topologies) maps $f$ from the closed annulus $\mathbb A:= \{x\in \mathbb R^2: 1\leq |x|\leq 2\}$ to the closed disk $\mathbb D := \overline{B(0,2)}$, which restricts to the identity map on the outer boundary circle $\partial \mathbb D = C(0,2)\subseteq \mathbb A$, and sends the inner boundary circle $C(0,1)$ to the interior of $\mathbb D$.
I was not able to prove or disprove this conjecture for even the Simpler Case: where $f$ maps the inner boundary circle $C(0,1)$ to the single point $0\in \mathbb D$.
Some attempts I made on the Simpler Case.
Attempt 1: Because we want $f$ to be open, we in particular want any open neighborhood in $\mathbb A$ of any boundary point $b\in C(0,1)$ to map to an open set containing $0\in \mathbb D$, in particular containing some $B(0,\epsilon)$.
My idea was map circles $C(0,1+\eta)$ to circles $C(0,\eta)$, and to to "swirl"/"smear" the circles $C(0,1+\eta)$ more and more extremely as $\eta \searrow 0$, so that even a very small neighborhood $B(b,\delta)\cap \mathbb A$ of $b\in C(0,1)$ containing just a $\approx \frac{2\delta}{2\pi}$ fraction of the circles $C(0,1+\eta)$ for small enough $\eta>0$ would get "swirled"/"smeared" to contain the entire circle $C(0,\eta)$.
So something like $f$ maps $z:=re^{i\theta}\in \mathbb A$ (thinking of $\mathbb R^2$ as the complex plane) to $(r-1)e^{i\theta\cdot \frac{1}{r-1}}$, mapping an arc of the circle $C(0,1+\eta)$ of arclength $\ell$ to an arc of the circle $C(0,\eta)$ with arclength $\ell \cdot \frac{1}{r-1}$. Unfortunately, the corresponding formula for $f$ would be $$f(z)=\frac{|z|-1}{|z|^\frac{1}{|z|-1}} \cdot z^{\frac{1}{|z|-1}},$$ which maybe looks fine, until one remembers that raising a complex number to a non-integer power needs (non-continuous) branch cuts to define. :(
Attempt 2: One can make a continuous "swirling only" (no "spreading", i.e. no multiplicative factor in the argument variable) by mapping $r e^{i\theta} \mapsto (r-1) e^{i\theta + i\cdot \frac{1}{r-1}}$, i.e.
$$f(z) = \frac{|z|-1}{|z|} \cdot z \cdot e^{\frac{1}{|z|-1}},$$
which I think is continuous, and does "swirl" a very small neighborhood $N_b:= B(b,\delta)\cap \mathbb A$ to something that does sort of "wrap around" $0 \in \mathbb D$, but in doing so has a lot of holes: this $f$ preserves that proportion of the arclength of $N_b \cap C(1+\eta)$, meaning $\text{arclength}(N_b \cap C(1+\eta)) = \text{arclength}(f(N_b) \cap C(0,\eta))$, so $f$ can't possibly map $N_b$ to something containing $B(0,\epsilon)$.
Attempt 3: Finally, because of this "monodromy problem" of defining this "swirling/smearing" map on the entire circle $C(0,1+\eta)$, I had an idea of cutting up $C(0,1+\eta)$ into $\frac 1\eta$ many pieces (restricting to $\eta \in \{\frac 1n: n=2, 3, 4, \ldots\}$), making $f$ "swirl/smear" each of those pieces into the entirety of $C(0,\eta)$, thus guaranteeing that $f(N_b)$ contains complete circles $C(0,\eta)$ arbitrarily close to $0\in \mathbb D$.
More precisely, I would partition $C(0,1+\frac 1n)$ into $2n$ equally sized, equally spaced pieces, and define $\{K_{n, i}\}_{i=1}^n$ to be the closures of the say odd-indexed pieces. I can map $K_{n,i}$ continuously to cover the entirety of $C(0,\frac 1n)$. Then for any $N_b:= B(b,\delta)\cap \mathbb A$, it does contain some $K_{n,i}$ for all $n$ sufficiently large, and hence $f(N_b)$ contains $C(0,\frac 1n)$ for all $n$ sufficiently large.
I can extend this $f$ defined on $C(0,1) \cup \bigcup_{n=2}^\infty\bigcup_{i=1}^n K_{n,i}$ via the Tietze extension theorem to a continuous function $\mathbb A \to \mathbb D$, but again I really doubt it is a an open map.
So as it stands regarding the Simpler Case, I can't even find a continuous function $f:\mathbb A\to \mathbb D$ that maps the neighborhood $B(b,\delta)\cap \mathbb A$ (for even a single fixed $\delta>0$) of any point $b\in C(0,1)$ to an open set containing $0\in \mathbb D$; nor can I disprove its existence.
---(EDIT: user1789 posted an answer that was later found to be incorrect and hence deleted, but if I recall correctly, that answer was able to map the inner boundary in "an open manner", but pushed the issue into the interior of the annulus. Those with sufficiently high reputation should be able to see this attempt.)---
Of course, one possible route of proving the Conjecture is if one accomplishes the original MSE post's goal of proving that every clopen function $\mathbb R^2 \to \mathbb R^2$ must be continuous (as for example is true in the $\mathbb R^1 \to \mathbb R^1$, as I showed here), but I suspect that problem is even harder than this one.