I am a little bit confused about definitions of null and alternative hypotheses.
My understanding is that the null and alternative hypotheses are defined based one a partition of the parameter space $\Theta$. Suppose that $\Theta$ can be partitioned into two disjoint subsets $\Theta_0$ and $\Theta_1$. Then, the null is such that $\theta \in \Theta_0$ and the alternative is such that $\theta \in \Theta_1$.
However, it is not uncommon to find examples where people test: $$ H_0: \theta = \theta_0 \quad\text{versus}\quad H_1: \theta > \theta_0 $$ or $$ H_0: \theta = \theta_0 \quad\text{versus}\quad H_1: \theta < \theta_0 .$$ For example, here :
- https://statweb.stanford.edu/~owen/courses/200/lec07.pdf (bottom of page 3)
- http://www.stat.yale.edu/Courses/1997-98/101/sigtest.htm
These hypotheses don't form a partition of the parameter space (assuming $\theta\in\mathbb{R}$). Is it still correct to do that? Do people assume (implicitly) that the equality in the null is actually an inequality?
Yes, correct.
Remember that the I type error (test size) is defined as
$$\alpha=\sup_{\theta \in \Theta_0}\pi(\theta)$$
Here is a formal definition of UMP Test
this explains why $\mathcal{H}_0:\mu\leq\mu_0 \equiv \mathcal{H}_0:\mu=\mu_0$
Actually there are many hypothesis-testing problems for which a UMP test does not exist. In these situation usually the tests are restricted in a class of Unbiased ones. If a test is biased it cannot be used because it might give incoherent results
a test $\gamma$ is unbiased iff
$$\sup_{\theta \in \Theta_0}\pi_{\gamma}(\theta)\leq \inf_{\theta \in \Theta_1}\pi_{\gamma}(\theta)$$