In sage: from $\mathbb{Z}/N\mathbb{Z}$ to $(\mathbb{Z}/N\mathbb{Z})^*$

67 Views Asked by At

In Sage G=IntegerModRing(11^5-1) gives me the cyclic group $\mathbb{Z}/161050\mathbb{Z}$. From here U=G.unit_group() gives me the group $(\mathbb{Z}/161050\mathbb{Z})^*\simeq\mathbb{Z}/20\mathbb{Z}\times\mathbb{Z}/3220\mathbb{Z}$ .

Question: how can I get in Sage the element in $\mathbb{Z}/20\mathbb{Z}\times\mathbb{Z}/3220\mathbb{Z}$ corresponding to $11\in\mathbb{Z}/161050\mathbb{Z}$?

There is a map from $(\mathbb{Z}/161050\mathbb{Z})^*$ to $\mathbb{Z}/161050\mathbb{Z}$: we can do U.inject_variables() to get variables f0 and f1 and then make G(f0) and G(f1) to get the corresponding elements of $\mathbb{Z}/161050\mathbb{Z}$. But U(G(11)) responds an error.

Of course the number here a only example and I search a general method.

1

There are 1 best solutions below

0
On BEST ANSWER

U(G(11).generalised_log()) does what you want. See the documentation for this method here.