Indexing facilities in the atlas package  

Description: 

  • Any object in the atlas package can be indexed. The following rules are used to provide the indexing facilities.
 

  • Any declaration of an object with symbolic indexes means that the indexes can be of any type. For instance, the declaration Constants(c[i]) means that c[i] is constant for any i.  
 

  • Any declaration of an object with numeric indexes means that the indexes can be only the same as has been declared. For instance, the declaration Forms(xi[3]=1, xi[0]=n) means that xi[3] is 1-form, xi[0] is n-form and xi[i] is 0-form if i is not equal to 3 or 0.  
 

Examples: 

> restart:
with(atlas):
 

The following declaration means that h[i] are constants for any i.  

> Constants(h[i]);
 

{`+`(`-`(I)), I, Pi, _Z, Catalan, h[i]}(2.1)
 

> type(h[k],const);
 

true(2.2)
 

> type(h[3],const);
 

true(2.3)
 

> type(h[-1/2],const);
 

true(2.4)
 

> 'd(h[j])'=d(h[j]);
 

d(h[j]) = 0(2.5)
 

The following declaration means that alpha[-`/`(1, 2)], alpha[0], alpha[`/`(1, 2)] are constants: 

> Constants(alpha[0],alpha[1/2],alpha[-1/2]);
 

{`+`(`-`(I)), I, Pi, _Z, Catalan, h[i], alpha[0], alpha[-`/`(1, 2)], alpha[`/`(1, 2)]}(2.6)
 

> type(alpha[0],const);
 

true(2.7)
 

> type(alpha[1/2],const);
 

true(2.8)
 

> type(alpha[-1/2],const);
 

true(2.9)
 

> type(alpha[2],const);
 

false(2.10)
 

> type(alpha[k],const);
 

false(2.11)
 

> 'd(alpha[j])'=d(alpha[j]);
 

d(alpha[j]) = d(alpha[j])(2.12)
 

> 'd(alpha[-1/2])'=d(alpha[-1/2]);
 

d(alpha[-`/`(1, 2)]) = 0(2.13)
 

The following declaration means that f[i] = f[i](y[1], y[2], () .. (), y[n]) for any i where n is the dimension. 

> Functions(f[i]=f[i](y[k]));
 

{f[i]}(2.14)
 

> type(f[k],func);
 

true(2.15)
 

> type(f[0],func);
 

true(2.16)
 

> type(f[-1],func);
 

true(2.17)
 

> 'd(f[j])'=d(f[j]);
 

d(f[j]) = Sum(`*`(Diff(f[j], y[l[1]]), `*`(d(y[l[1]]))), l[1] = 1 .. dim)(2.18)
 

The following declaration means that h[i, j] = h[i, j](x, y, z) for any i, j . 

> Functions(h[i,j]=h[i,j](x,y,z));
 

{f[i], h[i, j]}(2.19)
 

> type(h[m,k],func);
 

true(2.20)
 

> type(h[0,-1],func);
 

true(2.21)
 

> type(h[-1,i],func);
 

true(2.22)
 

> 'd(h[k,0])'=d(h[k,0]);
 

d(h[k, 0]) = `+`(`*`(Diff(h[k, 0], x), `*`(d(x))), `*`(Diff(h[k, 0], y), `*`(d(y))), `*`(Diff(h[k, 0], z), `*`(d(z))))(2.23)
 

The following declaration means that f = f(z[1], z[2], () .. (), z[n]) where n is the dimension. 

> Functions(f=f(z[k]));
 

{f, f[i], h[i, j]}(2.24)
 

> type(f,func);
 

true(2.25)
 

> 'd(f)'=d(f);
 

d(f) = Sum(`*`(Diff(f, z[l[1]]), `*`(d(z[l[1]]))), l[1] = 1 .. dim)(2.26)
 

The following declaration means that F = F(z[0], z[3]). 

> Functions(F=F(z[0],z[3]));
 

{F, f, f[i], h[i, j]}(2.27)
 

> type(F,func);
 

true(2.28)
 

> 'd(F)'=d(F);
 

d(F) = `+`(`*`(Diff(F, z[0]), `*`(d(z[0]))), `*`(Diff(F, z[3]), `*`(d(z[3]))))(2.29)
 

The following definition means that G = G(z[0], x[1], x[2], () .. (), x[n]) where n is the dimension. 

> Functions(G=G(z[0],x[j]));
 

{F, G, f, f[i], h[i, j]}(2.30)
 

> 'd(G)'=d(G);
 

d(G) = `+`(`*`(Diff(G, z[0]), `*`(d(z[0]))), Sum(`*`(Diff(G, x[l[1]]), `*`(d(x[l[1]]))), l[1] = 1 .. dim))(2.31)
 

The following definition means that E[k] are vectors for any k and U[0] is a vector:  

> Vectors(E[k],U[0]);
 

{E[k], U[0]}(2.32)
 

> type(E[i],vect);
 

true(2.33)
 

> type(E[-3],vect);
 

true(2.34)
 

> type(U[0],vect);
 

true(2.35)
 

> type(U[1],vect);
 

false(2.36)
 

> type(U[i],vect);
 

false(2.37)
 

> iota[U[0]](d(x));
 

iota[U[0]](d(x))(2.38)
 

> iota[U[3]](d(x));
 

Error, (in atlas/iota2) U[3] is not a vector
 

The following definition means that e[j] is 1-form for any j; omega[1] and omega[2] are 1-form and p-form respectively and omega[i, j] are 2-forms for any i, j. 

> Forms(e[j]=1,omega[1]=1,omega[2]=p,omega[i,j]=2);
 

{e[j], omega[1], omega[2], omega[i, j]}(2.39)
 

> kind(e[b]);
 

[0, 1](2.40)
 

> kind(e[6]);
 

[0, 1](2.41)
 

> kind(omega[1]);
 

[0, 1](2.42)
 

> kind(omega[3]);
 

[0, 0](2.43)
 

> kind(omega[1,k]);
 

[0, 2](2.44)
 

More complex example: 

> Forms(xi[i,0,k]=3);
 

{e[j], xi[i, 0, k], omega[1], omega[2], omega[i, j]}(2.45)
 

> kind(xi[a,0,b]);
 

[0, 3](2.46)
 

> kind(xi[1,0,-1/2]);
 

[0, 3](2.47)
 

> kind(xi[i,0,k]);
 

[0, 3](2.48)
 

> kind(xi[i,1,k]);
 

[0, 0](2.49)
 

> kind(xi[i,j,k]);
 

[0, 0](2.50)
 

>
 

See Also:  

atlas.