I'd like to define a differential form in 2n variables (where n is defined beforehand, and I'd like for it to be able to be arbitrarily big. For this reason I'd like to write a code for general n). My first idea is to write something of the sort:
n=var('n');
n=3;
x = list(var('x_%d' % i) for i in (1..2*n));
U = CoordinatePatch(x);
F = DifferentialForms(U);
w = DifferentialForm(F,2);
[w[i,2]=3 for i in range(0,2*n-1)]
The value w[i,2]=3 is obviously arbitrary. I don't know why the code doesn't work, it says that there's a syntax error with w[i,2]=3.