# Differential Geometry and Mechanics: A source of problems for computer algebra

Vladimir Salnikov, Aziz Hamdouni

► To cite this version:

Vladimir Salnikov, Aziz Hamdouni. Differential Geometry and Mechanics: A source of problems for computer algebra. Programming and Computer Software, 2020, 46 (2), pp.126 - 132. 10.1134/S0361768820020097. hal-02403764

HAL Id: hal-02403764

https://hal.science/hal-02403764

Submitted on 8 Oct 2020

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>
# Differential Geometry and Mechanics:
A Source for Computer Algebra Problems

V. N. Salnikov$^{a,b,*}$ and A. Hamdouni$^{b,**}$

**Abstract**—In this paper, we discuss the possibility of using computer algebra tools in the process of modeling and qualitative analysis of mechanical systems and problems from theoretical physics. We describe some constructions—Courant algebroids and Dirac structures—from the so-called generalized geometry. They prove to be a convenient language for studying the internal structure of the differential equations of port-Hamiltonian and implicit Lagrangian systems, which describe dissipative or coupled mechanical systems and systems with constraints, respectively. For both classes of systems, we formulate some open problems that can be solved using computer algebra tools and methods. We also recall the definitions of graded manifolds and $Q$-structures from graded geometry. On particular examples, we explain how classical differential geometry is described in the framework of the graded formalism and what related computational questions can arise. This direction of research is apparently an almost unexplored branch of computer algebra.

## 1. INTRODUCTION AND MOTIVATION

This paper is a part of a large project on “geometrization of mechanics,” which includes a series of works aimed at describing a formalism (associated with differential or algebraic geometry) that is suitable for the qualitative analysis and modeling of a sufficiently wide class of mechanical systems. In this project, we investigate a broad spectrum of problems: from describing the mathematical model of a system under analysis and defining suitable geometric structures to selecting (or developing) numerical methods that preserve the constructed structures. The efficient software implementation and application of the numerical methods are also investigated. These methods are called *geometric integrators*. Recent publications demonstrate advantages of this approach: the consideration of conservation laws, system symmetries, and constraints imposed on the system improves accuracy of the numerical method and, therefore, the reliability of modeling results, including the reliable description of qualitative properties of the system.

In this paper, we focus on some related problems that are difficult or even impossible to solve by classical analytical methods. We believe that computer algebra methods can be successfully employed in this context. Some of these problems are purely technical, and computer algebra only speeds up the computation.

However, most of the problems are rather conceptual, where issues of the existence of solutions and optimization of algorithms are important.

It should be noted that we consider *open problems*. In these problems, it is clear what needs to be done and it is roughly understandable how to do it, i.e., some promising directions can be found. We believe that there are no conceptual obstacles to solving these problems because there are obvious constructive solutions to some specific instances. The absence of solutions in the general case is due to the lack of regular communication between specialists in computer algebra and applied scientists from other fields: physics, mechanics, and especially geometry. In this paper, we try to fill this gap by adequately describing the geometric structures that are the baseline minimum for understanding the related problems and their direct solution.

### Organization of the Paper

In Section 2, some structures from generalized geometry that occur in applications to mechanics and theoretical physics are defined. Then, in Sections 3 and 4, we describe mechanical systems for which this geometry suits as a “language” and explain which problems can be solved using computer algebra methods. Section 5 is devoted to graded geometry: we

<footnote>$^a$French National Center for Scientific Research (CNRS), Paris, France</footnote>

<footnote>$^b$University of La Rochelle, La Rochelle, Av. Michel Crepeau, 17042 France</footnote>

<footnote>*e-mail: vladimir.salnikov@univ-lr.fr</footnote>

<footnote>**e-mail: aziz.hamdouni@univ-lr.fr</footnote>
define some necessary mathematical concepts and
describe some important problems of computer alge-
bra that are not yet solved (as far as we know) in stan-
dard packages.

