Paul Görlach

AND Evelyne Hubert

Théo Papadopoulo

RATIONAL INVARIANTS OF EVEN TERNARY FORMS UNDER THE ORTHOGONAL GROUP

In this article we determine a generating set of rational invariants of minimal cardinality for the action of the orthogonal group O 3 on the space R[x, y, z] 2d of ternary forms of even degree 2d. The construction relies on two key ingredients: On one hand, the Slice Lemma allows us to reduce the problem to determining the invariants for the action on a subspace of the finite subgroup B 3 of signed permutations. On the other hand, our construction relies in a fundamental way on specific bases of harmonic polynomials. These bases provide maps with prescribed B 3 -equivariance properties. Our explicit construction of these bases should be relevant well beyond the scope of this paper. The expression of the B 3 -invariants can then be given in a compact form as the composition of two equivariant maps. Instead of providing (cumbersome) explicit expressions for the O 3 -invariants, we provide efficient algorithms for their evaluation and rewriting. We also use the constructed B 3 -invariants to determine the O 3 -orbit locus and provide an algorithm for the inverse problem of finding an element in R[x, y, z] 2d with prescribed values for its invariants. These computational issues are relevant in brain imaging.

Contents

1. Introduction 1 2. Preliminaries 6 3. The Slice Method 10 4. Invariants of ternary quartics 13 5. Harmonic bases with B 3 -symmetries and invariants for higher degree 18 6. Solving the main algorithmic challenges 28 References 32

Introduction

Invariants are useful for classifying objects up to the action of a group of transformations. In this article we determine a set of generating rational invariants of minimal cardinality for the action of the orthogonal group O 3 on the space R[x, y, z] 2d of ternary forms of even degree 2d. We do not give the explicit expression for these invariants, but provide an algorithmic way of evaluating them for any ternary form. Classical Invariant Theory [START_REF] Grace | The algebra of invariants[END_REF] is centered around the action of the general linear group on homogeneous polynomials, with an emphasis on binary forms. Yet, the orthogonal group arises in applications as the relevant group of transformations, especially in three-dimensional space. Its relevance to brain imaging is the original motivation for the present article.

