{'fraction_non_alphanumeric': 0.054136932909179494, 'fraction_numerical': 0.023041870862350614, 'mean_word_length': 3.470946248958934, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 69, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Rational angles in plane lattices

This paper is concerned with configurations of points in a plane lattice which determine angles that are rational multiples of {\pi}. We shall study how many such angles may appear in a given lattice and in which positions, allowing the lattice to vary arbitrarily. This classification turns out to be much less simple than could be expected, leading even to parametrizations involving rational points on certain algebraic curves of positive genus.


Introduction
The present paper will be concerned with lattices in R 2 and in fact with the angles ∠ABC determined by an ordered triple of distinct points A, B, C varying through the lattice. Our leading issue will involve angles which are rational multiples of π, which we will call rational angles for brevity. These angles of course appear in regular polygons, in tessellations of the plane and other similar issues, and it seems to us interesting to study in which lattices these angles appear and how.
Let us see a few historical precedents of similar problems. Considering the simplest lattice Z 2 , E. Lucas [Luc78] in 1878 answered in the negative the rather natural question of whether points A, B, C ∈ Z 2 can determine an equilateral triangle. In fact, it is not very difficult to show that no angle ∠ABC, with A, B, C ∈ Z 2 , can be equal to π/3. (This will follow as an extremely special case of our analysis, but we anticipate it in the Appendix to this Introduction with a short and simple argument.) In 1946, in a related direction, W. Scherrer [Sch46] considered all regular polygons with all vertices in a given arbitrary lattice, and proved that the polygons which may occur are precisely those with 3, 4 or 6 sides. (See again the Appendix for an account of Scherrer's nice proof with some comments.) More recently, another generalization was considered by J. S. Calcut in 2009 [Cal09], who classified all rational angles in the Gaussian lattice Z 2 , proving that they are exactly the integer multiples of π/4. (See once more the Appendix below, giving a proof simpler than Calcut's.) Analogous properties hold for the Eisenstein lattice generated by the vertices of an equilateral triangle in the plane: the rational angles which occur are precisely the integer multiples of π/6. These results prompt the question: what happens when we consider other plane 1 lattices?
Namely, for an arbitrary lattice Λ ⊂ R 2 , how can we describe all rational angles determined by three points in Λ? The most ambitious goal would be to obtain a complete classification, in some sense. In particular, we can list the following issues in this direction: 1. Which rational angles can occur in a given plane lattice Λ? Intuitively, we should not expect many such angles when the lattice is fixed.
2. In which positions can they occur? Namely, which triples of points A, B, C ∈ Λ can determine such a given angle? Note that it is clearly sufficient to consider the case when B is the origin, and we may replace A, C by any two points in the lattice on the lines OA, OC. So we shall consider an angle determined by the origin and two lines passing through the origin and another lattice point.
3. Adopting a reciprocal point of view, how can we classify plane lattices according to the 'structure' of all rational angles determined by their points?
We shall give below a more precise meaning to these questions; for instance, we shall study plane lattices according to how many rational angles (with vertex in the origin) may occur and in which geometric 'configurations'; for instance it is relevant which pairs of angles have a side in common.
It is clear that for any arbitrarily-prescribed angle we are able to find a plane lattice in which this angle appears as the angle determined by three points of the lattice. It is easily seen that even a second (rational) angle can be prescribed arbitrarily. On adding further conditions on the rationality of other angles, and their relative positions, the arithmetical information deduced from these conditions increases and imposes severe restrictions on the lattice, which can lead to a classification. Let us observe that the variables in our problem are (i) the lattices, (ii) the (rational) angles, and (iii) the lines (through lattice points) determining these angles. We shall see that for three or more rational angles in a lattice we have roughly the following possibilities: Either (A) the angles belongs to a certain finite set (which is listed), or (B) the lattice belong to one of finitely many families of lattices (and corresponding angles) which are completely classified.
When the angles lie in the mentioned finite set and are fixed, then Either A1: The lattice belongs to a certain well-described family (called CM in the paper); moreover, for a fixed lattice in this family the points determining the angles are parameterized by the rational points in a suitable rational surface (this will occupy Section 4.2); or A2: Both the lattice and the vertices are parametrized by the rational points on finitely many suitable algebraic curves; or A3: We have a finite set of lattices-vertices.
We shall analyse all of these situations, also looking at the maximal number of different configurations of rational angles which can exist in a lattice, in the sense of 2. above. We shall prove that indeed this number is finite apart from well-described families.
As it is natural to expect, this study involves algebraic relations among roots of unity, a topic which falls into a well-established theory. However, even with these tools at disposal, our problem turns out to be more delicate than can be expected at first sight, in that some surprising phenomena will appear on the way to a complete picture: for instance we shall see that some of the curves mentioned in the case A2 have positive genus, in fact we have examples of genus up to 5.
In this paper we shall give an 'almost' complete classification, in the above alluded sense; in particular, this shall be complete regarding the sets of angles which may appear. Concerning the classification of specific configurations of angles, we shall confine them to a certain explicit finite list. In the present paper we shall treat in full detail only a part of them, in particular when the rational angles considered share a side.
We also give a full discussion of a case in which configurations arise which correspond to rational points on a certain elliptic curve (of positive rank). (See § 9) We postpone to a second paper the discussion of the remaining few cases, which need not be treated differently, but are computationally rather complicated due to the combinatorics of the configurations. We note that in view of Faltings' theorem, there are only finitely many rational points on the curves of genus > 1 which appear; however no known method is available to calculate these points (only to estimate their number), so we shall not be able a priori to be fully explicit in these cases.
A concrete example. As an illustration of the kind of problems one is faced with, we show here an example of a curve of high genus which arises from the general treatment of lattices with three non-adjacent rational angles.
These equations define a variety in P 3 which consists of the four lines ab = cd = 0 and of an irreducible curve C of genus 5.
It is worth noting that the curve C contains some trivial rational points such as, for instance (1 : 1 : 1 : 1), but also nontrivial rational points such as (12 : 2 : −8 : −3), which corresponds to the lattice generated by 1 and τ = rθ, with In addition to the angle spanned by 1 and τ , there are two more rational angle to be found between lines through the origin passing through elements 0 1 Figure 1 of the lattice. The angle spanned by τ + 12 and τ + 2 has an amplitude of 3 10 π, and the one spanned by τ − 3 and τ − 8 has an amplitude of 1 10 π. Figure 1 illustrates these angles.
As will be clear soon, these problems are better analysed not in plane lattices but viewing the real plane R 2 as the complex field C and considering, in place of the lattices, the Q-vector subspaces of C generated by the lattices.
Organization of the paper. The paper will be organized roughly as follows.
-In § 2 we shall introduce in detail our issues, giving also some notation and terminology.
-Section § 3 will be subdivided in several parts. In the first two parts we shall find general equations corresponding to the configurations that we want to study (as described in the previous section).
The third part will be devoted to obtaining a linear relation in roots of unity, with rational coefficients, after elimination from the equations obtained formerly (depending on the configuration).
In the fourth part we will study more in depth the elimination carried out in the previous part, in order to prove some geometric results.
The fifth part will recall known results from the theory of linear relations in roots of unity, which shall be used to treat the mentioned equations.
-In § 4 we shall study spaces with special symmetries (for instance those which correspond to imaginary quadratic fields).
-In § 5 we shall prove a theorem which gives a finite list for the rational angles corresponding to certain configurations; for this we shall use among other things results of the geometry of numbers (not applied to the original lattice however, but to a certain region in dimension three). More precisely we show that, for any lattice outside a finite set of explicitly described families, if a rational angle a b 2π occurs, with a, b coprime integers, then b divides

5
-In § 6 we classify the finite number of continuous families of lattices which escape the previous theorem.
-In § 7 we study the configurations where there exist four non-proportional points P 1 , P 2 , P 3 , P 4 of the lattice such that every angle ∠P i OP j is rational. In this analysis we shall meet two rather surprising geometric shapes (which we shall call dodecagonal).
-Section § 8 shall be devoted to applications of the previous results to elementary euclidean geometry. For instance we shall classify (i) the triangles with all rational angles and such that the foot of one altitude divides the basis into commensurable parts, and (ii) the parallelograms with angles between sides and diagonals all rational.
-Section § 9 will contain the complete study of an elliptic curve such that its rational points correspond to lattices with three non adjacent rational angles. (The group of rational points will be found to be isomorphic to Z/(2) × Z.)

Appendix to the Introduction
In this short Appendix we give a couple of simple proofs related to the known results cited in the Introduction. These will be largely superseded by the rest of the paper, but due to their simplicity we have decided to offer independent short arguments for them.
1.1. Rational angles in the Gaussian lattice. By 'Gaussian lattice' we mean as usual the lattice Λ = Z + Zi ⊂ C. For our issue of angles, it is equivalent to consider the Q-vector space generated by the lattice, i.e. V = Q + Qi. This space has the special feature of being a field, i.e. the Gaussian field Q(i), which makes our problem quite simpler. In fact, let α = 2πa/b be a rational angle occurring in Λ or V , where a, b are coprime nonzero integers, and let ζ = exp(2πia/b). That α occurs as an angle in Λ means that there are nonzero points P, Q ∈ Λ ⊂ C such that Q = ζrP where r ∈ R * . Conjugating and dividing we obtain ζ 2 = x/x, where x = QP ∈ Q(i). So the root of unity ζ 2 lies in Q(i) and it is well known that Q(i) contains only the fourth roots of unity, so ζ has order dividing 8. A direct argument is to observe that ζ 2 is an algebraic integer so must be of the shape r + is with integers r, s, and being a root of unity this forces r 2 + s 2 = 1, so ζ 2 is a power of i and ζ 8 = 1, as required.
A similar argument holds for the Eisenstein lattice, which again generates over Q a field, namely the field generated by the roots of unity of order 6; hence ζ can be a 12-th root of unity.
These special lattices will be treated in greater generality in § 4.2.
1.2. On Sherrer's proof. As mentioned above, Sherrer proved that the only regular polygons with vertices in some lattice are the n-gons for n = 3, 4, 6. The idea of his proof is by descent: if P 1 , . . . , P n are the vertices of an n-gon in a given lattice Λ, then P i+i −P i are again the vertices of a regular ngon in Λ; however, if n > 6, the new sides are smaller whence iterating the procedure we obtain a contradiction (and similarly with a little variation for n = 5). In fact, this argument amounts to the following: we assume as before that the lattice is inside C and (after an affine map) that QΛ contains all the n-th roots of unity ζ m where ζ = exp(2πi/n). By appealing to the fact, already known to Gauss, that the degree [Q(ζ) : Q] is equal to φ(n), we may already conclude that φ(n) ≤ 2, i.e. n = 1, 2, 3, 4, 6. But we may also avoid using such result, on observing that for n > 6, the ring Z[ζ] contains nonzero elements of arbitrarily small complex absolute value, so Z[ζ] cannot be contained in a lattice, which is discrete. To justify the assertion, consider the elements (ζ − 1) m : if n > 6 they are have absolute value which is decreasing to 0 since 0 < |ζ − 1| < 1. For n = 5 we may instead consider 1 + ζ 2 in place of ζ − 1.

Aknowledgements
We thank Yves André, Julian Demeio and Davide Lombardo for useful comments and discussions.

Terminology and notation
We identify the euclidean plane with C. We call a rational angle in C an ordered couple of distinct lines through the origin such that the measure of the euclidean angle between them is a rational multiple of π. We say that two points v 1 , v 2 ∈ C \ {0} such that v 2 /v 1 ∈ R determine (or form) a rational angle if the lines (Rv 1 , Rv 2 ) do (i.e. if the argument v 2 /v 1 is a rational multiple of π); with a slight abuse of notation we write the angle (Rv 1 , Rv 2 ) as (v 1 , v 2 ).
Let Λ ⊆ C be a lattice. Given a rational angle determined by elements of Λ, many more pairs in Λ 2 can be trivially found (by multiplication by integers) that determine the same angle. Therefore we prefer to tensor the whole lattice by Q and study angles in the tensored space. With this point of view, we can say that when we draw rational angles in Λ we extend the sides indefinitely and we are not concerned with which points of Λ actually meet the sides.
In this setting, the objects that we will study are 2-dimensional Q-vector spaces V ⊂ C that contain two R-linearly independent vectors. These are precisely the sets obtained after tensoring a plane lattice by Q. From now on, unless otherwise stated, we will refer to these sets simply as spaces.
Any angle-preserving transformation of C that sends the origin to itself will clearly establish a bijection between the rational angles of a space V and the rational angles of its image.
These transformations are generated by complex homotheties of the form z → λz for a fixed λ ∈ C * and by the complex conjugation. For this reason we will say that two spaces V 1 , V 2 are homothetic (and we write V 1 ∼ h V 2 ) if they are sent one to the other by a homothety, and we will say that they are equivalent (and we write V 1 ∼ V 2 ) if V 1 is homothetic to V 2 or to its complex conjugate V 2 .
Remark 2.1. Clearly every space is homothetic to a space containing 1. Given two spaces V 1 = 1, τ 1 Q and V 2 = 1, τ 2 Q , it is easy to see that V 1 ∼ h V 2 if and only if τ 2 = aτ 1 +b cτ 1 +d , where a b c d ∈ PGL 2 (Q), in which case the homothetic coefficient λ is given by 1/(cτ 1 + d).
The same condition can also be expressed by saying that V 1 ∼ h V 2 if and only if there is a Q-linear dependence between 1, τ 1 , τ 2 , τ 1 τ 2 ; in fact, from τ 2 = aτ 1 +b cτ 1 +d a linear relation is immediately obtained, and vice versa, from such a linear relation we obtain a matrix which must be invertible because τ 2 ∈ Q.
In conclusion, we can always assume up to homothety that V = 1, τ Q with Im(τ ) > 0. Up to equivalence, we can additionally assume that Re(τ ) ≥ 0.
For ease of notation, we will often write V (τ ) := 1, τ 1 Q . In every space V , given a rational angle (v 1 , v 2 ), we can obtain other rational angles by swapping them. We call the angles thus obtained equivalent to and we are not concerned with them.
Given two adjacent rational angles (v 1 , v 2 ) and (v 2 , v 3 ), we see immediately that (v 1 , v 3 ) is also a rational angle. For this reason it is more convenient to consider sets of adjacent angles as a single geometrical configuration, rather than as independent angles; this point of view is also supported by the shape of the equations that describe these cases. Therefore we call a rational ntuple a set of n vectors {v 1 , . . . , v n } such (v i , v j ) is a rational angle for all i = j.
According to this definition, a rational n-tuple can be identified with an nelement subset of P(V ) ⊆ P(C); this point of view however is not particularly useful when writing up the equations that describe the configuration.
Remark 2.2. If a rational n-tuple and a rational m-tuple are not disjoint, then their union is still a rational k-tuple for some k ≥ n, m.
From the shape of equations (3.5) and (3.11) below, which describe rational n-tuples, it is clear that angles which belong to a rational n-tuple containing 1 are qualitatively different from angles which do not belong to such an ntuple. In fact, an angle in a rational n-tuple containing 1 leads to an equation of degree 1 in τ , while angles in rational n-tuples not containing 1 lead to equations of degree 2 in τ .
In light of these considerations, we will say that a space V is of type n if it contains a rational n-tuple; we extend this notation "additively", by saying that V is of type n + m if it contains a rational n-tuple and a disjoint rational m-tuple, and so on. There is an obvious partial order on the possible types, and we say that V has an exact type a 1 n 1 + · · ·+a k n k , if this type is maximal for V . We will characterize in Section 4.2 the spaces for which such a maximal type exists.
We will denote by U the set of all roots of unity.
That is to say, there exists a root of unity µ ∈ U \ {±1} such that the ratio b 0 τ +b 1 a 0 τ +a 1 µ is real. Setting this ratio equal to its conjugate leads to the equation This shows that µ 2 ∈ Q(τ, τ ). Equation (3.1) is bi-homogeneous of degree 1 in both a 0 , a 1 and b 0 , b 1 , so it defines a curve C ⊆ P 1 × P 1 . Setting we can rearrange equation (3.1) as The curve C has genus 0 and it is irreducible. In fact, it has bidegree (1, 1) and, if it were not irreducible, it would have two components of bidegrees (0, 1) and (1, 0). But this cannot be true, because the function a 0 τ +a 1 a 0 τ +a 1 is not a constant function over P 1 (as τ ∈ R), and analogously for b 0 τ +b 1 b 0 τ +b 1 . There is a bijection between C(Q) and the set of rational angles (v 1 , v 2 ) in V with arg(v 2 /v 1 ) = µ. However, C is in general not defined over Q, but only over the field Q(τ, τ ) ∩ R. This fact plays a role in the characterization of spaces with infinitely many rational angles.
In particular we have that (rθ 0 + a j )/θ j ∈ R for j = 1, . . . , n − 2. Equating these numbers and their conjugates, we can write which we can solve for θ j , r or τ obtaining where we have set x j = θ 2 j for j = 0, . . . , n − 2.
3.4. Equations for the three main cases. We begin by observing that, if V is a space of type 2 , it is homothetic to 1, θr with θ ∈ U \ {±1}.
If a space V has two nonequivalent rational angles, we have seen in Sections 3.2 and 3.3 that we can derive equations for τ with coefficients in cyclotomic fields, therefore τ ∈ Q.
If we have two independent such equations, we can eliminate τ and obtain one equation in roots of unity with rational coefficients. We shall then apply the results of Section 3.5 with the aim of bounding the degree of the roots of unity intervening in the equation, outside of certain families which admit a parametrization.
When eliminating τ we could have two equations of shape (3.5) (which amounts to having a rational 4-tuple), or one of shape (3.5) and one of shape (3.11) (which amounts to one rational triple and one more angle not adjacent to it) or two equations of shape (3.11), for which we need three rational angles pairwise non-adjacent. These are the cases that we denote as type 4 , type 3 + 2 and type 2 + 2 + 2 and they will constitute the main equations, whose solutions we shall seek by means of Theorem 3.2. For ease of notation, we change variables here with respect to those considered in Sections 3.2 and 3.3.

Case 4
In this case we have two equations of the shape (3.5). Eliminating τ gives where a 0 , a 1 are distinct rational numbers different from 0 and x 0 , x 1 , x 2 are distinct roots of unity different from one. Now we set x 0 = x, x 1 = y, x 2 = z and a 1 = a, a 2 = b and obtain Case 3 + 2 In this case we have one equation of the shape (3.5) and one of the shape (3.11). Eliminating τ gives is equal to a 1 or 0 the configuration reduces to that of the case 4 , so we may also assume that a 1 , b 0 , b 1 are all distinct and nonzero. The roots of unity x 0 , x 1 , y 1 are different from one, and x 0 = x 1 .
By setting x 0 = x, x 1 = y, y 1 = z and a 1 = a, b 0 = b, b 1 = c we write Case 2 + 2 + 2 In this case we have two equations of the shape (3.11). Eliminating τ gives an expression in the four rational parameters b 0 , b 1 , c 0 , c 1 and the three roots of unity c 0 , c 1 } contains fewer than five distinct elements, we are in a case treated previously, so we may also assume that the b 0 , b 1 , c 0 , c 1 are all distinct and nonzero.
By setting x 0 = x, y 0 = y, z 0 = z and b 0 = a, b 1 = b, c 0 = c, c 1 = d we obtain an unwieldy polynomial equation Monomials Coefficients x 2 y, yz 2 c(a 2 b + ab 2 − 2abc − 2abd + acd + bcd) Remark 3.1. Notice that, while the shape of the equation (3.15) is not perfectly symmetric in the three angles, by applying an homothety we can always easily permute the three angles. This amounts to saying that the equation is stable by the substitution which sends the triples (1, We observe that the non-degeneracy conditions coming from the geometry of the problem ensure that the equations (3.13),(3.14),(3.15) do not identically vanish.
In cases 4 and 3 + 2 , given a solution of equations (3.13) and(3.14) one can easily obtain the corresponding value of τ and geometric configuration from equation (3.5): we have It is easy to check directly that, under the required conditions, this value of τ is never real. In case 2 + 2 + 2 we have two equations of degree two for τ , and it is not always possible to go back from a solution of (3.15) to a geometrical configuration.
Given a solution of (3.15), if the quantity ab − cd is different from 0, then the two quadratic equations for τ are independent, and it is possible to solve for τ obtaining If instead the equality ab = cd holds, either τ = 0 is the only common solution, or the two equations are proportional, and in this case two values of τ are found. We can study fully the cases in which this happens.
Setting d = ab/c and eliminating it, we see that the two equations are proportional if the following unit equation is satisfied This is a rational combination of four cosines of rational multiples of π, and all such combinations have been classified in [CJ76], Theorem 7.
3.5. Equations in roots of unity. The study of linear relations among roots of unity goes back to long ago. For instance in 1877 Gordan [Gor77] studied the equation cos x + cos y + cos z = −1 with x, y, z rational angles, with the purpose of classifying the finite subgroups of PGL 2 . The matter was considered by several other authors, also studying polygons with rational angles and rational side-lengths. Among these authors we point out Mann [Man65] and Conway and Jones [CJ76]. These last authors described these issues, important for the present paper, as "trigonometric diophantine equations". We do not pause further on other references, but we remark that this problem is linked to the conjectures of Lang on torsion points on subvarieties of tori. For simplicity we state a theorem of [CJ76], which we will apply to the equations in roots of unity that we have obtained before.
Theorem 3.2 (Conway-Jones). Let k−1 j=0 a j ξ j = 0 be a linear relation with rational coefficients a j between roots of unity ξ j , normalized with ξ 0 = 1. Then either there is a vanishing subsum, or the common order Q of the ξ j is a squarefree number satisfying A generalization of this theorem, with a different proof, was given in [DZ00], and a version which takes into account reductions modulo prime numbers in [DZ02].

Spaces with special symmetries
We study now some special classes of spaces which are stable under some angle-preserving transformation. They are relevant to our program because the presence of such symmetries can lead to a richer set of rational angles.
4.1. Spaces with V = V . The following lemma characterizes, up to homothety, the spaces which are fixed by the complex conjugation.
Lemma 4.1. Let V be a space. The following conditions are equivalent: is purely imaginary and non-zero.
, and M 2 = Id. The eigenvalues of M can only be ±1. If they were equal, then M would either be of infinite order, or be equal to ±Id, but this is impossible because otherwise v 1 , v 2 would be both real or both purely imaginary.
Therefore M has distinct eigenvalues 1 and −1, and it can be diagonalized over Q, that is to say that It seems natural to compare the three properties (i), (ii), (iii) with the condition V ∼ h V . It is obvious that (iii) implies this condition. However the converse implication does not hold: see Section 4.3, especially Lemma 4.4, for this. 4.2. CM spaces. We say that a space V has Complex Multiplication if there is a λ ∈ C \ Q such that the multiplication by λ sends V to itself. It is easy to see that this happens if and only if V ∼ h Q(τ ) with τ imaginary quadratic, and in this case the homothetic coefficient λ can be taken as any This shows that if the space is stabilized by a nontrivial homothety there are infinitely many other nontrivial homotheties which stabilize it, and the image of any rational angle under any such homothety is again a rational angle.
The following theorem summarizes the situation and fully describes the set of rational angles in a CM space, up to equivalence of angles and the action of the space on itself by multiplication.
Proof. In proving part (i) we can assume up to homothety (which preserves both conditions) that V = 1, τ Q with τ ∈ C \ R. As seen is section 1, c d ∈ PGL 2 (Q) if and only if the homothety with coefficient 1/(cτ 1 + d) sends V to itself. If τ is quadratic irrational then the coefficients of its minimal polynomial provide the suitable a, b, c, d. Vice versa, if such a matrix exists we get immediately a quadratic polynomial satisfied by τ .
Let us now prove part (ii). Let (v 0 , v 1 ) be a rational angle. By considering the angle (1, v 1 /v 0 ) we can reduce to the case v 0 = 1. Then either v 1 is a rational multiple of √ −d, which is what we need to prove, or {1, √ −d, v 1 } form a rational triple. Now we use the notation of Section 3.2. By equation (3.3) we see that x 1 is a root of unity in Q( √ −d), and therefore it must be −1. This means that v 1 lies on the imaginary axis, so it must indeed be a rational multiple of √ −d. The proof of parts (iii) and (iv) is analogous. As before, x 1 must be a fourth (resp. sixth) root of unity, therefore v 1 lies on one of the lines whose angle with the real axis is an integral multiple of π/4 (resp π/6). The points i, i + 1, i − 1 (resp √ −3, ζ, ζ − 1, ζ + 1, ζ + 2) lie on these lines, and any other such point must be a rational multiple of one of them.
We remark that if V is obtained as Λ ⊗ Q for a lattice Λ = 1, τ Z , the condition that V is a CM space in our sense is equivalent to saying that the elliptic curve C/Λ has Complex Multiplication.
We have seen that CM spaces contain infinitely many rational angles. In fact they are the only spaces with this property. Theorem 4.3. Let V be a non-CM space. Then V has only finitely many rational angles.
Proof. Up to homothety, we can assume that V = 1, τ Q for some τ ∈ C\R. We can also assume that τ is an algebraic number, otherwise, as remarked at the beginning of Section 3.4, the space V contains, up to equivalence, only one rational angle. The number field Q(τ, τ ) contains finitely many roots of unity; therefore it is enough to show that for every fixed root of unity µ = ±1 such that µ 2 ∈ Q(τ, τ ), the curve C ⊆ P 1 × P 1 defined by equation (3.2) has only finitely many rational points.
With the notation of Section 3.1, if the three coefficients A, B, C are not all rationals, then there exists a Galois automorphism σ such that σ(C) = C. In this case, the set C(Q) ⊆ C ∩ σ(C) is contained in the intersection of two distinct irreducible curves of bidegree (1, 1) in P 1 × P 1 and therefore it contains at most two elements.
In the case that A, B, C ∈ Q, the space V is CM. In fact A = τ τ and B + C = τ + τ , and this implies that [Q(τ ) : Q] = 2; by Theorem 4.2 (i), this is equivalent to V being CM.
We remark that the arguments of this proof allow one to bound the number of rational angles in 1, τ Q in terms of |U ∩ Q(τ, τ )|. We will see in Section 5 how this bound can be made independent of τ .
We notice also that equation (3.15), in the case of a CM space not ho- More in general, any reflection preserves angles so we can look at spaces which are stable by any reflection (not just the complex conjugation).
Lemma 4.4. Let V be a space. The following conditions are equivalent: We will see later in Section 7.4 some relevant nontrivial examples of spaces with this property.
We remark that if V is obtained as Λ ⊗ Q for a lattice Λ = 1, τ Z , the condition that V ∼ h V is equivalent to saying that the elliptic curve C/Λ has a real j-invariant (this property is stable for complex homotheties, and in particular depends only on the space V ).
Example 4.5. Consider a space V = 1, τ Q , with a transcendental τ such that |τ | 2 = 2. We will show that V , which obviously satisfies the conditions of Lemma 4.4, does not satisfy the conditions of Lemma 4.1.
Suppose that V is homothetic to a space 1, ω Q with |ω| = 1 (as in condition (i) of Lemma 4.1).
But this yields (a ± b) 2 = 2(c ± d) 2 , and since 2 is not a square we find that a = b = c = d = 0, which is impossible.

Finiteness of angles in lattices outside special families
Let us consider the equations obtained in the previous section. They are of the form (5.1) e∈I C e x e 1 y e 2 z e 3 = 0, where e = (e 1 , e 2 , e 3 ) ∈ I = {−1, 0, 1} 3 and the C e are homogeneous polynomials of degree 4 (in the most general case 2 + 2 + 2 ) in the four variables b 0 , b 1 , c 0 , c 1 , and we seek solutions x, y, z ∈ U \ {1} and b 0 , b 1 , c 0 , c 1 distinct nonzero integers (the cases 4 and 3 + 2 are of the same form, only involving fewer terms, fewer variables, and with coefficients C i of smaller degree).
Let us fix a solution x, y, z, b 0 , b 1 , c 0 , c 1 and let N be the minimal common order of the roots of unity x, y, z. We will argue now about the factorization of N , showing that either N is bounded by an absolute constant, or the solution belongs to a parametric family of solutions corresponding to a translate of an algebraic subgroup of G 3 m contained inside the variety defined by equation (5.1). 5.1. Odd primes appearing with exponent 1. Let p be an odd prime dividing N exactly. Let ζ be a primitive p-th root of unity, and let us write x = ζ v 1 ζ 1 , y = ζ v 2 ζ 2 , z = ζ v 3 ζ 3 , with ζ 1 , ζ 2 , ζ 3 roots of unity of order coprime with p. If we denote by (v, e) the scalar product of v = (v 1 , v 2 , v 3 ) and e = (e 1 , e 2 , e 3 ) as vectors of R 3 , we can write the monomial x e 1 y e 2 z e 3 as ζ (e,v) ξ e with ξ e a root of unity of order prime with p, and the equation can be rewritten as It follows that the quantities C e ξ e for i = 0, . . . , p − 1 must all be equal because the fields generated by ζ and by the ξ e 's are linearly disjoint. Equation (5.1) has only 27 terms. This implies that, for all primes bigger than 27, the coefficients γ i are all equal to zero. We consider only this case.
Not all entries of v are multiples of p, otherwise N would not be the exact order of x, y, z. Therefore the lattice Γ = vZ + pZ 3 ⊆ Z 3 is a lattice of volume Vol(Γ) = p 2 .
By classical results in the geometry of numbers, namely the exact value of Hermite's constant 2 in dimension three, we obtain that there exists a w ∈ Γ \ {0} of norm bounded as |w| ≤ √ 2p 2 1/3 . Let us write 0 = w = kv + pv ′ . Let e ′ , e ′′ be two vectors intervening in the same γ i . Then we have that So either (w, e ′ − e ′′ ) = 0 or |(w, e ′ − e ′′ )| ≥ p, and then Notice that either |e ′ − e ′′ | ≤ 3, or e ′ − e ′′ = (±2, ±2, ±2), in which case we can divide by 2 and replace |e ′ − e ′′ | with |e ′ −e ′′ | 2 = √ 3. In both cases we obtain Then if p ≥ 39 we have that (w, e ′ ) = (w, e ′′ ) for every e ′ , e ′′ intervening in the same γ i . Let us now consider a new triple (xt w 1 , yt w 2 , zt w 3 ), where t is an unknown. If we substitute in (5.1) and collect the powers of ζ as in (5.2) we obtain and we can collect the powers of t for some exponents f i . But the γ i 's are all zero, and so (xt w 1 , yt w 2 , zt w 3 ) is a solution identically in t.

5.2.
Primes appearing with exponent at least 2. Let us fix a solution x, y, z, b 0 , b 1 , c 0 , c 1 , let N be the minimal common order of the roots of unity x, y, z and let p m be a prime power dividing N exactly. Let ζ be a primitive p m -th root of unity, and let us write x = ζ v 1 ζ 1 , y = ζ v 2 ζ 2 , z = ζ v 3 ζ 3 , with ζ 1 , ζ 2 , ζ 3 roots of unity of order coprime with p. As before, we can write the monomial x e 1 y e 2 z e 3 as ζ (e,v) ξ e with ξ e a root of unity of order prime with p, and the equation can be rewritten as 2 This result goes back to Gauss through the theory of arithmetical reduction of ternary quadratic forms; see [Cas71] for a thorough treatment. We thank Davide Lombardo for suggesting the use of the exact value of Hermite's constant in place of Minkowski's theorem: this leads to a considerable numerical improvement.
The exponents (v, e) − i in the sums on the right are all multiples of p m−1 , so those powers of ζ are p-th roots of unity, but the degree of ζ over the field generated by the ξ e and the p-th roots of unity is exactly p m−1 , which implies that If in any of the sums (5.4) two different e ′ , e ′′ appear, we have that If p is odd we can argue again that the only case in which e ′ − e ′′ has norm greater than 3 is when it is equal to (±2, ±2, ±2), in which case it can be replaced by its half, and we obtain If p = 2 we can only use that |e ′ − e ′′ | ≤ 2 √ 3, which gives Therefore if p m−1 ≥ 39 (or m > 6 for p = 2) we have that (w, e ′ ) = (w, e ′′ ) for every e ′ , e ′′ intervening in the sums (5.4). Let us now consider a new triple (xt w 1 , yt w 2 , zt w 3 ), where t is an unknown. If we substitute in (5.3) we obtain and we can collect the powers of t for some exponents f i . But we argued before that the γ i 's are all zero, and so (xt w 1 , yt w 2 , zt w 3 ) is a solution identically in t.
We have thus shown that every solution of (5.1) either belongs to a parametric family given by (xt w 1 , yt w 2 , zt w 3 ), which represents the units in a translate of an algebraic subgroup of G m , or the common order N is a divisor of Combined with the proof of Theorem 4.3 this implies that, outside the parametric families just mentioned, which will be described in the next section, the number of rational angles in non-CM spaces is at most 2N 0 .

Parametric families of solutions
In this section we study which translates of algebraic subgroups of G 3 m are contained in the variety defined by (5.1). These are the parametric families of solutions which escape the analysis carried out in the previous section.
Suppose then that we have such a solution. This amounts to setting (x(t), y(t), z(t)) = (x ′ · t m , y ′ · t p , z ′ · t q ), where x ′ , y ′ , z ′ ∈ U , t is a parameter, x, y, z are not all constant in t, so we may assume m, p, q not all zero and coprime.
6.1. Case 2+2+2. Let us assume for now that we are in the most general case 2 + 2 + 2 , that is to say that a, b, c, d ∈ Q are all distinct and nonzero and x, y, z = 1; in this case we may assume m, p, q ≥ 0 by replacing t with t −1 and possibly exchanging the role of a, b or c, d.
6.1.1. If m, p, q are all positive. In this case the term in xyz is the one of highest degree (as polynomial in t) among those appearing in 3.16, so if (5.1) is satisfied identically in t its coefficient must be equal to 0. However this coefficient is −b(a − c)(b − d)d, which is not zero. 6.1.2. If m = 0 and p, q are positive and distinct. In this case the terms y 2 z 2 , xy 2 z 2 , x 2 y 2 z 2 are those of highest degree. The leading term in t is equal to (a − c)(b − d)(−c + bx ′ )(a − dx ′ ), which tells us that, for the equation to be satisfied identically in t, we must have x(t) = x ′ = −1 and either b = −c or a = −d. If this holds, the term of highest degree is either the one in y 2 z or the one in yz 2 , but setting either coefficient equal to zero implies that both b = −c and a = −d hold. Under this further assumption, the whole polynomial reduces to 4ab(a − b) 2 (y − z) 2 , which can't be identically 0 in t if p and q are distinct. 6.1.3. If m = 0 and p = q = 1. Arguing as before we see that, for the term of degree 4 to be zero, we must have x = −1 and one of b = −c or a = −d. The part of degree 3 is now given by the two terms in y and z together; the coefficient to be set equal to 0 is given by If b = −c, then the term in degree three vanishes, and looking at the terms of lower degree we reach what is indeed a parametric solution of (5.1): If b = −c, then we have Setting y ′ = z ′ implies b = −c, which was discussed above, while y ′ = −z ′ implies a 2 = −bc, which in turn reduces the full equation to −16ac(a − b) 2 y ′2 = 0, which is not the case.
6.1.4. If m = 1 and p = q = 0. In this case, looking at the coefficient of the term in t 2 gives where the second factor is equivalent to the first after exchanging every one of a, b, c, d with the reciprocals of b, a, d, c respectively. The unit equation doesn't have any one-term subsum equal to zero. Two-term subsums equal to zero are easily excluded, except possibly if hold. The second equation implies that y ′ = ±z ′ and then in turn the first one gives y ′2 = ±1 (the two signs being chosen independently). Of these 4 alternatives, three lead immediately to a contradiction, and we are left with the conditions y ′ = z ′ , y ′2 = 1, which implies a + b = c + d and y = z = −1. But under these conditions the full equation reduces to 16(a − c) 2 (b − c) 2 x, which cannot be equal to zero. We are left then with solutions of a 4-term equation in units without subsums equal to zero. Therefore y ′ , z ′ must be sixth roots of unity, and by direct inspection one finds three solutions (up to Galois action and exchanging the role of y ′ , z ′ ). Each of these solutions, when plugged back into (5.1), gives a non-vanishing term in degree 1.
Since we are assuming to be in the most general case 2 + 2 + 2 , we can freely permute the angles x(t), y(t), z(t) by changing the base of our lattice and obtaining a new equation of the shape (5.1) which is also identically satisfied. Then it is easy to see that we can always reduce up to homothety to one of the four cases discussed above.

Case 3+2. The equation is preserved by the transformations
This allows us to assume m, p, q ≥ 0 and m ≥ p.
6.2.1. If m, p, q > 0 and m > p. In this case the term of highest degree is x 2 yz, whose coefficient is ac, which is different from zero. 6.2.2. If m, p, q > 0 and m = p. In this case the terms of highest degree are x 2 yz and xy 2 z, and setting the coefficient equal to zero leads to acx ′ + a(a − c)y ′ = 0.
This implies x ′ = ±y ′ , but a = 0 so we must have x = −y and a = 2c. With this substitution, equation (5.1) becomes (after cancelling a factor 4cx) Let us assume first that m = q. In this case we see that the term of highest degree is either x 2 (if m > q) or xz (if m < q). Their coefficients are b − c and c respectively, so in either case they are not zero.
If instead m = q the coefficient to be set equal to zero is (b − c)x ′ + cz ′ . This implies b− c = ±c, which is impossible because in one case we get b = 0 and in the other b = 2c = a.

6.2.3.
If m > p > 0 and q = 0. In this case the terms of highest degree are x 2 yz and x 2 y, so we get acz ′ − ab = 0, therefore z = −1 and b = −c. Substituting back into (5.1) gives and their coefficients are −b 2 and a 2 respectively, which are nonvanishing. If instead m = 2p the coefficient to be set equal to zero is −b 2 x ′ + a 2 y ′2 = 0. This implies a 2 = ±b 2 , which gives a = ±b (because a, b ∈ Q), so a = −b = c, which is a contradiction. 6.2.4. If m = p = 1 and q = 0. The terms of highest degree in t are x 2 yz, x 2 y, y 2 xz, y 2 x. Setting the coefficient equal to zero gives This is a four-term unit equation. After normalising the equation dividing by x ′ , we need to study the vanishing sub-sums. The only non-trivial case is given by c = a−b and y = xz, which gives a vanishing subsum. Substituting back into (5.1) gives a nonvanishing coefficient either in degree 2 or in degree 1.
A simple computer check finds nine nontrivial solutions among the sixth roots of unity, but none of them leads to solutions identically in t. Let us assume first that m = q. In this case we see that the term of highest degree is either x 2 (if m > q) or xz (if m < q). Their coefficients are 2a − c and c respectively, so in either case they are not zero, because 2a = b. If instead m = q the coefficient to be set equal to zero is (2a − c)x ′ + cz ′ . This implies 2a − c = ±c, which is impossible because in one case we get a = 0 and in the other a = c.
6.2.6. If m = p = 0 and q = 1. In this case the coefficient of the term of degree one in t factors as It is enough to set the first factor equal to zero, as the second one is completely analogous (as seen by the transformation x → 1/x, y → 1/y, b ↔ c). This leads to a three-term unit equation. It is readily seen that there are no vanishing subsums, and a simple computer check finds no nondegenerate solution.
6.2.7. If m = 1 and p = q = 0. In this case the terms of highest degree are x 2 , yx 2 , zx 2 , yzx 2 , so we get the unit equation We need to study the vanishing sub-sums. The only non-trivial case is given by c = ab/(b − a) and y = z = −1, which indeed gives a vanishing subsum. Substituting back into (5.1) gives a nonvanishing coefficient either in degree 1. A simple computer check finds nine nontrivial solutions among the sixth roots of unity, but none of them leads to solutions identically in t.
6.3. Case 4. If we are in the case 4 we notice that the symmetries of the equation allow us to permute freely the angles x, y, z. Furthermore, up to homotheties, we can assume that the three exponents m, p, q are nonnegative, thanks to the substitution x → x −1 , y → yx −1 , z → zx −1 , a → 1/a, b → 1/b. 6.3.1. m = p = 0, q = 1. In this case, setting the coefficients of the terms of degree zero and one equal to zero we obtain the system of equations If we add them and divide by −a we get which is a contradiction.
6.3.2. If 0 ≤ m < p ≤ q. In this case, the term with the highest degree is yz, whose coefficient is a − b, which does not vanish.
6.3.3. If 0 < m = p < q. In this case the terms of highest degree are xz and yz, and setting the coefficient equal to 0 leads to gives a parametric solution of (5.1).
6.3.4. m = p = q = 1. Setting the coefficients of the terms in t and t 2 equal to zero leads to multiplying the first equation by y ′ and adding them leads to which would imply either y = x or y = z; this is a contradiction.
We can now understand them better. The family (6.1) is of type 2 + 2 + 2 whenever the parameter t is a root of unity. Its feature is the presence of a right angle; in fact the spaces of this family all belong to the self-conjugated spaces studied in Section 4.1. Up to homothety they form a family parametrized by a rational number a = 0, ±1 and a root of unity y = 1, with τ a purely imaginary root of If a = 0 or a = −1, the type of the resulting space becomes 4 , and we find the second parametric family (6.2), which will be studied in full detail in the next section, as part of the complete description of all spaces of type 4 . Up to homothety, for a root of unity y = 1, τ is given by Theorem 6.1. Every non-CM space has at most 2N 0 + 4 different rational angles.
Proof. Let us consider a space and assume that it has three nonequivalent rational angles with arguments three roots of unity x 1 , x 2 , x 3 of order greater than N 0 . Therefore, by the content of Section 5, this space is homothetic to one of the families described above. However this is impossible, because it would imply that one of x 1 , x 2 , x 3 is equal to −1. This shows that, in total, in a fixed space only N 0 + 2 different roots of unity can occur as arguments of a rational angle. It was already remarked in the proof of Theorem 4.3 that, for a fixed root of unity µ and a fixed non-CM space, there are at most two nonequivalent rational angles of that argument, and this completes the proof.
7. Spaces with a rational 4-tuple 7.1. Rectangular and superrectangular spaces. We saw before that the spaces which are invariant under complex conjugation can be characterized up to homothety as those generated by a τ of norm 1. Among those spaces, the subfamily of those for which τ is a root of unity are especially relevant with respect to the rational angles.
Lemma 7.1. Let V be a space. The following conditions are equivalent: (i) V is homothetic to 1, τ Q with τ ∈ U (ii) V contains a rational triple with two perpendicular vectors (iii) V contains a rational 4-tuple with two perpendicular vectors.
Proof. The equivalence between (i) and (ii) is proved as in Lemma 4.1, and (iii)⇒(ii) is trivial, so only (ii)⇒(iii) needs to be shown: After applying an homothety and multiplying the vectors in the triple by suitable rational numbers we can assume that the rational triple is 1, τ, τ + 1 for some purely imaginary number τ . We see immediately that the stability of V under complex conjugation allows us to add the vector τ −1 = −(τ + 1) to the triple and obtain a rational quadruple.
We define a space as rectangular if it contains a rational angle of π/2, and superrectangular if it satisfies the conditions of Lemma 7.1.
By definition every superrectangular space satisfies the hypotheses of Lemma 4.1, whose points (i) and (ii) provide two different parametrizations of superrectangular spaces.

Additional angles in superrectangular spaces.
Let us now check which superrectangular spaces have additional rational angles that are not part of a rational n-tuple containing 1.
Using the same notation for the space V , we seek a rational angle (τ + b 0 , τ + b 1 ). Then equation (3.11) gives us We are again in the position of using Theorem 3.2. To cut the number of cases to check, we see that the equation doesn't change if we swap b 0 and b 1 and invert θ. We also see that if y 1 = −1 then θ has degree 2 and we get one of the two CM superrectangular spaces Q(i) and Q( √ −3), which were already discussed.
A computer search doesn't find any solution with common order a divisor of 30 but not of 6 (if the common order is a divisor of 6 we are again in the case of Q( √ −3)). We are left with examining all possible subsums. The only coefficient that might vanish is 1 + b 0 b 1 , but its vanishing implies Of the fifteen two-term subsums, seven directly imply that θ 0 or y 1 are equal to ±1; two imply that θ 0 ∈ Q(i); the remaining six lead to θ 0 ∈ Q( √ −3). Of the ten pairs of vanishing 3-term subsums, nine directly imply that θ 0 ∈ Q( √ −3) and the last one that θ 0 ∈ Q(i). Therefore we can sum up these computations in the following statement: Theorem 7.2. A superrectangular space not homothetic to Q(i) or Q( √ −3) has exact type 4 , i.e. it has only one rational 4-uple up to equivalence and no other rational angle.
7.2. The general case "4". We have seen that every superrectangular spaces is of type 4 . Let us now show that, with only finitely many exceptions, every space of type 4 is a superrectangular space.
Let V be a space with a rational 4-tuple given by (1, τ, τ + a 1 , τ + a 2 ). By the computations in Section 3.2 we have eliminating τ we have with x 0 , x 1 , x 2 = 1 distinct roots of unity and a 1 , a 2 = 0 distinct rational numbers. In order to show that the space is superrectangular, it is enough to show that one of the x j or a ratio x j /x k is equal to −1.
We can rewrite this equation as We can now apply Theorem 3.2 and conclude that either there is a vanishing subsum, or the common order of x 0 , x 1 , x 2 is a divisor of 30.
A computer search shows that there are no solutions with common order a divisor of 30 which do not belong to the family of superrectangular spaces. Therefore we are left with searching solutions with vanishing subsums. 7.3. Vanishing subsums in (7.1). If there is a vanishing subsum in (7.1), then there is a vanishing subsum of minimal length at most three. 7.3.1. One-term subsums. If a vanishing subsum involves only one term, then the coefficient of the term must be 0, which is forbidden because a 1 , a 2 are nonzero and distinct. 7.3.2. Three-term subsums. There are 20 three-term subsums, which get paired in 10 systems of two three-term linear equations. By direct examination, applying again Theorem 3.2, one sees that any solution in roots of unity leads to a variable or ratio of two variables being equal to ±1, or to solutions where x, y, z have common order a divisor of 6, which have been already discarded. 7.3.3. Two-term subsums. There are 15 two-term subsums. By direct inspection one checks that, after setting them equal to zero, 12 of them immediately imply that one variable or a ratio of two variables is equal to ±1. The remaining three, which are those obtained by pairing terms with the same coefficient, correspond the relations Each of these relations reduces (7.1) to a four-term equation. Precisely x 2 x 0 = 0.
We can apply Theorem 3.2 again, to find that solutions with vanishing subsums lead again to variables or ratios of variables being equal to ±1, while the solutions without vanishing subsums are found with x 2 0 , x 2 1 , x 2 2 of common order a divisor of 6, which implies that the common order of x 0 , x 1 , x 2 is a divisor of 12. 7.4. Dodecagonal spaces. There are indeed solutions of common order 12. Up to homotheties, exchanging the roles of the vectors in the rational 4-tuple and acting with Galois automorphisms we find two spaces.
In order to check this, let us fix (1, √ 3, i, i √ 3) as a basis for Q(ζ)/Q; in this basis, any Galois automorphism acts by exchanging the sign of some coordinates. Given two elements v 1 , v 2 ∈ Q(ζ) and expressing in this basis the determinant of the 4 × 4 matrix with column vectors 1, v 1 , v 2 , v 1 v 2 , one can check explicitly that it depends only on the squares of the coordinates of v 1 and v 2 , and thus that it is invariant by the action of the Galois group.
In particular this shows that the dodecagonal spaces satisfy the symmetry considered in Section 4.3. 7.4.1. Additional angles in dodecagonal spaces. It is now quite easy to check that in these dodecagonal spaces the rational 4-tuple that defines them cannot be extended to a rational 5-tuple. With a little more (computational) work we also see that dodecagonal spaces do not contain any additional rational angle. Indeed it is enough to check which rational angles are contained in the spaces 1, τ j Q with j = 1, 2 and τ j the ones defined in the previous section. By the usual (3.7), this amounts to finding all solutions of with b 0 , b 1 ∈ Q and distinct, and y ∈ U different from 1. But we see immediately that y lies in Q(ζ 12 ), the twelfth cyclotomic field, so y = ζ k 12 for k = 1, . . . , 11. By writing both sides of the equation in terms of a basis, it is easy to see that the only solutions are found when b 0 , b 1 ∈ {0, 1, −1}, for j = 1, or b 0 , b 1 ∈ {0, 1, 3}, for j = 2.
The computations of this section can be summarized in the following theorem: Theorem 7.3. Let V be a space with a rational quadruple. Then V is homothetic to either a superrectangular space or one of the 2 dodecagonal spaces.
The following table summarizes the classification obtained so far.

4
V a non-CM Superrectangular space. Superrectangular V homothetic to one of the dodecagonal spaces. 3 + 2 Expected elliptic families and a finite list. 2 + 2 + 2

Geometric applications
It is well-known that results on equations in roots of unity can be used to derive properties of geometric configurations. For example in [CJ76] the authors show that a triangle with sides of rational length and angles which are rational multiples of π must be equilateral.
We show here some applications of the results and techniques presented in this paper to the realm of plane geometry. We will prove results on triangles or parallelograms in which the relevant angles are all rational multiples of π.
We begin with a simple lemma in algebraic number theory that will simplify our analysis.
Let ABC be a triangle in the euclidean plane whose angles are rational multiples of π. Let H be the foot of the altitude from C. Assume that the scalar α = − − → AH/ − − → AB is a rational number; then the triangle is similar to one of the following: (i) a right-angled triangle with the right angle in A (resp. B) and α = 0 (resp. 1); (ii) an isosceles triangle with base AB and α = 1/2; (iii) an isosceles triangle with angle in A (resp. B) equal to 2π/3 and α = −1/2 (resp. 3/2); (iv) a right-angled triangle with right angle in C, angle in A (resp. B) equal to π/3 and α = 1/4 (resp. 3/4).
Proof. Let us identify the euclidean plane with C, fixing the points A and B in 0 and 1 respectively. Let a, b > 0 be the lengths of the sides opposite to A and B. The condition that the angles of the triangle are rational multiples of π tells us that there are two roots of unity θ, ζ ∈ U \ {±1} such that (8.1) 1 + aθ + bζ = 0.
Up to symmetry with respect to the real line, we can assume that Im(θ) > 0. By taking the complex conjugate of equation (8.1) we obtain 1 + aθ −1 + bζ −1 = 0, and solving for a, b we get where we write s(x) = x − x −1 for simplicity. The vertex C is identified with the complex number −bζ, so that H is the real part of −bζ, that is to say − b 2 ζ + ζ −1 . By our hypothesis, this number must be a rational number, that we will denote by p/q; up to symmetry with respect to the axis of the segment AB we can assume that it is at least 1/2.
If q = 1 then s(θζ) is divisible by 2p − 1, so p = 1. This means that H = B, so the triangle is a right triangle with the right angle in B.
If q = 2 then s(θζ) is divisible by p − 1, so p = 1, 3. If p = 1 then H is the midpoint of the segment AB, and the triangle is isosceles with base AB.

A B C D
There is no parallelogram ABCD such that the angle ∠ABD is a right angle and the angles ∠CAB and ∠CAD are rational multiples of π.
Proof. If such a parallelogram existed, the triangle ABC would satisfy the hypotheses of Theorem 8.2 with α = 2, which is not possible.
Theorem 8.4. Let ABCD be a parallelogram such that the three angles ∠CAB,∠CAD and ∠ABD are rational multiples of π. Then either ABCD is a rectangle, or it is a rhombus, or it is similar to the red parallelogram in Figure 2.
Proof. Let us identify C with the plane in such a way that the points A, B, C, D are 0, 1, τ + 1, τ respectively, and let V = 1, τ Q . The hypothesis implies that V is a space with a rational quadruple (1, τ, τ + 1, τ − 1). Then by Theorem 7.3 V is either a superrectangular space or a dodecagonal space.
Suppose V is a superrectangular space, but not homothetic to Q(i) or Q( √ −3). Then by Theorem 7.2 the rational quadruple (1, τ, τ + 1, τ − 1) is the only one in V up to equivalence, and then two of those four vectors must be orthogonal. If 1 and τ are orthogonal, the parallelogram is a rectangle. If τ + 1 and τ − 1 are orthogonal, then the parallelogram is a rhombus. If 1 and τ ± 1 are orthogonal, then we are in the situation of Corollary 8.3, which cannot happen. Similarly if τ is orthogonal to τ ± 1 we can divide by τ and the configuration is again that of Corollary 8.3.
If V ∼ h Q(i), then by Theorem 4.2iii all angles involved are integral multiples of π/4, and then the only possibility is that ABCD is a square.
The first triple corresponds to the red rectangle in Figure 2. The second triple corresponds to its dual parallelogram, i.e. the parallelogram with vertices in the midpoints. The dual parallelogram is not, in general, similar to the original one, but in the case of Figure 2 the dual parallelogram turns out (up to rescaling) to be its mirror reflection, and hence similar to it. This concludes the proof of the theorem. 9. Example of spaces corresponding to rational points on a curve genus 1 As an example of the possible phenomena that can appear in the more general case 2 + 2 + 2 we show here an infinite family of spaces parametrized by the rational points on an elliptic curve of rank one over Q.
Setting x = e iπ/2 , y = e iπ/4 , z = e iπ3/4 in equation (3.15) we obtain Let us take one of the two factors multiplying √ 2 and set it to zero. Any rational solution of the system with a, b, c, d distinct and nonzero gives a solution to equation (3.15), and thus a space of type 2 + 2 + 2 . The system (9.2) defines a variety in P 3 , which is the union of the two lines {a = d = 0} and {b = c = 0} and an irreducible curve C of genus 1.
After eliminating c and applying the transformation It is possible to put this plane curve in Weierstrass form, sending at infinity the point (b : u : v) = (0 : 1 : 1). Under the transformation we obtain the Weierstrass form This elliptic curve has j-invariant 128. It has a 2-torsion point (−2, 0). The rank of the Mordell-Weil group is 1, with generator (−1, 1). This curve has infinitely many rational points, and each quadruple (a, b, c, d) provides a value of τ such that the space 1, τ Q is of type 2 + 2 + 2 . Let us see now that the set of spaces so obtained is infinite also considering them up to equivalence.
Any σ ∈ PGL 2 (Q) commutes with Galois automorphisms, so we have that τ 2 , τ 3 , τ 4 can be expressed as rational functions of a, b, c, d, and so can the cross-ratio ρ(τ 1 , τ 2 , τ 3 , τ 4 ). Computing its expression we obtain This φ defines a rational function on the projective curve C, and by what we argued above we see that, if P, Q ∈ C give two equivalent spaces, then φ(P ) = φ(Q). Clearly the generic fibre of the function φ is finite, and this immediately proves our claim, that the rational points on C give rise to infinitely many pairwise non-equivalent spaces.
An even clearer picture of the geometry of this problem is obtained by putting C in the form (9.3). In the (b : u : v) variables, the function φ is given by Appendix A. The irreducibility of the surface defined by equation (3.15) For fixed x, y, z, equation (3.15) defined a surface S ⊆ P 3 , whose rational points correspond to lattices of type 2 + 2 + 2 in which the three rational angles have fixed arguments; in this appendix we study more in depth its geometric properties.
A motivation for this study, other than its interest on its own, comes from the fact that we can reduce this problem of rational points on a surface to a problem of rational points on curves, arguing in a way similar to Section 3.1, with the important distinction that here the space is not fixed.
In fact, assume that S is not defined over Q. Then there is a Galois automorphism σ such that σ(S) = S. If S is irreducible, then all rational points on S lie in S ∩ σ(S), which is a curve.
The aim of this appendix is to study the surface S, proving that S is irreducible unless x = y = z = −1, and that S is not defined over Q unless x, y, z are either three fourth roots of unity or three sixth roots of unity.
A.1. Elimination of two quadratic equations. In order to prove some geometrical properties of the variety defined by the equation (3.15), we study here in general the elimination of one variable from two quadratic equations. Let be two equations, where for the moment τ, A 1 , A 2 , B 1 , B 2 are elements of a field. In our application, these two equations will be of the form 3.11. On subtracting we obtain (B 1 −A 1 )τ = −(B 2 −A 2 ), whence, on multiplying any of the equations by (B 1 − A 1 ) 2 and substituting for (B 1 − A 1 )τ , we obtain This is of course the resultant of the quadratic polynomials above. After some calculations we also find Let us now consider A 1 , A 2 , B 1 , B 2 as independent variables over an algebraically closed field K of characteristic 0, giving the weight i to A i , B i . Note that the expression (A.2) for E has decreasing weights in the variables B i , whereas the whole expression is homogeneous of degree 4 with respect to these weights. The total ordinary degree in all the four variables is 3 whereas the separate degrees in A 1 , A 2 and B 1 , B 2 are both equal to 2.
Proposition A.1. The polynomial E is irreducible over K. More generally, it is irreducible as a polynomial in B 2 over any extension of K(A 1 , A 2 , B 1 ) not containing a square root of A 2 1 − 4A 2 . Of course there is a similar statement on replacing B i with A i .
Proof. Let R 2 = A 2 1 − 4A 2 . Then from (A.1) we find that the roots of E as a polynomial in B 2 are This clearly yields what asserted.
Let now x, y, z be fixed roots of unity, different from 1. We view A 1 , A 2 , B 1 , B 2 as variables on the affine 4-space A 4 . Letting a, b, c, d be new variables, we define a regular map π : A 4 → A 4 by (A.3) This also corresponds to a ring homomorphism In the sequel we shall view E through this homomorphism as a polynomial E * in a, b, c, d, with coefficients in Q(x, y, z); it is homogeneous of degree 4. Similarly we think of A 1 , A 2 , B 1 , B 2 as polynomials in a, b, c, d as given by (A.3). The equation E * = 0 defines the surface S, while the equation E = 0 defines the surface π(S).
Warning: Here a word of warning is needed since the ring homomorphism is not always injective. It is injective (i.e. the map π is dominant, which in turn amounts to the algebraic independence of A 1 , A 2 , B 1 , B 2 as given by (A.3)) except when x = −1 and either y or z is −1. In these cases we have A 1 B 1 = 0 as a polynomial in a, b, c, d. We have A 1 = B 1 = 0 precisely if x = y = z = −1.
For simplicity of notation we omit explicit reference to this fact in what follows, which should not create confusion.
Note that up to a factor in Q(x, y, z), E * equals the polynomial P defined by Table (3.16). More precisely P = (y−1) 2 (z−1) 2 x E * .
Theorem A.2. For fixed x, y, z the polynomial E * is irreducible in Q[a, b, c, d], unless x = y = z = −1.
We note that for x = y = z = −1 the polynomial E * factors as (ab − cd) 2 .
Proof. Set a 1 := y − x y − 1 a, b 1 := xy − 1 y − 1 b, Suppose, to start with, that we are in Case 1: If x is different from all among y ±1 , z ±1 , which amounts to a 1 b 1 c 1 d 1 = 0.
Then we have where for this proof we set .
Under the present assumption the above ring homomorphism is injective and yields actually a field extension Q(a 1 , b 1 , c 1 , d 1 )/Q(A 1 , A 2 , B 1 , B 2 ) which is is finite Galois with group G isomorphic to the four-group Z/(2) × Z/(2), acting trivially on constants and capital variables and acting on the lowercase variables by transpositions on a 1 , b 1 and c 1 , d 1 .
Remark: This action gives a certain easy action on the original variables a, b, c, d but we do not need to make this explicit. This may be relevant when studying the rational points (a : b : c : d), since the present action is not defined over Q (thinking of a, b, c, d as defined over Q).
Suppose that F ∈ Q[a 1 , b 1 , c 1 , d 1 ] is a nontrivial irreducible factor of E * ; we may assume it is homogeneous of degree 1 or 2.
Suppose first that F σ = kF for a constant k; this should be necessarily ±1 since σ 2 = 1. If k = −1, then F vanishes on putting c 1 = d 1 , whereas E * does not (the term B 2 2 dominates). Hence k = 1. But then F is invariant by σ, thus lies in C(a 1 , b 1 , B 1 , B 2 ), and then necessarily in C(a 1 , b 1 )[B 1 , B 2 ] (e.g. since c 1 , d 1 are integral over C[B 1 , B 2 ] which is integrally closed). Then F divides E * in C(a 1 , b 1 )[B 1 , B 2 ] and by the above Proposition we deduce that A 2 1 − 4A 2 is a square in C(a 1 , b 1 , B 1 ) and hence in C(a 1 , b 1 ). But A 2 1 − 4A 2 = (a 1 + b 1 ) 2 − 4λa 1 b 1 , hence this latter possibility leads to λ = 0, 1. On the other hand λ = 0 is excluded by the present hypothesis, whereas λ = 1 easily leads to x = 1, again excluded. Therefore, since F, F σ are both irreducible, non proportional and divisors of E * , F F σ is a divisor of E * ; since it lies in C(a 1 , b 1 )[B 1 , B 2 ] (being a norm) and since E is irreducible in this ring (because as above A 2 1 − 4A 2 is not a square in C(a 1 , b 1 , B 1 )), F F σ must be a constant multiple of E. Setting c 1 = d 1 = u we have that E (a 1 , b 1 , u, u) is a square in C[a 1 , b 1 , u] (because it is a norm from a quadratic extension generated by (c 1 − d 1 ), or else because F, F σ become equal after such substitution). Since it lies in C[A 1 , A 2 , u] it is either a square in this ring, or vanishes on setting a 1 = b 1 ; this last fact is excluded by direct computation. Indeed, since B 1 (u, u) = 2u, B 2 (u, u) = µu 2 , we have E(a 1 , b 1 , u, u) = µ 2 u 4 − 2µA 1 u 3 + µ(A 2 1 − 2A 2 )u 2 + 4A 2 u 2 − 2A 1 A 2 u + A 2 2 . On the other hand, from (A.1) we see that the discriminant with respect to A 2 is, up to a nonzero square, B 2 1 (u, u) − 4B 2 (u, u) = 4u 2 (1 − µ). As above we have µ = 1 hence this discriminant cannot vanish, hence the polynomial cannot be a square.
This concludes the discussion of Case 1, and therefore from now on we may deal with Case 2: If a 1 b 1 c 1 d 1 = 0. By symmetry we may assume say that x = y, i.e. a 1 = 0 and A 1 = (x+1)b. Let us also assume first that x = z ±1 .
Hence let us assume A 1 = 0. By Proposition A.1 applied with A i in place of B i , if E * is reducible over C(a, b, c, d) as a polynomial in A 2 , then (by Gauss lemma) either is divisible by b or B 2 1 − 4B 2 is a square in C(b, c, d). This last possibility is excluded as above since we are presently assuming that x = z ±1 (so c 1 d 1 are still defined).
On the other hand the expression (A.2) shows that E * is not a multiple of b.
We are left with the case x = y and x = z or x = z −1 , which are symmetric, so assume x = y = z = −1. Then we have B 1 = (x + 1)d, B 2 = xcd, and we directly can check the irreducibility of E * , e.g. checking it is irreducible in c, since it is quadratic in this variable and with discriminant a constant multiple of c 2 (B 1 − A 1 ) 2 (A 2 1 − 4A 2 ) = (x + 1) 2 c 2 (d − b) 2 ((x + 1) 2 b 2 − 4xab), not a square.
We remark that the irreducibility of the surface S could also be used to argue for the finiteness of the rational angles in a fixed non-CM lattice, but the proof of Theorem 6.1 gives an explicit bound.
Remark A.3. We remark that the varieties S and π(S) are rational. Indeed one can set Z 1 = B 1 −A 1 and Z 2 = B 2 −A 2 , and the equation (A.1) becomes Z 2 2 − A 1 Z 1 Z 2 + A 2 Z 2 1 , which is linear in A 1 , A 2 ; this shows that π(S) is rational. As for the variety S, one can see that R 2 = A 2 1 − 4A 2 , through the substitutions (A.3), gives rise to a ternary quadratic form Q(a, b, R) = 0. After dehomogenizing with respect to, say, a we can then parametrize rationally b, R in terms of a parameter α. Through (A.1) we can also express R in terms of c, d, which leads to an equation which is linear in both c, d, thus allowing, for example, to express d as a rational function of α and c.
In any case the fact that these varieties are rational is not relevant to our arguments.
A.2. The field of definition of S.
Proposition A.4. The surface S is defined over Q if and only if either x 4 = y 4 = z 4 = 1 or x 6 = y 6 = z 6 = 1.
Proof. In order to understand when the surface S is defined over Q one can consider the following four monomials in the variables a, b, c, d from equation (3.15), with their coefficients ab 2 d −(y − 1)(z − 1)(xy − 1)(xz − 1).
If the variety is defined over Q, then the ratio of any two of those four coefficients, when they are not zero, must be a rational number. Considering the first two, we see that either there is a rational relation between 1, x, z, xz, or x = y; considering also the second two we obtain that either there is a rational relation between 1, x, z, xz, or x = y = −1. Similarly, pairing the first with the third and the second with the fourth, we obtain that either there is a rational relation between 1, x, y, xy, or x = z = −1. If x = y = −1 the equation defining the surface becomes −4a 2 b 2 (z − 1) 2 − 4c 2 d 2 (z − 1) 2 − 32abcdz + 4abc 2 (1 + z) 2 + 4abd 2 (1 + z) 2 , and for it to be defined over Q, z must have order 4 or 6 (and analogously if x = z = −1). If both a Q-linear relation with non-zero coefficients between 1, x, z, xz and between 1, x, y, xy exist, then by Theorem 3.2 x, y, z are roots of unity of common order 4 or 6.