# Pre-image of element in quaternion algebra

Let $$A$$ be an indefinite quaternion algebra (e.g. $$(2,5)_\mathbb{Q}$$), let $$M$$ be a maximal order in $$A$$ and let $$\Gamma$$ be the Fuchsian group derived from $$M$$. We will denote the group of units of $$M$$ with reduced norm $$1$$ by $$\overline{U}(M)$$.

These objects can all be easily constructed in magma.

A<i,j,k> := QuaternionAlgebra(RationalField(), 2,5);
M := MaximalOrder(A);
Gamma := FuchsianGroup(M);
g,map := Group(Gamma);


The generators and relaters of $$\Gamma$$ are stored in g and a map from $$\Gamma\rightarrow\overline{U}(M)$$ is stored in map. My question is, if I have a quaternion $$q\in M\subset A$$ which I know has reduced norm equal to $$1$$, how can I find the image of it in $$\Gamma$$ (specifically as a word in the generating set)?

Notes:

1. I have tried using the preimage command but it does not appear to work with map.
2. I am using the Magma online calculator, available at http://magma.maths.usyd.edu.au/calc/
3. map is a set theoretic section to the surjection $$\overline{U}(M)\rightarrow\Gamma$$.
• First, did you mean to ask "how can I find the PRE-image of it in $\Gamma$"? – Lee Mosher Feb 14 at 16:47
• Also, since you have not told us what your map $\Gamma \mapsto \overline U(M)$ is, how can we tell you what its pre-images are? – Lee Mosher Feb 14 at 16:48
• The preimage of it under map, which modulo $\pm1$ is the image of it in $\Gamma$. – Sam Hughes Feb 14 at 16:50
• It is the map that magma gives you when you run the above code – Sam Hughes Feb 14 at 16:51
• Now I'm wondering if there is any mathematical content to your question, or if this is just a question about how to use a software package. – Lee Mosher Feb 14 at 16:54

(BTW I would try to avoid naming your map map since this is a keyword in Magma.)
• Thanks for the advice about naming conventions! The problem is equivalent to factorising a quaternion in the order $M$ with respect to a list of quaternions. Unfortunately I don't believe that has a solution. Fortunately, I have a found a workaround, by taking the pre-image of a list of a large list of group elements and searching that. – Sam Hughes Feb 28 at 16:00