Solution (source code)

= Solution

First, the <product order> is a <partial order>. Reflexivity and transitivity hold in each coordinate. If $(p,q)\le_R(p',q')$ and $(p',q')\le_R(p,q)$, antisymmetry in $P,Q$ gives $p=p'$ and $q=q'$, proving antisymmetry in the product.

Let $D$ be a nonempty <directed set> in $P\times Q$. Its coordinate projections
$$
D_P=\{p:\exists q\;(p,q)\in D\},\qquad D_Q=\{q:\exists p\;(p,q)\in D\}
$$
are <directed sets>. For example, if $p_1,p_2\in D_P$, choose $(p_1,q_1),(p_2,q_2)\in D$. Directedness supplies $(p_3,q_3)\in D$ above both, so $p_3\in D_P$ is a common <upper bound> of $p_1,p_2$ inside $D_P$. The argument for $D_Q$ is identical.

By the assumed <directed-complete partial order> property, $p_* =\sup D_P$ and $q_* =\sup D_Q$ exist. Every $(p,q)\in D$ satisfies $p\le_Pp_*$ and $q\le_Qq_*$, so $(p_*,q_*)$ is an <upper bound> of $D$. If $(u,v)$ is any other <upper bound>, then $u$ bounds $D_P$ and $v$ bounds $D_Q$. Hence $p_*\le_Pu$, $q_*\le_Qv$, proving leastness. Thus
$$
\boxed{\sup D=(\sup D_P,\sup D_Q),\qquad P\times Q\text{ is directed-complete}.}
$$
The printed definition of a <directed set> also permits $D=\varnothing$.<Calculus, probability, linear algebra, discrete mathematics, logic and proof, and models of computation examination paper by the University of Oxford (2003)>[Printed p. 5, definitions preceding Question 7]{ref} Under that convention, the hypotheses require $P,Q$ to have <least elements>, namely the <least upper bounds> of their empty subsets. Their pair is the <least element> of the product and is $\sup\varnothing$ there. This handles the empty case as well; under the convention restricting <directed sets> to nonempty sets, only the preceding nonempty argument is needed.