The Algebraic Dynamics of the Pentagram Map

The pentagram map, introduced by Schwartz in 1992, is a dynamical system on the moduli space of polygons in the projective plane. Its real and complex dynamics have been explored in detail. We study the pentagram map over an arbitrary algebraically closed field of characteristic not equal to 2. We prove that the pentagram map on twisted polygons is a discrete integrable system, in the sense of algebraic complete integrability: the pentagram map is birational to a self-map of a family of abelian varieties. This generalizes Soloviev's proof of complex integrability. In the course of the proof, we construct the moduli space of twisted $n$-gons, derive formulas for the pentagram map, and calculate the Lax representation by characteristic-independent methods.


Main result.
The pentagram map is a discrete dynamical system on the space of polygons in the projective plane. The map was introduced by Schwartz in 1992 for convex polygons in the real projective plane [36], but the definition extends to polygons in any projective plane. This paper describes the dynamics of the pentagram map in projective planes over algebraically closed fields, including positive characteristic. Our main result establishes algebro-geometric complete integrability of the pentagram map over any arbitrary algebraically closed field of characteristic not equal to 2. Definition 1.1. Let n ≥ 3 be an integer. A closed n-gon, or just n-gon, is an ordered n-tuple of points (v 1 , . . . , v n ) ∈ (P 2 ) n in general linear position. The space of n-gons is a Zariski open subset of (P 2 ) n . Definition 1.2. Let n ≥ 5. The pentagram map is a rational self-map of the space of n-gons. The pentagram map sends an n-gon (v 1 , . . . , v n ) to the n-gon (w 1 , . . . , w n ), where w i is the intersection of the diagonals v i−1 v i+1 and v i v i+1 , and where we take the indices cyclically modulo n; see Figure 1.
Liouville-Arnold integrability is an extremely strong property which almost completely describes the dynamics. Roughly, it means: • the domain of the map (dimension ≈ 2n) admits a fibration by invariant submanifolds of dimension ≈ n; • each of these submanifolds may be identified with an open subset of a real torus of dimension ≈ n, such that on each torus, some iterate of the pentagram map is a translation. In this paper, we study the closely related pentagram map on twisted polygons, also introduced by Schwartz [37]. The main integrability theorems for the pentagram map on closed polygons were proved first for twisted polygons [34,43]. Definition 1.3. A twisted n-gon is a sequence (v i ) i∈Z in P 2 with the property that there exists a projective transformation M ∈ PGL 3 , called the monodromy, such that, for all i ∈ Z, We also impose some nondegeneracy conditions; see Definition 3.1 for details. The pentagram map on the parameter space of twisted n-gons sends (v i ) i∈Z to (w i ) i∈Z , where w i is the intersection of the diagonals v i−1 v i+1 and v i v i+1 ; see Figure 4. For any T ∈ PGL 3 and twisted n-gon (v i ) i∈Z , the twisted n-gons (v i ) i∈Z and (T v i ) i∈Z are projectively equivalent. The moduli space of twisted polygons, denoted T n , is the quotient space of twisted polygons up to projective equivalence; we construct T n as a variety in Section 3. Since the pentagram map on the parameter space of twisted polygons is projectively natural, it descends to a rational self-map f : T n T n .
From now on, by the pentagram map, we mean this map f on the moduli space.
To motivate the definition, notice that the definition of the pentagram map on closed polygons is combinatorially local, in the sense that each vertex of the image polygon v depends only on four consecutive vertices of v. Thus the pentagram map extends to a self-map of the space of sequences (P 2 ) Z , and n-gons correspond to n-periodic sequences. Studying the pentagram map in this larger space is difficult because (P 2 ) Z is infinite-dimensional. The constraint (1) defines a finite-dimensional domain for the pentagram map. Closed n-gons are Figure 1. The pentagram map applied to a 9-gon. twisted n-gons that have monodromy M = 1. We think of closedness as a global constraint on the geometry of a twisted polygon.
Our main theorem is an algebro-geometric version of discrete integrability which holds in characteristic 0 and characteristic p. Theorem 1.4. Let k be an algebraically closed field.
(1) The moduli space T n of twisted n-gons over k exists as an algebraic variety, and T n is a rational variety of dimension 2n.
(2) Assume that char k = 2. Then there exists a family of abelian varieties A → S and a birational map δ : T n A, such that, via the identification δ, the fibers of A → S are invariant subvarieties for the pentagram map.
(3) The behavior of the pentagram map on A depends on the parity of n: • Odd n : The fibers of A are Jacobian varieties of dimension n−1, and δ identifies the pentagram map with a translation by a section of A → S. • Even n : The fibers of A are pairs of Jacobian varieties of dimension n − 2. Via the identification δ, the pentagram map sends each Jacobian isomorphically to the other in its pair. The map δ identifies the second iterate of the pentagram map with a translation by a section of A → S.
By a family of abelian varieties over k, we mean a map of k-schemes A → S such that each fiber is isomorphic to an abelian variety. We do not assume any choice of zero-section S → A. Theorem 1.4 can in fact be made totally explicit. Our methods give equations for the invariant subvarieties and the section that corresponds to the pentagram map.
The case of Theorem 1.4 with base field k = C is essentially due to Soloviev [43]. We extend the result to algebraically closed fields of any characteristic except 2. In fact, we expect that, with some additional work, our proof would extend to characteristic 2; see Remark 6.10. Remark 1.5. A natural next step would be to formulate a notion of algebraic complete integrability over Spec Z. To explain this informally, while we study the pentagram map over each field independently, it is also true that any algebraic dynamical system f defined only using integers can be thought of as a self-map of a some scheme over Spec Z. The scheme Spec Z is a 1-dimensional topological space, and each prime number corresponds to a point of Spec Z. The codimension-1 fiber at prime p corresponds to the dynamical system induced by f over F p , and these fibers are all f -invariant. Of course, integrable systems have a more refined invariant fibration than this, usually including some "degenerate" leaves with interesting but non-generic dynamics. We propose that the bad primes for an integrable system over Z, if any, should be thought of as degenerate leaves. Thus, "generic" properties of an integrable system over Z should hold at all but finitely many primes. Theorem 1.4 has strong consequences for the arithmetic dynamics of the pentagram map over finite fields. For instance, the orbits of the pentagram map over a finite field F q are much smaller than one would expect for a randomly chosen rational self-map of P 2n , thanks to standard estimates for point counts on varieties over finite fields. Over F q , at least when q is odd, the domain T n of the map has O(q 2n ) elements, but these can be divided into invariant subsets of cardinality O(q n−1 ) or O(q n−2 ), depending on the parity of n. On sufficiently generic invariant subsets, the well-defined orbits of the pentagram map within an invariant subset all have the same period. Note that well-definedness of orbits is an issue because the pentagram map is a rational map rather than a morphism, since some degenerate polygons do not have well-defined images. A heuristic argument suggests that almost all orbits of the pentagram map eventually produce degenerate polygons. We formalize this idea in Conjecture 8.3. Theorem 1.4 also tells us something about the real pentagram map. When n is even, a typical nonperiodic orbit of a twisted n-gon fills out at least 2 tori, by taking real parts of A. We show an example in Figure 2. A final application of Theorem 1.4 is to the pentagram map over Q. The logarithmic height of a rational number is a measure of its arithmetic complexity, approximately equal to the number of digits needed to write down the number in lowest terms; see [41]. One can extend this definition to rational points in projective space and ask about the height growth along orbits of a dynamical system. Conjecturally, polynomial growth of height in orbits is an indicator of integrability, but few theoretical results in this direction are known [15]. In an experimental study, Khesin and Soloviev observed polynomial height growth in orbits of some generalized pentagram maps, and exponential height growth in others, providing heuristic evidence of integrability vs. non-integrability [25]. We confirm this empirical result for the standard pentagram map: for sufficiently generic orbits, the logarithmic height growth is not just polynomial, but in fact linear (Corollary 7.6).
Remark 1.6. The methods of this paper should also apply to closed polygons, with additional work. In that case, we expect an analogue of Theorem 1.4 to hold with the dimensions n − 1 and n − 2 replaced by n − 4 and n − 5. This was shown over C by Soloviev [43].
1.2. Sketch of proof of Theorem 1.4. In the complex theory of integrability, both algebraic and analytic methods are available. Working in characteristic p, we are restricted to algebraic techniques. We follow the route of Lax representations and spectral curves. Even though these techniques are classified as "analytic" in some textbooks, e.g. [2], they can be adapted to other algebraically closed fields.
The first step is to construct the moduli space T n of twisted n-gons as an algebraic variety (Theorem 3.6). The group PGL 3 of projective transformations M has dimension 8, so the parameter space of twisted n-gons has dimension 2n + 8. Since the pentagram map commutes with PGL 3 , it descends to the moduli space T n of twisted n-gons up to projective equivalence. The variety T n is 2n-dimensional, and the pentagram map is a rational self-map f . Since the projective equivalence class of M is f -invariant, we have at least two algebraically independent integrals.
The main technique we use to construct the moduli space T n is geometric invariant theory (GIT), which supplies tools for taking quotients of varieties by infinite groups. The construction of T n is not specific to the pentagram map and could have other applications. In fact, like Mumford's moduli space of closed polygons [29], the moduli space T n admits a GIT semistable compactification with an explicit combinatorial description [46]. The next step is to compute formulas for the pentagram map. Then we derive a Lax representation with spectral parameter, which is an embedding of the dynamics into a matrix group. The formulas and Lax representation have already been derived in various guises in the literature, but our setup is a little different than the usual one, so we include full detail.
From this point, our proof follows the structure of Soloviev's proof of complex integrability of the pentagram map, modified to allow for positive characteristic [43]. The characteristic polynomial of the Lax representation gives us a spectral curve. The next step is to show that the spectral curve is an integral curve (in the scheme-theoretic sense) of genus n − 1 when n is odd and n − 2 when n is even. These computations are technical in nature.
Then we construct the direct spectral transform, the birational map δ : T n A of Theorem 1.4. For the construction of δ, the argument in [43] goes through essentially without changes.
The brunt of the extra work in characteristic p is the computation of the genus of the spectral curve, which is key to ensuring that the Jacobian has the right dimension. Since the genus of the spectral curve can change after reducing modulo p, we need to make sure that these curves have a kind of good reduction. There are many classical examples of continuous-time integrable systems originating in  physics, but discrete-time examples are few and far between. Finding new examples is a major research area [14].

