1. ## Tricky Function Question

Problem: Prove there is some $\displaystyle f:\mathbb{R}\to\mathbb{Q}$ such that a) $\displaystyle f(x+y)=f(x)+f(y)$, b) $\displaystyle f\mid_{\mathbb{Q}}=\text{id}_{\mathbb{Q}}$, and c) $\displaystyle f$ is not continuous on $\displaystyle \mathbb{R}$

2. Originally Posted by Drexel28
Problem: Prove there is some $\displaystyle f:\mathbb{R}\to\mathbb{Q}$ such that a) $\displaystyle f(x+y)=f(x)+f(y)$, b) $\displaystyle f\mid_{\mathbb{Q}}=\text{id}_{\mathbb{Q}}$, and c) $\displaystyle f$ is not continuous on $\displaystyle \mathbb{R}$
let $\displaystyle \{a_i \}_{i \in I},$ where $\displaystyle a_k=1$ for some $\displaystyle k \in I,$ be a basis for $\displaystyle \mathbb{R},$ as a vector space over $\displaystyle \mathbb{Q}.$ that means every element of $\displaystyle \mathbb{R}$ can be written uniquely as $\displaystyle \sum_{i \in I} r_ia_i,$ where $\displaystyle r_i \in \mathbb{Q}$ and all but at most finitely
many of $\displaystyle r_i$ are zero. define $\displaystyle f: \mathbb{R} \longrightarrow \mathbb{Q}$ by $\displaystyle f \left(\sum_{i \in I} r_ia_i \right)=r_k.$ the map $\displaystyle f$ is clearly well-defined and satisfies the conditions a) and b). to show that it also satisfies the condition c), choose $\displaystyle i \in I$
such that $\displaystyle i \neq k$ and also choose a sequence $\displaystyle \{s_n \} \subset \mathbb{Q}$ such that $\displaystyle \lim_{n \to \infty} s_n = \frac{1}{a_i}.$ now define $\displaystyle x_n=a_k - s_na_i$ and see that $\displaystyle \lim_{n \to \infty}f(x_n)=1$ but $\displaystyle f( \lim_{n\to\infty} x_n)=0.$

3. Originally Posted by NonCommAlg
let $\displaystyle \{a_i \}_{i \in I},$ where $\displaystyle a_k=1$ for some $\displaystyle k \in I,$ be a basis for $\displaystyle \mathbb{R},$ as a vector space over $\displaystyle \mathbb{Q}.$ that means every element of $\displaystyle \mathbb{R}$ can be written uniquely as $\displaystyle \sum_{i \in I} r_ia_i,$ where $\displaystyle r_i \in \mathbb{Q}$ and all but at most finitely
many of $\displaystyle r_i$ are zero. define $\displaystyle f: \mathbb{R} \longrightarrow \mathbb{Q}$ by $\displaystyle f \left(\sum_{i \in I} r_ia_i \right)=r_k.$ the map $\displaystyle f$ is clearly well-defined and satisfies the conditions a) and b). to show that it also satisfies the condition c), choose $\displaystyle i \in I$
such that $\displaystyle i \neq k$ and also choose a sequence $\displaystyle \{s_n \} \subset \mathbb{Q}$ such that $\displaystyle \lim_{n \to \infty} s_n = \frac{1}{a_i}.$ now define $\displaystyle x_n=a_k - s_na_i$ and see that $\displaystyle \lim_{n \to \infty}f(x_n)=1$ but $\displaystyle f( \lim_{n\to\infty} x_n)=0.$
Good. I had a similar construction, except I kind of drew mine out a little more. It all depended in choosing a Hamel basis.