## 2. GENERALIZED GEOMETRY

In this section, we briefly describe the geometric
constructs mentioned in Introduction, namely, Cou-
rant algebroid and Dirac structures. As compared to
the original paper [1], we simplify the discussion by
omitting some technical details that are not important
for the results we are interested in. Nevertheless, this
section should be sufficient to understand and formu-
late some computer algebra problems. In particular,
we use the concepts “manifold” and “bundle” without
defining them; for understanding, one can read “vec-
tor space of the corresponding dimension.”

### 2.1. Vector Fields

Suppose that *M* is an *n*-dimensional manifold, *TM*
is a *bundle tangent* to it (a set of all tangent vectors at
each point), and *T*\**M* is its *cotangent bundle*. Locally,
*TM* can be considered as follows:

$$
TM \cong \mathbb{R}^{2n} = \mathbb{R}^n \times V,
$$

where $V$ is a vector space that have the same dimension
as $M$. Then,

$$
T^*M \cong \mathbb{R}^{2n} = \mathbb{R}^n \times V^*.
$$

The set of sections of *TM* is denoted by *Γ*(*TM*): these are vector fields on *M*. On these vector fields, the following commutator is defined:

$$
[\cdot, \cdot] : \Gamma(TM) \times \Gamma(TM) \to \Gamma(TM).
$$

In terms of components, it is written as

$$
[v, w]^i = \sum_j (v^j \partial_j w^i - w^j \partial_j v^i),
$$

where $\partial_j$ is the derivative with respect to the $j$th coor-
dinate.

2.2. Differential Form

On $V$, we can define skew-symmetric $k$-linear
forms. Having done this at each point of $M$, under cer-
tain regularity conditions, we obtain an object called a
*differential k-form*; in fact, it is a skew-symmetric “func-
tion” whose “arguments” are $k$ vector fields on $M$.

Functions on *M* can be regarded as 0-forms. Standard examples of 1-forms (i.e., covector fields) are objects dual to the vector fields ∂<sub>i</sub>; they are denoted by dx<sup>i</sup>. Here, duality is understood in terms of dx<sup>i</sup>(∂<sub>j</sub>) = δ<sub>j</sub><sup>i</sup>, where δ<sub>j</sub><sup>i</sup> is the Kronecker delta. In the dimension 2, an example of a 2-form is the oriented area.

On differential forms, the following two natural
operations are defined.

* *Contraction* of the vector field *v* with the form
* α(·, ·, ...):

$$
\iota_v(\alpha) := \alpha(v, \cdot, \dots).
$$

It lowers the degree of the form.

* *External differential* of the form α:

$$
d\alpha(v_0, v_1, \dots, v_k) := \sum_i (-1)^i v_i \alpha(v_0, \dots, v_i, \dots, v_k) \\
\qquad + \sum_{i<j} (-1)^{i+j} \alpha([v_i, v_j]_k v_0, \dots, \hat{v}_i, \dots, \hat{v}_j, \dots, v_k),
$$

where $\hat{v}$ denotes the omission of the argument.

The external differential increases the degree of the
form.

The notation $dx^i$ is not accidental: objects dual to
$\partial_i$ are actually differentials of coordinates. If $d\alpha = 0$,
then the form $\alpha$ is called *closed*. If the form $\alpha$ itself is a
differential of some other form ($\alpha = d\beta$), then the
form $\alpha$ is called an *exact* one, while the form $\beta$ is sometimes called its *integral*.

If a 2-form is non-degenerate (at each point, in
terms of linear algebra), then it is called an *almost sym-
plectic* one; if it is also *closed*, then it is called a *symplec-
tic* form. A vector field $v$ whose convolution with a
symplectic form $\omega$ is an exact form with an integral $H$
($\iota_v \omega = dH$) is called a *Hamiltonian vector field with the*
*Hamiltonian H*.

