1
$\begingroup$

I am asking this question since I could not comment on a related question and answer that can be found here.

An answer by @wendy.krieger states that: "For primes $p \equiv 1 \pmod{4}$ the number $i$ reduces either of two integers, and thus any $a+bi$ reduces to some number $\pmod{p}$. Primitive roots work as normal"

My question is: if $a+bi$ reduces to some number, say $k\in \mathbb{Z}^+$, is there a way to find the corresponding $a+bi$ given $k$?

  • 0
    Can you give an example so that we can better understand what you're talking about? For example, $p = 5 \equiv 1 \pmod 4$, the number $i$ "reduces" either of two integers? What does that mean in this specific example? Are you talking about norms? Like $N(-2 + i) = 5$?2017-01-20
  • 0
    $$N(a + bi) = (a - bi)(a + bi) = a^2 - (-1)b^2 = a^2 + b^2$$2017-01-20
  • 0
    So if a Gaussian integer has a positive prime number for its norm, then that positive prime can be expressed uniquely (though without regard to order) as a sum of two squares. Couple more examples: $(2 - 3i)(2 + 3i) = 13$, $(4 - i)(4 + i) = 17$.2017-01-20
  • 0
    I wish I have an example or I know what does that even mean. That's why I asked the question. It's mentioned in @wendy.krieger answer for the linked question. I think she can explain that more. I don't even know how to notify her on this.2017-01-21
  • 0
    Maybe you won't be able to until you have a score of 50 or higher, if I recall correctly. Anyway, please answer this one question: what does $2 + i$ "reduce" to?2017-01-24
  • 0
    I have no idea what does that mean. My question was totally conditional on Wendy's comment.2017-01-26
  • 0
    You have no idea as to the meaning of something in your question? If you have no idea what $2 + i$ reduces to, then you have no hope of finding $2 + i$ from the integer it reduces to.2017-02-01

2 Answers 2

1

So your problem is to solve the congruence $z^n \equiv i$ mod $pA$, where $A=\mathbf Z[i]$, the ring of Gaussian integers. As the problem is stated, a theoretical solution is easy enough to find. I stick to the notations of my previous answer, where 3 distinct cases (1), (2) and (3) were considered. Let us tackle them separately.

Case (2) : $p$ is an odd prime, $p \neq 1$ mod $4$. Then $A/pA$ is the finite field $\mathbf F_{p^2}$ (NB: I definitely prefer the notation $\mathbf F_q$ for the field with $q$ elements, because in ANT the notation $\mathbf Z_p$ is reserved for the ring of $p$-adic integers). Since $p$ is odd, $p^2\equiv 1$ mod $4$ and the cyclic group $(A/pA)^*$ of order $p^2 -1$ has a unique subroup of order $4$ generated by the class $[i]$ of $i$. So the congruence $[z]^n=[i]$ is equivalent (if we choose $n$ minimal) to " $[z]^n$ has order $4$ ", which implies that $n$ divides $\frac {p^2 - 1}4$. If this latter condition is satisfied, all the solutions with minimal $n$ will be of the form $[\zeta]^{\frac {p^2 - 1}4n}$, where $[\zeta]$ is a generator of $(A/pA)^* \cong \mathbf F_{p^2}^{*}$ .

Case (3) : $p\equiv 1$ mod $4$ and $A/pA \cong A/\pi A \times A/\pi' A \cong \mathbf F_p \times \mathbf F_p$ . This time one has to solve 2 simultaneous congruences of the form $[z]^n=[i]$ in $A/\pi A $ and $A/\pi A'$ respectively, but the method is the same as in case (2), just replacing $\frac {p^2 - 1}4$ by $\frac {p - 1}4$ .

Case (1) : $p=2$ and $A/2A$ is a ring with nilpotent elements. This could be generally complicated, but since the ring here has only 4 elements, one can just check by hand ./.

  • 0
    I am only interested in case case 3. I already thought of that algorithm. Finding a generator is not easy though. I tried a script on Mathematica to find a random generator. I could not find one in a few hours when $p=18446744069414584321$ and $n=8192$.2017-01-22
  • 0
    Unfortunately I am totally "algorithm illiterate".2017-01-23
1

I'm not sure I understand what you mean by "$a+ ib$ reduces to a rational integer", but from the title of your question "Gaussian integer modulo $p$" as well as from your link to @wendy.krieger's answer, I guess that you want to know what $A/pA$ looks like, where $A = Z[i]$ and $p$ is a rational prime. This is classically known as a theorem on the decomposition of rational primes in $A$ (see any textbook in ANT). The ring $A$ happens to be a principal (even an euclidian ) domain, so you can do arithmetic in $A$ just as in $Z$, provided you know what the irreducible elements (I prefer not to say "primes") in $A$ look like.

Recall that divisibility in a domain $A$ is defined only up to units (= invertible elements), which constitute a multiplicative group $A^*$, which is here {$\pm 1,\pm i$}. If $\pi$ is irreducible in $A$, then $\pi A \cap Z$ is of the form $pZ$ (why ?), so we need only to know how a rational prime $p$ decomposes in $A$ (up to units $u$). The ramification theorem mentioned above says that: (1) 2 is of the form $u.\pi^2$, so $A/2A$ is not a field, but a ring with nilpotent elements ; (2) an odd prime $p \neq 1$ mod $4$ remains irreducible, so $A/pA$ is the finite field with $p^2$ elements ; (3) an odd prime $p \equiv 1$ mod $4$ decomposes as $u.\pi\pi'$, where $\pi$ and $\pi'$ are two complex conjugate irreducible elements, and $A/pA$ is the direct product of the two fields $A/\pi A$ and $A/\pi'A$, hence is not a domain. Is this what you wanted to know ?

  • 0
    That's not really what I want. I'll tell you what is my problem which led me to ask this question. You can find [here](http://mathematica.stackexchange.com/questions/135575/how-to-solve-equations-in-gaussian-integers-modulo-p/135581#135581) a description of my problem. I need an efficient way to find roots of $i$ in that domain with large parameters. I thought that roots of $i$ are equivalent to 4-th roots of unity in $\mathbb{Z}_p$, but I need the root as a Gaussian integer not as a plain integer. So I thought maybe there is away to convert a 4-th root integer to a Gaussian integer.2017-01-22