The title of the question is not so clear: I am sorry about this.
While studying totally ordered groups, I found that a direct sum of totally ordered groups can be ordered by means of lexicographic order. So I had this idea: can we order the group $C([0,1])$ (continuous functions from $[0,1]$ to $\mathbb{R}$) with a "lexicographic order"? If you have two functions $f,g \in C([0,1])$, if $f(x)=g(x)$ for all $0 \le x \le a$, and then at some point you have (locally) that $f<g$, we say that $f \preceq g$. The problem is that this order is not a total order. In fact the function $$f(x)=x^{2n}\sin (1/x)$$ is of class $C^n$ and cannot be compared with the constant function $0$ since in every neighbourhood of $0$ it assumes positive and negative values.
Then I thought that maybe if we take a space of regular enough functions (for example for polynomials it works), this could become a total order. So my question is:
Let $f:[0,1] \longrightarrow \mathbb{R}$ be a $C^{\infty}$ function. Call $p(f)= \inf \{ x : f(x)>0 \}$ and $n(f)= \inf \{ x : f(x)<0 \}$ (with the convention that $\inf \emptyset = 1$). If $n(f)=p(f)$, can we say that $f$ is the constant function $0$?
If this question has an affirmative answer, then we could totally order the group $C^{\infty}([0,1])$ by saying that positive functions are those for which $p(f) < n(f)$.
$C^\infty$ is not enough. Consider
$$f(x) = \begin{cases} \quad 0 &, x = 0 \\ e^{-1/x}\sin \frac{1}{x} &, x > 0.\end{cases}$$
Then $n(f) = p(f) = 0$, but $f \not\equiv 0$. If you restrict to (real-)analytic functions, then you get a total order.