Note that a similar construction is also possible on
a cotangent bundle with the result being multivector
fields. An analogue of the symplectic form is the Pois-
son bivector; we detail this in Section 5.

2.3. *Courant Algebroid and Dirac Structures*

Let us consider a bundle $E = TM \oplus T^*M$, which is
sometimes called the generalized tangent bundle or
Pontryagin bundle. Its sections are pairs $(v, \alpha)$, where
$v$ is a vector field and $\alpha$ is a 1-form, i.e., a covector
field. On pairs of sections, two following operations
are defined.

An analogue of the scalar product (at each point,
with values in $\mathbb{R}$):

$$
\langle (v, \alpha), (w, \beta) \rangle := \iota_v \beta + \iota_w \alpha.
$$

An analogue of the vector product:

$$
[(v, \alpha), (w, \beta)]_{CD} := ([v, w], (d\iota_v + \iota_v d)\beta - \iota_w d\alpha).
$$

The second operation is called the *Courant–Dorfman bracket*, while the entire construction is an example (quite general) of a *Courant algebroid*.
The Dirac structure is a subbundle $D \subset E$ that, first, is maximally isotropic (i.e., $\langle \cdot, \cdot \rangle|_D = 0$ and has the maximum rank equal to the dimension of $M$) and, second, is stable under the action of $[\cdot, \cdot]|_{CD}$:

$$[\Gamma(D), \Gamma(D)]_{CD} \subset \Gamma(D),$$

where $\Gamma(D)$ denotes the set of sections $D$. By weakening the second condition, we obtain an almost Dirac structure.

A trivial example of the Dirac structure is $D = TM \subset E$. A more interesting example is given by the graph of the 2-form $\omega$, i.e., by the set of pairs

$$(v, \alpha), \text{ where } \alpha = \iota_v \omega.$$

The condition on the scalar product is guaranteed by the skew symmetry of the form. The condition on $[\cdot, \cdot]|_{CD}$ is satisfied when the form is closed. Thus, the symplectic structure is a special case of the Dirac structure.

Other examples include Poisson structures. We discuss them in Section 5, while their general description can be found in the original paper [1].

Dirac structures were introduced by T. Courant with some inspiration from mechanics: the system can be considered in terms of coordinates and velocities or coordinates and momenta. In these cases, geometric descriptions are made on $TM$ or $T^*M$, respectively. To some extent, Dirac structures could link these two ways of description. However, in his subsequent works, Courant focused only on their geometric properties. Applications to mechanics occurred later in the works on implicit Lagrangian [2–5] and port-Hamiltonian [6, 7] systems, which are discussed in the next two sections.

### 3. IMPLICIT LAGRANGIAN FORMALISM AND SYSTEMS WITH CONSTRAINTS

One of the reasons why Dirac structures did not immediately find their application in mechanics is that it is not correct to regard $TM$ and $T^*M$ simply as the phase space of the system. It turns out that the correct construction involves spelling out the Dirac structures on the manifold that is already a bundle: $M = T^*Q$, where $Q$ is the configuration space of the system. In this case, the necessary formalism uses double bundles and some of their fundamental properties described in [8].

This approach allows us to reconsider the classical formalism of systems with constraints. With the conventions adopted in the previous section, let us consider $TQ \cong \mathbb{R}^{2d} = \mathbb{R}^d \times V$ and $T^*Q \cong \mathbb{R}^{2d} = \mathbb{R}^d \times V^*$, where $d$ is the number of degrees of freedom of the system, $V$ is the space of velocities $v$ at each point $q$ of the configuration space, and $V^*$ is the space of momenta

p. Imposing constraints on the system means restricting the admissible points in the configuration space and, at each admissible point, selecting a subspace of admissible velocities; let us denote the resulting set by $\Delta$. This geometric construction is called a distribution; under certain nondegeneracy conditions, we can assume that it is a kernel of a certain number of 1-forms.

