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 any 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, 2 skew commutative variables |
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 ][dx ..dx ] 2 0 2 0 2 i + 1 o4 : PolynomialRing, 3 skew commutative variables |
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 ][dx ..dx ] 2 0 2 0 2 i + 1 o6 : PolynomialRing, 3 skew commutative variables |
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 ][dx ..dx ] 2 0 5 0 5 i + 1 o8 : PolynomialRing, 6 skew commutative variables |