To prove $\sup_{x\in X} |s(x)| = \|s\|_\infty$ where $s = \sum_{k=1}^n c_k \chi_{A_k}$ and $\mu(A_k) > 0$ for all $1\le k\le n$ Prove that $$\sup_{x\in X} |s(x)| = \|s\|_\infty$$ where $s = \sum_{k=1}^n c_k \chi_{A_k}$ and $\mu(A_k) > 0$ for all $1\le k\le n$. Assume the sets $A_k$ to be disjoint. In other words, $\sup_{x\in X}|s(x)|$ is equal to the essential supremum of $|s|$, for simple functions satisfying the aforementioned condition. I found this result without proof here.

I have tried to show equality using basic definitions. Let $s = \sum_{k=1}^n c_k \chi_{A_k}$, where $\mu(A_k) > 0$ for every $1\le k\le n$. Rudin defines the essential supremum $\|s\|_\infty$ as follows:
$$\|s\|_\infty = \inf\{\alpha\in\mathbb R: \mu(|s|^{-1}((\alpha,\infty])) = 0\}$$
How do I show that this equals $\sup_{x\in X} |s(x)|$? Moreover, the $c_k$'s could be in $\mathbb C$, so a nice expression for $|s|$ seems out of reach.
Thank you!

Follow-up: Will this result in any way help us prove that for $f \in C_c(\mathbb R^n)$, $$\sup_{x\in\mathbb R^n} |f(x)| = \|f\|_\infty$$

@copper.hat helped construct this answer. Any errors are due to me (though there probably are none).
Suppose $\alpha\in\mathbb R$ is such that $\mu(|s|^{-1}((\alpha,\infty])) = 0$. Then we must have $|s(x)| \le \alpha$ $\mu$-a.e. ,i.e. $|s(x)| > \alpha$ possibly on a set of measure zero. Suppose this set is non-empty, and call it $A$. If for some $k$, $|s(x)| = |c_k| > \alpha$, then $\mu(A_k) \le \mu(|s|^{-1}((\alpha,\infty])) = 0 \implies \mu(A_k) =0$ which is a contradiction. So, $A = \varnothing$. Hence, $|s(x)| \le \alpha$ everywhere. Taking supremum, we have $\sup |s| \le \alpha$, and now taking infimum (appropriately), we get $\sup|s| \le \|s\|_\infty$.
Suppose $\sup_{x\in X} |s(x)| < \|s\|_\infty$. Choose some $\beta$ for which $\sup_{x\in X} |s(x)| < \beta < \|s\|_\infty$. Then $\mu(|s|^{-1}((\beta,\infty])) = 0$ since $|s(x)| \le \sup_{x\in X} |s(x)| < \beta$ for all $x$. By definition of $\|\cdot\|_\infty$, we have $\beta \ge \|s\|_\infty$, which is a contradiction. Therefore,
$$\sup_{x\in X} |s(x)| = \|s\|_\infty$$