Now, following the approach from the previous section, let us consider $\mathcal{V} = TT^*Q \cong \mathbb{R}^{4d}$ and $\mathcal{V}^* = T^*T^*Q \cong \mathbb{R}^{4d}$. The distribution $\Delta$ and the span of 1-forms lift to this double bundle; let us denote the result of this lift by $\tilde{\Delta}$ and $\Delta_0$, respectively. Note that, on $T^*Q$, there is a canonical symplectic form $\Omega$ that defines a map $\Omega^b\mathcal{V} \to \mathcal{V}^*$, as in the example from the previous section. Then, the (almost) Dirac structure for the system with constraints is given by the following condition:

$$\mathbb{D}_{\Delta} = \{(w, \beta) \in \mathcal{V} \times \mathcal{V}^* | w \in \tilde{\Delta}, \beta - \Omega^b w \in \Delta_0\}.$$

The dynamics of the system, in turn, is given by the Lagrangian $L: TQ \to \mathbb{R}$ (the differential of which can be lifted to $\mathcal{V}^*$), and vector field—section of $\mathcal{V}$. This dynamics preserves constraints if this pair belongs to $\mathbb{D}_{\Delta}$.

Of course, this construction is not necessary for deriving equations of motion for the system: the constraints can be investigated using, e.g., Lagrange multipliers. However, the geometric approach has an important advantage: all its objects and operations have natural discrete analogues. This makes it possible to develop a numerical method for solving the derived motion equations that preserves constraints better than classical methods.

In more detail, this construction was described in [4, 5]. In this paper, having omitted the technical details, we provide only the final equations that define $\mathbb{D}_{\Delta}$:

$$ \begin{align} \iota_v \alpha^a &= 0, \quad a = 1, \dots, m, \nonumber \\ \dot{\mathbf{q}} \in \Delta, \quad \mathbf{p} &= \frac{\partial L}{\partial \mathbf{v}}, \tag{3.1} \\ \dot{\mathbf{q}} = \mathbf{v}, \quad \dot{\mathbf{p}} - \frac{\partial L}{\partial \mathbf{q}} \in \Delta_0 \nonumber \end{align} $$

Here, the first line specifies the constraints: $\alpha^a$ represents the 1-forms that define the distribution $\Delta$. Below is the discrete version of these equations:

$$ \begin{align} \langle \alpha_d^a, v_k \rangle &= 0, \quad a = 1, \dots, m, \nonumber \\ p_{k+1} &= \frac{1}{h} \frac{\partial L_d}{\partial v_k} \tag{3.2} \\ p_k - \frac{1}{h} \frac{\partial L_d}{\partial q_k} + \frac{\partial L_d}{\partial q_k} &= \sum_{a=1}^{m} \lambda^a \frac{\partial \langle \alpha_d^a, v_k \rangle}{\partial v_k} \nonumber \end{align} $$

where $L_d := hL(q_k, v_k)$ is a discrete Lagrangian of the system, while the subscripts $k$ or $k+1$ denote the
instant at which the corresponding variable is evaluated. The equations explicitly include the variables p at the kth and (k + 1)th steps, while $v_k$ is given by a certain approximation of the velocity v involving $q_k$. Thus, it is easy to verify that the system is defined and complete; moreover, it is linear in all variables except, eventually, v.

In the context of computer algebra, two problems naturally arise. The first one is purely technical: the derivation of equations (3.1) and their discretization. The second problem is much more conceptual: discrete equations (3.2) need to be solved at each integration step, i.e., the problem of efficiency arises. This leads us to the first problem formulated in this paper.

**Problem 1.** For the equations of the form (3.1) and (3.2), it is required to determine when the numerical method is explicit and when it is not. What geometric (e.g., type of constraints) and numerical (e.g., approximation of v) factors affect this? For each class, it is required to develop an algorithm for the exact (symbolic) or approximate (iterative) solution of system (3.2).

