Mapping boundaries in SAGE I'm trying to find the fundamental domain of congruence subgroups in SAGE by mapping the boundaries of the fundamental domain of $\mathrm{SL}_2(\mathbb{Z})$ by certain matrices. How can I transform the boundary, say $x=-\frac{1}{2}$, $y \ge \frac{\sqrt{3}}{2}$?

I'd make use of the fact that every Moebius transformation from $\operatorname{SL}(2,\mathbb{R})$ maps the set of vertical line segments and circular arcs around centers that lie on the real axis into itself. This essentially translates the problem to mapping the vertices of the standard fundamental domain, including $\mathrm{i}\infty$, and finding the arc or vertical line segment through each given pair of (mapped) vertices.
With less than 70 lines of asymptote code, I have thus implemented a drawing procedure map_fundamental_region(a,b,c,d) taking the transformation parameters. Some calls to that routine (plus a bit of decoration) then resulted in images like this:

