# Exact/numerical check of the geometry of the blind proof of Theorem A (Section 2 of the proof; Sections 2 to 4 of the paper follow it). # Coordinates: z = (sqrt((1+y)/2) e^{it}, sqrt((1-y)/2) e^{i(t+u)}); incidence = z1 conj(w1) + z2 conj(w2) = 2^{-1/2}. # Claims: input angles = (t,u) +- Gamma(x,y), Gamma=(A1,B1), cos B1 = -xy/sqrt((1-x^2)(1-y^2)), 0 0.5: continue tw = np.angle(w[0]); uw = np.angle(w[1]) - tw Dv = 1-xx*xx-yy*yy b1 = np.arccos(-xx*yy/np.sqrt((1-xx*xx)*(1-yy*yy))); a1 = np.arctan2(-np.sqrt(Dv), 1+xx+yy) d1 = np.angle(np.exp(1j*(tw - t))); d2 = np.angle(np.exp(1j*(uw - u))) e = min(np.hypot(np.angle(np.exp(1j*(d1-a1))), np.angle(np.exp(1j*(d2-b1)))), np.hypot(np.angle(np.exp(1j*(d1+a1))), np.angle(np.exp(1j*(d2+b1))))) worst = max(worst, e) print('branch formula, max error over samples:', worst) # density of the input height: histogram vs 2 * 1/(2 pi sqrt D) on |x| < sqrt(1-y^2) yy = 0.3; ph = rng.uniform(0, 2*np.pi, 2_000_000) xs = np.sqrt(1-yy*yy)*np.cos(ph) h, edges = np.histogram(xs, bins=40, range=(-0.5,0.5)) mid = (edges[1:]+edges[:-1])/2; dens = h/len(xs)/(edges[1]-edges[0]) pred = 1/(np.pi*np.sqrt(1-yy*yy-mid**2)) print('height density (two branches) max rel. error:', np.max(abs(dens/pred-1)))