The answer to the first question seems quite obvious: it depends on the degree of nonlinearity for the relationships between known and sought-for variables, which is a classical question of computer algebra. Depending on the answer, a suitable solution algorithm is selected. In this case, the geometric and mechanical interpretation of the answer can be quite interesting.

## 4. PORT-HAMILTONIAN FORMALISM AND INTERACTING SYSTEMS

In Section 3, we have defined the symplectic structure and Hamiltonian vector fields. This is a convenient formalism for describing conservative mechanical systems that do not interact with the environment. In the notation of the previous sections, on the cotangent bundle $T*Q$ with the canonical symplectic form, these systems read as

$$ \dot{\mathbf{q}} = \frac{\partial H}{\partial \mathbf{p}}, \quad \dot{\mathbf{p}} = -\frac{\partial H}{\partial \mathbf{q}}. \qquad (4.1) $$

It can be verified that the flow of the Hamiltonian vector field v preserves the function H, which, in terms of mechanics, corresponds to energy conservation. Apparently, the first geometric integrators appeared in this context [9, 10]: they preserve the symplectic structure and volume in the phase space and, hence, make it possible to control energy conservation.

However, most of the applied mechanical systems interact with each other and are not conservative. For such cases, a modification of the formalism was proposed. It is associated with the so-called *port-Hamiltonian systems* [6, 7], and equations of the form (4.1) are extended by adding terms responsible for interaction and dissipation:

$$ \dot{\mathbf{q}} = \frac{\partial H}{\partial \mathbf{p}}, \quad \dot{\mathbf{p}} = -\frac{\partial H}{\partial \mathbf{q}} + \mathbf{F} $$

Then, the dynamics of the system is completely determined by the function $H = H(\mathbf{q}, \mathbf{p})$ and force $\mathbf{F}$. In a more general case (for noncanonical symplectic forms), we consider the system of equations

$$ \dot{\mathbf{x}} = (J(\mathbf{x}) - R(\mathbf{x}))\frac{\partial H}{\partial \mathbf{x}} + g(\mathbf{x})\mathbf{f}, \qquad (4.2) $$

where $J(\mathbf{x})$ is a skew-symmetric matrix, while $R(\mathbf{x})$ and $\mathbf{f}$ are new terms responsible for interaction and dissipation, which are absent in classical Hamiltonian systems. In [6, 7], these terms were classified and their physical meaning was discussed.

It should be noted that the port-Hamiltonian formalism itself does not provide any new information about the system. However, it allows one to “order” the system, i.e., to partition it into simple blocks that interact based on understandable laws, which can be useful for modeling (see, for example, [11]). In addition, it turns out ([7]) that port-Hamiltonian systems can be described using Dirac structures, which is very important in the context of geometric integrators. This brings us to the second problem formulated in this paper.

**Problem 2.** Given a system of differential equations, it is required to construct its optimal port-Hamiltonian representation and describe the corresponding Dirac structure.

Note the word “optimal” in the formulation of the problem. It is easy to verify that any system of differential equations can be rewritten in the port-Hamiltonian form: it is sufficient to “forget” the Hamiltonian structure and declare all the right-hand sides “ports.” In this case, however, the information about energy balance in the system is lost, and it can potentially triple in size. For application purposes, this solution of the problem does not make much sense. Optimality can be understood, e.g., as limiting the number of added variables. Then, the standard questions about the existence of the solution and quick tests that exclude unsolvable cases arise.

The construction of the Dirac structure, in turn, is necessary for its subsequent use in the context of geometric integrators. Here, it is necessary to understand what form makes the answer the most constructive one, namely, how to describe the Dirac structure in the form convenient for discretization. In this context, there can be certain connection with the questions posed in Section 5.

## 5. GRADED GEOMETRY

In this section, we describe a geometric construction—graded manifolds—which is even more general than that described in Section 3. As before, instead of manifolds, we can think of vector spaces; in the graded
case, however, this simplification can have more interesting consequences.

