Solution (source code)

= Solution

<Zorn lemma> says that a nonempty partially ordered set in which every chain has an upper bound has a maximal element. The <axiom of choice> says that every family of nonempty sets has a choice <function>. The <well-ordering theorem> says that every set admits a well-order.

Choice gives the Hausdorff maximal principle by repeatedly choosing an element extending a chain; the union at <limit> stages is again a chain. A maximal chain has an upper bound, and that upper bound is maximal, proving Zorn. Conversely, apply Zorn to partial choice <functions> ordered by extension. A maximal partial choice <function> must have the full family as domain, proving choice.

Choice also well-orders a set by recursively choosing from the unchosen remainder; <Hartogs theorem> forces this recursion to exhaust the set before it reaches the Hartogs ordinal. Conversely, from a well-order on the union of a family, choose the least element of each member. Thus all three principles are equivalent.