Differential Invariants of Measurements, and Their Relation to Central Moments

Due to the principle of minimal information gain, the measurement of points in an affine space V determines a Legendrian submanifold of V×V*×R. Such Legendrian submanifolds are equipped with additional geometric structures that come from the central moments of the underlying probability distributions and are invariant under the action of the group of affine transformations on V. We investigate the action of this group of affine transformations on Legendrian submanifolds of V×V*×R by giving a detailed overview of the structure of the algebra of scalar differential invariants, and we show how the scalar differential invariants can be constructed from the central moments. In the end, we view the results in the context of equilibrium thermodynamics of gases, and notice that the heat capacity is one of the differential invariants.


Introduction
It has been known since the work of Gibbs [1,2] that thermodynamics can be formulated in the language of contact geometry. Because the fundamental thermodynamic relation takes the form of a contact structure on an odd-dimensional manifold, closed systems in thermal equilibrium correspond to Legendrian submanifolds with respect to this contact structure. More recently, some effort has been devoted towards studying an additional metric structure in the context of thermodynamics (see for example [3,4] and references therein).
Both the contact structure and the metric can be given statistical interpretations [5,6]. The principle of minimal information gain (similar to Jaynes' principle of maximal entropy, [7]), applied to a random vector taking values in an affine space V, gives a contact structure on V × V * × R. The variance of the random vector determines a metric on Legendrian submanifolds. In fact, for each integer k ≥ 2, the kth central moment gives a symmetric k-form on Legendrian submanifolds [6].
In this framework, the group of affine transformations on V plays an important role, as it acts on V × V * × R, and on the space of Legendrian submanifolds, while preserving the geometric structures mentioned. If we treat Legendrian submanifolds that are related by a transformation in this group as equivalent, it is clear that the important quantities are those that are invariant under this group action. Such quantities will be the main focus of this paper. In particular, we give a detailed description of the differential algebra of scalar differential invariants, building upon the work done in [8].
The paper is organized as follows. We start in Section 2 by recalling how the process of measuring points in an affine space leads to symplectic and contact geometry, following [6]. We explain how Legendrian submanifolds come equipped with symmetric k-forms corresponding to kth central moments. We end the section by discussing the action of the Lie group Aff(V) of affine transformations on V. In Section 3, we recall notions from the geometric theory of PDEs and explain the concept of scalar differential invariants. We show how the group Aff(V) acts on the jet spaces, and that its Lie algebra of vector fields is the largest Lie algebra of vector fields on V that preserves the central moments.
In Section 4, we use the central moments to find generators for the field of rational scalar differential invariants. We compute the Hilbert and Poincaré functions for the field. We also find invariant derivations, and give a finite set of generators for the set of differential invariants, as a differential algebra. We compute differential syzygies for the case dim V = 2. In Section 5, we apply our results to the thermodynamics of gases in equilibrium. We find a generating set of differential invariants and invariant derivations with respect to Aff(V), and we notice that the heat capacity (at constant pressure) is one of the fundamental scalar differential invariants. We also compute differential invariants with respect to two different subgroups of Aff(V) before we finish with a discussion of the significance of differential invariants.

From Random Vectors to Differential Geometry
We start by describing how the principle of minimal information gain applied to the measurement of points in an affine space leads to contact and symplectic geometry. We follow closely the approach of [6].

Measuring Points in Affine Spaces
A random vector is a map from a probability space to the affine space V R n : Here Ω is the sample space, A the σ-algebra of "events", and µ 0 a probability measure. We interpret X as a measurement of By choosing an affine frame in V, the integral above can be defined coordinate-wise. The measurement of a different vector x ∈ V is made by changing the probability measure from µ 0 to µ, using the probability measure as a control parameter, in a way so that E µ (X) = x. We now find conditions that determine µ.
Assume first that µ 0 is absolutely continuous with respect to µ. Then the Radon-Nikodym theorem implies that dµ = ρdµ 0 . We require ρ to satisfy the conditions E µ (X) = Ω Xρdµ 0 = x, In addition we require µ to be the probability distribution "closest" to µ 0 in the sense that it minimizes the information gain, or the Kullback-Leibler divergence: This is the principle of minimal information gain. It is similar to Jaynes' maximum-entropy principle [7]. As Jaynes put it, it is the only unbiased assignment we can make. Note that Jensen's inequality gives Minimizing I(µ, µ 0 ) under the constraints (1) gives where λ ∈ V * is a covector of Lagrange multipliers corresponding to the constraints given by the first equation of (1), and Z(λ) = Ω e λ,X dµ 0 is the partition function (see [6] for details). Thus ρ is determined by λ, and λ = 0 implies ρ = 1.
Let D ⊂ V * be a simply connected domain, containing 0, on which Z(λ) is defined and smooth. Due to the first condition of (1), we have d λ Z = Z(λ)x. The differential d λ Z is an element in T * λ D which can be identified with V = (V * ) * . In this identification, This defines an n-dimensional manifold By choosing an affine frame on V with origin x 0 (and its dual frame on V * ), we get coordinates x i on V and λ i on V * . In these coordinates, the linear basis of the vector space associated to V can be identified with dλ i ∈ T * λ D, and L is then given by the n equations and L is a Lagrangian submanifold: ω| L = 0. We use the Einstein summation convention, and sum over repeated indices. Since the information gain I(µ, µ 0 ) depends on ρ, and therefore on λ, it can be considered as a function on L. By using (2) we get Let u be a coordinate on R. We have the relation I x i = λ i , so the submanifold The Legendrian submanifoldL depends on the initial random vector. In this way, the statistical object we started with is translated into a geometric objectL. This shows that our model of physical measurements, based on random vectors and the principle of minimal information gain, is always accompanied by a form of thermodynamics, where the contact form du − λ i dx i plays the role of the fundamental thermodynamic relation.
We note that in some cases, it is convenient to hide the information gain from our consideration and consider the Lagrangian submanifold L ⊂ V × V * instead ofL ⊂ V × V * × R. We will switch between these two viewpoints.

Central Moments
LetL continue to denote the Legendrian manifold corresponding to the random vector X. It can be parametrized either by the measured quantity x ∈ V or by the parameter λ ∈ V * (we will mostly use the latter choice).
The kth moment of X (with respect to µ) is defined by It depends on λ and defines a symmetric tensor onL. We continue to use coordinates x i on V and λ i on V * , coming from the choice of affine frame on V with origin x 0 and linear basis dλ i . If we write X = X i dλ i , we get Assuming that the function Z is smooth, the differentiation is symmetric, and thus m k is a symmetric k-form defined onL. The equality can be shown by induction, using (2). The kth central moment σ k of X is defined as the kth moment of X − m 1 , where They are related through the formula where the product is the symmetric tensor product. Note that the tensor σ k is completely determined byL, or even by the corresponding Lagrangian manifold L ⊂ V × V * . The second central moment, or variance, determines a positive definite metric on Legendrian submanifolds. It can also be given locally as I x i x j dx i ⊗ dx j . Or if we consider only the Lagrangian submanifold L ⊂ V × V * , defined by n functions x i (λ), it can be given by x i Notice that the positive definiteness of σ 2 puts conditions onL. Thus, the measurement process does not lead to arbitrary Legendrian manifolds, but only to ones where the symmetric k-forms can be properly interpreted as central moments.
The metric σ 2 has been studied previously in different contexts. In particular it was treated by Ruppeiner [3,4] as a metric on V (in our notation). Ruppeiner was also interested in computing and giving a physical interpretation to its scalar curvature. However, as was pointed out in [6], and which we will discuss further in this paper, the group Aff(V) which appears naturally in this context is smaller than the full Lie pseudogroup of diffeomorphisms. As a result, the scalar curvature is not the most fundamental invariant. In [5], σ 2 was treated as a metric on Legendrian submanifolds of V × V * × R in the same way as we do in this paper. There, they also showed that it can be extended to a nondegenerate metric on V × V * × R.

The Action of the Group of Affine Transformations
In the framework outlined above, we get quite naturally an action of the affine group Aff(V). One can view it as coming from the arbitrary choice of affine frame on V. The action extends to V × V * × R in the obvious way: This Lie group action preserves the contact structure on V × V * × R (or the symplectic structure on V × V * ). Thus, it also gives an action on the space of Legendrian (or Lagrangian) submanifolds.
Moreover, the tensor σ k is preserved by Aff(V) for every k ≥ 2. This will be discussed further in the next section. In particular, we will show in Theorem 2 in Section 3.2 that the Lie algebra of the Aff(V)-action is the largest Lie algebra of vector fields on V that preserves the tensor σ 2 . Because of this, Aff(V) plays an important role in the theory of measurements, and this Lie group will be the focus of our attention in most of this paper. We also have the invariant 0-form α 0 = u and 1-form du − λ i dx i . The latter form vanishes when restricted toL, so we consider instead α 1 = λ i dx i which also is invariant since u, and therefore du, is. Since

Remark 1.
Notice that there may be situations for which it is desirable to consider proper subgroups of Aff(V) only, perhaps because the space V has additional structure. For example, in the case where V is a vector space, it may be more appropriate to consider only the action of GL(V). In this case, the regular kth moment m k will be invariant.

Jets and PDEs
The theory of jet spaces lets us treat functions, sections of bundles, submanifolds of a fixed dimension and, more generally, solutions of PDEs geometrically. In particular it gives a transparent picture of the algebra of scalar differential invariants. We will use most of this section to fix notation and definitions, sufficient for our use, and refer to the standard literature (for example [9][10][11]) for details. We recommend [12] for a comprehensive introduction the theory of jet spaces and differential invariants, and [13] for a more concise overview. The paper [14] can be added to either one of these as an updated treatment of the theory of scalar differential invariants.

Jets
We have seen that the Legendrian submanifolds in V × V * × R can be represented, locally, by a function I(x) on V. Let J k (V) denote the space of k-jets of functions on V. It is a bundle over V. As coordinates on J k (V) we will use We have dim J k (V) = n + n + k k .
By identifying u x i with λ i we get an identification of J 1 (V) with V × V * × R, and the contact form on V × V * × R is identified with the contact form on J 1 (V). A Legendrian submanifoldL of J 1 (V) V × V * × R can be prolonged canonically to an n-dimensional submanifoldL k ⊂ J k (V), by requiring thatL k is an integral manifold of the Cartan distribution on J k (V).
Alternatively, we may remove information gain from the picture, and consider Lagrangian submanifolds of V × V * with the symplectic form ω. (The information gain may be recovered later, up to an additive constant, by solving the system The symplectic form ω defines a PDE Lagrangian submanifold if and only if its 1-jets are contained in E 1 . Using coordinates x i , λ j on V × V * , a Lagrangian submanifold L is locally determined by n functions x i (λ) for i = 1, ..., n. (For thermodynamics of gases this corresponds to writing the internal energy and volume as functions of temperature and pressure.) Since dx i = x i λ j dλ j on L, the restriction of the symplectic form ω = dλ i ∧ dx i to L is given by Thus, the manifold L is Lagrangian (ω| L = 0) if and only if If we use the coordinates with respect to the variables λ 1 , ..., λ n we get n( n 2 ) additional equations of order two. We add these to the original set of first-order equations, and we denote the corresponding manifold in for every positive integer k by adding all derivatives (of appropriate order) of the first-order equations. We will also use the By counting the number of equations, we easily get the following statement.
Note that by throwing away the information gain from the picture, we get a natural projection , which is reflected in the counting above.
The central moment σ k can be interpreted as a horizontal symmetric form on E k (or on J k (V)). Loosely speaking, this means that it is defined by the same formula as before, only that its coefficients is now considered as functions on E k (or on J k (V)). For example, in the formula x i is viewed as a function on E k rather than a function on V * . Indeed, it is one of the coordinate functions on J k (V × V * , n). If a Lagrangian manifold is given, σ k can be restricted to the kth prolongation of L and get back its original meaning. In this way, the theory of jet spaces lets us work with functions and tensors on L that depend on x i (λ) and their derivatives without specifying L.

The Action of the Affine Group on J k (V) and E k
In Section 2.3 we explained how Aff(V) acts on V × V * × R. The action on V induces uniquely an action on V × V * × R which preserves the contact form θ = du − λ i dx i . This also gives a group action of Aff(V) on J 1 (V). More generally, a transformation on J 0 (V) uniquely induces a transformation on J k (V) for every positive integer k (it transforms functions on V and, as a consequence, their k-jets). In this way, the Aff(V)-action can be prolonged to J k (V). The same is true for the corresponding Lie algebra of vector fields defined on J 0 (V).
We illustrate this by prolonging a vector field on the base of J 0 (V) = V × R to a vector field on J 2 (V), and refer to [10] for a more general treatment. Consider the vector field X = a i (x)∂ x i on V × R. The unique vector field on J 1 (V) that preserves the Cartan distribution and projects to X is given by Note that when a i are affine functions, this corresponds exactly to the Aff(V)-action described in Section 2.3. The prolongation of X to J 2 (V) is given by In this formula l ≤ m is assumed in the summation, and D x i is the total derivative operator. The total derivative is used in order to avoid expressions such as u x 2 x 1 , which is not a function on

Remark 2. In a similar way we get an
, and we may consider the Aff(V)-action on E k .
When we say that σ k is Aff(V)-invariant, we mean that it is invariant as a horizontal symmetric form with respect to the Aff(V)-action on J k (V). More precisely, we have Now, let us see which conditions we get on the functions a i if we require the vector field X (2) from above to preserve the variance The terms of L X (2) (σ 2 ) that depend on first-order derivatives of a i cancel, and we see that L X (2) (σ 2 ) vanishes if and only if all second-order partial derivatives of a i vanish, implying that a i are affine functions on V. We get the following statement.
The fact that affine vector fields preserve the tensors σ k and that, due to the above theorem, they are the only vector fields on V to do so, emphasizes the importance of the Aff(V)-action in the context of measurements.

Differential Invariants
Since Aff(V) acts on J k (V), we can look for functions on J k (V) that are Aff(V)-invariant.
Notice that a differential invariant of order k is also a differential invariant of order k + 1. This determines a filtration on the algebra of differential invariants.
Due to the natural projection J k+1 (V) → E k ⊂ J k (V × V * , n), any function on E k gives a function on J k+1 (V). Essentially, the only thing we loose by considering functions on E k , is the zero-order invariant u corresponding to the information gain. In the remaining sections we will mostly consider Lagrangian submanifolds of V × V * , and therefore we will usually not mention the information gain explicitly in our description of differential invariants. Notice also that, by our definition, an invariant defined on E k will be of order k + 1 and not, in general, of order k.
We follow [14] and consider the field of rational differential invariants. This is sufficient for separating orbits in general position as the group action, and the PDE on which it acts, is algebraic. More precisely, for every k ≥ 1, there is a Zariski-open subset of E k−1 on which the field of rational differential invariants of order k separate orbits. The set of rational differential invariants can also be considered as a differential algebra. By using invariant derivations, the differential algebra of differential invariants can be finitely generated.

Scalar Differential Invariants
In this section, we construct scalar differential invariants from the symmetric tensors σ k and the 1-form α 1 which was discussed in Section 2.3. We end up with a transcendence basis for the field of differential invariants of order k, for every k, and we find a finite set of generators for the differential algebra of differential invariants. Differential syzygies are computed for the case dim V = 2.
As is common when looking for differential invariants, we will be satisfied with obtaining a number of independent differential invariants of order k equal to the codimension of an orbit in general position in E k−1 . In other words, we will generate a differential algebra of differential invariants which, for each order k, contains a transcendence basis for the field of differential invariants of order k. In general, the field of rational differential invariants of order k will be an algebraic extension of the field generated by the transcendence basis. In this section, we will focus on Lagrangian submanifolds of V × V * and therefore, in most cases, disregard the differential invariant of order zero corresponding to the information gain.

Remark 3.
All results in this section may be useful also if we want to consider a subgroup G ⊂ Aff(V), for example due to preservation of additional structure on V. All scalar and tensorial invariants will be invariant also with respect to G. The essential changes in the algebra of scalar differential invariants will occur on the level of third-order invariants, where new invariants will appear.

From Invariant Symmetric Forms to Scalar Invariants
We will now find the scalar differential invariants. We use α 1 , σ 2 and σ 3 to construct an invariant frame on L ⊂ V × V * .

2.
By using σ 2 again, we turn the symmetric 2-form i v 1 σ 3 into a linear map A : TL → TL.

3.
We use A to define the n − 1 additional vector fields v i = A i−1 v 1 for i = 2, ..., n.
We require that v 1 , ..., v n constitute a frame on L. This puts conditions on A, and therefore on the 2-jets of L. These conditions hold on a Zariski-open subset of E 2 . Note that all the steps above can be taken without fixing the manifold L if we treat α 1 and σ k for k ≥ 2 as horizontal symmetric forms on E k . The inverse of σ 2 = s ij dλ i ⊗ dλ j is then given by where v ij are (rational) functions on E 2 determined by the algorithm above. These are horizontal vector fields on E ∞ .

Remark 4.
Note that this idea has previously been used, with slight modifications, when considering subgroups of Aff(V). Differential invariants of the actions of the Euclidean group and the general linear group on functions were considered in [15,16], respectively.
The next step is justifying that we can find, among these differential invariants that we have constructed, a transcendence basis for the field of differential invariants of order k, for each order k.

Lemma 1.
There is only one independent differential invariant of order 2. It can be given in coordinates by Proof. Consider the action of Aff(V) on the 2-jet of the information gain I(x) at the point x = x 0 . By using translations on V, we may set x 0 = 0, so that the 2-jet is given by j 2 0 (I)(x) = I(0) + a i x i + a ij x i x j . The linear and quadratic terms can be encoded in terms of a one-form and a nondegenerate metric, respectively (in fact, by α 1 and σ 2 ). The action by GL(V) (the stabilizer of 0) preserves the degree of monomials, and we can use it to normalize the quadratic terms to get j 2 0 (I)(x) = We have used up all the freedom the group gives us, and the 2-jet is brought to normal form. There is only one free constant c, in addition to I(0), so there is at most one invariant of second order in addition to the zero-order information gain, namely the length of the one-form (or its square).
Before we consider the differential invariants of third order, we consider the invariants of higher order, which is an easier task. At points in general position in E 2 , the horizontal vector fields v 1 , ..., v n are linearly independent. Notice that the function and lower-order terms. Since the coefficients of v i depend on E 2 , the invariants σ 4 (v i 1 , ..., v i 4 ), with i 1 ≤ · · · ≤ i 4 , are algebraically independent when restricted to a generic fiber of E 3 → E 2 . This argument is easily extended to k > 4, and we obtain the following statement.
Lemma 2. The differential invariants σ k (v i 1 , ..., v i k ), with i 1 ≤ · · · ≤ i k and k ≥ 4, are algebraically independent. Moreover, for each k ≥ 4, the number of independent functions among them, when restricted to a generic fiber of E k−1 → E 2 , is equal to the dimension of the fiber.
We deduce from the lemma that the Aff(V)-action is locally free on E 2 , meaning that the dimension of an orbit in general position in E 2 is equal to dim Aff(V) = n 2 + n. Since we have dim E 2 = n + ( n+3 3 ) − 1, the codimension of an orbit in general position is given by Therefore, in addition to the invariant of order two, there exist n 3 +11n−6 6 algebraically independent differential invariants of order three. We will verify that we have found all of them.
It is clear from the construction of the invariant frame {v 1 , ..., v n } that we have the relations Note how this is consistent with the fact that there is only one second-order invariant σ 2 (v 1 , v 1 ). It also follows that there will be relations between σ 3 (v 1 , v i , v j ): In two dimensions this holds trivially, since σ 3 is symmetric. In three dimensions the additional relation takes the form In four dimensions we get two additional relations: For dim V = n ≥ 3 we get ( n−1 2 ) relations between the ( n+2 3 ) components of σ 3 . The difference is n 3 +11n− 6 6 . Lemma 3. The algebraic relations between the ( n+2 2 ) relations given by (6).
Proof. It is sufficient to prove that there are ( n+2 3 ) − ( n−1 2 ) = n 3 +11n−6 6 algebraically independent functions in this set of differential invariants. We will do this by restricting to a suitable n 3 +11n− 6 6 -dimensional submanifold in E 2 , and show that there are n 3 +11n−6 6 independent functions among the invariants, also after restricting to this submanifold. After the appropriate submanifold is found, the statement of the lemma follows quite easily.
First we restrict the invariants to the fiber of E 2 → E 1 given by On this fiber, the expressions for the tensors α 1 and σ 2 are significantly simplified: We restrict further to a submanifold of this fiber, of codimension ( n−1 2 ), by setting .., n, i = 1, ..., n − 2.
On this subset, we have For dim V = 2 we get These four functions are clearly independent, and thus the lemma is proved in the case dim V = 2.
With an appropriate choice of ordering of the functions σ 3 (v i , v j , v k ), each new function depends on the same variables as the previous function in addition to x i Due to the particular form of σ 3 and v 1 , ..., v n , when restricted to our submanifold, it is clear that this type of pattern will continue. By extending the sequence of functions, with one at a time, each variable x i λ j λ k will be introduced with the function σ 3 (v i , v j , v k ), where j = i, ..., k and i = 1, ..., k and k = 1, ..., n (this also indicates the appropriate ordering). There are two possible obstructions to this, and we have to justify that they are, in fact, not obstructions.
Firstly, the function σ 3 (v 1 , v 1 , v 3 ) will depend on the same variables as the four we found above, in addition to x 1 λ 1 λ 3 . This new variable is zero on our submanifold, and thus σ 3 (v 1 , v 1 , v 3 ) is not independent from the previous ones. However, this is exactly what we want, as we are already aware of the relation σ 3 , and so on.
Secondly, even though the derivations depend in nontrivial ways on the variables, this fact does not interfere with the pattern. The potential new variables coming from the derivations will always be introduced (to our sequence of functions) with σ 3 (v 1 , v i−1 , v i ), and these new variables would be x 1 The first one was introduced already by σ 3 (v 1 , v i−1 , v i−1 ), and the second is exactly the one that should be introduced here, as it is equal to These lemmas imply that we have in the following sense constructed a complete set of rational differential invariants.
Theorem 3. For every order k, the field generated by σ 2 (v 1 , v 1 ) and σ j (v i 1 , ..., v i j ), where i 1 ≤ · · · ≤ i j and j = 3, ..., k generates a field of differential invariants with transcendence degree equal to the codimension of an Aff(V)-orbit in general position in E k−1 .
Let s k denote the codimension of an Aff(V)-orbit in J k (V), in general position, for k ≥ 0. This number is the same as the transcendence degree of the field of rational scalar differential invariants of order k. The Hilbert function for the filtered field of differential invariants is defined as H k = s k − s k−1 for k ≥ 1, and H 0 = s 0 . From the discussion above we deduce the following statement. Theorem 4. The Hilbert function for the field of differential invariants is given by Note that for n = 2, the formula for H 3 coincides with that for H k , as both gives 4. We define the Poincaré function corresponding to the Hilbert function by the series P(z) = ∑ ∞ k=0 H k z k which converges to a rational function for |z| < 1.

Theorem 5.
The Poincaré function for the field of differential invariants is given by

The Differential Algebra of Differential Invariants
The differential algebra of differential invariants is finitely generated (see [14] and references therein). The invariant horizontal vector fields v 1 , ..., v n act on the differential invariants as derivations, resulting in new differential invariants which, in general, are of higher order. It is clear that we get, by taking invariant derivatives of the kth-order invariants σ k (v i 1 , ..., v i k ), a set of H k+1 independent differential invariants of order k + 1, for k ≥ 4 (since the coefficients of the derivations v i are only of order 3). See for example [12] (Theorem 5.48). Thus, the algebra of differential invariants can be generated by the differential invariants of order 4, together with the invariant derivations. Theorem 6. The differential algebra of scalar differential invariants is generated by the invariant derivations v 1 , ..., v n and the scalar invariants Note that this generating set of differential invariants is not minimal. As explained in in the previous section, some of the invariants σ 3 (v i , v j , v k ) are algebraically related to each other. Moreover, many of the invariants σ 4 (v i , v j , v k , v l ) can be constructed by computing invariant derivatives of the third-order invariants. In particular, when n = 2 the algebra of differential invariants can be generated by v 1 , v 2 and the differential invariants of order three.

Differential Syzygies for
The algebra of differential invariants is not a freely generated differential algebra; there are differential syzygies among the generators. We will find the syzygies in the simplest case, when dim V = 2. This will also let us sharpen Theorem 6 for this particular case. Let us use the notation We have I 22 = I 31 and I 23 = I 32 . In order to write the differential syzygies in a relatively compact form, it will be useful to have the following definitions: When dim V = 2, the third-order invariants are sufficient to generate the whole algebra. Furthermore, if we compute invariant derivatives of I 21 , we get v 1 (I 21 ) = 2I 21 + I 31 , v 2 (I 21 ) = 2I 31 + I 32 .
This implies that the invariants I 21 , I 33 , I 34 are sufficient for generating the algebra of differential invariants, together with v 1 and v 2 . Let us express the differential syzygies relating these generators. The derivations v 1 , v 2 satisfy the commutation relation . The commutation relation determines some of the differential syzygies. When finding the rest of them, we consider only higher-order invariant derivatives of the form v a 2 2 • v a 1 1 , where a i are non-negative integers. Invariant derivatives of I 21 give k − 1 differential invariants of order k for k ≥ 3 while the invariant derivatives of I 33 and I 34 give 2(k − 2) differential invariants of order k for k ≥ 4. This implies that we get 4 differential invariants of order three, 7 of order four and, in general, 3k − 5 of order k for k ≥ 4. The Hilbert function is given by H k = k + 1 for k ≥ 3, implying that there are 2k − 6 syzygies for k ≥ 4.
Since the differential invariants are rational, finding the differential syzygies becomes a completely algebraic problem. The first two differential syzygies (for k = 4) are found with the help of Maple, and they are given by Notice that the invariants J i can be expressed in terms of I 21 , I 33 , I 34 , v 1 (I 21 ) and v 2 (I 21 ).
Since only S 1 depends on invariant derivatives of I 34 , it is clear that the invariant derivatives of S 1 = 0 and S 2 = 0 will give 2(k − 3) additional independent syzygies involving differential invariants of order k for each k ≥ 4. Thus, they generate the desired number of differential syzygies. The commutation relation can be used to ensure that the syzygies are written purely in terms of invariants of the form v a 2 2 • v a 1 1 (I), where I is I 21 , I 33 or I 34 . We get the following theorem.
Theorem 7. The differential algebra of scalar differential invariants is generated by the invariant derivations v 1 and v 2 , and the scalar differential invariants I 21 , I 33 and I 34 . The differential syzygies are generated by S 1 = 0 and S 2 = 0.

Remark 5.
In [5] it was noted that there is a relation between the curvature of σ 2 and higher moments. Indeed, when dim V = 2 the scalar curvature of σ 2 can be written as

Thermodynamics of Gases
We will now apply the ideas above to the context of gases in thermodynamic equilibrium. Consider the thermodynamic space with variables p, T, e, v, s corresponding to pressure, temperature, internal energy, volume and entropy. The entropy is related to the information gain I by the formula dI = −ds. By aligning the one-form θ = dI − λ i dx i with the fundamental thermodynamic relation −ds + T −1 de + pT −1 dv = 0, we see that we can get the standard thermodynamics of gases from the measurement of a point (e, v) ∈ V, and the principle of minimal information gain. The relationship between p, T, e, v and x 1 , x 2 , λ 1 , λ 2 is We will suppress the information gain, or entropy, from the picture, and consider a system in thermodynamic equilibrium as a Lagrangian submanifold of V × V * on which the symplectic form vanishes. We will assume T = 0 throughout. Similarly as above, we let the Lagrangian submanifold L ⊂ V × V * be given by two functions e(T, p), v(T, p). Restricting ω to such a submanifold gives implying that L is Lagrangian if and only if F = e p + Tv T + pv p = 0.

The Group Action
In the (nonlinear) coordinates T, p, e, v, the Lie algebra corresponding to the Aff(V) action on V × V * is spanned by the six vector fields Orbits in general position in E 1 are six-dimensional. The subset on which the orbit dimension decreases is given by T(e p v T − e T v p ) = 0. Positive definiteness of σ 2 implies positivity of the left-hand side of this equation (see the end of Section 5.2).
One can ask if it is appropriate to consider arbitrary affine transformation on points (e, v). We will consider the action by two different subgroups of Aff(V), in addition to the full group of affine transformations, and write down the differential invariants for each of these three group actions. The choices of the two subgroups are based on recent results concerning the thermodynamics of fluids on two different manifolds.
In [17], the symmetries of compressible viscid fluids were found. Some of the symmetries are purely geometrical, such as translations, rotations and Galilean transformations. In addition there are some symmetries that act on thermodynamic variables. In particular there is a three-dimensional Lie algebra that is spanned by It corresponds to the group action given by (e, v) → (Ae + Cv, Bv) for A, B ∈ R \ {0}, C ∈ R.
In [18], the symmetries of compressible viscid fluids on a spherical layer were found. In this case, the thermodynamic part of the symmetry Lie algebra is a Lie subalgebra of the one above. It is spanned by v∂ e − ∂ p , v∂ v + 2e∂ e + 2T∂ T + p∂ p .
It corresponds to the group action given by (e, v) → (A 2 e + Bv, Av) for A ∈ R \ {0}, B ∈ R. Remark 6. To be precise, in both [17,18] there is also a vector field ∂ s corresponding to translation in entropy. These transformations are not contained in Aff(V), and since we consider here only differential invariants of Lagrangian submanifolds of V × V * , they will not affect our description of differential invariants. However, we swiftly note that if we extend the Lie algebras above with this vector field, the differential invariant of order zero that corresponds to entropy will not be invariant any more.

Differential Invariants with Respect to Aff(V)
The algebra of differential invariants with respect to Aff(V) was in principle completely described in section 4. We found both generators and syzygies for the case dim V = 2. In the new coordinates, the tensors α 1 , σ 2 and σ 3 are given by In this section we will use a slightly different set of generators for the algebra of differential invariants. With the help of the DifferentialGeometry and JetCalculus packages and the pdsolve procedure in Maple we find a generating set of invariants whose expressions are simpler in the current choice of coordinates. It is possible to find the second-order differential invariants by solving the system of linear partial differential equations given by X (1) i ( f (T, p, e, v, e T , v T , v p ))| F=0 = 0 for a basis X 1 , ..., X 6 of the Lie algebra of vector fields corresponding to the group action.
First of all, we have the following invariant derivations: And we remember from the previous section that the Hilbert function for the field of rational differential invariants is given by H 1 = 0, H 2 = 1 and H k = k + 1 for k ≥ 3.
The verification of the theorems in this section consists of two parts. Firstly, one must check that the functions and derivations given are invariant, something we recommend doing with the help of Maple. Secondly, one must verify that the differential invariants and invariant derivations allow us to generate a sufficient amount of independent differential invariants (compare with H k ). Due to the simple form of the differential invariants and invariant derivations, this is straightforward. Theorem 8. The differential invariants I 2 = pv T + e T , I 31 = −(pv TT + e TT )T, I 32 = (e T v TT − e TT v T ) 2 T 3 e p v T − e T v p , constitute a transcendence basis for the field of third-order differential invariants.
Here we have recycled the notation I 3i that we used in Section 4.3. These are not exactly the generators we used above, but I 2 = σ 2 (v 1 , v 1 ). We notice that this second-order differential invariant is what is known in thermodynamics as the heat capacity (at constant pressure). Thus the concept of heat capacity is given to us automatically if we consider the action of the affine group on V × V * (a subgroup of the affine group will lead to more scalar differential invariants).

Example 1.
Requiring I 2 to be constant singles out a special set of Lagrangian submanifolds. They are solutions to the system F = e p + Tv T + pv p = 0, I 2 = pv T + e T = C for C ∈ R, and they are given by By using the invariant derivations ∇ 1 and ∇ 2 we can generate the algebra of differential invariants. Notice that I 31 = ∇ 1 (I 2 ). Theorem 9. The differential algebra of scalar differential invariants is generated by the invariant derivations ∇ 1 and ∇ 2 , together with the differential invariants I 2 , I 32 , I 33 , I 34 .
Notice also that the tensor σ 2 takes diagonal form when written in terms of the frame ∇ 1 , ∇ 2 : Positive definiteness of σ 2 implies I 2 > 0 and I 32 > 0 (the latter may be replaced by (e p v T − e T v p )T > 0).

Differential Invariants with Respect to a Three-Dimensional Subgroup
Now, let us consider the three-dimensional group from [17] which acts by (e, v) → (Ae + Cv, Bv) The Hilbert function is in this case given by H 1 = 1 and H k = k + 1 for k ≥ 2. Thus, we get 4 invariants of order two. Theorem 10. The differential invariants generate the field of second-order differential invariants.
We notice that the last two invariants are the heat capacity at constant pressure and at constant volume, respectively. The derivations TD T and T v D p are invariant, and by using them we can generate the algebra of differential invariants. Theorem 11. The differential algebra of differential invariants is generated by the following two differential invariants of order 1 and two invariant derivations: The generators are related by the differential syzygỹ The invariant J 2 can be written in terms of the invariants in Theorem 10. We use it here because it gives a simple differential syzygy.

Example 2.
Let us find the Lagrangian submanifolds for which J 1 is constant. By solving the system F = e p + Tv T + pv p = 0, for C ∈ R, we get e = (C − f (p))T, pv = f (p)T.

Differential Invariants with Respect to a Two-Dimensional Subgroup
Now, let us consider the two-dimensional Lie group from [18] which acts by (e, v) → (A 2 e + Bv, Av) for A ∈ R \ {0}, B ∈ R.
The Hilbert function is in this case given by H k = k + 1 for k ≥ 1. Thus, we get 5 invariants of order two. Theorem 12. The differential invariants generate the field of second-order differential invariants.
The derivations TD T and vD p are invariant, and by using them we can generate the algebra of differential invariants. We reuse the notation from the previous subsection.
Theorem 13. The differential algebra of differential invariants is generated by the following two differential invariants of order 1 and two invariant derivations: The generators are related by the differential syzygy

The Significance of the Differential Invariants
We end the paper with a discussion on the significance of the differential invariants. In order to simplify the discussion, we will focus mainly on the group action of the two-dimensional Lie group considered in the previous subsection, but the ideas are general. We denote the Lie group by G.
A differential invariant I is a function on E k ⊂ J k (V × V * , 2) that is constant on G-orbits. It can be restricted to a Lagrangian submanifold L, resulting in a function I| L on L. For example, if L is given by a particular pair of functions e(T, p) and v(T, p), then the differential invariant e T + pv T restricts to a function e T (T, p) + pv T (T, p). A transformation from the Lie group under consideration, such as (T,p,ẽ,ṽ) = (T, p − A, e + Av, v), transforms the functions e(T, p) and v(T, p) into two new functions e(T,p) = e(T, p − A) − Av(T, p − A) andṽ(T,p) = v(T, p − A), but the differential invariant remains the same:ẽ This function gives the same value at the point (T, p) in L as at the point (T,p) in the transformed Lagrangian manifoldL. Thus, if we treat Lagrangian manifolds that are related by a transformation in G as equivalent, the differential invariants play an important role, as they are the scalar functions determined by e(T, p) and v(T, p) and their derivatives that only depend on the equivalence class of L.
The differential invariants can also be used to distinguish non-equivalent Lagrangian manifolds and classify them. Consider the differential invariants If we restrict these invariants to a Lagrangian submanifold L, we get five functions that depend on T and p.
We consider the subset of R 5 parametrized by (J 1 | L (T, p), J 2 | L (T, p), K 1 | L (T, p), K 2 | L (T, p), K 3 | L (T, p)). For generic Lagrangian manifolds this is a two-dimensional surface, and we call it the signature surface of L. Clearly, two equivalent Lagrangian manifolds give the same signature surface.
We will now generate the algebra of differential invariants in a different way than we did above. Let∂ 1 ,∂ 2 denote the Tresse derivatives with respect to the pair J 1 , J 2 . They are derivations of the form aD T + bD p , where a and b are functions on E 1 , that are uniquely determined by the condition ∂ i (J j ) = δ ij . Here it is important that whered is the horizontal differential. This condition determines an Zariski-open subset in E 1 , and we consider only Lagrangian manifolds whose 1-jets lie in this open subset. Another way to say it is that we consider only Lagrangian manifolds L such that d(J 1 | L ) ∧ d(J 2 | L ) = 0 for every point in L.
Note that this condition guarantees that the signature surfaces are two-dimensional. It is not difficult to check that we can generate all differential invariants by using these five differential invariants and the Tresse derivatives. Then, since all differential invariants can be generated from J 1 , J 2 , K 1 , K 2 , K 3 and the Tresse derivatives, it becomes clear that the signature manifold of L contains all information about its invariants. Since the field of rational differential invariants separates orbits in general position in E k for every k [14], distinguishing non-equivalent Lagrangian manifolds (with jets in general position) comes down to comparing their signature surfaces. Now we will find conditions that the signature surfaces must satisfy. By computing∂ i (K j ), we get six differential invariants of order three. Since H 3 = 4, there are at least two differential syzygies. In fact, there are exactly two and they are given by 0 = (−2J 2 K 2 (J 1 − K 3 ) + (J 2 − K 1 )(J 2 − 2K 1 ))∂ 1 (K 1 ) + J 2 (J 2 − 2K 1 )(J 1 − K 3 )∂ 1 (K 2 ) All higher-order syzygies are differential consequences of these. The Tresse derivatives play the role of partial derivatives with respect to J 1 and J 2 (their restriction to a Lagrangian submanifold L are partial derivatives with respect to J 1 | L and J 2 | L ), and these two differental syzygies are partial differential equations that the signature manifolds must satisfy. They are often called the quotient or factor equations. Their solutions can be interpreted as equivalence classes of Lagrangian submanifolds.