Suppose that, on a manifold $M$, a *grading* is defined, i.e., for each coordinate $x^i$ on $M$, a quantity $\deg(x^i) \in Z$ called a *degree* is defined. For simplicity, we assume that $\deg(x^i)$ is non-negative for all coordinates.

This grading is used to determine the commutation relations between the coordinates. In contrast to the classical case,

$$x^i \cdot x^j = (-1)^{\deg(x^i)\deg(x^j)} x^j \cdot x^i.$$

In addition, for all coordinates, the following relation holds:

$$\deg(x^i \cdot x^j) = \deg(x^i) + \deg(x^j).$$

The most general functions on this manifold are formal series in all variables. However, in cases of interest, it is sufficient to restrict ourselves to polynomials in coordinates with nonzero degrees whose coefficients are smooth functions of coordinates with zero degrees. For them, the notion of a homogeneous function and its degree (and, therefore, the commutation relations) is correctly defined:

$$f \cdot g = (-1)^{\deg(f)\deg(g)} g \cdot f.$$

Many objects and operations of classical differential geometry can be defined on graded manifolds. An important difference is that, each time graded objects are rearranged, a sign appears that depends on their degree. For instance, a graded vector field $V$ of an even degree automatically commutes with itself:

$$[V, V] \equiv VV - (-1)^{\deg(V)\deg(V)}VV = 0.$$

The commutation condition for an odd-degree vector field $Q$ is nontrivial:

$$[Q, Q] \equiv QQ - (-1)^{\deg(Q)\deg(Q)}QQ = 2Q^2.$$

A self-commuting vector field of degree 1 is called a *Q-structure*.

A graded manifold with this vector field is called a *differential graded manifold* (or, in the physical literature, a *Q-manifold*). Below we consider several Q-manifolds to illustrate the computational process in the graded case.

### 5.1. Differential Forms

As before, let us consider a tangent bundle to an ordinary manifold $\Sigma$ with the linear coordinates $\theta$ on its fiber of degree 1; this object is denoted by $T[1]\Sigma$. With $\deg(\sigma^\mu) = 0$, we have $\sigma^{\mu_1}\sigma^{\mu_2} = \sigma^{\mu_2}\sigma^{\mu_1}$ and $\deg(h(\sigma^1, ..., \sigma^d)) = 0$. The equality $\deg(\theta^\mu) = 1$ implies

that $\theta^{\mu_1}\theta^{\mu_2} = -\theta^{\mu_2}\theta^{\mu_1}$. An arbitrary homogeneous function on $T[1]\Sigma$ of degree $p$ has the form

$$f = \sum f_{\mu_1 \dots \mu_p} (\sigma^1, \dots, \sigma^d) \theta^{\mu_1} \dots \theta^{\mu_p}.$$

As above,

$$f \cdot g = (-1)^{\deg(f)\deg(g)} g \cdot f.$$

It is easy to see that this construction replicates the operations on differential forms defined in Section 2:

$$f \leftrightarrow \alpha = \sum f_{\mu_1 \dots \mu_p} d\sigma^{\mu_1} \wedge \dots \wedge d\sigma^{\mu_p} \in \Omega(\Sigma).$$

$$\text{Let us consider the vector field } Q = \sum \theta^{\mu} \frac{\partial}{\partial \sigma^{\mu}}.$$

Note that $\deg Q = 1$ and $[Q, Q] = 2Q^2 = 0$; therefore, it is a Q-structure that exactly replicates the external (de Rham) differential.

### 5.2. Poisson Structures

Suppose that, on the manifold $M$, a Poisson bracket, i.e., a skew-symmetric operation $\{\cdot, \cdot\} : C^\infty(M) \times C^\infty(M) \to C^\infty(M)$ that satisfies the Leibniz identity

$$\{f, gh\} = \{f, g\}h + g\{f, h\}$$

and Jacobi identity

