TITLE: How much of the Cantor-Schröder-Bernstein theorem is constructively recoverable if the injections have retractions and decidable images?
QUESTION [7 upvotes]: This is cross-posted from MSE at the suggestion of a comment after receiving no answers over a few weeks.
Suppose we have $f : A \to B$ and $g : B \to A$, as well as left inverses $f_r : B \to A$ of $f$ and $g_r : A \to B$ of $g$. Suppose further that $f$ and $g$ have decidable images; i.e., we have $\forall b : B.(\exists a : A. f(a) = b) \vee \neg(\exists a : A. f(a) = b)$, and similarly in the other direction (replace $\vee$ with $+$ in a proof-irrelevant setting). So this is the structure necessary to work with an expression like $f^{-1}(b)$; we can ask whether it is defined, and what its value is if so.
My impression is that the inability to invert an arbitrary function is ordinarily the biggest obstacle in Cantor-Schröder-Bernstein, so I'm interested in knowing what difficulties are left if you skip over that issue by fiat.
I've been playing with these assumptions in Coq, and so far I've managed to adapt the standard proof by König to show that there exist sequences of functions $F_n : A \to B$ and $G_n : B \to A$ which gradually approximate the classically defined bijections. Most importantly, their sequences of compositions $G_n \circ F_n$ and $F_n \circ G_n$ "converge pointwise to" the identities on $A$ and $B$ in the following weak sense:
$$\forall a : A. \neg\neg\exists n : \mathbb N.\forall m \ge n.G_m(F_m(a)) = a$$
$$\forall b : B. \neg\neg\exists n : \mathbb N.\forall m \ge n.F_m(G_m(b)) = b$$
But this seems like a fairly weak result, and I'd like to know how much it may be possible to strengthen it! I did find the Myhill isomorphism theorem, but having looked at the proof, it seems like any adaptation of it to more general premises like the ones I've given might require the types in question to be subcountable or something like that.

REPLY [4 votes]: Sorry that I come back to this question after 6 months, but I was looking for something else and duckduck brought me here. But if we go back even further, a short proof that a topos with NNO satisfies the Cantor-Schroeder-Bernstein if and only if it is boolean bubbled up on the CATEGORIES list in early 1994 (the following is from February '94):
The other way around, the validity of CSB in a topos ALMOST implies
that the topos is boolean. "Almost" means a slightly stronger version
needs to be considered:

(CSB*) if f:A->B and g:B->A are monics
       then there is an iso h:A->B 
        such that for every x in A holds
        h(x) = f(x) or h(x) = g^{-1}(x)

The usual set-theoretical proof of CSB (which goes through in boolean
toposes) actually yields (CSB*). In return, (CSB*) implies
booleanness. We assume that every topos has an object of natural
numbers.

PROPOSITION. A topos is boolean if and only if it satisfies (CSB*).

PROOF of the "if" part: Let X be a subobject of Y. We use (CSB*) to
construct its complement. Define
    A = YxN 
    B = X+(YxN)
(where N is the object of natural numbers). Let f:A-->B be the
inclusion, and g:B-->A the unique arrow which maps X into the first
copy of Y in A, while it takes the copies of Y contained in B into the
second one, the third one and so on. (Formally, g is defined using the
universal property of coproducts, and the structure of N.) It is clear
that both f and g are monics.

By (CSB*), there is a bijection h:A-->B with h(x)=f(x) or
h(x)=g^{-1}(x). This means that the union of
    C = {z | h(z)=f(z)} and
    D = {z | h(z)=g^{-1}(z)}
covers A. On the other hand, the definitions of f and g imply that C
and D are disjoint. So they are complements in A. By pulling back C and D
along the inclusion of Y iso Yx{0} in A, we get two complementary
subobjects of Y. The claim is now that the intersection (pullback) X'
of D and Yx{0} is isomorphic to X -- so that the intersection of C and
Yx{0} yields the complement of X in Y.

First of all, each element <y,n> of D must surely be in the image of
g. Thus, if <y,0> is in D, then y must be in X. So X' is contained in
Xx{0}. The other way around, since h(C) is contained in f(C), the
intersection in B of X and h(C) must be empty. Therefore, X must be
contained in h(D): indeed, h is an iso, and the direct images h(C) and
h(D) must be complementary in B. But h(D) is contained in
g^{-1}(D). So X is in g^{-1}(D), i.e. g(X) is in D. Hence, Xx{0}=g(X)
is contained in X'.