How to show triangle inequality and that open ball is a compact ideal? On a ring $F_p[[X]]$ of formal series with coefficients in the field with $p$ elements we have a metric
$$d(\sum\limits_{n=0}^{\infty} a_n X^n,\sum\limits_{n=0}^{\infty} b_n X^n)=p^{-\min\{n|a_n\neq b_n\}}.$$
I have two problems

*

*Problem with showing the triangular inequality. I have only managed to see how it looks like
$$  p^{-\min\{n|a_n\neq b_n\}}\leq  p^{-\min\{n|a_n\neq c_n\}}+ p^{-\min\{n|c_n\neq b_n\}}.$$
I tried to apply logarithm to both sides, but without effects. Also I do not know any senible inequality with powers.


*Problem with showing that open ball in regard to this metric with the centre in $0$ and any positive radius is compact ideal in $F_p[[X]]$.
Our ball is in a form ($r>0$)
$K_{0,r}=\{\sum\limits_{n=0}^{\infty} a_n X^n:d(\sum\limits_{n=0}^{\infty} a_n X^n,0)\leq r\} =\{\sum\limits_{n=0}^{\infty} a_n X^n:p^{-\min\{n|a_n\neq 0\}}\leq r\} $.
In my opinion we ought to show that
a) $K_{0,r}$ is nonempty and $\alpha - \beta\in K_{0,r} \ \forall_{\alpha,\beta\in K_{0,r}}$,
b) if $\gamma\in F_p[[X]], \ \alpha\in K_{0,r}$ then $\gamma \alpha \in K_{0,r}$,
b) if $\gamma\in F_p[[X]], \ \alpha\in K_{0,r}$ then $ \alpha\gamma \in K_{0,r}$.
Unfortunately I have no idea how to prove that, what is more how to show that this ideal is compact.
 A: In fact this is an ultrametric space: if $g,f,h\in F_p[[X]]$, then $d$ satisfies the strong triangle (or ultrametric) inequality:
$$d(f,g)\le\max\{d(f,h),d(h,g)\}\,.\tag{1}$$
For distinct $f(X)=\sum_{n\ge 0}a_nX^n,g(X)=\sum_{n\ge 0}b_nX^n\in F_p[[X]]$ let
$$\delta(f,g)=\min\{n\ge 0:a_n\ne b_n\}\,,$$
so that $d(f,g)=p^{-\delta(f,g)}$.
Let $f(X)=\sum_{n\ge 0}a_nX^n$, $g(X)=\sum_{n\ge 0}b_nX^n$, and $h(X)=\sum_{n\ge 0}c_nX^n$. Clearly $(1)$ holds if $f=h$, $h=g$, or $f=g$, so assume that $f,g$, and $h$ are all distinct. Let $k=\delta(f,h)$ and $\ell=\delta(h,g)$, and without loss of generality assume that $k\le\ell$. Then $a_n=b_n=c_n$ for each $n<k$, so $\delta(f,g)\ge k$, and therefore
$$d(f,g)=p^{-\delta(f,g)}\le p^{-k}=\max\{p^{-k},p^{-\ell}\}=\max\{d(f,h),d(h,g)\}\,,$$
as desired.
In this answer I proved that an open ball in an ultrametric space is also a closed set. (The notation there is taken from the PDF to which the OP linked and is a little odd: $B(x,r^-)$ is simply the open ball of radius $r$ centred at $x$.) In this answer I showed that open balls centred at the origin in $\Bbb Q_p$ are compact; with a little work you should be able to adapt it to balls in $F_p[[X]]$.
For the rest, note that the open balls centred at $0$ all have the following form:
$$B_k=\left\{\sum_{n\ge 0}a_nX^n\in F_p[[X]]:a_n=0\text{ for }n<k\right\}\,.$$
Using this it isn’t hard to show that $fg\in B_k$ whenever $g\in B_k$: if $g\in B_k$, it has a factor of $X^k$, and hence so does $fg$. Checking that it’s closed under addition is also straightforward.