$$\{f, \{g, h\}\} + \{g, \{h, f\}\} + \{h, \{f, g\}\} = 0$$

is defined.

From a geometric perspective, the Poisson bracket can be rewritten as $\{f, g\} = \pi(df, dg)$, where $\pi \in \Gamma(\Lambda^2 TM)$ is a bivector field with components $\pi^{ij}(x) = \{x^i, x^j\}$ (see Section 3). The bivector field is a bidifferentiation, which is why it satisfies the Leibniz identity. In terms of the components $\pi$, the Jacobi identity has the following form:

$$\sum_l \left( \frac{\partial \pi^{ij}(x)}{\partial x^l} \pi^{lk}(x) + \frac{\partial \pi^{ki}(x)}{\partial x^l} \pi^{lj}(x) + \frac{\partial \pi^{jk}(x)}{\partial x^l} \pi^{li}(x) \right) = 0 \qquad (5.1)$$

Now, let us consider $T*[1]M$, a cotangent bundle to $M$ with coordinates on the fiber of degree 1, i.e., $\deg(x^i) = 0$ and $\deg(p_i) = 1$. On it, the canonical symplectic form $\omega = \sum_i dp_i \wedge dx^i$ is defined. Then, the bivector field defines the function $H = \frac{1}{2} \pi^{ij} p_i p_j$ on $T*[1]M$ with the corresponding Hamiltonian vector field having the form
$$Q_{\pi} = \pi^{ij}(x)p_j \frac{\partial}{\partial x^i} - \frac{1}{2} \frac{\partial \pi^{ik}}{\partial x^i} p_j p_k \frac{\partial}{\partial p_i}.$$

It is useful to verify that $\deg(Q_{\pi}) = 1$ and that the condition $Q_{\pi}^2 = 0$ is equivalent to (5.1).

Thus, graded geometry describes quite different objects (e.g., differential forms and Poisson structures) in a similar way. In addition, this formalism is applicable to the Dirac structures described above (see the general statement in [12] and specific mechanical examples in [13, 14]), as well as to the Lie and Courant algebras and many other objects, which, as mentioned above, are widely used in mechanics and theoretical physics.

It should be noted that, with all the elegance of the definitions of graded objects, real-life computations for particular examples are quite time-consuming and not always straightforward. Thus, we arrive at the third problem of computer algebra, which is quite vaguely formulated as follows.

**Problem 3.** It is required to extend standard differential geometry packages to include operations on graded objects.

As far as we know, the existing packages for working with non-commuting objects (which, in fact, is the main feature of graded manifolds) are written for specific tasks. In contrast, packages for classical differential geometry are very well developed, and their extension would make an invaluable contribution to the corresponding applied fields. More specifically, it would be useful to supplement all standard operations (differentiation, computing contractions and commutators of vector fields, algebraic simplification, etc.) with signs that are due to gradings, which is just a matter of programming. Moreover, it is necessary to consider the correspondence between the fairly simple conditions of the form $Q^2 = 0$ and the classical conditions of form (5.1), which are partial differential equations, and use them for simplification of expressions. This is a nontrivial problem even without taking gradings into account; one of the possible approaches can be the description of partial differential equations in the jet space [15, 16].

## 6. DISCUSSION AND CONCLUSIONS

Thus, we have formulated three problems of computer algebra that arise when investigating geometric aspects of mechanical systems. The first problem is quite technical: computer algebra can help to avoid time-consuming, potentially erroneous computations. The second problem is more conceptual: it is aimed at facilitating the qualitative analysis of differential equation systems and avoiding “guessing” their correct form. The third problem seems quite an unexplored,

potentially promising direction in the development of computer algebra.