Related work
The main antecedents of our result are the Liouville-Arnold integrability of the pentagram map [33], Soloviev's proof of complex integrability [43] and Izosimov's study of the pentagram map via difference operators [20].
The special case of our Theorem 1.4 where the base field k is C recovers the main theorems of Soloviev [43,Theorem A,Theorem B]. However, the setup in the two papers is different, as we now explain. When n is even, our Theorem 1.4 explains that the invariant subvarieties generically have two irreducible components, each isomorphic to a Jacobian, and the pentagram map sends each component into the other, isomorphically. The two components correspond to two ways of marking certain special points on the spectral curve, which come from making a choice of square root; see Sections 6 and 7. In contrast, Theorem A of [43] states that "Each torus (Jacobian J(Γ)) is invariant for the pentagram map." Theorem B of [43] describes the dynamics when n is even as "staircase-like", that is, the pentagram map is not treated as a single-valued algebraic map, but rather depends on time, alternating between two translations on a single Jacobian. The reason for the discrepancy is that the two components of each invariant fiber have been identified in [43], by forgetting the marking. The choice of square root (hence the marking) flips upon application of the pentagram map, so the pentagram map is not a well-defined self-map of the single Jacobian appearing in [43].
We also fill a gap in the proof of complex integrability [43,Theorem 2.9]. This theorem concerns the singularities and genus of the generic spectral curve. To find the genus of the generic curve in a family, one needs an upper bound on the genus together with a "one-point calculation" showing that the upper bound is achieved somewhere. This onepoint calculation plays a role somewhat like checking the rank of the Poisson structure at a single point, as in [33]. The argument in [43,Theorem 2.9] does not include the one-point calculation. Specifically, the proof asserts that the generic spectral curve, defined by a plane equation R(k, z) = 0, is nonsingular except at infinity. This is true, but difficult to justify; nonsingularity arguments usually depend on checking the nonvanishing of a resultant, but here the joint resultant of R, ∂R/∂k, ∂R/∂z does in fact vanish, due to the singularity at infinity. We replace this assertion with several one-point calculations in Section 6; see in particular the casework depending on characteristic and the data in Tables 1 and 2. There are many ways to generalize the pentagram map; see, for instance, [10,20,24]. The height growth in orbits of these generalized pentagram maps offers empirical evidence of integrability vs. non-integrability; see [25]. Theorem 1.4 describes the generic behavior of the pentagram map. Many special classes of twisted n-gons have more idiosyncratic dynamics, including closed polygons [34], Poncelet polygons [19], and axis-aligned polygons [13]. Most recently, Schwartz has established a remarkable pentagram rigidity conjecture for the 3-diagonal map on centrally symmetric octagons [38].
Our construction of the moduli space T n of twisted n-gons follows an idea of Izosimov to take an appropriate quotient of a space of difference operators. This idea is introduced in [20, Proposition 3.3], where the identification is shown to be a homeomorphism. We promote it to an algebraic isomorphism (Theorem 3.6).
Singularity confinement, a feature of many discrete integrable systems, was explored in [12]. Singularity confinement is closely related to the existence of a partial compactification on which the pentagram map becomes a morphism, which we construct in Theorem 1.1.
The corner invariants coordinatize the space of twisted n-gons by cross-ratios. Cross-ratios are a frequent source of compactifications in the theory of moduli spaces, for instance, the Naruki cross-ratio variety [32].
Little is known in general about the dynamics of rational maps on P n over finite fields; see the survey [3,Section 18], and for arithmetic dynamics more generally, see [41]. Even in the simplest case, polynomials on P 1 , we have only scattered pieces of the whole picture, and rational maps in higher dimension are even more complicated. For reversible maps and integrable systems, there are some probabilistic models for the statistics of the orbits [35,42]. Our work is motivated by the need for concrete examples of rational maps over finite fields for which the dynamics can be totally described.
The thesis [21] collects some results on integrable systems over finite fields and, taking a more arithmetic dynamical angle, suggests viewing integrability over finite fields as a kind of p-adic singularity confinement, or "almost good reduction." The other existing works on discrete integrable systems over finite fields focus on the construction of cellular automata with solitonic properties. This is also a nice perspective for our setting. Theorem 1.4 shows that the pentagram map over F q defines an integrable cellular automaton on an alphabet of q 2 + q + 2 cell states, corresponding to the points of P 2 (F q ) together with an extra state to represent degeneration of the map. The Toda molecule over F 2 m is studied in these terms in [31]. The articles [4,6,8,22] study the discrete KdV and KP equations and the Hirota equation over finite fields as cellular automata. These articles restrict attention to genus 0 and 2 spectral curves, with a focus on special solutions which do not degenerate.
These articles apply the formulas of integrable systems in characteristic 0 to finite fields. We emphasize that discrete integrability in characteristic 0 does not imply the same over characteristic p. While the conserved quantities still exist, their algebraic independence is not guaranteed. The geometry of the spectral curve, its genus, and the application of the Riemann-Hurwitz formula are all characteristic-dependent. Indeed, by restricting attention to a subfamily of polygons where the spectral curve has worse singularities mod p, we can force the loss of algebro-geometric integrability in that family. This means the focus of proving integrability is on showing that the generic spectral curve has good reduction.
Ultradiscretization, or tropicalization, is a totally different idea for producing integrable systems valued in finite sets; see [45].
Some other surprising connections between integrable systems and number theory in finite characteristic are suggested in [44].