Computational Invariant Theory [DK15, [START_REF] Grace | The algebra of invariants[END_REF][START_REF] Sturmfels | Algorithms in invariant theory[END_REF] has long focused on polynomial invariants. In the case of the group O 3 , any two real orbits are separated by a generating set of polynomial invariants. The generating set can nonetheless be very large. For instance a generating set of 64 polynomial invariants for the action of O 3 on R[x, y, z] 4 is determined as a subset of a minimal generating set of polynomial invariants of the action of O 3 on the elasticity tensor in [START_REF] Olive | A minimal integrity basis for the elasticity tensor[END_REF]. There, the problem is mapped to the joint action of SL 2 (C) on binary forms of different degrees and resolved by Gordan's algorithm [START_REF] Grace | The algebra of invariants[END_REF][START_REF] Olive | About Gordan's algorithm for binary forms[END_REF] so that the invariants are given as transvectants.

A generating set of rational invariants separates general orbits [START_REF] Popov | Invariant theory[END_REF][START_REF] Rosenlicht | Some basic theorems on algebraic groups[END_REF] -this remains true for any group, even for non-reductive groups. Rational invariants can thus prove to be sufficient, and sometimes more relevant, in applications [HL12, [START_REF] Hubert | Scaling invariants and symmetry reduction of dynamical systems[END_REF][START_REF] Hubert | Computation of the invariants of finite abelian groups[END_REF] and in connection with other mathematical disciplines [START_REF] Hubert | Smooth and algebraic invariants of a group action. Local and global constructions[END_REF][START_REF] Hubert | Algebraic and differential invariants[END_REF]. A practical and very general algorithm to compute a generating set of these first appeared in [START_REF] Hubert | Rational invariants of a group action. Construction and rewriting[END_REF]; see also [START_REF] Derksen | Computational invariant theory[END_REF]. The case of the action of O 3 on R[x, y, z] 4 , a 15-dimensional space, is nonetheless not easily tractable by this algorithm. In the case of R[x, y, z] 4 , the 12 generating invariants we construct in this article are seen as being uniquely determined by their restrictions to a slice Λ 4 , which is here a 12dimensional subspace. The knowledge of these restrictions is proved to be sufficient to evaluate the invariants at any point in the space R[x, y, z] 4 . The underlying slice method is a technique used to show rationality of invariant fields [START_REF] Colliot-Thélène | The rationality problem for fields of invariants under linear algebraic groups (with special regards to the Brauer group). In Algebraic groups and homogeneous spaces[END_REF]. We demonstrate here its power for the computational aspects of Invariant Theory.

More generally, by virtue of the so-called Slice Lemma, the field of rational invariants of the action of O 3 on R[x, y, z] 2d is isomorphic to the field of rational invariants for the action of the finite subgroup B 3 of signed permutations on a subspace Λ 2d of R[x, y, z] 2d . Working with this isomorphism, we provide efficient algorithms for the evaluation of a (minimal) generating set of rational O 3 -invariants based on a (minimal) generating set of rational B 3 -invariants. Finding an element of R[x, y, z] 2d with prescribed values of O 3invariants and rewriting any O 3 -invariant in terms of the generating set are also made possible through the specific generating sets of rational B 3 -invariants we construct. R[x, y, z] 2d decomposes into a direct sum of O 3 -invariant vector spaces determined by the harmonic polynomials of degree 2d, 2d -2, . . . , 2, 0. The construction of the B 3 -invariants relies in a fundamental way on specific bases of harmonic polynomials. These bases provide maps with prescribed B 3 -equivariance properties. Our explicit construction of these bases should be relevant well beyond the scope of this paper. The explicit expression of the B 3 -invariants can then be given in a compact form as the composition of two equivariant maps. Both the rewriting and the inverse problem can be made explicit for this well-structured set of invariants.

The whole construction is first made explicit for R[x, y, z] 4 and then extended to R[x, y, z] 2d . It should then be clear how one can obtain the rational invariants of the joint action of O 3 on similar spaces, as for instance the integrity tensor.

In the rest of this section we first introduce the geometrical motivation and then the context of application for our constructions. Notations, preliminary material and a formal statement of the problems appear then in Section 2. In Section 3, we describe the technique for reducing the construction of invariants for the action of O 3 on R[x, y, z] 2d to the one for the action of a finite subgroup, the signed symmetric group, on a subspace. Based on this, we construct a generating set of rational invariants for the case of ternary quartic forms in Section 4. We extend this approach in Section 5 to ternary forms of arbitrary even degree; central there is the construction of bases of vector spaces of harmonic polynomials with specific equivariant properties with respect to the signed symmetric group. Finally, we solve the principal algorithmic problems associated with rational invariants in Section 6.

Acknowledgments. Paul Görlach was partly funded by INRIA Mediterranée Action Transverse. Evelyne Hubert wishes to thank Rachid Deriche, Frank Grosshans, Boris Kolev for discussions and valuable pointers. Théo Papadopoulo receives funding from the ERC Advanced Grant No 694665 : CoBCoM -Computational Brain Connectivity Mapping.

1.1. Motivation: spherical functions up to rotation. In geometric terms, the results in this paper allow one to determine when two general centrally symmetric closed surfaces in R 3 differ only by a rotation.

The surfaces we consider are given by a continuous function f : S 2 → R defined on the unit sphere S 2 := {(x, y, z) ∈ R 3 | x 2 + y 2 + z 2 = 1}. The surface is then defined as the set of points S := {(x f (x, y, z), y f (x, y, z), z f (x, y, z)) ∈ R 3 | (x, y, z) ∈ S 2 } ⊂ R 3 , i.e. for each point on the unit sphere we rescale its distance to the origin according to the function f . For example, the surface described by a constant function f ≡ r (for some r ∈ R) is the sphere with radius |r| centered at the origin. With more general functions f , a large variety of different surfaces can be described. For the surface to be symmetric with respect to the origin, one needs the function f to satisfy the property (1.1)

f (p) = f (-p) ∀p ∈ S 2 .
Since the unit sphere S 2 ⊂ R 3 is a compact set, the Stone-Weierstraß Theorem implies that a given continuous function S 2 → R can be approximated arbitrarily well by polynomial functions, i.e. by functions f : S 2 → R of the form

(1.2) f (x, y, z) = i+j+k≤d a ijk x i y j z k .
The symmetry property (1.1) is then fulfilled if and only a ijk = 0 whenever i + j + k is odd, in other words, f must only consist of even-degree terms. We can then rewrite f in such a way that all its monomials are of the same degree, by multiplying monomials of small degree with a suitable power of x 2 + y 2 + z 2 (which does not change the values of f since x 2 + y 2 + z 2 = 1 for all points (x, y, z) on the sphere).

We therefore model closed surfaces that are centrally symmetric with respect to the origin by f : S 2 → R, a polynomial function of degree 2d:

f (x, y, z) = i+j+k=2d a ijk x i y j z k .
The modeled surface can then be encoded exactly by simply storing the 1 2 (2d + 2)(2d + 1) numbers a ijk ∈ R. However, from such an encoding of a surface via the coefficients a ijk of its defining polynomial, it is not immediately apparent when the defined surfaces have the same geometric shape, only differing by a rotation. As an example, Figure 1.1 depicts the two surfaces S 1 and S 2 described by

f 1 (x, y, z) := 18x 2 -27y 2 + 18z 2 and f 2 (x, y, z) := 13x 2 + 20xy -20xz -2y 2 + 40yz -2z 2 ,
respectively, whose numerical description in terms of coefficients look very distinct, but whose shapes look very similar. Indeed S 2 arises from S 1 by applying the rotation determined by the matrix

1 3   2 -1 -2 2 2 1 1 -2 2   , so that f 2 (x, y, z) = f 1 2x + 2y + z 3 , -x + 2y -2z 3 , -2x + y -2z 3 .
In general, we want to consider surfaces to be of the same shape if they differ by a rotation or, equivalently, by an orthogonal transformation: Since we only consider surfaces symmetric with respect to the origin, two surfaces differing by an orthogonal transformation also differ by a rotation.

The question which arises is: How can we (algorithmically) decide whether two surfaces only differ by an orthogonal transformation, only by examining the coefficients of their defining polynomial?

Regarding this question, we should be aware that if f : S 2 → R describes S ⊂ R 3 , then its negative -f describes the same set S ⊂ R 3 . With the intuition of describing the surface by deforming the unit sphere, this ambiguity corresponds to turning the closed surface S inside out. We typically want to think of the surfaces defined by f and by -f as two distinct objects (even though they are equal as subsets of R 2 ). For example, the surface defined by the constant function f ≡ 1 is the unit sphere, while the surface defined by f ≡ -1 should be considered as the unit sphere turned inside out.

Then the question above corresponds to the following algebraic question:

Question 1.1. Given two polynomials f = i+j+k=2d a ijk x i y j z k and g = i+j+k=2d b ijk x i y j z k , how can we decide in terms of their coefficients a ijk and b ijk whether or not there exists an orthogonal transformation

ϕ : R 3 → R 3 such that f = g • ϕ as functions R 3 → R?
Once we can decide whether two polynomials define equally shaped surfaces, a natural question is how to uniquely encode the shape of a surface, i.e. an equivalence class of surfaces up to orthogonal transformations. The corresponding question for polynomials is:

Question 1.2. How can we encode in a unique way equivalence classes of polynomials up to orthogonal transformations?

For the purpose of illustration we discuss next the case of homogeneous polynomials of degree two, i.e. quadratic forms. In the following section, we shall describe the mathematical setup for addressing Questions 1.1 and 1.2 with the rational invariants of the action of the orthogonal group on ternary forms of even degree.

Illustration for the case of quadratic surfaces. Quadratic forms are in one-to-one correspondence with symmetric 3 × 3-matrices, as indeed we can write (1.2) as:

(1.3) f (x, y, z) = x y z    a 200 1 2 a 110 1 2 a 101 1 2 a 110 a 020 1 2 a 011 1 2 a 101 1 2 a 011 a 002    =:A   x y z  
When we compose f with a rotation, given by a matrix R, we obtain another homogeneous polynomial of degree 2. The defining symmetric matrix (as in 1.3) of the obtained polynomial is then RAR T . For two symmetric matrices A and B, Linear Algebra then tells us that there is an orthogonal matrix R such that B = RAR T if and only if A and B have the same eigenvalues. Yet, eigenvalues are algebraic functions of the entries of a matrix and thus cannot be easily expressed symbolically. It is thus easier to compare the coefficients of the characteristic polynomials. Up to scalar factors, these are:

(1.4) e 1 := a 200 + a 020 + a 002 , e 2 := 4a 020 a 200 + 4a 002 a 020 + 4a 002 a 200 -a 2 110 -a 2 101 -a 2 011 , e 3 := 4a 002 a 020 a 200 + a 101 a 110 a 011 -a 2 101 a 020 -a 2 011 a 200 -a 002 a 2 110 .

The result is that two homogeneous polynomial of degree 2 are obtained from one another by an orthogonal transformation if and only if the functions e 1 , e 2 , e 3 of their coefficients take the same values. This answers Question 1.1 in this case. The functions e 1 , e 2 , e 3 also provide a solution to Question 1.2. To each polynomial of degree 2 we can associate a point in R 3 whose components are the values of the functions e 1 , e 2 , e 3 for this polynomial. All equivalent polynomials will be mapped to the same point. One can check for example that this point is (9, -2592, -34992) for both f 1 and f 2 defined above. 1.2. Biomarkers in neuroimaging. The cerebral white matter is the complex wiring that enables communication between the various regions of grey matter of the brain. Its integrity plays a pivotal role in the proper functionning of the brain. Diffusion MRI (dMRI) has the ability to measure the diffusion of water molecules. The architecture of white matter, or other fibrous structures can be inferred from such measurements in-vivo and non-invasively. This paragraph introduces our original motivation for the problem solved in this article and thus follows only a single sub-thread of this research. The interested reader is referred to [START_REF] Johansen-Berg | Diffusion MRI. From Quantitative Measurement to In vivo Neuroanatomy[END_REF][START_REF] Jones | Diffusion MRI. Theory, Methods, and Applications[END_REF] for a more globalview of this field and the progress accomplished on the many challenges (acquisition protocols, mathematical models, reconstruction algorithms, . . .) since its inception [LBBL + 86].

In the popular technique known as diffusion tensor imaging (DTI) the aquired signal is modeled as

S(b, v) = S 0 exp(-b v t Av)
, where b includes the control parameters of the aquisition protocol while v is an orientation vector. In this model, the anisotropic apparent diffusion coefficient is the quadratic function v → v t Av given by a positive symmetric matrix A which admittedly reflects the microstructure of the tissue. Such a signal S(b, v) is sampled, measured and reconstructed at each voxel (that is, the elementary volume in which a 3D image is decomposed), meaning that a symmetric positive definite matrix A is estimated at each voxel. The eigenvector associated to the largest eigenvalue is then an indicator of the orientation of the dominant fibre bundle.

Due to the resolution of dMRI images, i.e. the size of the voxel compared to the diameter of the fibers, this is only a gross approximation of the underlying tissue microstructure. DTI cannot discern between complex fibre bundle configurations such as fiber crossings or kissings. With the advent of higher angular resolution diffusion imaging or Q-ball imaging, higher order models of the diffusion signal were thus investigated [START_REF] Ghosh | A survey of current trends in diffusion mri for structural brain connectivity[END_REF]. Figure 1.2 illustrates, at a sample of voxels, diffusion as the graph of a function on the sphere. As such, expansions into spherical harmonics is a natural choice for the the apparent distribution coefficient, diffusion kurtosis tensor or the fiber orientation distribution [SFG + 13]. The usual (real) spherical harmonics of order d are the restrictions to the sphere of homogeneous harmonic ternary polynomials (called tensor in this context) of degree d [START_REF] Atkinson | Spherical harmonics and approximations on the unit sphere: an introduction[END_REF], once expressed in polar coordinates. Diffusivity is mostly antipodal, i.e. centrally symmetric, and thus only even degree polynomials (equivalently even order spherical harmonics) are considered.

It is desirable to extract meaningful scalars, known as biomarkers, from the reconstructed signal. In the case of DTI, mean diffusivity and fractional anisotropy, given respectively as

λ = λ 1 + λ 2 + λ 3 3 = 1 3 tr(A) and (λ 1 -λ) 2 + (λ 2 -λ) 2 + (λ 3 -λ) 2 λ 2 1 + λ 2 2 + λ 2 3 = 1 - 1 3 tr(A) 2 tr(A 2 )
in terms of the eigenvalues λ 1 , λ 2 , λ 3 of A, are relevant to detect various diseases such as Alzheimer, Parkinson, or writer's cramp [DVW + 09, LMM + 10]. These quantities are naturally invariant under rotation. There thus has been efforts [BP07, GPD12, PGD14, CV15], in the computational dMRI literature, to find rotation invariants for the higher order models of diffusion, with some successes up to order 6. The present article provides a complete (functionally independent and generating) set of rational invariants, for all even degrees 2d. It belongs to a wider project to identify the biologically relevant ones for a given pathology. In this respect, it is interesting to be able to reconstruct the diffusion signal corresponding to a given set of invariants. This would allow practitioners to interpret the invariants as shape descriptors and relate the diffusion abnormalities with the pathology. This is an inverse problem that we shall solve for the invariants constructed in this paper.

Preliminaries

In order to set the notations, we review the definitions of the action of O 3 on the vector space of forms V d := R[x, y, z] d and of its rational invariants. We then elaborate on the Harmonic Decomposition of V 2d .

2.1. The action of the orthogonal group on homogeneous polynomials. We start out with a few notational conventions. We denote by R[x, y, z] d the set of homogeneous polynomials

f = i+j+k=d a ijk x i y j z k
of degree d in the three variables x, y, z with real coefficients a ijk ∈ R. By O 3 ⊂ R 3×3 we denote the group of orthogonal matrices and we consider the action of O 3 on R[x, y, z] given by

O 3 × R[x, y, z] d → R[x, y, z] d (g, f ) → f • g -1 .
By f • g -1 , we mean the composition of the orthogonal transformation g -1 : R 3 → R 3 with the polynomial function f : R 3 → R, resulting in a different polynomial function that we denote by gf . Note that gf is again homogeneous of degree d, so the above action is well-defined. As g -1 = g T , the polynomial gf is obtained from f by applying the substitutions x → g 11 x + g 21 y + g 31 z, y → g 12 x + g 22 y + g 32 z, z → g 13 x + g 23 y + g 33 z,

when g = (g ij ) ∈ O 3 is an orthogonal 3 × 3-matrix with entries g ij . The use of the inverse g -1 (= g T ) instead of g in the above composition is only of notational importance, guaranteeing g 1 (g 2 f ) = (g 1 g 2 )f for all g 1 , g 2 ∈ O 3 .

A counting argument shows that there are N := d+2 2 = 1 2 (d + 2)(d + 1) monomials x i y j z k of degree d, so formally, R[x, y, z] d is an N -dimensional vector space over R. In order to stress this point of view, we shall denote V d := R[x, y, z] d and, accordingly, we shall from now on typically denote elements of V d by letters like v or w. The monomials {x i y j z k | i + j + k = d} form a basis for this vector space. But alternative bases will prove useful in this paper.

As g(v + w) = gv + gw and g(λv) = λ(gv) holds for all g ∈ O 3 , v, w ∈ V d and λ ∈ R, the action of O 3 on V d is a linear group action. If we fix a basis for V d , there is a polynomial map from O 3 to the group of invertible N × N matrices that describes the action of O 3 on V d in this basis.

Example 2.1 (The action on quadratic forms). We show the matrix that provides the transformation by g = (g ij ) 1≤i,j≤3 ∈ O 3 on V 2 in two different bases, starting with the monomial basis.

       b200 b110 b020 b101 b011 b002        =        g 2
              a200 a110 a020 a101 a011 a002       
Let us denote by R(g) the matrix in the above equality.

Alternatively the set of polynomials {x 2 + y 2 + z 2 , yz, zx, xy, y 2 -z 2 , z 2 -x 2 } forms a basis for V 2 . Let P be the matrix of change of basis, i.e.

x 2 + y 2 + z 2 yz zx xy y 2 -z 2 z 2 -x 2 = x 2 xy y 2 zx yz z 2 P If f = a 1 (x 2 + y 2 + z 2 ) + a 2 yz + a 3 zx + a 4 xy + a 5 (y 2 -z 2 ) + a 6 (z 2 -x 2 ) and gf = b 1 (x 2 + y 2 + z 2 ) + b 2 yz + b 3 zx + b 4 xy + b 5 (y 2 -z 2 ) + b 6 (z 2 -x 2 ),
= R(g) a,
where R(g) = P -1 R(g)P

Using that g ∈ O 3 , one can compute that R(g) =        1 0 0 0 0 0 0 g23g32 + g22g33 g31g23 + g21g33 g31g22 + g21g32 2g32g22 -2g33g23 2g33g23 -2g31g21 0 g32g13 + g12g33 g31g13 + g11g33 g31g12 + g11g32 2g32g12 -2g33g13 2g33g13 -2g31g11 0 g22g13 + g12g23 g21g13 + g11g23 g21g12 + g11g22 2g22g12 -2g23g13 2g23g13 -2g21g11 0 g22g23 g21g23 g21g22 g 2 22 -g 2 23 g 2 23 -g 2 21 0 g32g33 + g22g23 g31g33 + g21g23 g31g32 + g21g22 g 2 22 + g 2 32 -g 2 23 -g 2 33 g 2 23 + g 2 33 -g 2 21 -g 2 31        .
Hence the linear spaces generated by x 2 + y 2 + z 2 , on one hand, and by yz, zx, xy, y 2 -z 2 , z 2 -x 2 , on the other hand, are both invariant under the linear action of O 3 on V 2 .

As we shall see in Section 2.3, the quadratic polynomial x 2 + y 2 + z 2 ∈ V 2 also plays a special role in the action of O 3 on V d for d > 2 due to the property that it is fixed by the action of O 3 .

2.2. Rational invariants and algorithmic problems. We denote by R(V d ) the set of rational functions p : V d R on the vector space V d . Explicitly, if we denote elements of V d as

i+j+k=d a ijk x i y j z k , then (2.1) R(V d ) = R(a ijk | i, j, k ≥ 0, i + j + k = d)
is the field of rational expressions (i.e. quotients of polynomial expressions) in the variables a ijk .

The explicit description of elements in R(V d ) as expressions in the variables a ijk however reflects the choice of the monomial basis

{x i y j z k | i + j + k = d} for V d .
Later on, we will work with a different basis for V d giving rise to an alternative presentations of elements in R(V d ). We will therefore mostly avoid the description of R(V d ) as in (2.1) in the following discussions.

When working with rational functions p = p1 p0 ∈ R(V d ) (where p 1 , p 0 : V d → R are polynomial functions and p 0 ≡ 0), there is always an issue of division by zero: The function p = p1 p0 is only defined on a general point, namely, on the set {v ∈ V d | p 0 (v) = 0}. To keep this in mind, the rational function is denoted by a dashed arrow p :

V d R.
Similarly, the equalities we shall write have to be understood wherever they are defined, i.e. where all denominators involved are non-zero.

More generally, it is said that a statement P about a point v ∈ V in a given R-vector space V (e.g. V = V d ) holds for a general point if there exists a non-zero polynomial function p 0 : V → R such that P holds for all points v ∈ V where p 0 (v) = 0. For a statement P about several points v 1 , . . . , v k ∈ V , we say that P holds for general points v 1 , . . . , v k if there exists a non-zero polynomial function p 0 : V → R such that P holds whenever p 0 (v i ) = 0 for all i ∈ {1, . . . , k}. Note that this is not necessarily equivalent to saying that P holds for a general point (v 1 , . . . , v k ) of the vector space V k . The set of rational invariants for the action of O 3 on V d is defined as

R(V d ) O3 := {p ∈ R(V d ) | p(v) = p(gv) ∀v ∈ V d , g ∈ O 3 }.
For any d there exists a finite set {p 1 , . . . , p m } ⊂ R(V d ) O3 of rational invariants which generate R(V d ) O3 as a field extension of R. This means that any other rational invariant q ∈ R(V d ) O3 can be written as a rational expression in terms of p 1 , . . . , p m . We call such a finite set {p 1 , . . . , p m } a generating set of rational invariants.

In contrast to the ring of polynomial invariants, the fact that the field of rational invariants is finitely generated is just an instance of the elementary algebraic fact: Any subfield of a finitely generated field is again finitely generated (see for example [Isa09, Theorem 24.9]). A lower bound for the cardinality of a generating set of rational invariants is given by the following result, implied by [PV94, Corollary of Theorem 2.3]: Theorem 2.2. For d ≥ 2, any generating set of rational invariants for the action of

O 3 on V d consists of at least dim V d -dim O 3 = d+2 2 -3 elements.
An important characterization of rational invariants is given by the following theorem, for which we refer to [PV94, Lemma 2.1, Theorem 2.3] or [START_REF] Rosenlicht | Some basic theorems on algebraic groups[END_REF].

Theorem 2.3. Rational invariants p 1 , . . . , p m ∈ R(V d ) O3 form a generating set of R(V d ) O3 if and only if for general points v, w ∈ V d the following holds: w = gv for some g ∈ O 3 ⇔ p i (v) = p i (w) ∀i ∈ {1, . . . , m}.
In other words, a set of rational invariants generates the invariant field R(V d ) O3 if and only if they separate O 3 -orbits in general position.

In this article, we focus on forms of even degree and explicitly construct a generating set of rational invariants for the action of O 3 on V 2d , whose cardinality attains the lower bound from Theorem 2.2. The results appear in Corollary 4.4 for V 4 and in Corollary 5.13 for V 2d , d ≥ 2. Theorem 2.3 gives a crucial justification for approaching Question 1.1 with rational invariants. It further addresses Question 1.2 of how to encode even degree polynomials up to orthogonal transformations: We may encode a general point v ∈ V 2d as the m-tuple (p 1 (v), . . . , p m (v)) ∈ R m . Then the m-tuples of v ∈ V 2d and w ∈ V 2d are equal if and only if v and w are equivalent under the action of O 3 .

Associated with this approach are the following main Algorithmic Problems:

1. Characterization: Determine a set of generating rational invariants p 1 , . . . , p m ∈ R(V 2d ) O3 . 2. Evaluation: Evaluate p 1 (v), . . . , p m (v) for a given (general) point v ∈ V 2d in an efficient and robust way. 3. Rewriting: Given a rational invariant q ∈ R(V 2d ) O3 , express q as a rational expression in terms of

p 1 , . . . , p m . 4. Reconstruction: Which m-tuples µ = (µ 1 , . . . , µ m ) ∈ R m lie in the image of the map π : V 2d R m , v → (p 1 (v), . . . , p m (v))? If µ lies in the image of π, find a representative v ∈ V 2d such that π(v) = µ.
General algorithms for computing a generating set of rational invariants based on Gröbner basis algorithms exist [START_REF] Hubert | Rational invariants of a group action. Construction and rewriting[END_REF], [DK15, Section 4.10], but the complexity increases drastically with the dimension of V 2d , which in turn grows quadratically in d. Already for 2d = 4, these general methods are far from a feasible computation. Furthermore, these algorithms typically do not produce a minimal generating set. In this article we shall demonstrate the efficiency of a more structural approach for describing a generating set of rational invariants with minimal cardinality. How to address the algorithmic challenges 2-4 will become more apparent from our construction of the generating rational invariants, and we will examine them in detail in Section 6.

The field of rational invariants R(V 2d ) O3 is the quotient field of the ring of polynomial invariants R[V 2d ] O3 [PV94, Theorem 3.3]; Any rational invariant can be written as the quotient of two polynomial invariants. Yet determining a generating set of polynomial invariants is a somewhat more arduous task. In [START_REF] Olive | A minimal integrity basis for the elasticity tensor[END_REF], a minimal set of generating polynomial invariants was identified for the action of O 3 on H 4 ⊕ 2H 2 ⊕ 2H 0 , the space of the elasticity tensor. We can extract from this basis a set of 64 polynomial invariants that generate R[V 4 ] O3 . These invariants are computed thanks to Gordan's algorithm [START_REF] Grace | The algebra of invariants[END_REF][START_REF] Olive | About Gordan's algorithm for binary forms[END_REF], after the problem is reduced to the action of SL(2, C) on binary forms through Cartan's map. One has to observe though that polynomial invariants separate the real orbits of O 3 [Sch01, Proposition 2.3], while rational invariants will only separate general orbits (Theorem 2.3).

Harmonic Decomposition.

In the study of the action of O 3 on V d , the Harmonic Decomposition plays a central role. We start out by collecting some basic facts about the apolar inner product and harmonic polynomials.

Definition 2.4. The apolar inner product •, •

d : V d ×V d → R is defined as follows: If v = ijk a ijk x i y j z k ∈ V d and w = ijk b ijk x i y j z k ∈ V d , we define v, w d := i,j,k i!j!k! a ijk b ijk ,
where the sums range over {i, j, k ≥ 0

| i + j + k = d}.
The apolar inner product arises naturally as follows:

Identifying V d = R[x, y, z] d with the space of symmetric tensors Sym d (R 3 ) * = Sym d (V 1 ), it is (up to a rescaling constant) the inner product inherited from V ⊗d 1 via the embedding Sym d (V 1 ) → V ⊗d 1 .
Here, the inner product on

V ⊗d 1 is induced by the standard inner product on V 1 = (R 3 ) * .
Since the group O 3 preserves the standard inner product on V 1 , this viewpoint leads to the following fact.

Proposition 2.5. The apolar inner product is preserved by the group action of

O 3 , i.e. if v, w ∈ V d and g ∈ O 3 , then gv, gw d = v, w d .
Another intrinsic formulation of the apolar product [AH12, Section 2.1] is given as follows: For a polynomial function f (x, y, z) ∈ R[x, y, z] d , let f (∂) be the differential operator obtained from f by replacing x, y, z respectively by ∂ ∂x , ∂ ∂y , ∂ ∂z . One then checks that for f 1 , f 2 ∈ R[x, y, z] d the apolar inner product is given by

f 1 , f 2 d = f 1 (∂)(f 2 ) = f 2 (∂)(f 1 ).
With this viewpoint, Proposition 2.5 follows by observing that gf 1 , f 2 d = f 1 , g T f 2 d holds for all group elements g.

From now on, we denote

q := x 2 + y 2 + z 2 ∈ V 2 .
This q ∈ V 2 plays a special role as it is fixed by the action of O 3 : gq = q for all g ∈ O 3 .

Definition 2.6. For any d ≥ 2, we consider the inclusion of vector spaces

V d-2 → V d , v → q • v and its image qV d-2 ⊂ V d , which is given by those polynomials in V d = R[x, y, z] d that are divisible by q.
We define the subspace H d ⊂ V d of harmonic polynomials of degree d to be the orthogonal complement of qV d-2 ⊂ V d with respect to the apolar inner product on V d .

An immediate consequence of the invariance of q and Proposition 2.5 is the following observation.

Proposition 2.7. Let g ∈ O 3 and v ∈ V d . Then the following holds:

(i) If v ∈ qV d-2 ⊂ V d , then also gv ∈ qV d-2 . (ii) If v ∈ H d , then also gv ∈ H d .
Harmonic functions are typically introduced as the functions f such that ∆(f ) = 0, where ∆ is the Laplacian operator

, i.e. ∆ = ∂ 2 ∂x 2 + ∂ 2 ∂y 2 + ∂ 2 ∂z 2 , [ABR01]
. We can see that this is equivalent to Definition 2.6 as follows: Understanding the apolar inner product via differential operators as described above, we have

f 1 f 3 , f 2 d = f 1 , f 3 (∂)(f 2 ) k for all f 1 ∈ R[x, y, z] k , f 2 ∈ R[x, y, z] d , f 3 ∈ R[x, y, z] d-k . In particular, f 1 , qf 2 d = ∆(f 1 ), f 2 d-2 holds for all f 1 ∈ R[x, y, z] d , f 2 ∈ R[x, y, z] d-2 , so that f 1 ∈ H d if and only if ∆(f 1 ) = 0.
So far, all formulations have been made for arbitrary degree d. However, we are ultimately interested in the case of even degree only. From now on and for the remainder of the article we will therefore only consider the case of degree 2d.

By Definition 2.6, there is an orthogonal decomposition V 2d = H 2d ⊕qV 2d-2 . For d ≥ 2 we can also decompose V 2d-2 in this manner, so we may iterate this decomposition which leads to the following observation, [ABR01, Theorem 5.7].

Theorem 2.8 (Harmonic Decomposition). For d ≥ 2 there is a decomposition

V 2d = H 2d ⊕ qH 2d-2 ⊕ q 2 H 2d-4 • • • ⊕ q d-2 H 4 ⊕ q d-1 V 2 ,
i.e. each v ∈ V 2d can uniquely be written as a sum

v = h 2d + qh 2d-2 + q 2 h 2d-4 + . . . + q d-2 h 4 + q d-1 v where h 2k ∈ H 2k and v ∈ V 2 .
We mention at this point that it would be possible to refine Theorem 2.8 by further decomposing V 2 = H 2 ⊕ Rq, but this is not beneficial for our purpose.

Different bases for the vector spaces H 2d ⊂ V 2d of harmonic polynomials are used in applications. A frequent choice in practice is the basis of spherical harmonics [START_REF] Atkinson | Spherical harmonics and approximations on the unit sphere: an introduction[END_REF] which are usually given as functions in spherical coordinates. In Section 5, we shall construct another basis for H 2d that exhibits certain symmetries with respect to the group of signed permutations.

The Slice Method

Our aim is to determine a generating set of rational invariants for the linear action of the orthogonal group O 3 on the vector spaces V 2d of even degree ternary forms. The group O 3 is infinite and of dimension 3 as an algebraic group. We reduce the problem to the simpler question of determining rational invariants for the linear action of a finite group B 3 (contained in O 3 as a subgroup) on a subspace Λ 2d of V 2d .

3.1. The Slice Lemma. We introduce the general technique for the reduction mentioned above, called the slice method. For the formulation, we abstract from our specific setting: We consider a linear action of a real algebraic group G on a finite-dimensional R-vector space V , denoted

G × V → V, (g, v) → gv.
We denote by R(V ) the field of rational functions and by R(V ) G the finitely generated subfield of rational invariants, as introduced already for V = V 2d and G = O 3 . Let V C and G C denote the complexifications of V and G, respectively (and analougously for other real vector spaces and real algebraic groups). Note that there is an induced action of G C on V C .

In our particular case, we have G = O 3 and V = V 2d , and the action of G on V is defined in Section 2.1.

Here, G C = O 3 (C) is the group of complex orthogonal matrices and

V C = V 2d ⊗ R C = C[x, y, z] 2d .
The main technique for the announced reduction is known as the Slice Method [CTS07, Section 3.1], [START_REF] Popov | Sections in invariant theory[END_REF].

It is based on the following definition.

Definition 3.1. Consider a linear group action of an algebraic group G on a finite-dimensional R-vector space V . A subspace Λ ⊂ V is called a slice for the group action, and the subgroup

B := {g ∈ G | gs ∈ Λ ∀s ∈ Λ} ⊂ G
is called its stabilizer, if the following two properties hold:

(i) For a general point v ∈ V there exists g ∈ G such that gv ∈ Λ.

(ii) For a general point s ∈ Λ C the following holds:

If g ∈ G C is such that gs ∈ Λ C , then g ∈ B C .
The Slice Lemma then states that rational invariants of the action of G on V are in one-to-one correspondence with rational invariants of the smaller group B ⊂ G on the slice Λ ⊂ V :

Theorem 3.2 (Slice Lemma). Let Λ be a slice of a linear action of an algebraic group G on a finitedimensional R-vector space V , and let B be its stabilizer. Then there is a field isomorphism over R between rational invariants : R(V

) G ∼ = -→ R(Λ) B , p → p| Λ , which restricts a rational invariant p : V R to p| Λ : Λ R.
This observation goes back to [START_REF] Seshadri | On a theorem of Weitzenböck in invariant theory[END_REF], and we refer to [CTS07, Theorem 3.1] for a proof. The above version of the Slice Lemma is weaker than the formulation in [CTS07, Theorem 3.1], but it is sufficient in our case.

Explicitly, the inverse to : R(V

) G ∼ = -→ R(Λ) B in Theorem 3.2 is given by -1 : R(Λ) B → R(V ) G , q → V R, v → q(gv), where g ∈ G is such that gv ∈ Λ .
The assumption that property (ii) in Definition 3.1 holds over the complex numbers is needed to show that the map on the right is indeed a rational function.

We will apply Theorem 3.2 for G = O 3 , V = V 2d and a suitable choice for the slice Λ. The consequence of Theorem 3.2 for the construction of a generating set of rational invariants is the following.

Corollary 3.3. Let Λ be a slice of a linear action of a real algebraic group G on a finite-dimensional R-vector space V , and let B be its stabilizer. If I = {p 1 , . . . , p m } is a generating set of rational invariants for the action of B on Λ, then J := { -1 (p 1 ), . . . , -1 (p m )} is a generating set of rational invariants for the action of G on V (where is given as above).

Proof. Let p 0 ∈ R(V ) G . By assumption, (p 0 ) ∈ R(Λ) B can be written as a rational expression in the generators p 1 , . . . , p m . Since is a field isomorphism, p 0 = -1 ( (p 0 )) is the same rational expression in -1 (p 1 ), . . . , -1 (p m ).

A corresponding statement for polynomial invariants requires much stronger hypotheses on the slice. In particular, even if the generating set for R(Λ) B consists of polynomial expressions p 1 , . . . , p m ∈ R[Λ] B , the construction described above typically introduces denominators, so that -1 (p 1 ), . . . , -1 (p m ) ∈ R(V ) G become rational expressions.

3.2.

A slice for V 2d . We now describe a slice Λ 2d ⊂ V 2d for the action of O 3 on V 2d for any d ≥ 1.

We recall from Section 1.1 the description of the action of O 3 on V 2 : Elements of V 2 are ternary quadratic forms and they can be identified with symmetric 3 × 3-matrices as in (1.3). If the associated symmetric matrix of v ∈ V 2 is A, then for any g ∈ O 3 ⊂ R 3×3 , the associated symmetric matrix of gv ∈ V 2 is the matrix product gAg T .

Definition 3.4. Let Λ 2 ⊂ V 2 denote the subspace of quadratic forms whose associated symmetric matrix is diagonal. Explicitly,

Λ 2 = {λ 1 x 2 + λ 2 y 2 + λ 3 z 2 ∈ V 2 | λ 1 , λ 2 , λ 3 ∈ R}.
For d ≥ 2 we consider the Harmonic Decomposition of V 2d from Theorem 2.8 and define Λ 2d ⊂ V 2d to be the subspace

Λ 2d := H 2d ⊕ qH 2d-2 ⊕ • • • ⊕ q d-2 H 4 ⊕ q d-1 Λ 2 .
In other words, elements of the subspace Λ 2d are those v ∈ V 2d that can be written as

v = h 2d + qh 2d-2 + q 2 h 2d-4 + . . . + q d-2 h 4 + q d-1 v
with h 2k ∈ H 2k and v ∈ Λ 2 a quadratic form whose associated symmetric matrix is diagonal. The main observation is now the following:

Proposition 3.5. Let d ≥ 1. The subspace Λ 2d ⊂ V 2d is a slice for the action of O 3 on V 2d and its stabilizer is the group B 3 ⊂ O 3 of signed permutation matrices. In particular, there is a one-to-one correspondence between rational invariants : R(V 2d

) O3 ∼ = -→ R(Λ 2d ) B3
given by the restriction of rational functions.

We recall that a signed permutation matrix is a matrix for which each row and each column contain only one non-zero entry and this entry is either 1 or -1. Below we will remark on further structural descriptions of the group B 3 .

Proof of Proposition 3.5. The second statement is a consequence of the first statement by Theorem 3.2.

Let

v = h 2d + qh 2d-2 + q 2 h 2d-4 + . . . + q d-2 h 4 + q d-1 v be the Harmonic Decomposition of an element v ∈ V 2d and let A ∈ R 3×3 be the symmetric matrix associated to the quadratic form v ∈ V 2 . By the Spectral Theorem for symmetric matrices, there exists an orthogonal matrix g ∈ O 3 ⊂ R 3×3 such that gAg T is a diagonal matrix (whose diagonal entries are the eigenvalues of A). Since gAg T is the associated symmetric matrix of gv ∈ V 2 , this means that gv = (gh 2d ) + q(gh 2d-2 ) + q 2 (gh 2d-4 ) + . . . + q d-2 (gh 4 ) + q d-1 (gv ) is contained in Λ 2d . This verifies property (i) of Definition 3.1 for Λ 2d ⊂ V 2d .

A complex orthogonal matrix g ∈ O 3 (C) lies in the stabilizer B

C := {g ∈ O 3 (C) | gv ∈ (Λ 2d ) C ∀v ∈ (Λ 2d ) C } if
and only if the matrix product g diag(λ 1 , λ 2 , λ 3 )g T is again a diagonal matrix for all values of λ 1 , λ 2 , λ 3 ∈ C. This means that the rows of the matrix g are orthonormal eigenvectors of diag(λ 1 , λ 2 , λ 3 ) for all values of λ 1 , λ 2 , λ 3 ∈ C (where orthogonality and length of vectors refers to the standard bilinear form C 3 × C 3 → C, (v, w) → v T w). In particular, this holds when λ 1 , λ 2 , λ 3 ∈ C are distinct, in which case the only unit eigenvectors are ±e i (where e 1 , e 2 , e 3 is the standard basis of C 3 ). Hence, g is a signed permutation matrix. This establishes the description of the stabilizer B = B C = B 3 .

Similarly, to verify property (ii) of Definition 3.1, we only need to show: If g ∈ O 3 (C) is such that for a general point (λ 1 , λ 2 , λ 3 ) ∈ C 3 , the matrix product g diag(λ 1 , λ 2 , λ 3 )g T is a diagonal matrix, then g ∈ B 3 . Indeed, we have just seen that this property holds whenever λ 1 , λ 2 , λ 3 ∈ C are distinct values, i.e. wherever the polynomial function

C 3 → C, (λ 1 , λ 2 , λ 3 ) → (λ 1 -λ 2 )(λ 2 -λ 3 )(λ 3 -λ 1 )
does not vanish.

We note that in the proof we verified property (i) of Definition 3.1 for all v ∈ V 2d , while for property (ii) we had to make use of the notion of a general point.

Above, we introduced the group B 3 ⊂ O 3 of signed permutation matrices. This is a finite group with 2 3 • 3! = 48 elements and is known as the octahedral group or as the wreath product S 2 S 3 , i.e. as the semidirect product of the symmetric group S 3 with the abelian group {1, -1} 3 .

Note thatid ∈ B 3 acts trivially on V 2d , so we in fact have an action of the quotient B 3 / -id on Λ 2d . The group B 3 / -id is isomorphic to the symmetric group S 4 . However, the group action on Λ 2d is more straightforwardly formulated in terms of B 3 (and more naturally generalizes to the cases of odd degree or more than three variables). For working explicitly with B 3 , we introduce the following notation.

Notation 3.6. For σ ∈ S 3 we denote by g σ ∈ O 3 the permutation matrix such that

g σ   α 1 α 2 α 3   =   α σ -1 (1) α σ -1 (2) α σ -1 (3)   For τ = (τ 1 , τ 2 , τ 3 ) ∈ {1, -1}
3 we write g τ := diag(τ 1 , τ 2 , τ 3 ) ∈ O 3 and we will call these matrices signchange matrices.

Then B 3 is the smallest subgroup of O 3 containing all permutation matrices and all sign-change matrices: Each signed permutation matrix g ∈ B 3 can be uniquely written as g = g τ g σ with τ ∈ {1, -1}

3 , σ ∈ S 3 . Indeed, τ i must be 1 or -1 corresponding to the sign of the unique non-zero entry in the i-th row of the matrix g. For this τ , the matrix g σ := g -1 τ g is a permutation matrix. Analogously, we can also write each g ∈ B 3 uniquely as g = g σ g τ with τ ∈ {1, -1}

3 , σ ∈ S 3 . However, τ = τ in general.

Illustration on quadratic forms.

We illustrate the Slice Method on the well-known case of quadratic forms: The slice Λ 2 ⊂ V 2 is given as

Λ 2 = {λ 1 x 2 + λ 2 y 2 + λ 3 z 2 | λ 1 , λ 2 , λ 3 ∈ R}.
By Theorem 3.2, the field of rational O 3 -invariants on V 2 is isomorphic to the field of rational B 3 -invariants on Λ 2 .

We observe that sign-change matrices in B 3 act trivially on Λ 2 , so

R(Λ 2 ) B3 = R(Λ 2 ) S3 = R(λ 1 , λ 2 , λ 3 ) S3
, where the symmetric group S 3 ⊂ B 3 acts by permuting λ 1 , λ 2 , λ 3 (which we view as coordinates on Λ 2 ). By the Fundamental Theorem of symmetric polynomials, we can thus choose the set of elementary symmetric polynomials I = {λ 1 + λ 2 + λ 3 , λ 1 λ 2 + λ 2 λ 3 + λ 3 λ 1 , λ 1 λ 2 λ 3 } as a generating set of rational invariants for R(Λ 2 ) B3 . By Corollary 3.3, there exist unique rational O 3invariants J ⊂ R(V 2 ) O3 on V 2 restricting to these invariants on the subspace Λ 2 , and they form a generating set for R(V 2 ) O3 . By uniqueness, the generating set J consists up to scalars precisely of the polynomial invariants e 1 , e 2 , e 3 ∈ R[V 2 ] O3 described in (1.4), arising as the coefficients of the characteristic polynomial of the symmetric matrix A corresponding to a quadratic form. Alternatively one could consider

I = {λ 1 + λ 2 + λ 3 , λ 2 1 + λ 2 2 + λ 2 3 , λ 3 1 + λ 3 2 + λ 3 3
}, the set of Newton sums, and J = {Tr(A), Tr(A 2 ), Tr(A 3 )}. We shall actually opt for this choice when extending the result to ternary quartics in Theorem 4.5.

In this case, one can in fact show that J even generates the ring of polynomial invariants R[V 2 ] O3 . This will however no longer be true for our construction of generating rational invariants in higher degree. Furthermore, the construction of B 3 -invariants on the slice will be more involved, especially because the sign-change matrices in B 3 no longer act trivially on Λ 2d for d ≥ 2.

Invariants of ternary quartics

In this section we implicitly describe a generating set of rational invariants of minimal cardinality for ternary quartics under the action of O 3 , i.e. for the case 2d = 4. Following the approach of Section 3.1 this set of rational invariants is uniquely determined by a set of rational invariants for the action of B 3 on the slice Λ 4 . The first step is to construct an appropriate basis of Λ 4 that is equivariant. In this basis, a minimal generating set of rational B 3 -invariants takes a particularly compact form, and can be chosen to consist of polynomial invariants. We provide an additional (near minimal) generating set of R(Λ 4 ) B3 that extends the invariants for quadratic forms. For both choices of generating invariants, we make explicit how to write any other invariant in terms of these, following [START_REF] Hubert | Rational invariants of a group action. Construction and rewriting[END_REF].

r 1 s 1 t 1 r 2 s 2 t 2 r 3 s 3 t 3
The construction of this section serves as a model for invariants of ternary forms in higher degree 2d > 4 which are treated in Section 5.

4.1. A B 3 -equivariant basis for harmonic quartics. In order to construct B 3 -invariants on the vector space Λ 4 = H 4 ⊕ qΛ 2 , we introduce a basis of H 4 that exhibits certain symmetries with respect to B 3 . In Section 5 we show how to construct bases of H 2d with analogous symmetry properties for arbitrary d ≥ 2.

Proposition 4.1. The following nine ternary quartics form a basis for the R-vector space H 4 :

r 1 := y 4 -6y 2 z 2 + z 4 , s 1 := y 3 z -yz 3 , t 1 := 6x 2 yz -y 3 z -yz 3 , r 2 := z 4 -6z 2 x 2 + x 4 , s 2 := z 3 x -zx 3 , t 2 := 6y 2 zx -z 3 x -zx 3 , r 3 := x 4 -6x 2 y 2 + y 4 , s 3 := x 3 y -xy 3 , t 3 := 6z 2 xy -x 3 y -xy 3 .
The group B 3 ⊂ O 3 acts on H 4 with respect to this basis as follows: For σ ∈ S 3 and τ ∈ {1, -1} 3 , the corresponding permutation and sign-change matrices g σ and g τ act by Proof. One can first check that the polynomials r i , s i , t i (1 ≤ i ≤ 3) are in the kernel of the Laplacian operator ∆ = ∂ 2 ∂x 2 + ∂ 2 ∂y 2 + ∂ 2 ∂z 2 . As H 4 is a 9-dimensional R-vector space, it suffices to check that all r i , s i , t i (1 ≤ i ≤ 3) are linearly independent. This easily follows from examining the monomials occurring in their expressions.

g σ r i = r σ(i) , g σ s i = sgn(σ)s σ(i) , g σ t i = t σ(i) , g τ r i = r i , g τ s i = τ 1 τ 2 τ 3 τ i s i , g τ t i = τ 1 τ 2 τ 3 τ i t i .
Note that a permutation matrix in B 3 acts by applying the corresponding permutation to the variables x, y, z, and a sign-change matrix acts by replacing some of the variables x, y, z by their negatives. The claim about the action of B 3 is then read off the formulas for the basis elements.

A polynomial v in Λ 4 = qΛ 2 ⊕ H 4 can thus be written as

(4.1) v = (x 2 + y 2 + z 2 ) 3 i=1 λ i x 2 i + 3 i=1 (α i r i + β i s i + γ i t i ).
We introduce the vector of coefficients λ = λ 1 λ 2 λ 3 T and similarly α, β and γ. Then Proposition 4.1

shows: For σ ∈ S 3 , if g σ v has coefficients λ, α, β, γ , then

λ = g σ λ, α = g σ α, β = sgn(σ)g σ β, γ = g σ γ. For τ ∈ {1, -1} 3 , if g τ v is determined by λ, ᾱ, β, γ , then λ = λ, ᾱ = α, β = det(g τ )g τ β, γ = det(g τ )g τ γ.
4.2. B 3 -invariants on the slice. The rational invariants of B 3 on Λ 4 can be obtained computationally by applying the general algorithm for generating sets of rational invariants presented in [START_REF] Hubert | Rational invariants of a group action. Construction and rewriting[END_REF]. The results obtained with this approach suggest nice structures when the basis of Proposition 4.1 is used. We accordingly present generating sets of invariants as the results of the composition of equivariant maps. We first present a minimal generating set, which consists of 12 algebraically independent polynomials, and then a generating set that consist of 13 rational invariants, including the invariants for Λ 2 .

Lemma 4.2. The maps W 1 , W 2 : Λ 2 → R 3×3 and W 3 , W 4 : Λ 4 → R 3 whose values at v as in (4.1) are respectively given by

W 1 (v) =   1 λ 1 λ 2 1 1 λ 2 λ 2 2 1 λ 3 λ 2 3   , W 2 (v) =   1 γ 2 1 γ 4 1 1 γ 2 2 γ 4 2 1 γ 2 3 γ 4 3   , W 3 (v) =   β 1 γ 1 [λ] β 2 γ 2 [λ] β 3 γ 3 [λ]   and W 4 (v) =   β 1 γ 1 [γ 2 ] β 2 γ 2 [γ 2 ] β 3 γ 3 [γ 2 ]   ,
where

[λ] := (λ 1 -λ 2 )(λ 2 -λ 3 )(λ 3 -λ 1 ) = det W 1 (v) and [γ 2 ] := (γ 2 1 -γ 2 2 )(γ 2 2 -γ 2 3 )(γ 2 3 -γ 2 1 ) = det W 2 (v), are equivariant in the sense that W i (g σ v) = g σ W i (v) and W i (g τ v) = W i (v).
Proof. This is a direct consequence of the discussion in Section 4.1 of the action of B 3 on the basis of Proposition 4.1.

It follows that the entries of W T i W j , for i, j ∈ {1, 2, 3, 4}, and of W -1 i W j , for i ∈ {1, 2} and j ∈ {1, 2, 3, 4}, are rational invariants on Λ 4 . With this mechanism, we provide a generating set of invariants of minimal cardinality.

Theorem 4.3. A generating set of rational invariants for R(Λ 4 ) B3 is given by the 12 polynomial functions

I 4 = { i , a i , b i , c i | 1 ≤ i ≤ 3}
, whose values at v as in (4.1) are given by

c 1 := γ 2 1 + γ 2 2 + γ 2 3 , c 2 := γ 1 γ 2 γ 3 , c 3 := γ 4 1 + γ 4 2 + γ 4 3 ,
and the entries of the 3

× 3 matrix   1 a 1 b 1 2 a 2 b 2 3 a 3 b 3   :=   1 1 1 γ 2 1 γ 2 2 γ 2 3 γ 4 1 γ 4 2 γ 4 3     λ 1 α 1 β 1 γ 1 [γ 2 ] λ 2 α 2 β 2 γ 2 [γ 2 ] λ 3 α 3 β 3 γ 3 [γ 2 ]   where [γ 2 ] := (γ 2 1 -γ 2 2 )(γ 2 2 -γ 2 3 )(γ 2 3 -γ 2 1 ).
Proof. We first observe that the polynomials i , a i , b i ∈ R[Λ 4 ] are the entries of the matrix W T 2 (v)W(v), where W 2 was introduced in Lemma 4.2 and W : Λ 2 → R 3×3 is given by

W(v) :=   λ 1 α 1 β 1 γ 1 [γ 2 ] λ 2 α 2 β 2 γ 2 [γ 2 ] λ 3 α 3 β 3 γ 3 [γ 2 ]   .
With Lemma 4.2 one easily checks that W is equivariant in the sense that W(σv) = g σ W(v) and W(τ v) = W(v). Hence the entries of W T 2 (v)W(v) are invariants. It is also straightforward to check that c 1 , c 2 , c 3 ∈ R[Λ 4 ] are polynomial invariants.

We now show in three steps that any rational invariant can be written as a rational expression in terms of c i , i , a i , b i , for i ∈ {1, 2, 3}.

Step 1: Reducing the problem to rewriting invariant polynomials.

For a finite group, the field of rational invariants is the quotient field of the ring of invariants [PV94, Theorem 3.3]. That means that for any rational invariant p ∈ R(Λ 4 ) B3 there exist p 1 , p 0 ∈ R[Λ 4 ] B3 such that p = p1 p0 . We are thus left to show that any polynomial invariant can be written as a rational expression of i , a i , b i , c i , for i ∈ {1, 2, 3}.

Step 2: If p ∈ R[Λ 4 ] B3 is an invariant whose value at v as in (4.1) is given by a polynomial expression in γ 1 , γ 2 , γ 3 only, then p can be written polynomially in terms of c 1 , c 2 , c 3 .

First, we consider the monomials γ i 1 γ j 2 γ k 3 of the polynomial expression p. By Proposition 4.1, a sign-change matrix g τ = diag(τ 1 , τ 2 , τ 3 ) ∈ B 3 acts on q by replacing γ i 1 γ j 2 γ k 3 by τ j+k 1 τ i+k 2 τ i+j 3 γ i 1 γ j 2 γ k 3 , so p can only be invariant with respect to all sign-change matrices if for all its monomials γ i 1 γ j 2 γ k 3 , the numbers i + j, i + k and j + k are even numbers, i.e. i ≡ j ≡ k (mod 2). In particular, we can write p as a polynomial in

c 2 = γ 1 γ 2 γ 3 , δ 1 := γ 2 1 , δ 2 := γ 2 2 , δ 3 := γ 2 3 .
If g σ ∈ B 3 is a permutation matrix, then g σ acts according to Proposition 4.1 on p by replacing δ i by δ σi . Therefore, p is a symmetric polynomial expression in the three variables δ 1 , δ 2 , δ 3 . By the Fundamental Theorem of symmetric functions, p can therefore be written as a polynomial expression in the three symmetric power sum polynomials

δ 1 + δ 2 + δ 3 = c 1 , δ 2 1 + δ 2 2 + δ 2 3 = c 3 and δ 3 1 + δ 3 2 + δ 3 3 = 3 2 c 1 c 3 - 1 2 c 3 1 + 3c 2 2 .
With this, we have expressed p as a polynomial expression in terms of c 1 , c 2 , c 3 .

Step 3: If p ∈ R[Λ 4 ] B3 is a polynomial expression in λ, α, β, γ, then p can be written as a rational expression in the invariants , a, b, c.

We have

  λ 1 α 1 β 1 γ 1 [γ 2 ] λ 2 α 2 β 2 γ 2 [γ 2 ] λ 3 α 3 β 3 γ 3 [γ 2 ]   = W -T 2 (v)   1 a 1 b 1 2 a 2 b 2 3 a 3 b 3   ,
where W 2 (v) is a matrix that only involves the variables γ 1 , γ 2 , γ 3 . With this, we can replace each occurrence of λ i , α i , β i for i ∈ {1, 2, 3}, by a linear combination of i , a i , b i with coefficients that are rational expressions in γ 1 , γ 2 , γ 3 . Hence, p is written as a polynomial in i , a i , b i with coefficients that are rational expressions in γ 1 , γ 2 , γ 3 . Since the i , a i , b i are algebraically independent, these rational expressions of γ 1 , γ 2 , γ 3 must be invariant. By Step 1 and 2 they can be written as rational expressions of c 1 , c 2 , c 3 .

Except maybe for

Step 1, the proof above shows how to rewrite any rational invariants in terms of the minimal generating set. One could alternatively rely on a computational proof following [START_REF] Hubert | Rational invariants of a group action. Construction and rewriting[END_REF]; that way shows that rewriting a rational invariant in terms of this minimal generating set of invariants can be done by applying the following rewrite rules to both the numerator and denominator:

  λ 1 λ 2 λ 3   -→ [γ 2 ] c 0   (γ 2 3 -γ 2 2 )γ 2 2 γ 2 3 γ 4 2 -γ 4 3 γ 2 3 -γ 2 2 (γ 2 1 -γ 2 3 )γ 2 3 γ 2 1 γ 4 3 -γ 4 1 γ 2 1 -γ 2 3 (γ 2 2 -γ 2 1 )γ 2 1 γ 2 2 γ 4 1 -γ 4 2 γ 2 2 -γ 2 1     1 2 3   ,   α 1 α 2 α 3   -→ [γ 2 ] c 0   (γ 2 3 -γ 2 2 )γ 2 2 γ 2 3 γ 4 2 -γ 4 3 γ 2 3 -γ 2 2 (γ 2 1 -γ 2 3 )γ 2 3 γ 2 1 γ 4 3 -γ 4 1 γ 2 1 -γ 2 3 (γ 2 2 -γ 2 1 )γ 2 1 γ 2 2 γ 4 1 -γ 4 2 γ 2 2 -γ 2 1     a 1 a 2 a 3   ,   β 1 β 2 β 3   -→ 1 c 0 c 2   γ 2 γ 3 0 0 0 γ 3 γ 1 0 0 0 γ 1 γ 2     (γ 2 3 -γ 2 2 )γ 2 2 γ 2 3 γ 4 2 -γ 4 3 γ 2 3 -γ 2 2 (γ 2 1 -γ 2 3 )γ 2 3 γ 2 1 γ 4 3 -γ 4 1 γ 2 1 -γ 2 3 (γ 2 2 -γ 2 1 )γ 2 1 γ 2 2 γ 4 1 -γ 4 2 γ 2 2 -γ 2 1     b 1 b 2 b 3   , γ 1 -→ 1 c 2 (c 1 γ 2 γ 3 -γ 3 2 γ 3 -γ 2 γ 3 3 ), γ 4 2 -→ c 1 γ 2 3 -γ 2 2 γ 2 3 +c 1 γ 2 3 -γ 4 3 + 1 2 (c 3 -c 2 1 ), γ 6 3 -→ 1 2 (c 3 -c 2 1 )γ 2 3 +c 1 γ 4 3 +c 2 2 , where c 0 := [γ 2 ] 2 = (γ 2 1 -γ 2 2 ) 2 (γ 2 2 -γ 2 3 ) 2 (γ 2 3 -γ 2 1 ) 2 = 1 2 c 3 3 - 1 4 c 6 1 -27c 4 2 + c 4 1 c 3 - 5 4 c 2 1 c 2 3 -9c 2 2 c 1 c 3 + 5c 2 2 c 3 1 .
These rewrite rules reflect a (non-reduced) Gröbner basis of the ideal of the generic orbit of the action.

The field of rational functions R(Λ 4 ) has transcendence degree dim Λ 4 = 12 over R, and since B 3 is a finite group, the same is true for the field of invariants R(Λ 4 ) B3 . Therefore, the generating set I 4 ⊂ R(Λ 4 ) B3 of rational invariants specified in Theorem 4.3 is of minimal cardinality. By Corollary 3.3 and Proposition 3.5, there are 12 unique rational invariants in R(V 4 ) O3 restricting to the B 3 -invariants I 4 on the subspace Λ 4 , and they form a generating set for R(V 4 ) O3 . In particular, the cardinality of this generating set attains the lower bound given in Theorem 2.2:

Corollary 4.4. There exists a generating set of dim V 4 -dim O 3 = 12 rational invariants J 4 ⊂ R(V 4 ) O3 restricting to the invariants

I 4 ⊂ R[Λ 4 ] B3 on the subspace Λ 4 ⊂ V 4 specified in Theorem 4.3.
While the above generating set

J 4 ⊂ R(V 4 ) O3 (respectively, I 4 ⊂ R(Λ 4 ) B3
) is minimal, we observe that it does not directly contain the three invariants for quadratic forms from Section 3.3, which can be considered as invariants on V 4 via the decomposition V 4 = H 4 ⊕ qV 2 (respectively on Λ 4 via Λ 4 = H 4 ⊕ qΛ 2 ). We therefore now introduce an alternative, non-minimal, generating set of rational B 3 -invariants on Λ 4 , such that a generating set of rational invariants of B 3 on Λ 2 is obtained by restriction. We also make explicit how to rewrite any other invariants in terms of these.

Theorem 4.5. A generating set of rational invariants for R(Λ 4 ) B3 is given by the 13 rational functions ˜ i , ãi , bi , ci , for i ∈ {1, 2, 3}, and c0 whose values at v as in (4.1) are given by c0 = γ 1 γ 2 γ 3 ,

˜ 1 = λ 1 + λ 2 + λ 3 , ˜ 2 = λ 2 1 + λ 2 2 + λ 2 3 , ˜ 3 = λ 3 1 + λ 3 2 + λ 3 3
, and the entries of the 3 × 3 matrix

  ã1 b1 c1 ã2 b2 c2 ã3 b3 c3   :=   1 λ 1 λ 2 1 1 λ 2 λ 2 2 1 λ 3 λ 2 3   -1   α 1 β 1 γ 1 [λ] γ 2 1 α 2 β 2 γ 2 [λ] γ 2 2 α 3 β 3 γ 3 [λ] γ 2 3   . where [λ] := (λ 1 -λ 2 )(λ 2 -λ 3 )(λ 3 -λ 1 ). Let ˜ 0 := (λ 1 -λ 2 ) 2 (λ 2 -λ 3 ) 2 (λ 3 -λ 1 ) 2 = 3 2 ˜ 2 ˜ 4 1 - 1 6 ˜ 6 1 + 6 ˜ 3 ˜ 2 ˜ 1 - 4 3 ˜ 3 ˜ 3 1 - 7 2 ˜ 2 2 ˜ 2 1 -3 ˜ 2 3 + 1 2 ˜ 3 2 .
Then any rational invariant p = p 0 /p 1 ∈ R(Λ 4 ) B3 can be written in terms of the above generating set by applying the following rewrite rules to both the numerator p 0 and the denominator p 1 :

  α 1 α 2 α 3   -→   1 λ 1 λ 2 1 1 λ 2 λ 2 2 1 λ 3 λ 2 3     ã1 ã2 ã3   ,   β 1 β 2 β 3   -→ [λ] c0 ˜ 0   γ 2 γ 3 0 0 0 γ 3 γ 1 0 0 0 γ 1 γ 2     1 λ 1 λ 2 1 1 λ 2 λ 2 2 1 λ 3 λ 2 3     b1 b2 b3   , γ 1 γ 2 γ 3 -→ c0 ,   γ 2 1 γ 2 2 γ 2 3   -→   1 λ 1 λ 2 1 1 λ 2 λ 2 2 1 λ 3 λ 2 3     c1 c2 c3   ,   γ 2 γ 3 γ 1 γ 3 γ 1 γ 2   -→ 1 c0   γ 1 (c 1 + λ 2 c2 + λ 2 2 c3 )(c 1 + λ 3 c2 + λ 2 3 c3 ) γ 2 (c 1 + λ 1 c2 + λ 2 1 c3 )(c 1 + λ 3 c2 + λ 2 3 c3 ) γ 3 (c 1 + λ 1 c2 + λ 2 1 c3 )(c 1 + λ 2 c2 + λ 2 2 c3 )   ,
and finally

λ 1 -→ 1 -λ 3 -λ 2 , λ 2 2 -→ 1 λ 2 + 1 λ 3 -λ 3 λ 2 -λ 2 3 + 1 2 2 - 1 2 2 1 , λ 3 3 -→ 1 3 3 + 1 6 3 1 - 1 2 2 1 + 1 2 ( 2 -2 1 )γ 3 + 1 γ 2 3 .
One observes that with this generating set, the rewriting of a polynomial invariant only introduces powers of c0 and ˜ 0 as the denominator. This result was first obtained by applying the construction in [HK07a, Theorem 2.16]. This latter theorem shows that the coefficients of the reduced Gröbner basis of the generic orbit ideal form a generating set and how to rewrite any other rational invariants in terms of these. The rewrite rules given above can be recognized as a Gröbner basis of the generic orbit ideal. We do not present the reduced Gröbner basis as it is rather cumbersome.

5. Harmonic bases with B 3 -symmetries and invariants for higher degree

In this section, we extend the description of generating rational invariants for ternary quartics given in Section 4 to ternary forms of arbitrary even degree. According to Section 3, the O 3 -invariants on V 2d are uniquely determined by the B 3 -invariants on Λ 2d .

A crucial step in order to describe invariants of the B 3 -action on Λ 2d consists in constructing a basis of the vector space H 2d exhibiting certain symmetries with respect to the group B 3 of signed permutations. We make precise what we mean by this in Section 5.1, and subsequently we give an explicit construction of such a B 3 -equivariant basis.

Because of the wide-range of applications that involve harmonic functions, this B 3 -equivariant basis is of independent interest. We therefore devote Section 5.3 to an illustration of the constructed harmonic basis and briefly discuss connections to other bases for H 2d . We mention at this point that our construction of B 3 -equivariant bases for harmonic polynomials would work analogously for the case of odd degree H 2d+1 , but with a view toward rational B 3 -invariants on Λ 2d , we restrict our treatment to the case of even degree

H 2d .
Finally, in Section 5.5, we deduce from the B 3 -equivariant basis for H 2d a generating set of rational B 3invariants on Λ 2d , as a natural extension of Theorem 4.3.

5.1. B 3 -equivariant bases. We construct a basis H 2d (d ≥ 2) that essentially splits into subsets of three polynomials that are obtained from one another by permutation of the variables. Each of these subsets spans a B 3 -invariant subspace and the action of B 3 on this subspace is given by signed permutations on the subset. We introduce the following notation to be more precise.

Definition 5.1. Let k ∈ N and consider two maps ζ, ξ : {0, . . . , k -1} → {0, 1}. An indexed set

{u i,j | 1 ≤ i ≤ 3, 0 ≤ j < k} ⊂ V 2d of 3k elements of V 2d is called a B 3 -equivariant subset of V 2d with respect to ζ, ξ (or, a (ζ, ξ)- equivariant subset)
if the action of B 3 on this set is given as follows: For σ ∈ S 3 and τ ∈ {1, -1} 3 , the permutation and sign-change matrices g σ and g τ act by ∀i, j :

g σ u i,j = sgn(σ) ζ(j) u σ(i),j and g τ u i,j = τ 1 τ 2 τ 3 τ i ξ(j) u i,j .
Our aim is to find a B 3 -equivariant basis for the vector space H 2d for arbitrary d ≥ 2, similar to Proposition 4.1 in the case of H 4 . For d ≡ 2 (mod 3), however, we need to slightly relax this aim, and instead of a basis, we shall determine a B 3 -equivariant spanning set of the vector space H 2d together with the linear relationships satisfied.

Theorem 5.2. Let d ≥ 2 and let k := 4d+1

3

. Then there exist 3k harmonic polynomials u i,j ∈ H 2d for i ∈ {1, 2, 3}, j ∈ {0, . . . , k -1} forming a (ζ, ξ)-equivariant set for some maps ζ, ξ : {0, . . . , k -1} → {0, 1}, such that:

(i) The harmonic polynomials u i,j ∈ H 2d for i ∈ {1, 2, 3}, j ∈ {0, . . . , k -1} span the vector space H 2d . (ii) (a) If d ≡ 2 (mod 3), then the u i,j form a basis of H 2d .
(b) If d ≡ 1 (mod 3), then dim H 2d = 3k -1 and the u i,j satisfy the linear relation

u 1,0 + u 2,0 + u 3,0 = 0.
(c) If d ≡ 0 (mod 3), then dim H 2d = 3k -2 and the u i,j satisfy the relations

u 1,0 = u 2,0 = u 3,0 .
We observe that Theorem 5.2 generalizes Proposition 4.1: For 2d = 4, we have k = 3 and the harmonic polynomials u i,0 := r i , u i,1 := s i and u i,2 := t i (i ∈ {1, 2, 3}) form a basis of H 2d satisfying the assertions of Theorem 5.2 for

ζ(j) = 1 if j = 1, 0 otherwise and ξ(j) = 1 if j ∈ {1, 2}, 0 otherwise.
We formulated Theorem 5.2 as an existence result, but the crucial part for applications is the constructive proof given below. We provide explicit closed formulas for the elements u i,j , in addition to algorithmic constructions that appear as proofs.

5.2. Construction of B 3 -equivariant harmonic bases. We prove Theorem 5.2 by constructing a spanning set with the asserted properties.

For nonnegative integers i, j, k and r = i + j + k, we denote the multinomial coefficient

r i, j, k := r! i!j!k! .
The following result is a simple characterization of harmonic polynomials.

Lemma 5.3. Let d ≥ 2. A ternary form v = i+j+k=2d 2d i, j, k β i,j,k x i y j z k ∈ V 2d lies in H 2d if and only if β i+2,j,k + β i,j+2,k + β i,j,k+2 = 0 holds for all i, j, k ∈ N such that i + j + k = 2d -2.
and for k > j from the recursion

β -K,j,k+1 = -β -(K-1),j,k -β -K,j+1,k
(both resulting from (i)). This determines all β -K,j,k . Note that β -K,j,k = (-1) d-β -K,k,j follows iteratively from the assumption that property (iv) holds for all previously constructed β i,j,k . Hence, we determined the unique values for β -K,j,k such that the properties (i)-(v) are still preserved. This concludes the construction.

Remark 5.5. The proof above is actually an iterative construction of the coefficients β i,j,k defining θ . We now give an explicit formula: If d -is odd and s := d-+1 2 , then the values . On the other hand, if d -is even and s := d- 2 , then β i,j,k = (-1) j j -s -i + (-1) j j -s -1 -i satisfy the desired properties. This gives an explicit closed formula for the harmonic polynomials θ . Similar to Lemma 5.4, we also obtain the following result.

β i,j,k = (-1) j j -s -i
Lemma 5.6. Let d ≥ 2 and 0 ≤ ≤ d -1. Then there exists a harmonic polynomial η ∈ H 2d , unique up to scaling, with the following four properties:

(1) Each monomial of η is of even degree in x and of odd degree in each of the variables y and z.

(2) The highest degree in which the variable x occurs in η is 2 .

(3) The monomial y 2j+1 z 2k+1 (for j + k = d -1) does not occur in the expression η if |j -k| < . (4) Interchanging the variables y and z in the expression η gives (-1) d-+1 η .

In this unique polynomial η , all monomials in V 2d of degree 2 in x and odd degree in each y and z occur with a non-zero coefficient.

Proof. Writing η = i+j+k=d-1 2d 2i, 2j + 1, 2k + 1 β i,j,k x 2i y 2j+1 z 2k+1 ,
the coefficients β i,j,k for i + j + k = d -1 have to meet the same conditions as before (replacing d by d -1), so the construction is the same as before (and the corresponding explicit formulas from Remark 5.5 apply).

While the harmonic polynomials θ , η are (anti-)symmetric with respect to the variables y and z, the variable x plays a special role. We therefore now consider the expressions that arise from θ , η by cyclically permuting the variables x, y and z. For this, we consider the cycle c = (123) ∈ S 3 and its associated permutation matrix

g c =   0 0 1 1 0 0 0 1 0   ∈ B 3 .
Lemma 5.7. Let d ≥ 2 and consider η , θ ∈ H 2d as in Lemmas 5.6 and 5.4. Then the harmonic polynomials

η 0 , g c η 0 , g 2 c η 0 , η 1 , g c η 1 , g 2 c η 1 , . . . , η d-1 , g c η d-1 , g 2 c η d-1 , θ 0 , g c θ 0 , g 2 c θ 0 , θ 1 , g c θ 1 , g 2 c θ 1 , . . . , θ r , g c θ r , g 2 c θ r are linearly independent in H 2d for r := d-2 3 .
Proof. The monomials in θ , g c θ , g 2 c θ are of the form x 2i y 2j z 2k , in η of the form x 2i y 2j+1 z 2k+1 , in g c η of the form x 2i+1 y 2j z 2k+1 , and in g 2 c η of the form x 2i+1 y 2j+1 z 2k . Therefore, we can show the linear independence of those families of harmonic polynomials separately.

The linear independence of η 0 , η 1 , . . . , η d-1 ∈ H 2d is a consequence of property (2) in Lemma 5.6. The same for g c η 0 , . . . , g c η d-1 and for g 2 c η 0 , . . . , g 2 c η d-1 follows directly. To see that {g i-1 c θ | 1 ≤ i ≤ 3, 0 ≤ ≤ r} is a linearly independent set, suppose that

3 i=1 r =0 α i, g i-1
c θ = 0 for some α i, ∈ R, not all equal to zero. Let s ∈ {0, . . . , r} be maximal such that α i,s = 0 for some i ∈ {1, 2, 3}. We may assume that α 1,s = 0. Note that s ≤ r = d-2 3 implies that there exist integers j, k > s such that j + k + s = d. It follows from property (2) in Lemma 5.4 that the coefficient of x 2s y 2j z 2k in the expression

3 i=1 s =0 α i, g i-1
c θ is α 1, λ 1 , where λ 1 = 0 is the coefficient of x 2s y 2j z 2k in θ s . This implies

3 i=1 s =0 α i, g i-1
c θ = 0, contrary to the assumption.

Lemma 5.8. Let d = 3k 0 + 1 for some k 0 ≥ 1 and let g c ∈ B 3 and θ as before. Then

θ k0 + g c θ k0 + g 2 c θ k0 = 0.
Proof. From Lemma 5.7 we know that the set {g i-1 c θ | 1 ≤ i ≤ 3, 0 ≤ ≤ k 0 -1} forms a basis for a 3k 0 -dimensional subspace W ⊂ H 2d . By properties (2) and (1) in Lemma 5.4, all monomials occurring in any g i-1 c θ for 1 ≤ i ≤ 3, 0 ≤ ≤ k 0 -1 must be of the form x 2i y 2j z 2k with min{i, j, k} ≤ k 0 -1, so W is contained in the subspace U of V 2d spanned by the monomials of this form. Lemma 5.3 implies that dim

U ∩ H 2d = d -1 = 3k 0 , so in fact W = U ∩ H 2d .
By properties (2) and (4) in Lemma 5.4 we have θ k0 = λx 2k0 y 2k0+2 z 2k0 -λx 2k0 y 2k0+2 z 2k0 + u for some u ∈ U and λ ∈ R. Therefore, θ k0 + g c θ k0 + g 2 c θ k0 = u + g c u + g 2 c u =: u ∈ U ∩ H 2d and we can write u =

3 i=1 k0-1 =0 α i, g i-1
c θ . Suppose for contradiction that not all α i, are zero and let s ∈ {0, . . . , k 0 -1} be minimal such that α i,s = 0 for some i ∈ {1, 2, 3}. By symmetry, we may assume α 1,s = 0. If d + s is even, then the monomial y d+s z d-s occurs in θ s with a non-zero coefficient µ ∈ R, but not in θ for > s by property (3) in Lemma 5.4. Observe also that the y-degree and the z-degree of this monomial are both larger than 2k 0 , so y d+s z d-s is not contained as a monomial in any of the expressions g c θ or g 2 c θ for ≤ k 0 . Therefore, the monomial y d+s z d-s occurs in u with the non-zero coefficient α 1,s µ, but not in θ k0 or g c θ k0 or g 2 c θ k0 , a contradiction. If d + s is odd, then s ≤ k 0 -2 and we consider the monomial y d+s+1 z d-s-1 . As before, this monomial does not occur in θ for > s + 1 or in any of the expressions g c θ or g 2 c θ for 0 ≤ ≤ k 0 . Hence, its coefficient in u is α 1,s µ + α 1,s+1 µ = 0, where µ, µ = 0 are the coefficients of y d+s+1 z d-s-1 in θ s and θ s+1 , respectively. In the same way we can consider the monomial y d-s-1 z d+s+1 , which then gives -α 1,s µ + α 1,s+1 µ = 0 by the (anti-)symmetry of θ s and θ s+1 due to property (4) in Lemma 5.4. From both equations we deduce α 1,s = 0, a contradiction.

Proof of Theorem 5.2. We use the notations of the previous Lemmas and denote

k 0 := d -2 3 and k := 4d + 1 3 = k 0 + d + 1.
For i ∈ {1, 2, 3} and j ∈ {1, . . . , k -1}, we define Representation-theoretic viewpoint and cubic harmonics. While spherical harmonics form the most commonly used basis of harmonic polynomials, another basis is given by the cubic harmonics [START_REF] Muggli | Cubic harmonics as linear combinations of spherical harmonics[END_REF][START_REF] Fox | Computation of cubic harmonics[END_REF], which correspond to the decomposition of the space of harmonic polynomials into irreducible B 3 -representation spaces. With the following representation theoretic viewpoint on Theorem 5.2, one can see how our explicitly constructed B 3 -equivariant bases are related to these cubic harmonics. Indeed, the construction of the spanning set u (2d) i,j of H 2d can be seen as decomposing H 2d into B 3 -invariant subspaces endowed with one out of six possible representations of dimension 3, 2 or 1.

u i,j := g i-1 c θ k0-j , if 1 ≤ j ≤ k 0 , g i-1 c η j-k0-1 , if k 0 + 1 ≤ j < k.
For ζ, ξ ∈ {0, 1}, there is a three-dimensional representation space W ζ,ξ of B 3 given by B 3 → GL(R 3 ) ⊂ R 3×3 , g = g τ g σ → (sgn σ) ζ (det g τ ) ξ g ξ τ g σ , where we (uniquely) write g ∈ B 3 as a product of a sign-change matrix g τ and a permutation matrix g σ . W 0,1 and W 1,1 are irreducible representations of B 3 , but

W 0,0 ∼ = W triv ⊕ W std , W 1,0 = W sgn ⊕ W std ,
where W triv is the one-dimensional trivial representation, W std the two-dimensional irreducible representation of the symmetric group S 3 , and W sgn the one-dimensional alternating representation of the symmetric group S 3 . As representations of B 3 W triv , W sgn , W std , W 0,1 , W 1,1 are exactly the irreducible B 3 -representations such thatid ∈ B 3 lies in the kernel of the corresponding group homomorphism B 3 → GL(R k ) [START_REF] Goodman | Symmetry, representations, and invariants[END_REF]. These are thus the five irreducible representations of B 3 / -id ∼ = S 4 .

For d ≡ 2 (mod 3), Theorem 5.2 then corresponds to a decomposition of H 2d into the four types of representations W 0,0 , W 1,0 , W 0,1 and W 1,1 as

H 2d ∼ = k-1 j=0 W ζ(j),ξ(j) ,
and we have given an explicit construction of a basis u i,j of H 2d corresponding to this decomposition. Indeed, for each j ∈ {0, . . . , k -1}, the three-dimensional subspace of H 2d spanned by u 1,j , u 2,j , u 3,j corresponds to the representation W ζ(j),ξ(j) .

If d ≡ 2 (mod 3), then only for j ≥ 1 is it true that the subspace spanned by u 1,j , u 2,j , u 3,j is the threedimensional representation W ζ(j),ξ(j) . For j = 0, we get the one-dimensional trivial representation W triv if d ≡ 0 (mod 3), or the two-dimensional irreducible representation W std of the symmetric group if d ≡ 1 (mod 3). Precise counting gives the following decompositions of H 2d into the mentioned B 3 -representations :

H 2d ∼ =        d+1 6 W 0,0 ⊕ d+1 6 W 1,0 ⊕ d 2 W 0,1 ⊕ d 2 W 1,1 if d ≡ 2 (mod 3), W triv ⊕ d 6 W 0,0 ⊕ d 6 W 1,0 ⊕ d 2 W 0,1 ⊕ d 2 W 1,1 if d ≡ 1 (mod 3), W std ⊕ d-1 6 W 0,0 ⊕ d-1 6 W 1,0 ⊕ d 2 W 0,1 ⊕ d 2 W 1,1 if d ≡ 0 (mod 3).
5.4. B 3 -equivariant bases for Λ 2d . In order to describe rational B 3 -invariants on Λ 2d , we now describe a basis for Λ

2d = H 2d ⊕ qH 2d-2 ⊕ • • • ⊕ q d-1 Λ 2 with B 3 -symmetries.
The main observation is that we can combine the linear spanning sets of the spaces H 2d+2 and H 2d , when d ≡ 0 (mod 3), from Theorem 5.2, so as to remove the linear dependencies. Specifically, we observe:

Lemma 5.9. Let m ≥ 1 and k := 8m + 2. The 3k-dimensional subspace H 6m+2 ⊕ qH 6m ⊂ V 6m+2 has a B 3 -equivariant basis ũi,j (1 ≤ i ≤ 3, 0 ≤ j < k) with respect to some maps ζ, ξ : {0, . . . , k -1} → {0, 1}.

Proof. A B 3 -equivariant basis is given by {qu

(6m) i,0 + u (6m+2) i,0 | 1 ≤ i ≤ 3} ∪ {qu (6m) i,j | i, j ≥ 1} ∪ {u (6m+2) i,j | i, j ≥ 1} where {u (6m) i,j } and {u (6m+2) i,j
} are respectively the spanning sets of H 6m and H 6m+2 constructed in Theorem 5.2 and the maps ζ and ξ are defined accordingly.

Theorem 5.10. Let d ≥ 1 and let k := (d+1)(2d+1) 3 -1. Then the vector space Λ 2d contains 3k linearly independent elements w i,j ∈ Λ 2d for 1 ≤ i ≤ 3, 0 ≤ j < k forming a B 3 -equivariant set with respect to some maps ζ, ξ : {0, . . . , k -1} → {0, 1}. If d is not divisible by 3, then these w i,j form a basis of Λ 2d . If d ≡ 0 (mod 3), the set {w i,j } can be extended to a basis of H 2d by adding an element w ∞ ∈ Λ 2d which is fixed under the action of B 3 .

Proof. We recall that Λ 2d = H 2d ⊕ qH 2d-2 ⊕ • • • ⊕ q d-2 H 4 ⊕ q d-1 Λ 2 , where q d-1 Λ 2 ⊂ V 2d is a threedimensional subspace with basis w 1,0 := q d-1 x 2 , w 2,0 := q d-1 y 2 , w 3,0 := q d-1 z 2 . For i ∈ {1, 2, 3} we observe that gw i,0 = w σ(i),0 if g ∈ B 3 is a 3 × 3 permutation matrix with corresponding permutation σ and gw i,0 = w i,0 if g ∈ B 3 is a 3 × 3 sign-change matrix.

From Theorem 5.2 and Lemma 5.9 we obtain bases {u

(6m-2) i,j } ⊂ H 6m-2 and {ũ (6m+2) i,j
} ⊂ H 6m+2 ⊕ qH 6m with the desired B 3 -equivariance property. By multiplying with appropriate powers of q, we obtain the desired elements w i,j ∈ Λ 2d . Explicitly,

{w i,j } = q d-3m-1 ũ(6m+2) i,j | 1 ≤ m ≤ d -2 6 ∪ q d-3m+1 u (6m-2) i,j | 1 ≤ m ≤ d + 1 3 ∪ u (6m) i,j | m = d 3 , j ≥ 1 ,
additionally to the elements w i,0 from above. Note that the last set in this union is empty if d ≡ 0 (mod 3), and otherwise consists of those elements u (2d) i,j ∈ H 2d that are linearly independent. From Theorem 5.2 and Lemma 5.9 it is clear that this set {w i,j } is B 3 -equivariant (adequately inheriting the definition of the maps ζ, ξ from Theorem 5.2 and Lemma 5.9). In the case d ≡ 0 (mod 3), we do not yet have a basis of Λ 2d , because we left out the element

w ∞ := u (2d) 1,0 = u (2d) 2,0 = u (2d) 3,0 from the linear spanning set u (2d) i,j
of the subspace H 2d ⊂ Λ 2d described in Theorem 5.2. Note that the relation u Again it is important for applications to not consider Theorem 5.10 a pure existence result, but to observe how to immediately obtain the basis {w i,j } (resp. {w i,j , w ∞ }) of Λ 2d from harmonic polynomials u (2k) i,j ∈ H 2k as in Theorem 5.2. In particular, one can easily write out such a basis. Slightly deviating from Definition 5.1, we will call the constructed basis B 3 -equivariant, even in the case d ≡ 0 (mod 3), when the basis includes an element w ∞ fixed under B 3 . Remark 5.11. We observe that for d ≥ 2 there exists an index j 0 ∈ {0, . . . , k -1} such that ζ(j 0 ) = 0 and ξ(j 0 ) = 1 (and may assume after permuting the basis elements that this holds for j = 0). Indeed, the basis contains -up to multiplication with a power of q -the elements u (4) i,j forming a basis of H 4 . This basis of H 4 , given in Proposition 4.1, satisfies the desired property, as remarked after Theorem 5.2. 5.5. Rational invariants for ternary forms of arbitrary even degree. With the construction of the B 3 -equivariant basis for the slice Λ 2d ⊂ V 2d established for arbitrary d, we can now turn to the construction of a generating set of rational invariants for the action of B 3 on Λ 2d , generalizing the case 2d = 4 described in Section 4.

Let d ≥ 2 and consider a basis {w

i,j | 1 ≤ i ≤ 3, 0 ≤ j < k} [∪ {w ∞ }] of Λ 2d
and corresponding maps ζ, ξ : {0, . . . , k -1} → {0, 1} as described in Theorem 5.10. Here, and from now on, we distinguish between the case d ≡ 0 (mod 3) and the case d ≡ 0 (mod 3), where there is an additional basis element w ∞ ∈ Λ 2d , with square brackets, whenever we are confident that no confusion arises from this.

As observed in Remark 5.11, we can assume ζ(0) = 0, ξ(0) = 1. With this chosen basis, an element v ∈ Λ 2d can be uniquely expressed as

(5.3) v = 3 i=1 i w i,0 + 3 i=1 k-1 j=1 α i,j w i,j [+ α ∞ w ∞ ] for γ i , α i,j [, α ∞ ] ∈ R.
In this way, we identify R(Λ 2d ) with the field of rational expressions in variables

γ i , α i,j [, α ∞ ], i.e. R(Λ 2d ) = R(γ i , α i,j [, α ∞ ] | 1 ≤ i ≤ 3, 0 ≤ j < k).
Theorem 5.12. With the notations as above, a minimal generating set of rational invariants for R(Λ 2d ) B3 is given by the 2d 2 + 3d -2 = dim Λ 2d polynomial functions

I 2d = {p i,j } [∪{p ∞ }]
, whose values at v as in (5.3) are given as follows:

• Three invariants are given by

p 1,0 := γ 2 1 + γ 2 2 + γ 2 3 , p 2,0 := γ 1 γ 2 γ 3 , p 3,0 := γ 4 1 + γ 4 2 + γ 4 3 . • In the case d ≡ 0 (mod 3), one invariant is given by p ∞ := α ∞ .
• The remaining invariants in the generating set are given as the entries of the 3 × (k -1)-matrix

  p 1,1 . . . p 1,k-1 p 2,1 . . . p 2,k-1 p 3,1 . . . p 3,k-1   :=   1 1 1 γ 2 1 γ 2 2 γ 2 3 γ 4 1 γ 4 2 γ 4 3   M (α),
where k = 2d 2 +3d-5 3 and M (α) is the 3 × (k -1)-matrix whose (i, j)-th entry is

M (α) i,j = γ ξ(j) i (γ 2 1 -γ 2 2 )(γ 2 2 -γ 2 3 )(γ 2 3 -γ 2 1 ) ζ(j) α i,j .
Proof. With Theorem 5.10 established, the proof is analogous to the one for Theorem 4.3: One checks that I 2d consists of B 3 -invariants (for example, by the use of equivariant maps as before, or directly from the definitions). In order to express a given rational invariant p ∈ R(Λ 2d ) B3 as a rational combination in terms of I 2d , we may first replace each occurrence of the variables α i,j in p by a rational expression in terms of invariants in I 2d and γ 1 , γ 2 , γ 3 by using that M (α) i,j is the (i, j)-th entry of the matrix product

  1 1 1 γ 2 1 γ 2 2 γ 2 3 γ 4 1 γ 4 2 γ 4 3   -1   p 1,1 . . . p 1,k-1 p 2,1 . . . p 2,k-1 p 3,1 . . . p 3,k-1   .
If d ≡ 0 (mod 3), we also replace each occurrence of α ∞ by p ∞ . As in the proof of Theorem 4.3, we express the remaining B 3 -invariant rational expression in γ 1 , γ 2 , γ 3 in terms of p 1,0 , p 2,0 , p 3,0 -note that γ 1 , γ 2 , γ 3 play the exact same role here as in Theorem 4.3. Explicitly, as in Section 4.2, we again have a routine for expressing rational B 3 -invariants on Λ 2d in terms of I 2d , given by the following rewrite rules:

  α 1,j α 2,j α 3,j   -→ δ 1-ζ(j) c 0 p ξ(j) 2,0   γ 2 γ 3 0 0 0 γ 3 γ 1 0 0 0 γ 1 γ 2   ξ(j)   (γ 2 3 -γ 2 2 )γ 2 2 γ 2 3 γ 4 2 -γ 4 3 γ 2 3 -γ 2 2 (γ 2 1 -γ 2 3 )γ 2 3 γ 2 1 γ 4 3 -γ 4 1 γ 2 1 -γ 2 3 (γ 2 2 -γ 2 1 )γ 2 1 γ 2 2 γ 4 1 -γ 4 2 γ 2 2 -γ 2 1     p 1,j p 2,j p 3,j   ∀j ≥ 1, α ∞ -→ p ∞ , γ 1 -→ 1 p 3,0
(p 1,0 γ 2 γ 3 -γ 3 2 γ 3 -γ 2 γ 3 3 ), Corollary 5.13. There exists a generating set of dim V 2d -dim O 3 = 2d 2 + 3d -2 rational invariants J 2d ⊂ R(V 2d ) O3 uniquely determined by their restrictions to Λ 2d ⊂ V 2d that are given by the invariants I 2d ⊂ R[Λ 2d ] B3 specified in Theorem 5.12.

γ 4 2 -→ p 1,0 γ 2 2 -

Solving the main algorithmic challenges

In Sections 4 and 5, in Corollaries 4.4 and 5.13, we identified, for any d ≥ 2, a finite set of rational invariants J 2d ⊂ R(V 2d ) O3 generating R(V 2d ) O3 . We denote the number of these rational invariants as m := |J 2d |.

Recall that m is minimal, that is

m = dim V 2d -dim O 3 = 2d + 2 2 -3.
Instead of being given by a closed form formula, each invariant p ∈ J 2d is uniquely determined, in virtue of Theorem 3.2, by the restriction p = p| Λ 2d ∈ R(Λ 2d ) B3 of the rational map p : V 2d R to the subspace Λ 2d ⊂ V 2d . We shall in this section examine the practical implications of Theorem 3.2 in addressing the algorithmic challenges formulated in Section 2.2. For these, we provide algorithms that rely only on the explicit knowledge of the restricted invariants I 2d = { p| Λ 2d | p ∈ J 2d }.

6.1. The Evaluation Problem. Having identified a finite generating set of rational invariants J 2d ⊂ R(V 2d ) O3 , the most basic algorithmic question is: How can we evaluate each of the generating invariants p ∈ J 2d at a given point v ∈ V 2d ?

Let p ∈ J 2d and consider the restriction p := p| Λ 2d ∈ I 2d of p : V 2d R to the subspace Λ 2d ⊂ V 2d . By construction of the invariants, we know explicit expressions for p ∈ R(Λ 2d ) B3 , which allow us to evaluate p ∈ J 2d at any point of the slice u ∈ Λ 2d by computing p(u) = p(u) ∈ R.

When we want to evaluate p(v) for arbitrary v ∈ V 2d , we observe that p(gv) = p(v) for all g ∈ O 3 , since p is an invariant for the action of O 3 . By Proposition 3.5, we know that for general v ∈ V 2d there exists an orthogonal transformation g ∈ O 3 such that gv ∈ Λ 2d . For such g ∈ O 3 , we may then compute p(v) = p(gv) = p(gv). is a basis of V 2d and we can uniquely write For B 2k ⊂ H 2k , we might as well use the elements u (2k) i,j explicitly constructed in Theorem 5.2 (by selecting a linearly independent subset of these in the cases k ≡ 2 (mod 3)), though it is not essential at this stage. For chosen bases B 2k ⊂ H 2k , computing the expression (6.1) for a given v = ijk a ijk x i y j z k corresponds to converting from the monomial basis {x i y j z k | i + j + k = 2d} ⊂ V 2d to the basis B 2d ⊂ V 2d . The corresponding base-change matrix is the inverse of the matrix whose entries are given by the coefficients of the expressions b ∈ B 2d in the variables x, y, z. This base-change matrix may be precomputed for fixed d. If we use bases B 2k ⊂ H 2k built from elements u (2k) i,j ∈ H 2k as constructed in Theorem 5.2, the base change transformation could in fact be described explicitly by a careful analysis of the proofs in Section 5.2.

Step 3 is the problem of computing the eigendecomposition of the symmetric matrix A and is equivalent to finding the eigenvalues and eigenvectors of A. Exact (symbolic) algorithmic solutions to this problem would involve introducing (nested) square roots and cubic roots, but such expressions are typically very undesirable from a practical standpoint. However, there are well-established numerical methods for computing the eigendecomposition of a symmetric matrix -with the additional benefit that the numerical stability of these methods is well-studied [START_REF] Kressner | Numerical methods for general and structured eigenvalue problems[END_REF], [GVL13, Chapter 8].

Realizing

Step 5 is straightforward by the definition of the action of g = (g ij ) ∈ O 3 on V 2d : Applying the substitutions x → g 11 x + g 21 y + g 31 z, y → g 12 x + g 22 y + g 32 z, z → g 13 x + g 23 y + g 33 z,

to v ∈ V 2d = R[x, y, z] 2d and expanding the resulting expression gives u = gv ∈ Λ 2d . This expansion may also be precomputed symbolically for fixed d such that it is only necessary to evaluate with the entries g ij .

Finally, for Step 6, we want to evaluate at u ∈ Λ 2d the expressions for the rational invariants I 2d ⊂ Λ 2d described in Theorem 5.12. For that, we express u = 3 i=1 γ i w i,0 + 3 i=1 k j=1 α i,j w i,j [+ α ∞ w ∞ ] , where {w i,j | 1 ≤ i ≤ 3, 0 ≤ j ≤ k} [∪ {w ∞ }] is the basis of Λ 2d from Theorem 5.10. This can again be realized by an appropriate linear base change transformation. We then evaluate p(u) for each p ∈ I 2d with the formulas for the invariants given in Theorem 5.12. 6.2. The Rewriting Problem. In this section, we discuss how to address the Rewriting Problem specified in Section 2.2.

For notational simplification, we now assume that the rational invariants in J 2d ∈ R(V 2d ) O3 are indexed as J 2d = { p 1 , . . . , p m } and their restrictions to Λ 2d are I 2d = {p 1 , . . . , p m }. Since p 1 , . . . , p m ∈ R(V 2d ) O3 form a generating set of rational invariants, it is possible to express any other rational invariant p 0 ∈ R(V 2d ) O3 as a rational combination of p 1 , . . . , p m , i.e. there exists a rational expression in m variables r(T 1 , . . . , T m ) ∈ R(T 1 , . . . , T m ) such that (6.2) p 0 = r( p 1 , . . . , p m ).

Determining such r(T 1 , . . . , T m ) ∈ R(T 1 , . . . , T m ) for any given p 0 ∈ R(V 2d ) O3 is a problem that can be reduced to the corresponding problem for B 3 -invariants on the subspace Λ 2d ⊂ V 2d .

Note that restricting the equality (6.2) to the subspace Λ 2d ⊂ V 2d gives:

p 0 | Λ 2d = r(p 1 , . . . , p m ).

Figure 1 . 1 .

 11 Figure 1.1. Two centrally symmetric surfaces only differing by a rotation.

Figure 1 . 2 .

 12 Figure 1.2. Slice of a brain diffusion image (a). The yellow boxes indicate the regions that are zoomed in (b) illustrating the diffusion signal at each voxel. From [PGD14].

  If f := a 200 x 2 + a 110 xy + a 020 y 2 + a 101 xz + a 011 yz + a 002 z 2 and gf = b 200 x 2 + b 110 xy + b 020 y 2 + b 101 xz + b 011 yz + b 002 z 2 , then the relation between the coefficients of f and gf is given by the matricial equality:

  then the vector of coefficients b = b 1 . . . b 6 T is related to the vector of coefficients a = a 1 . . . a 6 T by the matricial equality: b

Figure 4 . 1 .

 41 Figure 4.1. Harmonic quartics

Figure 4 .

 4 Figure 4.1 illustrates this basis of H 4 as explained in Section 1.1, similar to Figure 1.1. Here, different colors within one picture correspond to different signs of the harmonic polynomial at corresponding points.

  are easily checked to satisfy (i)-(v). Here, we employ for a, b ∈ Z the convention a b := a(a-1)...(a-b+1) b! if b ≥ 0, 0 otherwise and use the identities a+1 b+1 = a b + a b+1 and a b = (-1) b b-a-1 b

Figure 5 . 2 .

 52 Figure 5.2. Illustration of the elements u (8) 1,j in the B 3 -symmetric spanning set of H 8

  and the description of the B 3 -action on u in Theorem 5.2 imply that gw ∞ = w ∞ for all g ∈ B 3 . This concludes the proof.

  α b q d-k b + β200q d-1 x 2 + β020q d-1 y 2 + β002q d-1 z 2 + β110q d-1 xy + β011q d-1 yz + β101q d-1 zx with α b , β ijk ∈ R.Then the Harmonic Decomposition of v as in Step 1 is given byh 2k = b∈B 2k α b b ∈ H 2k , v = β 200 x 2 + β 020 y 2 + β 002 z 2 + β 110 xy + β 011 yz + β 101 zx ∈ V 2 .

  As in Section 4.2, we notice that the generating setI 2d ⊂ R(Λ 2d ) B3 is a transcendence basis for R(Λ 2d ) B3 as a field extension over R, since |I 2d | = dim Λ 2d .In particular, this generating set is of minimal cardinality. By Corollary 3.3, there uniquely exists a corresponding generating set J 2d of rational O 3 -invariants on V 2d with |J 2d | = |I 2d | = dim Λ 2d , attaining the lower bound from Theorem 2.2 because of dim V 2d = Λ 2d + dim O 3 .

	γ 2 2 γ 2 3 + p 1,0 γ 2 3 -γ 4 3 +	1 2	(p 2,0 -p 2 1,0 ),	γ 6 3 -→	1 2	(p 2,0 -p 2 1,0 )γ 2 3 + p 1,0 γ 4 3 + p 2 3,0 ,
	where
				δ := (γ 2 1 -γ 2 2 )(γ 2 2 -γ 2 3 )(γ 2 3 -γ 2 1 )	and
	c 0 := δ 2 =	1 2	p 3 2,0 -	1 4	p 6 1,0 -27p 4 3,0 + p 4 1,0 p 2,0 -	5 4	p 2 1,0 p 2 2,0 -9p 2 3,0 p 1,0 p 2,0 + 5p 2 3,0 p 3 1,0 .

July 12, 2018

July 12, 2018

Maple

Maplesoft, a division of Waterloo Maple Inc., Waterloo, Ontario.

Proof. Recall that H 2d is the orthogonal complement of qV 2d-2 in V 2d with respect to the apolar product, where q = x 2 +y 2 +z 2 . Hence, v ∈ H 2d if and only if v, qx i y j z k = 0 for all i, j, k such that i+j +k = 2d-2. From

we see that v, qx i y j z k = (2d)!(β i+2,j,k + β i,j+2,k + β i,j,k+2 ), so the claim follows.

Lemma 5.4. Let d ≥ 2 and 0 ≤ ≤ d. There exists a harmonic polynomial θ ∈ H 2d , unique up to scaling, with the following four properties:

(1) Each monomial of θ is of even degree in each of the variables x, y and z.

(2) The highest degree in which the variable x occurs in θ is 2 .

(3) The monomial y 2j z 2k (for j + k = d) does not occur in the expression θ if |j -k| < .

(4) Interchanging the variables y and z in the expression θ gives (-1) d-θ .

In this unique polynomial θ , all monomials in V 2d of degree 2 in x and even degree in each y and z occur with a non-zero coefficient.

Proof. By Lemma 5.3, determining the expression

amounts to finding β i,j,k ∈ R for i, j, k ≥ 0, i + j + k = d such that (i) β i+1,j,k + β i,j+1,k + β i,j,k+1 = 0 for all i, j, k ≥ 0, i + j + k = d -1, (ii) β i,j,k = 0 if i > , (iii) β ,j,k = 0 for some j, k, (iv) β i,j,k = (-1) d-β i,k,j for all i + j + k = d, (v) β 0,j,k = 0 if |j -k| < .

From this, the coefficients β i,j,k can be determined iteratively. Combining (v) with (i), one shows by induction on i that (5.1)

Moreover, (ii) imposes β i,j,k = 0 if i > . Then (i) implies that β ,j+1,k = -β ,j,k+1 for all j, k ≥ 0 with

Because of (iii), we may assume (after rescaling all β i,j,k ) that β ,j,k = (-1) j for all j + k = d -.

If d -is even and s := d- 2 , we additionally have β -1,s,s+1 + β -1,s+1,s + β ,s,s = 0 by (i). From β ,s,s = (-1) s , we conclude with (iv) that (5.2)

At this stage we have determined all β i,j,k for i + j + k = d such that i ≥ or |j -k| < max{ -i, 2} and they are compatible with (i)-(v) in the sense that all statements from (i)-(v) only involving those β i,j,k are satisfied. We now proceed to determine β -K,j,k for K ∈ N increasing from 1 to , assuming that the values β i,j,k for i > -K are already known and compatible with (i)-(v).

Recall that from (5.1) and (5.2) we already know the values β -K,j,k whenever |j -k| < max{K, 2}. For increasing values of |j -k|, we then iteratively obtain the values β -K,j,k for j > k from the recursion

Note that we have only defined u i,j for j ≥ 1. Additionally, let

). In the following, we show that these harmonic polynomials u i,j ∈ H 2d for i ∈ {1, 2, 3}, j ∈ {0, . . . , k} satisfy the properties stated in Theorem 5.2 if we define ζ, ξ : {0, . . . , k -1} → {0, 1} as

First, we check the (ζ, ξ)-equivariance of the harmonic polynomials u i,j . The symmetric group S 3 is generated by the cycle c = (123) together with the transposition t = (23), so in order to show g σ u i,j = sgn(σ) ζ(j) u σ(i),j for all σ ∈ S 3 , it suffices to check this for σ = c and σ = t. By definition of u i,j we have

i.e. g c u i,j = u c(i),j . Note that sgn(c) = 1. Since g t acts by interchanging the variables y and z, it follows from property (4) in Lemmas 5.4 and 5.6 that g t u 1,j = (-1) ζ(j) u 1,j . Indeed, for j ≥ 1 or d ≡ 0 (mod 3), this is immediate from the definition of u 1,j , while for j = 0 and d ≡ 0 (mod 3), it follows after using the identities g t g c = g 2 c g t and g t g 2 c = g c g t and observing that ζ(0) = 0 in this case. After that, we deduce

, (where we used again g t g c = g 2 c g t ) and therefore also g t u 3,j = (-1) ζ(j) u 2,j . All together, we have g t u i,j = (-1) ζ(j) u t(i),j . Note that sgn t = -1. With this, we have verified verified the equivariance for permutation matrices.

Now let τ ∈ {1, -1}

3 . Note that property (1) of Lemmata 5.4 and 5.6 ensures that g τ u 1,j = (τ 2 τ 3 ) ξ(j) u 1,j . Using g τ g c = diag(τ 2 , τ 3 , τ 1 ) and g τ g 2 c = diag(τ 3 , τ 1 , τ 2 ), we also see that g τ u 2,j = (τ 3 τ 1 ) ξ(j) u 1,j and g τ u 3,j = (τ 1 τ 2 ) ξ(j) u 1,j . This concludes the proof of the (ζ, ξ)equivariance.

If d ≡ 2 (mod 3), then k = 4d+1 3 , so dim H 2d = 3k. The 3k harmonic polynomials u i,j are linearly independent by Lemma 5.7, hence they form a basis of H 2d . This verifies properties (i) and (ii) for d ≡ 2 (mod 3).

If d ≡ 0 (mod 3), then dim H 2d = 4d + 1 = 3k -2 and the identities u 1,0 = u 2,0 = u 3,0 hold by definition of u i,0 . This shows property (ii). The 3k -3 harmonic polynomials u i,j for i ∈ {1, 2, 3}, j ∈ {1, . . . , k -1} are linearly independent by Lemma 5.7, and the subspace of H 2d spanned by them does not contain the harmonic polynomial u 1,0 = u 2,0 = u 3,0 , because the latter contains the monomial x 2d 3 y 2d 3 z 2d 3 , which does not occur in u i,j for j ≥ 1. This also establishes (i) for d ≡ 0 (mod 3).

We are left with the case d ≡ 1 (mod 3). Note that then dim

From considering the (non-)occurrence of the monomials

in the expressions u i,j , it follows that the subspace of H 2d spanned by all the 3k harmonic polynomials u i,j must be at least of dimension 3k -1 and must hence coincide with H 2d . Together with Lemma 5.8, this verifies (i) and (ii) in this last case, concluding the proof.

Illustrations and examples.

For degree 4, the construction above reproduces the basis for H 4 given in Proposition 4.1 (up to scalars). For arbitrary d, the proof of Theorem 5.2 together with Remark 5.5 give explicit closed formulas for elements u i,j of a B 3 -equivariant spanning set of H 2d , by means of several case distinctions. For example, tracing back the definitions gives:

where s := 1 2 (d -k 0 + j + 1); and u 2,j , u 3,j are obtained from this by cyclically permuting x, y, z. For the other elements u i,j , similar formulas can be written out.

We give examples for B 3 -equivariant spanning sets of H 2d for d = 3 and 4. For this, we will denote the constructed harmonic polynomials u i,j ∈ H 2d from Theorem 5.2 by u (2d) i,j to avoid confusion between different values of d.

In degree 6, the following 13 harmonic polynomials form the B 3 -equivariant basis for H 6 constructed in Theorem 5.2:

The five harmonic polynomials u (6) 1,j for j ∈ {0, . . . , 4} are illustrated in Figure 5.1, presented in the same way as previously for quartics in Figure 4.1. The remaining basis elements u (6) 2,j and u (6) 3,j not depicted arise from these by permuting the coordinates.

For degree 8, the following polynomials form the B 3 -equivariant spanning set for H 8 :

= 14y 6 zx -35y 4 z 3 x -35y 4 zx 3 + 21y 2 z 5 x + 21y 2 zx 5 -z 7 x -zx 7 , u (8) 3,5 = 14z 6 xy -35z 4 x 3 y -35z 4 xy 3 + 21z 2 x 5 y + 21z 2 xy 5 -x 7 y -xy 7 .

They satisfy the linear relation u

Recalling the definition of the slice Λ 2d , this idea leads to Algorithm 1. In the following, we comment on its validity and its computational realization.

2 Let A ∈ R 3×3 be the symmetric matrix corresponding to the quadratic form v ∈ V 2 as in (1.3).

3 Determine g ∈ O 3 such that the matrix product gAg T is diagonal:

4 If λ i = λ j for some i = j, output "undefined at v" and stop. 5 Compute u := gv ∈ Λ 2d . 6 Compute and output the values p(u) for each p ∈ I 2d .

Algorithm 1: Evaluation Algorithm

Validity of Algorithm 1. First, we describe how the formulation in Algorithm 1 corresponds to the idea described above of evaluating p(v) as p(gv) where g ∈ O 3 is some orthogonal transformation such that gv ∈ Λ 2d . We recall that if

is the Harmonic Decomposition of v computed in Step 1, then the Harmonic Decomposition of gv is given as gv = gh 2d + q(gh 2d-2 ) + q 2 (gh 2d-4 ) + . . . + q d-2 (gh 4 ) + q d-1 (gv ) by Proposition 2.7. Then the definition of Λ 2d gives: gv is contained in Λ 2d if and only if gv ∈ V 2 lies in Λ 2 , i.e. the symmetric matrix associated to the quadratic form gv is diagonal. This matrix is gAg T (where A is the matrix of the quadratic form v ∈ V 2 ).

To validate Step 4 in Algorithm 1, we recall that even when the restricted invariant p ∈ R(Λ 2d ) B3 is known to be a polynomial invariant, the corresponding invariant p ∈ R(V 2d ) O3 is typically only a rational function, defined at a general point only. In fact, going back to the proof of Proposition 3.5, we see that the rational function p : V 2d R which we obtain from p ∈ R(Λ 2d ) B3 is only defined at those points v ∈ V 2d whose quadratic part v ∈ V 2 (in the Harmonic Decomposition) does not have repeated eigenvalues in the matrix representation (1.3). This precisely corresponds to Step 4. We observe that leaving out Step 4, Algorithm 1 would still output a (meaningless) value for the non-defined cases, but that value would depend on the choice of g in Step 3.

Computational realization of Algorithm 1. First, we discuss the implementation of Step 1: In order to compute v ∈ V 2 in the Harmonic Decomposition of v ∈ V 2d , we can use the explicit projection operators on H 2d , . . . , H 4 given in [START_REF] Axler | Harmonic function theory[END_REF]Theorem 5.21]. Alternatively we express the given element v = ijk a ijk x i y j z k in terms of a basis of V 2d that reflects the Harmonic Decomposition

