Say we have $X_1,\dots,X_n$ independent random variables that are $\operatorname{hom}[0,\theta]$ distributed with parameter $\theta>0$. I don’t understand why we have $$ p_\theta(x_1,\dots,x_n)=\prod_{i=1}^n\frac{1}{\theta}\mathbb 1_{\{0\leq x_i\leq \theta\}}=\left(\frac{1}{\theta}\right)^n\mathbb 1_{\{x_{(n)}\leq\theta\}}, $$ where $x_{(n)}$ is the $n$-th order statistic.
Say we have $x_{(n)}<0$. Then the product (in the middle) will yield zero, while the indicator function $\mathbb 1_{\{x_{(n)}\leq\theta\}}$ will yield 1. In fact, as soon as one $x_i\leq 0$, we get zero with the product, while we might still get 1 with the single indicator function on the right, as long as $x_{(n)}\leq\theta$ .
So could someone explain how this is an equality?
I suspect the indicator on the right-hand side should be $\mathbb{1}_{\{x_{(1)} \ge 0\} \cap \{x_{(n)} \le \theta\}}$, since $$\{x_{(1)} \ge 0\} \cap \{x_{(n)} \le \theta\} = \bigcap_{i=1}^n \{0 \le x_i \le \theta\}.$$