next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
DiffAlg :: newForm(String)

newForm(String) -- constructor of a differential form

Synopsis

Description

This function defines the particular differential form written in the given expression as elements of type DiffAlgForm. Notice that the exterior product must be written as the ordinary product of variables *. If parameters are founded in the given expression, they are automatically included in the ring of scalar coefficients.


In the following example we define two particular differential forms, w and z, and compute the exterior product w^z, see DiffAlgForm ^ DiffAlgForm. In the definition of w we are introducing a scalar parameter named a. Notice that the variable x_2 is missing from the ring of w. But when computing w^z, the rings of both vector fields are automatically merged.

i1 : w = newForm("a * x_1 * dx_0 * dx_1")

o1 = a*x dx dx
        1  0  1

o1 : DiffAlgForm
i2 : ring w

      QQ[i]
o2 = ------[][a][x , x ][dx , dx ]
      2           0   1    0    1
     i  + 1

o2 : PolynomialRing
i3 : z = newForm("x_0^2 * dx_2 - x_2^2 * dx_0")

        2       2
o3 = - x dx  + x dx
        2  0    0  2

o3 : DiffAlgForm
i4 : ring z

      QQ[i]
o4 = ------[][x , x , x ][dx , dx , dx ]
      2        0   1   2    0    1    2
     i  + 1

o4 : PolynomialRing
i5 : w ^ z

        2
o5 = a*x x dx dx dx
        0 1  0  1  2

o5 : DiffAlgForm
i6 : ring (w+z)

      QQ[i]
o6 = ------[][a][x , x , x ][dx , dx , dx ]
      2           0   1   2    0    1    2
     i  + 1

o6 : PolynomialRing

In this example we show that the variables will always start from the index 0 and go up to the highest index encountered in the expression defining the differential form.

i7 : v = newForm("dx_5")

o7 = dx
       5

o7 : DiffAlgForm
i8 : ring v

      QQ[i]
o8 = ------[][x , x , x , x , x , x ][dx , dx , dx , dx , dx , dx ]
      2        0   1   2   3   4   5    0    1    2    3    4    5
     i  + 1

o8 : PolynomialRing

Caveat

By default, the affine coordinates will be x_0,...,x_n and the differentials are denoted as dx_0,...,dx_n, respectively. The coefficient i is the complex number.

See also