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$$
 A: We need to assume that the sets $A_k$ are disjoint [or some other property on $A_k$ of similar strength, like every nonempty element of $\sigma(A_k : 1\leq k \leq n)$ has postive measure] for this to be true.  Otherwise, you might have $s = 2\chi_{[-1,0]} + \chi_{[0,1]}$ and $\mu$ the Lebesgue measure on $\mathbb{R}$, which gives $$\sup_{x \in \mathbb{R}} |s(x)| = 3 \neq 2 = \|s\|_\infty.$$

If we assume $A_k$ are disjoint, then we have $|s| = \sum_{k=1}^n |c_k|\chi_{A_k}$ and $$\sup_{x \in X} |s(x)| = \sup_{1 \leq k \leq n} |c_k|.$$  Similarly, $$|s|^{-1}\left(\sup_{1 \leq k \leq n}|c_k|, \infty\right] = \emptyset \\ \forall a < \sup_{1 \leq k \leq n}|c_k|, \quad \mu\left(|s|^{-1}(a,\infty]\right) > 0$$
from which it follows that $\|s\|_\infty = \sup_{1 \leq k \leq n}|c_k|.$
A: @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$$
