The writer in this post summarizes the proof which I quote:
Theorem 1.24 (p19, Rudin Functional Analysi), which states that if $X$ is a topological vector space with a countable local base, then there is a metric $d$ on $X$ such that a) $d$ is compatible with the topology of $X$ b) the open balls are balanced c) $d$ is invariant and, if $X$ is locally convex, then all open balls are convex.
Here is a slimmed down version of his proof:
By his theorem 1.14, $X$ has a balanced local base $\{V_n\}$ such that $V_{n+1} + V_{n+1} + V_{n+1} + V_{n+1} \subset V_n$.
D is the set of all rational numbers $r$ of the form $\Sigma_{n=1}^{\infty} c_n(r) 2^{-n}$, where each of the digits $c_i(r)$ is 0 or 1 and only finitely many are 1. Define $A(r) = X$ if $r \geq 1$. For any $r$ in $D$, define $A(r) = \Sigma c_n(r)V_n$. (Note each is a finite sum). Define $f(x) = \inf \{r : x \in A(r)\}$ for $x \in X$ and $d(x,y) = f(x - y)$. Rudin proves an inclusion $A(r) + A(s) \subset A(r + s)$ and uses it to show that $\{A(r)\}$ is totally ordered by set inclusion and that $f(x + y) \leq f(x) + f(y)$.
As each $A(r)$ is balanced, $f(x) = f(-x)$. $f(0) = 0$. If $x\not = 0$, then $x \not \in V_n = A(2^{-n})$ for some $n$, so $f(x) \geq 2^{-n} > 0$.
I understand the proof. But I am confused - how did one even come up with the function $A$ (as highlighted)?
I remember a "similar function" in Urysohn's lemma proof which utilizes the concept of minimal membership.