SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Lemma B.2. Let  $P \in \mathbb{R}^d$  be a hyperplane and consider two points  $a, b \in \mathbb{R}^d \setminus P$  that lie in the same half-space w.r.t.  $P$ . Let  $a', b'$  be the reflections of  $a, b$  through  $P$ . Then  $d(a', b') = d(a, b) < d(a, b')$ .
Proof. It suffices to restrict to the plane AffineSpan  $\{\{a,b,a'\}\}$ , and thus we take  $d = 2$  and up to isometry we may fix  $P$  to be the  $x$ -axis,  $a = (0,y)$ ,  $b = (x,y')$ ,  $b' = (x,-y')$ , with  $y,y' > 0$ . Then it follows that  $d(a,b)^2 = x^2 + (y - y')^2 < x^2 + (y + y')^2 = d(a,b')^2$ . As reflections are isometries,  $d(a,b) = d(a',b')$ .
Claim: If  $s$  is as in Lemma B.1, then we have the following:
- Exactly one of the candidates for  $S$  given  $\mathbf{s}$ , up to reflection across AffineSpan(s), is completely contained in one of the half-spaces determined by AffineSpan(s).
- A candidate  $S'$  as in the previous point is the only one of the candidates for  $S$  given  $\mathbf{s}$ , up to reflection across AffineSpan( $\mathbf{s}$ ), for which  $D_{S'} = D_S$ .
To prove the first item, we use only the property that AffineDim(s) =  $d - 1$ , with which by Lemma A.4, each point of a candidate for  $S$  given s, has either two possible locations (related by a reflection across AffineSpan(s)) or a single possible location if it belongs to AffineSpan(s). For the second item, let  $S'$  be as above and let  $S''$  be a candidate for  $S$  given s, which is not completely contained in one of the half-spaces determined by AffineSpan(s). We now consider each term  $d(x', y')$  in the sum defining  $D_{S'}$ , comparing the corresponding term  $d(x'', y'')$  from  $D_{S''}$ , where  $x'' = x'$  or is a reflection across s of  $x'$  and similarly for  $y''$  and  $y'$ . By Lemma B.2, either  $d(x'', y'') = d(x', y')$  in case  $x'', y''$  are in the same half-space determined by AffineSpan(s), or  $d(x'', y'') > d(x', y')$  otherwise. Summing all terms, by the property of  $S', S''$  we find  $D_{S'} < D_{S''}$ . By the same reasoning with  $S$  instead of  $S''$ , since we are assuming that s satisfies Lemma B.2, we have  $D_S = D_{S'}$ , completing the proof of the second item and of the claim.
The reconstruction of  $S$  in Case 2, can therefore be done as follows: we run through all  $\mathbf{s}$  such that AffineDim(s) = d - 1, and for each such  $\mathbf{s}$  we construct all candidates  $\widetilde{S}$  for  $S$  given  $\mathbf{s}$ , and calculate  $D_{\widetilde{S}}$  for each of them. Lemma B.1 guarantees that we run into some  $\mathbf{s}$  for which, up to isometry, only one such  $\widetilde{S}$  realizes  $D_{\widetilde{S}} = D_S$ . This is our unique reconstruction of  $S$ .