Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Setting the components of a differential form systematically.

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.

click to hide/show revision 2
retagged

Setting the components of a differential form systematically.

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.