The moduli space of twisted n-gons
In this paper, we study the pentagram map on twisted polygons. The space of twisted polygons is larger than the space of closed polygons, but is still finite-dimensional. Definition 3.1. Let n ≥ 4 be a positive integer. A twisted n-gon is a Z-indexed sequence (v i ) in P 2 with the properties: • There exists a projective transformation M ∈ PGL 3 such that, for all i, • A nondegeneracy condition: in each 5-tuple of consecutive points no 3 points are collinear, except possibly v i , v i+2 , v i+4 . The transformation M is called the monodromy of the twisted n-gon. By the nondegeneracy condition, the monodromy M is unique. A closed polygon is a twisted polygon for which M = 1. The set of twisted n-gons is denoted U n .
Remark 3.2. There is variation in the literature in the definition of twisted n-gon. We chose our definition in order to get a convenient moduli space. The most frequently used definition, from [33], only requires consecutive triples to be in general position. This definition is too permissive for our purposes because then the geometric quotient does not exist. Another common definition asks for all the points to be in general position. But this is too strict for our setting, since working overF p , there are no such sequences.
Proof. We need only show that this map is invertible on a generic subset of the variety (P 2 ) n × PGL 3 . This is straightforward: for a generic choice of (v 1 , . . . , v n , M ), the points This sequence is a twisted n-gon that corresponds to (v 1 , . . . , v n , M ), since it satisfies the nondegeneracy condition of Definition 3.1.
The pentagram map is invariant under projective transformations. So, we study the induced map on the moduli space of projective equivalence classes of twisted n-gons. If we view U n as an open subvariety of (P 2 ) n × PGL 3 , the PGL 3 -action on U n is given by Definition 3.4. The moduli space of twisted n-gons, denoted T n , is the quotient variety U n / PGL 3 for the action described by (2).
Definition 3.4 asserts the existence of a quotient in the category of varieties, but in general, such quotients may not exist. The main theorem of this section, Theorem 3.6, equips T n with a variety structure. We explicitly describe the coordinate ring of the moduli space T n , and we check that the quotient map to T n is geometric in the sense of geometric invariant theory.
We briefly recall the basic notions and give a more detailed review in Section 3.1.
Informally, given a variety V and group G, a categorical quotient, denoted V //G, is a variety V and a map V → V which has the typical categorical properties of a quotient. Categorical quotients do not always exist, and even when they do, they may not reflect the geometry of the orbits well. A categorical quotient V = V //G is called a geometric quotient if the points of V classify G-orbits in V . When a geometric quotient exists, the notions of orbit space and categorical quotient are essentially the same, so we can speak of a variety structure on V /G.
We now recall the definition of Schwartz's corner invariants, which have played an essential role in the study of the pentagram map [37]. These functions were known to define a full set of coordinates on T n as a manifold over R; we extend this to show that they generate the coordinate ring of T n as a variety over k.
Definition 3.5. We define the cross-ratio of four points v 1 , v 2 , v 3 , v 4 in P 1 with v 1 = v 3 and v 2 = v 4 in a slightly non-standard way, as follows. Choose any affine coordinate such that, computed in that coordinate, we have v 1 , v 2 , v 3 , v 4 ∈ {0, ∞}. Then the cross-ratio is defined by the formula One can check that the result is independent of the choice of affine coordinate. (Frequently one sees the reciprocal of this quantity defined as the cross-ratio.) Given a twisted n-gon v = (v i ), its left and right corner invariants, denoted x i , y i , are defined by Figure 3. The left corner invariant x i is defined as the cross-ratio of the four points on the pictured horizontal line, and the right corner invariant y i is defined as the cross-ratio of the four points on the pictured vertical line. We can informally think of the corner invariants as providing coordinates for v i in the axes determined by v i−2 , v i−1 , v i+1 , and v i+2 .
These quantities are PGL 3 -invariant functions of v. We consider the morphism . , x n (v), y 1 (v), . . . , y n (v)). We now present the main theorem of this section, which says that this morphism defines a geometric quotient (i.e. a variety with nice quotient properties).
Theorem 3.6. The geometric quotient T n = U n / PGL 3 exists, and there is an isomorphism of varieties We prove a more detailed version of this theorem as Proposition 3.16, later in this section. Theorem 3.6 implies that any algebraic, projectively invariant condition on twisted n-gons can be expressed in terms of the corner invariants. For instance, one can show that the points The real part of T n was studied in [33], where it was shown that the corner invariants provide a diffeomorphism to R 2n . To do something similar algebraically, we have to take the quotient of a variety by an infinite group, using GIT.
The proof of Theorem 3.6 is complicated. The motivating idea is as follows. In any sequence of five points in the plane, we can describe coordinates for the third point in terms of the first, second, fourth, and fifth points. Take consecutive subsequences of length 5 in the bi-infinite sequence defining a twisted n-gon. Because of the monodromy, the resulting coordinates are n-periodic, thus giving 2n functions that coordinatize the space of twisted n-gons.
Remark 3.7. The existence of the geometric quotient T n follows immediately from the main results of [46]. However, that proof does not produce the explicit coordinatization by corner invariants, and we use that coordinatization to study the pentagram map.
Remark 3.8. Another coordinate system, the so-called ab-coordinates, has also been used widely in the study of the pentagram map, for instance in [33]. These work well over R, but their definition uses the isomorphism SL 3 (R) ∼ = PGL 3 (R), and they are not well-defined over an arbitrary base field. Further, our proof of Theorem 3.6 explains the algebraic origin of the corner invariants.
3.1. Background on geometric invariant theory. We cite some standard theorems in geometric invariant theory. For a development of these ideas, see [7,Chapter 6]. Definition 3.9. Suppose that a group G acts algebraically on a variety V , with action α : G × V → V . A categorical quotient is a variety V and a G-invariant morphism χ : V → V , such that for every variety V , every G-invariant morphism V → V factors through χ uniquely. We denote a categorical quotient V by V //G. The quotient depends on the action, but this notation suppresses it. If we want to be specific about the action, we write V //α. We will also use the notation V //G and V //α to refer to the variety without the attached data of χ.
By a universal property argument, if a categorical quotient exists, it is unique up to unique isomorphism. When we write V //G, the argument will always provide a specific construction of the categorical quotient.
A geometric quotient, denoted V /G, is a categorical quotient V //G with the following property: if v 1 , v 2 ∈ V have the same image in V //G, then there exists some g ∈ G such that Categorical quotients do not always exist, much less geometric quotients. But for a large class of groups, the geometrically reductive groups, categorical quotients of affine varieties do exist. Any algebraic subgroup of a general linear group GL d is geometrically reductive, regardless of base field.
The first claim, about finite generation, is due to Nagata [30]. The scond claim is due to Mumford [28]. For a proof, see [7, Theorem 6.1].
We use G m to denote the multiplicative group scheme over k.
Example 3.11. Consider G m acting on A 1 by t · v = tv. The categorical quotient A 1 //G m exists by Theorem 3.10, and O(A 1 ) Gm = k, so the categorical quotient is a point. Since 0 and 1 are in different orbits, but have the same image, the quotient is not geometric.
3.2. The dual space. In this section, we prove Theorem 3.6. We describe a map which takes a twisted n-gon to a kind of dual data: the list of relations satisfied by consecutive sets of four points. The objects in the proof will be used again to derive formulas for the pentagram map in Section 4. We introduce two spaces V n and W n , along with actions α and β, which are closely related to the action of PGL 3 on U n . The existence of the geometric quotient W n /β is easier to establish, and we use its structure to show existence of the geometric quotient V n /α, which in turn gives us existence of U n / PGL 3 and the explicit description. The relationships between the various objects are depicted in the following diagram.
, v i+4 are nonzero, and no 3 of them are coplanar, except possibly v i , v i+2 , v i+4 . Observe that V n consists of the elements of (A 3 {0}) n × GL 3 which are sent by projectivization to U n . Let π : V n → U n denote projectivization.
We embed V n in the space of 3 × (n + 3) matrices via the map  Each set of four vectors in A 3 satisfies some nontrivial relation. If no 3 of the vectors are coplanar, then each coefficient in the relation is nonzero. Thus, given an element θ ∈ V n , there exist values The variety W n parametrizes matrices of the above form. Let the coordinates on the i-th We extend these definitions to be n-periodic, by the rule that for all i > n, × GL 3 . We set notation for the coordinate on each factor.
• For each i where 1 ≤ i ≤ n, let η i be a coordinate on the i-th copy of G m .
• Let ξ be a coordinate on the (n + 1)-th copy of G m .
• Let A be the coordinate on the GL 3 factor. We now define an action • The ξ coordinate scales the GL 3 factor of V n .
• The A coordinate acts by A · (v 1 , . . . , v n , M ) = (Av 1 , . . . , Av n , AM A −1 ). After writing an element of V n in matrix form, the scalings correspond to coordinatewise multiplication by various matrices: • For i = 1, 2, 3, the η i coordinate simultaneously scales columns i and n + i. For each i where 4 ≤ i ≤ n, the η i coordinate only scales column i. • The ξ coordinate scales columns n + 1, n + 2, and n + 3.
• The A coordinate acts by change of basis. We now define an action β : G 2n+1 m × W n → W n . We use the following coordinates on G 2n+1 m .
• For each i where 1 ≤ i ≤ n, let κ i be a coordinate on the i-th copy of G m .
• For each i where 1 ≤ i ≤ n, let ρ i be a coordinate on the (n + i)-th copy of G m .
• Let be a coordinate on the (2n + 1)-th copy of G m . Viewing W n as a space of matrices, the action of each factor is by a coordinatewise multiplication.
• For each i in 1 ≤ i ≤ n, the κ i coordinate acts by scaling column i.
• For each i in 1 ≤ i ≤ 3, the ρ i coordinate acts by simultaneously scaling rows i and i + n. For 4 ≤ i ≤ n, the ρ i coordinate acts by scaling row i. • The coordinate acts by a coordinatewise multiplication by  Izosimov found formulas for the corner invariants of a twisted polygon in terms of Proposition 2.10]. Without referring to corner invariants, we prove that those expressions, denoted x i , y i , generate the ring of invariants of β. We show later, in Lemma 3.14, that these expressions agree with the corner invariants.
Proposition 3.12. The geometric quotient W n /β exists. It is given explicitly by Proof. There are three parts to the proof: constructing a categorical quotient W n //β, calculating its coordinate ring, and showing that the quotient is geometric.
(1) To see that W n //β exists, observe that W n is an affine variety and that (G m ) 2n+1 × GL 3 is reductive. By Nagata's Theorem (Theorem 3.10), the spectrum of the ring of invariants k[W n ] β is a categorical quotient.
(2) Let x i , y i be defined in the statement of the theorem. We claim that The x i , y i are invariants by inspection, so we just have to show that they generate the ring k[W n ] β . Each of the 2n + 1 actions of G m puts a grading on k[W n ]. Then k[W n ] β is the intersection of the 0-graded part for each grading. Further, the invariant ring is generated by monomials in the a i , b i , c i , d i , because the ring of invariants for each grading considered separately is generated by monomials. Now, we argue that every invariant monomial is of the form If µ is an invariant monomial, then we can divide by an appropriate power of the x i and y i to get an invariant monomial that has a i -degree 0 and We have shown that µ is a power of µ 0 . And the -grading gives µ 0 degree 1, so µ = 1. Further, we claim the spectrum is G 2n m . This is true if the x i , y j are algebraically independent. This is clear, since a distinct a i or d i appears in the definition of each, and these have no relations.
Proof. Recall that we defined action α : G × V n → V n just after (3) as the product of actions by scaling by η i , 1 ≤ i ≤ n, scaling by ζ, and conjugation by A. Thus we can reduce the claim to the cases that θ 2 is obtained by applying just one of the η i , ζ, or A actions.
• Suppose that θ 2 is obtained from θ 1 by applying A. Then ∆(θ 2 ) is obtained from ∆(θ 1 ) by scaling every entry by det(A). This can be accomplished by scaling each column individually with the κ i . • Suppose that θ 2 is obtained from θ 1 by applying ξ. Then ∆(θ 2 ) is obtained from ∆(θ 1 ) by applying a coordinatewise multiplication by This can be achieved using κ n−1 , κ n , and .
So far, we have described the invariants x i , y i of the action β in purely algebraic terms. In fact, they agree with the corner invariants. Proof. The idea is to compute χ • ∆ for a carefully chosen element of V n that is α-equivalent to v, then observe that α-equivalence does not change the corner invariants or χ • ∆, by Proposition 3.12 and Proposition 3.13. See [19,Lemma 2.10] or [47, Lemma 3.2.10] for two different approaches to the computation. Proposition 3.15. Let θ, θ ∈ V n . If ∆(θ), ∆(θ ) are in the same β-orbit, then θ, θ are in the same α-orbit.
Proof. We may use moves in α to assume that θ and θ agree in v 1 , v 2 , v 4 , v 5 . Let u, u be the image of θ, θ in U n , respectively. By Propositions 3.12 and 3.14, the corner invariants of u and u agree. We claim that u 3 = u 3 . Indeed, the value of the corner invariant x 3 (u) determines the point of intersection of u 3 u 4 with u 1 u 2 , which gives us a line on which u 3 must lie. The value of y 3 (u) similarly picks out a second line on which u 3 must lie. This determines u 3 . Thus we know the relative positions of each consecutive group of 5 points in u, which determines all of u.
Finally, we prove the following more detailed version of Theorem 3.6.
Proposition 3.16. The geometric quotients U n / PGL 3 and V n /α exist, and are isomorphic. The dualization map ∆ descends to an embedding V n /α → W n /β, and there is an isomorphism restricts to a geometric quotient , v 3 at the standard basis vectors, and each remaining vector v i for 4 ≤ i ≤ n is determined recursively by the relation We formally compute v n+1 , v n+2 , v n+3 in the same way, and then define M to be the matrix Define We claim that χ satisfies the necessary universal property to be a categorical quotient V n /α. The argument is the following elementary diagram chase.
We know that χ • ∆ = χ , χ • ∆ = χ. Suppose that we are given a variety V and an α-invariant map ν : V n → V . We want to show that there exists a unique map Then composing each side of the equation with ∆ on the right gives the desired equation Further, if some other ν satisfies ν • χ = ν, then composing with ∆ on the right gives so again by the universal property, ν = ν .
Suppose that v, v ∈ V n , and suppose χ(v) = χ(v ). Then ∆(v) and ∆(v ) are in the same β-orbit. So, by Proposition 3.15, we know that v and v are in the same α-orbit.
Now that we know that the geometric quotient V n /α exists, we compute it another way. Since the G m factors act by scaling the A 3 's and the GL 3 , we can write V n /α as Since scaling is trivial on U n , This concludes the proof of Proposition 3.16.
Proof of Theorem 3.6. Immediate from Proposition 3.16.  The pentagram map on moduli space, or just pentagram map, is the rational map f : T n T n induced on the moduli space of twisted n-gons up to the PGL 3 -action (2). In other words, the map f is the unique dominant rational map such that the following diagram commutes:

