Almost everywhere (ae) Homogeneous function of degree $0$ equals to a constant for ae $x \in (0,\infty)$ provided $ f $ is measurable? Is an almost everywhere (ae) Homogeneous function $f$of degree $0$ equals to a constant for almost every $x \in (0,\infty)$ given that $ f $ is measurable?

Let
   $f : \mathbb R \to \mathbb R$.
If $f(ax)=f(x)$ ae for any $a>0$
Then $f(x)=c$ for almost every $x \in (0,\infty)$, where $c$ is a constant.

Is the above true?
I know it is true if $ f $ is locally integrable see here
I encountered this problem while studying bounded linear operators $ T:L^2 \to L^2$
 A: 
Lemma $1$ $\quad A\subset\mathbb{R}$ is measurable and $m(A)>0$. then $m\left(\mathbb{R}-\bigcup_{q\in\mathbb{Q}}q\cdot A\right)=0$.

${ Proof}$ It's sufficient to show $m\left([1/n,n]-\bigcup_{q\in\mathbb{Q}}qA\right)=0$, where $n\in\mathbb{Z}-\{0\}$. 
$\forall \alpha<1$, $\exists$ an interval $I$ s.t. $m(I\cap A)>\alpha\cdot m(I)$. Obviously, $[1/n,n]\subset\bigcup_{q\in\mathbb{Q}}qI$. By arranging the intervals properly, we can find finitely many $\{q_k\}_{k=1}^N\subset\mathbb{Q}$ such that the corresponding $\{I_k\}_{k=1}^N:=\{q_kI\}_{k=1}^N$ satisfies
$$[1/n,n]\subset\bigcup_{k=1}^N I_k,\quad \sum_{k=1}^n m(I_k)\leq3n.$$
Then we have
\begin{eqnarray*}
[1/n,n]-\bigcup_{q\in\mathbb{Q}}q_kA&\subset&[1/n,n]-\bigcup_{k=1}^Nq_kA\\
&\subset&\left\{[1/n,n]-\bigcup_{k=1}^NI_k\right\}\bigcup\left\{\bigcup_{k=1}^N[(q_kA)^c\cap I_k]\right\}\\
&\subset&\left\{\bigcup_{k=1}^N[(q_kA)^c\cap I_k]\right\}
\end{eqnarray*}
Thus,
$$m\left\{[1/n,n]-\bigcup_{q\in\mathbb{Q}}\{qA\}\right\}\leq m\left\{\bigcup_{k=1}^N[(q_kA)^c\cap I_k]\right\}\leq (1-\alpha)3n.$$
Let $\alpha\to 1$, so we proved the lemma, and directly have lemma 2.

Lemma $2$ $\quad r\in\mathbb{R},$ $m\{f\leq(\geq)r\}>0\Rightarrow f\leq(\geq)r\ a.e.$ 

$ Proof:$ $f\overset{a.e.}{\leq} r$ on $q\cdot\{f\leq r\}$ because of homogeneity, where $q\in\mathbb{Q}$. Unit of all $q\cdot\{f\leq r\}$ with respect to $q$ covers $\mathbb{R}$ almost everywhere due to lemma 1, so we proved lemma 2.
Let $R_1:=\{r\in\mathbb{R}:m\{f\leq r\}>0\},\ R_2:=\{r\in\mathbb{R}:m\{f\geq r\}>0\}$. $f\overset{a.e.}{\equiv}\inf R_1=\sup R_2$.
Seems we don't need any extra condition here, just measurability. 
A: The proof follows from lemma 2 given by XIADO : Here is a simplified proof
Proof of Lemma 1:
It suffice to prove it for some measurable $ B \subset A $ and $ B\subseteq I=[a ,b]$  and $ m (B) > 0,|a|,|b| > 0$:
There some measurable $ S$ with $ m (S) > 0$  and by Lebesgue density theorem there some $ x \in S \subseteq I $ and some $ 0<r<\frac{m(I)}{2},1>\epsilon > 0$ such that $ I_r=(x-r, x+r)$,  $ m (S \bigcap I_r)  > (1-\epsilon)m (I_r)$ 
It also obvious that for $ S_q =q\cdot S $, $ I_{r, q}=q\cdot I_r $,$ m(S_q)=qm (S) , m(I_{r, q})=qm (I_r) $, and $ (S_q\bigcap I_{r, q})  >q (1-\epsilon)m (I_r)$ ,where $q \in \mathbb {Q} $
Now we can take subsequence  {$ I_{r, q} $}that is pairwise disjoint such that $\bigcup_q I_{r, q} \supseteq I $  and $max${$|q|$} $\le n^2,n^2=\frac {|b|}{|a|}$
Define $ B = S \bigcap I_r $ ,  $ B_q=q\cdot B $, It follows $ m(\bigcup_q B_{q})  >(1-\epsilon)m (I)$
$ m(I-\bigcup_q B_{q}) = m (I) - m (  I\bigcap\bigcup_q B_{q}) $ 
$ m(I-\bigcup_q B_{q}) \le \epsilon m (I)+ 2rn^2 $
$A_q=q\cdot A$
$ I- \bigcup_q A_q \subseteq I-\bigcup_q B_{q} $
Therefore $ m(I-\bigcup_q A_q) \le \epsilon m (I)+2rn^2 $
Letting $r,\epsilon \to 0$ the result follows 
Proof of Lemma 2
define $A=${$x \in \mathbb{R} : f(x) < r$}
$m(q\cdot A-A)=0$ since $f(qx)=f(x)$ ae
so if $m(A) >0$ ,since $ m(I-\bigcup_q A_q)=0$
It follows $f(x) < r$ ae, hence it is bounded almost everywhere and so it is locally integrable
Using the result of see here shows $ f (x) $ is constant ae on $(0, \infty)$
