Why is the event $\{X_{(j)} \le x_i\}$ is equivalent to the event $\{Y_i \ge j\}$?

From Statistical Inference by Casella and Berger:

Let $ X_1, \dots X_n$ be a random sample from a discrete distribution with $ f_X(x_i) = p_i$ , where $ x_1 \lt x_2 \lt \dots$ are the possible values of $ X$ in ascending order. Let $ X_{(1)}, \dots, X_{(n)}$ denote the order statistics from the sample. Define $ Y_i$ as the number of $ X_j$ that are less than or equal to $ x_i$ . Let $ P_0 = 0, P_1 = p_1, \dots, P_i = p_1 + p_2 + \dots + p_i$ .

If $ \{X_j \le x_i\}$ is a “success” and $ \{X_j \gt x_i\}$ is a “failure”, then $ Y_i$ is binomial with parameters $ (n, P_i)$ .

Then the event $ \{X_{(j)} \le x_i\}$ is equivalent to the event $ \{Y_i \ge j\}$

Can someone explain why these two are equivalent?

$ \{X_{(j)} \le x_i\} = \{s \in \text{dom}(X_{(j)}) : X_{(j)}(s) \le x_i\}$

$ \{Y_i \ge j\} = \{s’ \in \text{dom}(Y_i) : Y_i(s’) \ge j\}$

I’m having trouble understanding how these random variable functions show this equivalence.