Say, B 2k ⊂ H 2k is a basis of the space H 2k of harmonic polynomials of degree 2k (for 2 ≤ k ≤ d). Then

Hence, to determine the rational expression r, it is sufficient to rewrite p 0 := p 0 | Λ 2d ∈ R(Λ 2d ) B3 in terms of the restricted generating rational invariants p 1 , . . . , p m ∈ R(Λ 2d ) B3 . This leads to Algorithm 2.

Algorithm 2: Rewriting Algorithm

Step 2 is the problem of rewriting a rational B 3 -invariant on Λ 2d in terms of the generating rational invariants p 1 , . . . , p m ∈ R(Λ 2d ) B3 . The realization of this is addressed in the proofs of Theorems 4.3 and 5.12 and made explicit by the "rewrite rules" given in Sections 4.2 and 5.5.

6.3. The Reconstruction Problem. By construction,

is the set of rational O 3 -invariants on V 2d such that

are the B 3 -invariants on Λ 2d from Theorem 5.12.

In Section 6.1, we saw how to numerically evaluate

, so we are also interested in the following question:

Note that the reconstructed v ∈ V 2d is not uniquely determined, since for any orthogonally equivalent w ∈ V 2d (i.e. w = gv for some g ∈ O 3 ), the invariants p ∈ J 2d take the same values for v and w. Theorem 2.3 implies that generically, the reconstructed v is unique up to orthogonal transformations, i.e. any different reconstructed w ∈ V 2d is orthogonally equivalent to v.

