claim such a square root of is given by . Firstly it follows from Euclid's Fundamental Theorem of Arithmetic that . Consequently, : that is, are their own inverses modulo and this property is unique to them. It then follows from the validity of Euclidean division in the integers, and the fact that is prime, that for every the gcd of and may be expressed via the Euclidean algorithm yielding a unique and distinct inverse of modulo . In particular therefore the product of all non-zero residues modulo is . Let : from what has just been observed, . But by definition, since each term in may be paired with its negative in , , which since is odd shows that , as required. Dedekind's two proofs using Gaussian integers Richard Dedekind gave at least two proofs of Fermat's theorem on sums of two squares, both using the arithmetical properties of the Gaussian integers, which are numbers of the form a + bi, where a and b are integers, and i is the square root of −1. One appears in section 27 of his exposition of ideals published in 1877; the second appeared in Supplement XI to Peter Gustav Lejeune Dirichlet's Vorlesungen über Zahlentheorie, and was published in 1894. 1. First proof. If is an odd prime number, then we have in the Gaussian integers. Consequently, writing a Gaussian integer ω = x + iy with x,y ∈ Z and applying the Frobenius automorphism in Z[i]/(p), one finds since the automorphism fixes the elements of Z/(p). In the current case, for some integer n, and so in the above expression for ωp, the exponent (p-1)/2 of -1 is even. Hence the right hand side equals ω, so in this case the Frobenius endomorphism of Z[i]/(p) is the identity. Kummer had already established that if } is the order of the Frobenius automorphism of Z[i]/(p), then the ideal in Z[i] would be a product of 2/f distinct prime ideals. (In fact, Kummer had established a much more general result for any extension of Z obtained by adjoining a primitive m-th root of unity, where m was any positive integer; this is the case of that result.) Therefore, the ideal (p) is the product of two different prime ideals in Z[i]. Since the Gaussian integers are a Euclidean domain for the norm function , every ideal is principal and generated by a