A (very?) naïve question, but I didn't get an answer on math.se: so here goes ….


In his original [ETCS](https://doi.org/10.1073/pnas.52.6.1506) paper, Lawvere states a categorial version of choice for sets in this form: "If the domain of $f$ has elements, then there exists $g$ such that $fgf = f$". So let's say, generalizing


(1) A category has Choice-1 iff for any $f\colon X \to Y$ where $X \not\cong 0$ [with $0$ initial], there exists a $g \colon Y \to X$ such that $f \circ g \circ f = f$.


Another more familiar version of choice for sets is that any surjection has a right inverse (or left inverse, depending on your preferred handedness convention!). Generalizing, let's say


(2) A category has Choice-2 iff for any epic $f\colon X \to Y$ there exists a $g \colon Y \to X$ such that $f \circ g = 1\_Y$.


But (forgive a senior moment!) I'm embarrassingly unclear about the conditions — the weakest/most natural/nicest conditions? — under which a category which has Choice-2 has Lawvere's Choice-1. Is there a standard story about this which I've missed?



Versions of Choice in categories
If we take Choice-1 in Lawvere's original form with "has (global) elements" in place of "is not initial", then Choice-2 follows from Choice-1 in any [Boolean category](https://ncatlab.org/nlab/show/Boolean+category). Factor $f:X\to Y$ as an epi $h : X \twoheadrightarrow Z$ followed by a mono $m:Z\hookrightarrow Y$. Then $h$ is a split epi by Choice-2, while $m$ is complemented by Booleanness, and therefore a split mono since $Z$ has a global element. So we have $s:Z\to X$ with $h s = 1\_Z$, and $r:Y\to Z$ with $r m = 1\_Z$, and defining $g = s r$ we have $f g f = (m h) (s r) (m h) = m (h s) (r m) h = m h = f$.


In a topos, Booleanness also follows from Choice-1 by the [Diaconescu-Goodman-Myhill theorem](https://ncatlab.org/nlab/show/Diaconescu-Goodman-Myhill+theorem). So Choice-2 also follows from Lawvere's original Choice-1 in any topos.


