Solution (source code)

= Solution

<Zorn's lemma> states that a nonempty <partially ordered set> in which every <chain> has an <upper bound> contains a <maximal element>. Here a <chain> means a <subset> totally ordered by the inherited order; it need not have a greatest member.

View every <partial function> as its graph, a <subset> of $\mathbb R\times\mathbb R$. The family $\mathcal F$ is a <set> by <axiom of separation> from the <power set> of this product. Let $\mathcal C\subseteq\mathcal F$ be a <chain> and put $h=\bigcup\mathcal C$. If two members of the <union> assign values to the same input, the <chain> property makes one graph contain the other, so those values agree. Thus $h$ is a <partial function>.

If $x\in\operatorname{dom}h$ and $q\in\mathbb Q$, choose a <chain> member containing $x$ in its domain. Its rational-scalar closure gives $qx\in\operatorname{dom}h$. If $x,y\in\operatorname{dom}h$, choose two <chain> members containing them; the larger one contains both, and therefore contains $x+y$ with value $h(x)+h(y)$. Hence $h$ satisfies the required additive identity and domain closure. Consequently
$$
\boxed{\bigcup\mathcal C\in\mathcal F,}
$$
and it is an <upper bound> for the <chain>. For the empty <chain> its <union> is the <empty function>, which satisfies the defining <logical implications> vacuously, so this case is covered too.