Formulas for the Pentagram Map
We showed in Theorem 3.6 that The coordinates on T n are x i , y i for each i = 1, . . . , n. In these coordinates, the pentagram map has a straightforward formula, which we apply in Section 5. Define This is just the usual algebro-geometric definition of pullback of a function by a rational map.
The pentagram map f : T n T n can be written in coordinates as The condition 1 − x i y i = 0 causes vanishing denominators in the formula of f . This condition is equivalent to collinearity of the points These formulas were first published in [37], and a proof was given over R using abcoordinates in [33]; see also [19,Section 2.3]. Since the ab-coordinates are not well-defined over an arbitrary base field, we give a new field-independent proof of the formulas following the matrix refactorization argument of Izosimov [20]. The remainder of this section builds up to the proof of Proposition 4.2.
Recall the definitions of V n and W n from Section 3. First, we explain how to view W n as a space of difference operators. We are working over an algebraically closed base field k. Let k Z be the space of Z-indexed sequences in k. Let Σ : k Z → k Z be the left shift operator, defined on each σ ∈ k Z by (Σσ) i = σ i+1 . Each s ∈ k Z defines a scalar operator on k Z , via the rule A third-order difference operator is a map k Z → k Z of the form where a, b, c, d are scalar operators. Note that scalar operators generally do not commute with Σ, since Σ • s(σ) i = s i+1 σ i+1 and s • Σ(σ) i = s i σ i+1 . Any element of W n can be identified with a third-order difference operator by reading off the sequences a i , b i , c i , d i . Specifically, the space W n is a subset of (k Z ) 4 , and we identify each element (a i , b i , c i , d i ) i∈Z of W n with a third-order difference operator via Given any third-order difference operator D = a + bΣ + cΣ 2 + dΣ 3 , we define two associated third-order difference operators D + = a + cΣ 2 , We extend the action of a difference operator on k Z coordinatewise to the set (k 3 ) Z of sequences in k 3 . Thus each third-order difference operator defines a map V n → (k 3 ) Z .

Lemma 4.3 ([20]
). Let u ∈ Dom F , let v ∈ V n be a lift of u, and let D ∈ W n annihilate v.
Proof. Observe that (F (v)) i lies in the plane spanned by v i , v i+2 and also in the plane spanned by v i+1 , v i+3 . We have The two planes intersect in a unique line, by the nondegeneracy condition on twisted n-gons. Thus, The next theorem presents the pentagram map as a matrix refactorization.  20]). Suppose that u ∈ Dom F . Let v be any lift of u to V n . Let D ∈ W n annihilate v. Then there existsD ∈ W n such that Further, for each liftṽ ∈ V n of F (u), there is a choice ofD such that Proof. First we check that the factorizatioñ is possible. We start by looking for a solutionD in the space of all n-periodic third-order difference operators (so some of the a i , b i , c i , d i may be 0). The equation (5) imposes 3n homogeneous linear conditions on 4n variables, so by linear algebra, there is a nontrivial solution.
Next we show thatD (ṽ) = 0. Our initial choice ofD annihilates D − v, by the following calculation: (5), We claim thatD belongs to W n . We note that D − has every consecutive 4-tuple in projective general position by the assumption that u ∈ Dom F . SinceD(D − v) = 0 andD = 0, all the a i , b i , c i , d i are nonzero, soD is in W n . By Lemma 4.3, we have that D − v andṽ have the same image in U n , so D − v andṽ are the same up to rescaling vectors. Then we can rescaleD using the row-scalings ρ i of the action β to produce a difference operator which annihilatesṽ, and the modifiedD still satisfies (4).
Applying (4) to σ, we obtain the following system of equations: The same equations hold after a change in index, by symmetry. We use the appropriate shifts of the first and last equations to eliminateã i andd i from the middle equation, and rearrange to obtainb Taking the reciprocal and multiplying byã Then by Proposition 3.12, Symmetry gives the formula for x i in general, and the formula for y i comes from a similar calculation.

