Ask Your Question

Setting the components of a differential form systematically.

asked 2019-08-22 16:13:05 +0100

sum8tion gravatar image

updated 2019-08-29 18:36:08 +0100

FrédéricC gravatar image

Suppose for some p and q we have a manifold

Sage: p=1
Sage: q=2

Sage: M = Manifold((2*p*q), 'M', field='complex')
Sage: U = M.open_subset('U')
Sage: x = U.chart(names=tuple('x_%d' % i for i in range(2*p*q)))
Sage: eU = x.frame()

and some differential forms

Sage: d = {(i): var("d_{}".format(i)) for i in range(2*p*q)}

Sage: for i in range(2*p*q):
Sage:     d[i] = M.diff_form(i)

I want to construct and/or inspect components of these differential forms in a systematic way, which is to say I want to be able to iterate over the components. So for example, one way in which I've tried to do this is to create lists.
For example, if we let

Sage: R = [eU, 0, 1]

I would want to say

Sage: d[2]R = 1

but this gives me a syntax error.
I've also tried something like

Sage: S = [0, 1]
Sage: d[2][eU, :]S = 1

but again I get a syntax error.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2019-08-22 22:18:04 +0100

eric_g gravatar image

updated 2019-08-22 22:26:43 +0100

You should write

sage: d[2][R] = 1

Indeed, when R is the list [eU, 0, 1], as in your example, the above is equivalent to

sage: d[2][eU, 0, 1] = 1

Side note: in your example, the line

sage: d = {(i): var("d_{}".format(i)) for i in range(2*p*q)}

is useless, because the elements of the dictionary d are fully redefined in the two lines that follow:

sage: for i in range(2*p*q):
sage:     d[i] = M.diff_form(i)

If you want to give names to the differential forms d[i], you could write simply

sage: d = {i: M.diff_form(i, name="d_{}".format(i)) for i in range(2*p*q)}


sage: d[2]
2-form d_2 on the 4-dimensional complex manifold M
sage: R = [eU, 0, 1]
sage: d[2][R] = 1
sage: d[2].display()
d_2 = dx_0/\dx_1
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-08-22 16:13:05 +0100

Seen: 182 times

Last updated: Aug 22 '19