By Proposition 3.5, for a general point v ∈ V 2d there exists g ∈ O 3 such that u := gv ∈ Λ 2d . Then

In particular, we can always choose to reconstruct an element v that lies in the subspace Λ 2d .

With respect to the basis {w i,j | 1 ≤ i ≤ 3, 0 ≤ j < k} [∪{w ∞ }] of Λ 2d from Theorem 5.10, we therefore want to determine

With the explicit formulas for the invariants given in Theorem 5.12, this leads to the problem of solving the following system of polynomial equations in unknowns α i,j , γ i [, α ∞ ] ∈ R:

where the (i, j)-th entry of the matrix

The crucial part for the resolution of the polynomial system (6.3) lies in solving the first three equation for γ 1 , γ 2 , γ 3 . Once values for γ 1 , γ 2 , γ 3 ∈ R are known, we are left with a system of linear equations in the remaining variables. Therefore, the following observations are essential:

1 , γ 2 2 , γ 2 3 ∈ C are the zeroes (with multiplicities) of the cubic polynomial

Proof. Let γ 1 , γ 2 , γ 3 ∈ C be solution of the system and let f ∈ C[T ] be the polynomial whose zeroes (with multiplicities) are γ 2 1 , γ 2 2 , γ 2 3 . Then

The following classical fact then characterizes when the solution in Lemma 6.1 has real solutions:

Proof. The expression a 2 b 2 -4b 3 -4a 3 c -27c 2 + 18abc is the discriminant of the cubic polynomial f , which is positive if and only if f has three distinct real solutions. Descartes' rule of signs implies that f has no negative solutions if and only if the signs of the coefficients of f alternate, i.e. a, b, c > 0.

Combining these two results, we obtain Algorithm 3.

For Step 14 in Algorithm 3, it should be observed that an unambiguous reconstruction requires γ 2 1 , γ 2 2 , γ 2 3 to be distinct and non-zero. The validity of the algorithm follows from the discussion above.

Input : µ i,j ∈ R for 1 ≤ i ≤ 3, 0 ≤ j < k [plus µ ∞ ∈ R] Output: A ternary form v ∈ V 2d such that p i,j (v) = µ i,j for all i, j

INRIA Méditerranée, MPI MIS Leipzig

E-mail address: goerlach@mis.mpg.de

INRIA Méditerranée

E-mail address: evelyne.hubert@inria.fr

INRIA Méditerranée

E-mail address: theodore.papadopoulo@inria.fr