The Lax Representation
We now derive a Lax representation for the pentagram map. The Lax representation supplies the invariant functions that define the invariant fibration of the pentagram map.
Informally, a Lax representation is an embedding of the domain of a dynamical system into a space of matrices such that the dynamical system is carried out via matrix conjugation. 5.1. The idea. The pentagram map is a discrete algebraic dynamical system f : T n T n , so in our setting, the Lax representation is a space Mat d (k) of d × d matrices over k (for some d ≥ 1) and a function T : T n Mat d (k) such that, for any v ∈ Dom f , the matrix T (f (v)) is conjugate (similar) to T (v). Then the coefficients of the characteristic polynomial of T (v) are functions on T n which are invariant for f . One can do even better by identifying a function P : T n GL d (k) which carries out the conjugation, that is, such that This construction supplies up to d invariant functions. More may be obtained from a Lax representation with spectral parameter. This construction replaces Mat d (k) with Mat d (k(ζ)), where ζ is an indeterminate. Then the characteristic polynomial may be viewed as a bivariate polynomial, so there are more coefficients and thus more invariant functions. Of course, some of these invariant functions may be constants, and they may also be algebraically dependent, so even after a Lax representation with spectral parameter is found, some work is required to establish the existence of a fibration by low-dimensional subvarieties.
Formulas for T and P may be easily checked by carrying out the requisite matrix multiplication. But deriving the right formulas may be very difficult and requires some deeper sense of why the dynamical system is integrable. Soloviev found formulas for an algebraic Lax representation with spectral parameter for the pentagram map in Mat 3 (C) [43]. One hopes for a conceptually motivated proof, and [18] has almost what we need, but the argument uses coordinates which are only well-defined over R. Trying to push the same argument through over C results in invariants which are only well-defined up to a third root of unity. In this section, we derive the Lax representation using corner invariants as coordinates, so the argument works over any algebraically closed field k.
Before formally going through the proof, we sketch the idea. A Lax representation (without spectral parameter) can be found by tracking the monodromy of a twisted n-gon v. The monodromy is a linear transformation, so it does not come with a preferred choice of coordinates. The Lax representation (without spectral parameter) describes the monodromy in a basis defined by the first few vertices of v. To introduce a spectral parameter, we observe a property of the pentagram map known as scaling invariance. Namely, there is an action of G m on T n , defined by ζ · (x 1 , . . . , x n , y 1 , . . . , y n ) = (ζ −1 x 1 , . . . , ζ −1 x n , ζy 1 , . . . , ζy n .) Inspecting the formulas of Proposition 4.2, we see that the pentagram map commutes with this action. This provides a deformation of the pentagram map, and following through the same construction for the deformation, we obtain matrices with the spectral parameter.
Remark 5.1. Another method of obtaining the 3 × 3 Lax representation is to go through the "dual" n × n Lax representation found by Izosimov in [20]. Indeed, writing down the eigenvectors of Izosimov's representation requires a recursive calculation equivalent to (8) below. Thus a proof of algebraic integrability from the n × n Lax representation would ultimately lead through the same equations, resulting in the same spectral curve. However, there is a conceptual difference between the two approaches. The 3 × 3 Lax representation follows more directly from the geometric definition of the pentagram map on twisted polygons, but it does not explain the origins of scaling invariance. Izosimov's method allows for a farreaching generalization of scaling invariance to a much wider class of generalized pentagram maps.

The Lax representation via corner invariants.
We let ζ be a formal indeterminate.
Definition 5.2. A projective zero-curvature equation with spectral parameter is the following data: for each i ≥ 1, two functions L i : Dom f → P(Mat 3 (k(ζ))) and P i : Dom f → PGL 3 (k(ζ)), such that, for all t ∈ Z, Definition 5.3. A projective Lax representation with spectral parameter is, for each i ≥ 1, two functions In this situation, the functions T i are collectively called a projective Lax function with spectral parameter and the function P i is called the associated function.
Now we give explicit formulas for functions L i , P i , T i as in Definitions 5.2 and 5.3 that are associated to the pentagram map. For any i ∈ Z, we define L i , P i : T n P(Mat 3 (k(ζ))) by Note that L i and P i are n-periodic in i, since x i and y i are n-periodic in i. We also introduce an optional time index t ∈ N ≥0 . We set Also for any i ∈ Z, we set Theorem 5.4. [43, Theorem 2.2] Suppose that k is an algebraically closed field. Let L i , P i , and T i be defined, respectively, by (6), (7), and (8). Then we have Thus the functions L i and P i define a projective zero-curvature equation with spectral parameter for the pentagram map, and T i is a projective Lax function with spectral parameter, with associated function P i .

This Lax representation appeared as [43, Theorem 2.2]
, where the proof is the brute-force calculation that the matrix equations (9) and (10) follow from (6) and (7). That approach requires foreknowledge of the hard-to-guess formulas (6) and (7). Below, we give a new proof that leads naturally to these formulas. We first show that equations of the form of(9) and (10) must hold for some matrices L i and P i , then deduce the right definitions for L i and P i as a consequence.
This argument generalizes to other pentagram-like maps. In particular, it explains the origin of the complicated formulas in the Lax representation of the 3D pentagram map [24, Theorem 6.3].
Proof of Theorem 5.4. We use the hypothesis that k is algebraically closed to to define the moduli space T n of twisted n-gons (Theorem 3.6). Without loss of generality, set t = 0.
Suppose that v ∈ Dom f . We set the notation v = f (v). Define a 4-arc to be a 4-tuple of points in general position. Given any pair of 4-arcs, there is a unique projective transformation mapping the first to the second. So, we can define projective transformations by specifying the image of a single 4-arc. We call this 4-arc the source 4-arc and we call its image the target 4-arc.
For each i ∈ Z, we now define three projective transformations because both sides are projective transformations such that We need to write the equality (11) in terms of matrices, which requires choosing bases. For each of the transformations Λ i , Π i , Λ i , we write a matrix L i , P i , L i (respectively) for it, in the (unique) basis such that the given source 4-arc is located at When we rewrite (11) as an equality in P(Mat 3 (k)), we get We rearrange (12) to be in the form of a projective zero-curvature equation for the pentagram map: The reversal of composition order is a consequence of the different choice of basis. Now, we derive formulas for the matrices. For ease of notation, we just compute formulas for L 1 and P 1 , and the rest follow by symmetry. We wish to write a matrix in the basis e 1 , e 2 , e 3 for the unique projective transformation that takes e i to a representative e i of the corresponding point in the target 4-arc, for each i = 1, 2, 3, 4,. We can do this as follows.
(1) Calculate any choice of e 1 , e 2 , e 3 in the chosen basis as a function of the coordinates Find values µ 1 , µ 2 , µ 3 such that, up to rescaling, If these are not obvious, we can find them by calculating some choice of e 4 in the chosen basis and setting (3) By direct check, the following matrix has the desired property: (4) Scale the matrix in Step 3 so that it is written in terms of the corner invariants x i , y i instead of the a i , b i , c i , d i . We can ease this computation by choosing a 1 = b 1 = c 1 = −d 1 = 1, which is a choice consistent with our lift. We can also choose some, but not all, of the other variables to be 1, by a rescaling. First we calculate L 1 −1 and invert it to obtain L 1 . We can take we can take Thus, up to scale, We want to find a matrix projectively equivalent to this one that is written in terms of corner invariants. From Lemma 3.14, we know that the entry with a 2 should be transformed to match x 0 . So, dividing through by b 2 and using the known values a 1 = b 1 = c 1 = 1 and We follow the same steps for P 1 −1 . This time we get Thus, up to scale, Dividing through by b 0 b 2 c 3 and making the convenient choice c 0 = 1 gives us the desired form, Taking projective inverses and using symmetry, we deduce the formulas The last step to prove the zero-curvature equation is to use the scaling invariance of the pentagram map to bring in a spectral parameter. The map commutes with the pentagram map. This map is an action of G m on T n . The matrices appearing in (12) are functions of T n , but we can extend them to functions of T n × G m by setting L i (v, ζ) = L i (ζ · v) and P i (ζ, v) = P i (ζ · v). The projective zero-curvature equation (12) still holds for these matrices because the pentagram map commutes with the G m -action. Suppressing the notational dependence on v, and rescaling the matrices by ζ or 1/ζ as needed to get simpler formulas, we obtain the Lax representation with spectral parameter appearing in the theorem statement.
Finally, we use the zero-curvature equation to get the Lax equation. Since P i is n-periodic in i, This conclude the proof of Theorem 5.4.
Remark 5.5. The Lax representation found by Soloviev differs from ours by some signs. The matrix in place of our L i is , and the matrix in place of our This can be explained by a change of basis by diag(1, 1, −1), so there is essentially no difference between the formulas.
For an affine Lax representation, the natural next step is to deduce that the coefficients of the characteristic polynomial are invariants. We have to modify this step slightly because our Lax representation is projective.
So, the coefficients of the γ i are functions on T n such that the scaling class of the triple (h 1 , h 2 , h 3 ) is invariant for the pentagram map. We can eliminate negative powers of ζ by multiplying through by ζ n . Then we can normalize by scaling so that γ 1 (ζ) becomes monic. This puts the expression in the form Since Q is invariant under the pentagram map as a formal expression, the coefficients of Q are rational functions on T n which are invariant for the pentagram map. We would like to say which terms appear in Q. This may be done with an inductive calculation using the explicit formula for L i ; we refer to [34,Prop. 5.3] for the argument, and just state the end result.
Corollary 5.6. Set the notation m = n/2 . Then, for some The coefficients H 1 , . . . , H 2m+2 in the expression Q(λ, ζ) are rational functions on T n that are invariants of the pentagram map. Thus the fibers of H : T n S are invariant for the pentagram map.