Once again, we emphasize that the solution of these problems is important to us not just for fun. For mechanics, their solution can permit the development of full-cycle software complexes (from describing the physics of the system to the results of numerical computations). We have mentioned this approach in the Introduction; presently, each instance analyzed in this way deserves publication. That is why the automation of the process in the framework of Problem 2 seems to be a natural and important direction of computational mechanics. This is also true for Problem 3, which arises, e.g., when carrying out computations in theoretical or high energy physics. Anyway, a motivated reader can regard these problems as an invitation to join efforts.

In conclusion, we would like to note that, in addition to the “continuous” constructions described above, it is important to spell-out their discrete analogues. We are interested in this research direction [17, 18] particularly in the framework of the project on “geometrization of mechanics” mentioned above; this direction is obviously related with the problems formulated in this paper.

## 7. ACKNOWLEDGMENTS

V.N. Salnikov is grateful to S.A. Abramov, S.Ya. Stepanov, and A. Prokopenya for interesting questions and fruitful discussions on the topic, as well as for their useful remarks in preparing the manuscript.

## REFERENCES

1. Courant, T.J., Dirac manifolds, *Trans. Amer. Math. Soc.*, 1990, vol. 319, pp. 631–661.

2. Yoshimura, H. and Marsden, J.E., Dirac structures in Lagrangian mechanics. Part I: Implicit Lagrangian systems, *J. Geom. Phys.*, 2006, vol. 57.

3. Yoshimura, H. and Marsden, J.E., Dirac structures in Lagrangian mechanics. Part II: Variational structures, *J. Geom. Phys.*, 2006, vol. 57.

4. Salnikov, V. and Hamdouni, A., From modeling of systems with constraints to generalized geometry and back to numerics, *Z. Angew. Math. Mech.*, 2019.

5. Razafindralandy, D., Salnikov, V., Hamdouni, A., and Deeb, A., Some robust integrators for large time dynamics, *Adv. Model. Simul. Eng. Sci.*, 2019.

6. Maschke, B.M., van der Schaft, A.J., and Breedveld, P.C., An intrinsic Hamiltonian formulation of network dynamics: Non-standard Poisson structures and gyrators, *J. Franklin Inst.*, 1992, vol. 329.

7. van der Schaft, A., Port-Hamiltonian systems: An introductory survey, *Proc. Int. Congr. Mathematicians, Madrid, 2006*.

8. Tulczyjew, W.M., The Legendre transformation, *Ann. Inst. H. Poincaré, Sect. A*, 1977, vol. 27, no. 1, pp. 101–114.
9. Verlet, L., Computer "experiments" on classical fluids, *Phys. Rev.*, 1967, vol. 159, pp. 98–103.

10. Yoshida, H., Construction of higher-order symplectic integrators, *Phys. Lett. A*, 1990, vol. 150, p. 262.

11. Falaize, A. and Hélie, T., Passive simulation of the nonlinear port-Hamiltonian modeling of a Rhodes piano, *J. Sound Vib.*, 2016.

12. Kotov, A., Schaller, P., and Strobl, T., Dirac sigma models, *Commun. Math. Phys.*, 2005, vol. 260.

13. Salnikov, V. and Hamdouni, A., Geometric integrators in mechanics: The need for computer algebra tools, *Proc. 3rd Int. Conf. Computer Algebra*, Moscow, 2019.

14. Salnikov, V. and Hamdouni, A., Géométrie généralisée et graduée pour la mécanique, *Proc. Congrès Français de Mécanique*, Brest, France, 2019.

15. Kushner, A., Lychagin, V., and Rubtsov, V., Contact geometry and non-linear differential equations, *Encyclopaedia of Mathematics and its Applications*, Cambridge University Press, 2007.

16. Krasil'schik, I.S., Vinogradov, A.M., et al., Symmetries and conservation laws for differential equations of mathematical physics, *Amer. Math. Soc.*, 1999.

17. Hamdouni, A. and Salnikov, V., Dirac integrators for port-Hamiltonian systems, in prep.

18. Salnikov, V. and Hamdouni, A., Discretization in the graded world, in prep.