In a previous post we discuss the definition of the coordinated patch on a manifold, how to define differential forms, wedge them or calculate their exterior derivative… even simplify’em.
This time a zero form will be defined and a list of forms will be created… So, let’s begin!
Define a 0-form
Once created the coordinated patch and the differential forms algebra
sage: reset() sage: var('t,x,y,z') sage: U = CoordinatePatch((t,x,y,z)) sage: Omega = DifferentialForms(U)
A 0-form is defined as an element of , but the value of the 0-form is given inside the declaration command,
sage: A = DifferentialForm(Omega, 0, exp(x*y))
I tried addition, multiplication, wedge product and exterior differentiation on 0-forms and they worked!
Of course you can combine them with forms of different degrees.
New method of defining a form
I wrote to Joris this morning… but before he was able to answer, from the documentation of the differential form package.
When one calls the generators of the differential form,
sage: Omega.gen(1) dx
and the result is a differential form… Thus, one can assign a form as follow,
sage: A = sin(x)* Omega.gen(2) sage: B = cos(y) * Omega.gen(0) sage: C = sin(z) *Omega.gen(1) sage: D = cos(y) * Omega.gen(2)
And this forms can be wedged, differentiated, et cetera. 🙂
List of forms
Finally, after discovering the above behavior I tried the following, a list of differential forms ;-), for example,
sage: pro = matrix([[A, B], [C, D]]) sage: for i in range(2): ... for j in range(2): ... show(pro[i,j].diff())
returns
This implies that somehow one can manage a series of forms by using list properties… I expect to go deeper on this subject in the future! 😀
Enjoy people!!!
Dox