The Geometry of the Spectral Curve
In Corollary 5.6, we described a bivariate polynomial Q(λ, ζ) with coefficients H 1 , . . . , H 2m+2 which are rational functions on T n and invariant for the pentagram map. In this section, we view Q(λ, ζ) as the equation of a curve. We continue with the notation of Corollary 5.6. Set homogeneous coordinates [X : Y : Z] on P 2 S . When we dehomogenize, we denote the corresponding remaining coordinates by the lowercase letters x, y, z. Thus if we dehomogenize by setting Z = 1, we write x = X/Z and y = Y /Z. (These are not to be confused with the corner invariants x i , y j .) Definition 6.1. For each n ≥ 4, we define the n-th spectral curve to be the relative curve Γ → S in P N S cut out by the homogeneous polynomial We may alternately view the relative curve Γ → S as a family of curves indexed by S.
The spectral curve describes the eigenvalues in an algebraic 1-parameter family of linear maps, since Q(λ, ζ, 1) equals the quantity Q(λ, ζ) described in Corollary 5.6.
Because the defining polynomial of the spectral curve is invariant for the pentagram map, we can think of the spectral curve itself as an invariant. In this section, we prove some geometric properties of the spectral curve in order to be able to describe its Jacobian. The results are collected in Proposition 6.2 and Theorem 6.4.
The spectral curve was defined in (in a slightly different form) by Soloviev in [43] to prove complex integrability over C; in this section, we extend that argument to any algebraically closed field k, where char k = 2. The argument proceeds by desingularizing a family of curves and computing the genus of the generic fiber with the Riemann-Hurwitz formula. Directly computing the genus of the generic fiber is difficult, so we compute the genus of a carefully chosen special fiber, and then show that this special fiber has the same genus as the generic fiber. As discussed in Section 2, our special fiber calculation fills a gap in [43].
Basic references for these techniques are as follows. For the resolution of curve singularities, and the basic theory of zeroes and poles of rational functions on singular varieties, see [26,Ch. 1]. For the basic theory of the Riemann-Hurwitz formula in arbitrary characteristic, see [16,Ch. 4.2] or [40,Ch. 2].
By curve, we mean a projective, possibly singular algebraic variety of dimension 1 over an algebraically closed field.
We prove various properties of the fibers of Γ → S which hold on a Zariski dense subset of S. Note that for any particular fiber, we may change coordinates to obtain a curve with affine equation of the form where I 0 , . . . , I m , J 0 , . . . , J m ∈ k. This simpler form is unique up to a choice of third root of unity. We set S = Spec k[I 0 , . . . , I m , J 0 , . . . , J m ]. For short, we write k[I, J] to mean k[I 0 , . . . , I m , J 0 , . . . , J m ]. We define a family of curves Γ → S in P 2 S n by the homogeneous equation A property of the fibers of Γ → S is said to hold generically if, for all geometric points s in some Zariski dense open subset of S, the property is true for Γ s . Properties of curves which are stable under birational maps and which hold generically for fibers of Γ also hold generically for fibers of Γ. We refer to the affine plane defined by Z = 0 as the main affine patch. For any point s ∈ S , we consider the special fiber Γ s → Spec k. The geometry of the curve Γ s varies with s; depending on the choice of s, the special fiber may be reducible, non-reduced, or have worse singularities and thus a lower genus than expected. The next theorem describes the geometry of Γ .  Table 1.
Proof. (1) To find the points that are outside the main affine patch, set Z = 0 and solve for X and Y . The points [1 : 0 : 0] and [0 : 1 : 0] are singular by the Jacobian criterion for smoothness.
(2) We start by desingularizing [1 : 0 : 0]. Dehomogenizing by X = 1, we obtain the equation In the yz-plane, the singularity is at (0, 0), so we have prepared it for blowing up. We treat [0 : 1 : 0] similarly. We use the standard algorithm for blowing up a point singularity in the plane, and the results are as shown in Table 1. In characteristic 2, we have used the separability of the polynomials I m α 2 − J 0 α + 1 and J m α 2 − I 0 α + 1 to justify that there are two roots.
(3) The images ζ(P ) and ramification indices of ζ may be determined from the local equations in Table 1. For example, for the point above [1 : 0 : 0] when P is odd, the map ζ iŝ y in the given coordinates. The vanishing order ofŷ is the length of the module Evidently this module has length 2, soŷ vanishes to order 2. So ζ has a zero there, and the ramification index is 2.  Table 1. (Note that O 1 is not in Table 1 Table 1, and again W 2 and W 3 are not defined over the base S . Theorem 6.4. Assume char k = 2. For generic s ∈ S, the curve Γ s over k is integral, and has geometric genus g(Γ s ) = n − 1, n odd, n − 2, n even.
We prove the theorem for Γ s , and the result for Γ s follows immediately because geometric genus is a birational invariant. We split the proof of Theorem 6.4 into lemmas, which make up the remainder of this section.  Table 1. A map Γ → Γ generically resolving the singularities above [1 : 0 : 0] and [0 : 1 : 0], given in terms of coordinate changes and local equations. We also record the geometric points above the singularities, and their images and ramification by the map ζ.
The idea of the proof is to compute the genus of a special fiber. We have to choose the special fiber judiciously, because (roughly speaking) if the fiber we choose has worse singularities than the generic fiber, then the genus will be lower. Definition 6.5. We call Γ s a good fiber if it satisfies all of the following conditions: (1) The k-scheme Γ s is integral.
(2) The singularities at [1 : 0 : 0] and [0 : 1 : 0] of Γ s are resolved by Γ s → Γ s . Equivalently, the following nondegeneracy conditions hold: (3) The curve Γ s is nonsingular in the main affine patch. Equivalently, there are no singularities of Γ s in the main affine patch.
The next lemma shows that the generic curve's genus can be computed by looking at a good fiber, because a good fiber's singularities are as mild as possible for the family Γ . Lemma 6.6. Suppose that a good fiber Γ s exists. Then generically, the fibers of Γ have the same genus as Γ s .

Proof.
Integrality is an open condition, because the locus of reducible polynomials of a fixed degree is an algebraic subset of the space of all polynomials of that degree. Thus, since Γ s is integral, so is the generic fiber of Γ .
We claim that for generic s , we have Since geometric genus is a birational invariant, it suffices to show g(Γ s ) ≥ g(Γ s ).
For generic s , the singularities of Γ s at [1 : 0 : 0] and [0 : 1 : 0] have the structure described in Table 1. Denote arithmetic genus by g a . By the good fiber hypothesis, g(Γ s ) = g a (Γ s ).
Observe that Γ s and Γ s are plane curves with the same degree, hence the same arithmetic genus. Combining this with the fact that the singularities of Γ s and Γ s at [1 : 0 : 0] and [0 : 1 : 0] have the same structure, we find g a (Γ s ) = g a (Γ s ).
For any curve, the arithmetic genus is at least the geometric genus, so Putting it all together proves the claim: Since all the curves in Γ have the same degree, the family Γ is flat, so the function S → Z ≥0 , s → g(Γ s ) is lower-semicontinuous in the Zariski topology. Therefore, the genus for generic s ∈ S must be exactly g(Γ s ).
The next lemma describes the essential idea of the strategy for calculating the genus of a good fiber. To state it, we need more notation.
Consider the map ζ : Γ s → P 1 from Proposition 6.2. Let Ω be the sheaf of relative differentials on Γ s , where the structure map is ζ.
For any point P ∈ Γ s , we denote the length of Ω at P by len(Ω P ). For short, we also write ω(P ) = len(Ω P ).
We denote the vanishing order of a function Φ ∈ K(Γ s ) at P by ord P Φ. If Φ has a pole at P , then ord P Φ is negative.
We use the notation Note that the functions R x , R y are computed by dehomogenizing R so that Z = 1. We also set the notation P ∞ for the set of points of Γ s above the line Z = 0. Thus, • Odd n : Lemma 6.7. If Γ s is a good fiber, then Proof. Because Γ s is a good fiber, it is a nonsingular, integral curve. Further, since Γ s is a good fiber, we have I m = 0. Working in dehomogenized coordinates x, y, we see by inspection that y is a uniformizer at (x, Therefore ζ is separable. So the Riemann-Hurwitz formula applies to ζ. Since ζ is degree 3, the Riemann-Hurwitz formula states 2g(Γ s ) − 2 = (−2) · 3 + P ∈Γ s ω(P ).
Breaking apart the sum and rearranging this formula gives We compute the first sum another way. Suppose that P ∈ P ∞ . Then P is in the main affine patch. Working in dehomogenized coordinates x, y, we can compute the module of relative differentials at P explicitly.
Then, since the zeros and poles of a rational function have total vanishing order 0, we get This completes the proof of Lemma 6.7.
Now we come to the last step, which takes some luck. In each characteristic, we need to find a good fiber and compute the vanishing order ord P R x and ω(P ) for each point P ∈ P ∞ . We split the job into cases depending on the characteristic and n.
For the remainder of the section, we set notation for the quantity which we claim is the expected genus, g(n) = n − 1 n odd, n − 2 n even.
Lemma 6.8. Suppose char k = 2 and char k n. The curve Γ s cut out by is a good fiber, and its genus is g(n). This fiber corresponds to s ∈ S defined by the coordinates I m = −1, J m = 1, and all other I i , J i = 0.
Proof. First we check the three conditions for Γ s to be a good fiber.
(1) Since char k = 2, the Eisenstein criterion applies with reference to the ideal (x + 1), so Γ s is integral.
Since by assumption n = 0 in our characteristic, we deduce from R y = 0 that either z = 0, k = 0, or k = 1. Looking at R x , only the last case is possible, and in that case y n = 1. But plugging this information into R, we have −2 = 0, which is false since char k = 2. Next, we compute the quantities ω(P ) and ord P R x for each P ∈ P ∞ . We list the results of the calculation in Table 2. To compute these quantities, first we compute ω(P ) for each Table 2. Calculation of the genus of Γ s . P ∈ P ∞ . We can inspect the equations in Table 1 to deduce the ramification index e(P ) at each P ∈ P ∞ , and we find that e(P ) ≤ 2 for each P . So, by the assumption that char k = 2, the ramification at each P is tame. So ω(P ) = e(P ) − 1. Next, we compute ord P R x for each P ∈ P ∞ .
We homogenize, then dehomogenize by X = 1. We obtain the local equation We blow up (y, z) = (0, 0) according to the formula in Table 1. We compute the equation of R x in the coordinatesŷ,ẑ. We split into cases for n odd and even. Suppose that n is odd; then Because ord P is a valuation, if one of these terms has smaller order than all the others, then ord P R x is computed by the order of that term. But in this case there are two terms of least order: ord P (ŷ/ẑ) = ord P (1) = 0.
We eliminate one term by adding the appropriate multiple of R; this leaves one term, 2, of minimal order 0. Then, since char k = 2, the vanishing order at P is 0.
On the other hand, suppose that n is even; then The coordinates of O 2 , O 3 are (ŷ,ẑ) = (0, ±1), so we can see directly by plugging in values that, since 2 = 0, the function R x has order 0 at O 2 , O 3 .
• We compute the order at P = W 1 . The equation of R x inx,ẑ is . The numerator at W 1 = (0, 1) is 1. The order of the denominator is computed by examining the local equation for R. We find thatẑ has order 0, andx has order 1, so ord P R x = −n.
• The argument for W 2 , W 3 uses the same techniques, so we omit it. Finally, we plug the quantities in Table 2 into Lemma 6.7.
Lemma 6.9. Suppose char k = 2 and char k | n. The curve Γ s cut out by is a good fiber, and its genus is g(n). This fiber corresponds to s ∈ S defined by the coordinates I m = 1, J m−1 = −1, J m = 1, and all other I i , J i = 0.
Proof. The structure of the proof is identical to that of Lemma 6.8, but the computations are different. First we check the three conditions for Γ s to be a good fiber.
(1) We claim Γ s is integral. If it were not, then R(x, y) would factor in k[x, y], and since R is cubic in x, there would be a factor linear in x. Since Γ s contains no points of the form y = 0 in the main affine patch, this line would be of the form x = c for some constant c ∈ k. But this cannot happen, since if R(c, y) were identically 0, then examining coefficients, we would have both c = 0 and c = 1. (3) We claim that Γ s is nonsingular in the main affine patch. To see this, observe that a singularity (x, y) would satisfy R y (x, y) = −x 2 y n−1 = 0, since char k | n. So if (x, y) is a singularity, then x = 0 or y = 0. But for such points, we have R x (x, y) = 3x 2 y n − 2xy n−1 − 2xy n + 1 = 1 = 0. The values of ω(P ) and ord P R x coincide with the numbers in Table 2. The computation is nearly identical, so we omit it. Remark 6.10. We briefly explain how the polynomials (13) and (14) were found. The first is R(x, y) = x 3 y n − x 2 y n − x − 1 = 0. We tried various polynomials that had few terms and this was the simplest one that we found that had small genus. But this polynomial is not suitable for the case when the the characteristic of k divides n, because then the y-derivative R y (x, y) is identically 0, and the Jacobian criterion reveals extra singularities in the main affine patch. Thus for this case we use the polynomial R(x, y) = x 3 y n + x 2 y n−1 − x 2 y n + x − 1. Characteristic 2 is more difficult than the others because a hypothesis in the definition of good fiber (Definition 6.5) reduces to I 0 , I m , J 0 , J m = 0 in characteristic 2. Thus a good fiber needs to have at least 6 monomials in its defining equation, which makes calculating the singularities with the Jacobian criterion very complicated. This is the reason for the hypothesis on characteristic in Theorem 1.4.
Finally, we collect these results to prove Theorem 6.4.

The Spectral Transform
We now describe the construction of the direct spectral transform, the birational map δ : T n A of Theorem 1.4. The idea is that a twisted n-gon v can be reconstructed from the Lax matrices T i (v, ζ), and matrices can be reconstructed from their eigenvalues and eigenvectors, at least generically. The eigenvalues correspond to the three points of the spectral curve Γ H(v) above ζ. Each eigenvalue has an associated eigenvector (up to scale), and these fit together into a line bundle on Γ H(v) . In fact, Soloviev's argument over C in [43] goes over to our setting with only cosmetic changes, so we just formulate the statements we need and appeal to [43] for the proofs.
Let Γ → S be the spectral curve (Definition 6.1). The map Γ → S is projective, flat, and finitely presented, since it is a family of projective plane curves of the same degree. By Theorem 6.4, the fibers are integral schemes of dimension 1 over an algebraically closed field. Then by [5,Theorem 8.2.1], the relative Picard scheme Pic Γ/S exists and has the structure of both a k-variety and an S-scheme.
zThe map H : T n S gives a dense, Zariski open subset T • n ⊂ T n the structure of an S-scheme. For each v ∈ T • n , the special fiber Γ H(v) is a degree 3 curve. The points (λ, ζ) of Γ H(v) in the main affine patch parametrize eigenvalues λ of T 0 (v, ζ). The map ζ : Γ H(v) → P 1 is generically 3-to-1, so there is a unique λ-eigenvector ψ (up to scale) of T 0 (v, ζ) associated to a generically chosen point (λ, ζ) on Γ H(v) . The eigenvector's coordinates are rational functions of λ, ζ and v. Because ψ varies algebraically in λ and ζ, and Γ H(v) is a projective curve, we can extend ψ in a unique way to a line bundle on the normalization. Since T • n is an S-scheme, the family of line bundles ψ is represented by a T • n -point on Pic Γ/S . So there is a corresponding map Ψ : T • n → Pic Γ/S . Lemma 7.1. For any algebraically closed field k and for generic v in T • n , the line bundle ψ H(v) has degree g(n) + 2.
Proof. Over C, this follows from the fact that the ramification points of ζ on Γ are generically simple; a proof is given in [43,Lemma 3.4]. We extend this to any characteristic by observing that the degree of a line bundle defined over Z is preserved by base change. More formally, let S Z = A 2m+2 Z , and consider the subscheme Γ of P 2 S Z cut out by the affine equation Q(λ, ζ) = 0 defining the spectral curve. Define (T • n ) Z similarly. The scheme Pic Γ Z /S Z exists, and the eigenvector bundle is a map from G 2n m to Pic Γ Z /S Z . Since the eigenvector bundle has degree g(n) + 2 for C-points, it must send the generic point of (T • n ) Z into Pic g(n)+2 Γ Z /S Z . Definition 7.2. For each n ≥ 4, we define a relative abelian variety A, the spectral data, and a rational map δ : T n A, the spectral transform. The definitions of A and δ depend on the parity of n, as follows.
• Odd n : Let A = Pic n+1 Γ/S , and let δ = Ψ. The points O 1 , O 2 , W 1 , W 2 were defined as sections of Γ → S ; see Definition 6.3. By abuse of notation we let O 1 , O 2 , W 1 , W 2 denote the corresponding sections of Γ → S. The morphism δ on T • n extends to a rational map δ : T n A.
• Even n : In this case, we need to mark the points O 2 , O 3 , W 2 , W 3 appearing in Table 1. Extend the base S by adjoining a rootx 0 ofx 2 0 − h 1x0 + h n and a rootẑ 0 of h n+1ẑ  Table 1.) This defines a generically 4-to-1 cover S mark → S, and by pullback, we define a family Γ mark → S mark . The members of this family are spectral curves with a marking of the points O 2 , O 3 and W 2 , W 3 . We define A = Pic n Γ mark /S mark . The latter relative Picard scheme exists by the same condition we used for Pic Γ/S . Recall that x i , y i denote the corner invariants, which are coordinates on T n . The map H factors through H mark : T • n → S mark , by choosinĝ So T • n has the structure of an S mark -scheme. Define δ : T • n → Pic Γ mark /S mark to be the map induced by pulling back Ψ. Then δ defines a rational map δ : T n Pic Γ mark /S mark . Theorem 7.3. Assume that char k = 2. Then the spectral transform δ : T n A of Definition 7.2 is a birational map.
Proof. The construction of the rational inverse of δ, the inverse spectral transform, is carried out over C in [43,Section 3.2]. It runs for several pages and works almost verbatim for our setting. The structure of the argument over C is as follows. First, describe the divisor of ψ H(v) on Γ H(v) , for generic v, by an explicit calculation of the vanishing order for each point in P ∞ . Second, the genus of the spectral curve (for generic s ∈ S) is g(n) + 2, so the Riemann-Roch theorem can be used to show that there is only one such divisor in each linear equivalence class. Third, show that a Lax matrix is determined by the data of its eigenvalues and eigenvector divisor. Now we adapt the argument to the field k. For the first step, the divisor calculations are the same for any algebraically closed field k, by inspection of the (many) formulas in [43,Appendix]. Note that the divisions by 2 that appear in this argument are not used in the divisor calculations, but rather to construct the universal symplectic form, so they are not relevant to the present argument. The limits which appear in the calculation are just the leading terms appearing in certain Laurent expansions, so these calculations are all algebraic. We need to work with corner invariants x i , y i instead of ab-coordinates, but we get the same results.
For the second step, the genus of the generic spectral curve is g(n) if char k = 2, by Theorem 6.4.
The third step, the reconstruction of the Lax matrix, is algebraic in nature and makes sense for any algebraically closed base field.
While the genus of the spectral curve Γ s for generic s ∈ S is g(n) + 2 by Theorem 6.4, it does not follow that the genus of Γ H(v) for generic v is g(n) + 2. In fact, there are loci in S that correspond to spectral curves of lower genus, such as the image of H by the subset of T n consisting of closed polygons. One way to resolve this issue is to show that the pentagram invariants (the coordinates of H) are algebraically independent, so H is dominant; this was done over C in [37]. The argument we use here constructs an explicit birational inverse for δ. Comparing the dimensions of T • n and A, we obtain algebraic independence of the pentagram invariants as a corollary.
Corollary 7.4. The invariants of f are algebraically independent over any field k for which char k = 2.
Finally, we describe the effect of the pentagram map f after birationally identifying T n with A via δ.
Theorem 7.5. Let k be an algebraically closed field, and assume char k = 2.
• Odd n : Let τ : A → A denote translation by the section [−O 1 + W 2 ] ∈ Pic 0 Γ/S . Then as rational maps, • Even n : Let τ : A → A denote translation by the section [−O 1 + W 2 ] ∈ Pic Γ mark /S mark . Let ι be the map on A induced by the involution on S mark interchanging the marked roots. Then as rational maps, Proof. The proof is carried out over C in [43,Section 4]. The same argument works without changes over any algebraically closed field for which the result of Theorem 7.3 holds, again making the necessary change of replacing ab-coordinates with corner invariants.
We now have the pieces of our main theorem.
We end this section with an application of Theorem 7.5 to arithmetic complexity, partially confirming an empirical observation made in [25,Section 5]. Let k =Q, and let h Weil Tn : T n (Q) → R be a (logarithmic) Weil height function on T n relative to some chosen divisor; see [17] for background. In [25, Fig. 3], it is observed that the growth of h Weil Tn appears to be polynomial. In fact, for sufficiently generic polygons, the height growth is linear. Corollary 7.6. Let n ≥ 4, and let v ∈ T n (Q) be a twisted n-gon defined overQ that is in the domain of δ and the image of δ −1 . There is a constant C = C(v) > 0 depending on v, such that, for all t ∈ N such that f t (v) is defined, we have h Weil Tn (f t (v)) ≤ Ct. Proof. First, assume n is odd. Let A be the fiber of A → S containing δ(v). According to Theorem 7.3, there exists a point a ∈ A such that, for any twisted n-gon w with δ(w) ∈ A, we have f (w) = δ −1 (δ(w) + a).

By functoriality of Weil heights, the pullback of h Weil
Tn to A is a Weil height on A, which we denote h Weil A . Thus, for all t ∈ N such that f t (v) is defined, we have h Weil Tn (f t (v)) = h Weil A (δ(v) + ta). The growth of the right side is well-known to be at most linear in t. For completeness, we give the argument here. Since A is an abelian variety defined over Q, it admits a canonical height h A : A → R; see [17,Chapter B.5] for all the properties we use. There exists a constant C 0 such that, for all a 0 ∈ A, we have |ĥ A (a 0 ) − h Weil A (a 0 )| ≤ C 0 . Further, for any m ∈ N,ĥ A (ma) = mĥ A (m).
Finally, the parallelogram law implies that there is a constant C 1 independent of w such that, for all a 0 ∈ A, we have h Weil A (δ(v) + a 0 ) ≤ 2h Weil A (a 0 ) + C 1 . Thus h Weil A (δ(v) + ta) ≤ 2h Weil A (ta) + C 1 ≤ 2(ĥ A (ta) + C 0 ) + C 1 ≤ 2t(ĥ A (a) + C 2 ) for some sufficiently large constant C 2 , completing the proof for n odd. Now let n be even. The proof above shows that the height growth of the second iterate f 2 is linear. Since the growth is linear for the orbits of f 2 starting from both v and f (v), the orbit of f starting at v also has linear growth; just take the larger of the two constants.

A Collapse Conjecture for the Pentagram Map over Finite Fields
Theorem 1.4 shows that the same algebro-geometric structure underlies the pentagram map over various fields. However, the implications for the dynamics over C andF p could not be more different. In this section, we sketch an argument that a randomly chosen twisted polygon inF p , upon iteration, is likely to enter the degeneracy locus of the pentagram map. Geometrically, this corresponds to some iterate of the map being a degenerate polygon. This section may be read independently of the proof of Theorem 1.4. Definition 8.1. Given a rational map φ : V V , let I φ ⊂ V denote the indeterminacy locus of φ. Given N ∈ N, if v ∈ I φ N , we say the N -th iterate of φ at v is undefined and write formally φ N (v) = * . Otherwise, the point φ N (x) is the N -th iterate of x.
The orbit of a point v ∈ V is the set of iterates of v, valued in V ∪ { * }. We also use the term orbit to refer to the sequence of iterates of v, rather than the set they form.
A preperiodic point is a point v such that, for some values M = N in N, the iterates φ M (v) and φ N (v) are defined and φ M (v) = φ N (v). A periodic point of period N is a point v such that φ N (v) = v.
Note that, if we were to use the inductive definition of orbit then each orbit would terminate after hitting the indeterminacy locus. Definition 8.1 makes it possible, in certain cases, to talk about the behavior of an orbit even after meeting the indeterminacy locus. Thus different choices of w give orbits which pass through the same point v but then "remember" information from earlier in the orbit.
Our definition of orbit, Definition 8.1, is unusual at first glance, but it is well-suited for the algebraic dynamics of rational maps, as we now explain.
In real and complex dynamics, it is common to restrict the domain so that a rational map φ : V V becomes a function, set-theoretically. This means throwing away all points with an iterate in I φ . We call the remaining subset the dynamical domain, denoted DynDom(φ). Formally, writing φ −N for the N -fold inverse image, Over R and C, if φ is dominant, then since I φ has measure 0, we end up deleting a set of measure 0 to obtain DynDom(φ). This leaves a nice measure space on which to study the generic dynamics of the system.
Over countable algebraically closed fields, such asQ andF p , there is a potential problem in setting up the dynamical domain: a countable union of proper subvarieties can contain all the points of the domain. However, it turns out that the dynamical domain is never empty overF p . By work of Hrushovski, DynDom(φ) is Zariski dense in V ; see [1, Corollary 2]. Nevertheless, on the level of points, the dynamical domain could still be very small. To measure the size of the dynamical domain, one can study the fraction of orbits which degenerate while going up a tower of finite fields.
In the survey of arithmetic dynamics [3], Conjecture 18.10b states that the dynamical domain is large in the sense that, for any rational map φ : P n P n over F q , lim r→∞ # DynDom(φ) ∩ P n (F q r ) #P n (F q r ) = 1.
But computer experiments and Theorem 1.4 suggest that the pentagram map is a counterexample. From the formulas for the pentagram map in Proposition 4.2, homogenizing via the scaling invariance, one obtains an explicit map φ : P 2n−1 P 2n−1 with the same property. If we are right about Conjecture 8.3, then the dynamical domain is badly behaved over finite fields, similar results might hold for other discrete integrable systems. On the other hand, our main theorem shows that a birational change of domain can almost completely remove the dynamical indeterminacy of the map. The situation here is reminiscent of the notions of good reduction versus potential good reduction in arithmetic dynamics. It would be interesting to see whether more general maps admit conjugacies that improve their dynamical domains. 8.1. Plausibility argument. We now explain how Theorem 1.4 provides heuristic evidence for Conjecture 8.3.
For simplicity, let n be odd. Let S be the base of the family A of abelian varieties in Theorem 1.4. Fix p and consider various powers q = p r . Each F q -point of S gives us an f -invariant subvariety of T n defined over F q . Some of the F q -points of T n belong to invariant subvarieties defined over smaller finite fields than F q , but we claim these are relatively rare. Let q = p r . For each proper subfield F p of F q , we see O(p (n+1) ) members of A defined over F p , each containing O(p (n−1)r ) points over F q . But these make up only a small fraction of the O(p 2nr ) points in T n (F q ).
The pentagram map is undefined at a point if the construction of the image polygon results in a degenerate n-gon; this occurs if some set of points of the form v i , v i+1 , v i+2 or v i , v i+2 , v i+4 are collinear.
Let A be a member of A defined over F q . We claim almost all the F q -points eventually hit I f ∩ A. To see this, observe that the degeneracy locus has codimension 1, so it should cut a codimension 1 subset out of each invariant fiber. So I f ∩ A contains O(1/q) of the F q -points of A. The group of points of a random Jacobian over F q is usually close to being cyclic, so the order of a random translation on a random Jacobian is close to the order of the whole group. Thus, tracking the motion on the Jacobian, A(F q ) should be roughly one orbit under f , so hitting a degeneracy point is highly likely.
To formalize the above argument, some substantial work would be needed to understand the intersections I f ∩ A, to understand the randomness of the Jacobians and the translations, and to make sure that the degeneracy locus is not collapsed by δ.