| 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 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 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 not equal to 3 or 0.
Examples: restart: with(atlas): The following declaration means that are constants for any . Constants(h[i]); ![{I, Catalan, _Z, Pi, -I, h[i]}](prod/atlas/help/images/indexing3.gif)
type(h[k],const); 
type(h[3],const); 
type(h[-1/2],const); 
'd(h[j])'=d(h[j]); ![d(h[j]) = 0](prod/atlas/help/images/indexing7.gif)
The following declaration means that are constants: Constants(alpha[0],alpha[1/2],alpha[-1/2]); ![{I, Catalan, _Z, Pi, alpha[0], alpha[1/2], alpha[-1/2], -I, h[i]}](prod/atlas/help/images/indexing9.gif)
type(alpha[0],const); 
type(alpha[1/2],const); 
type(alpha[-1/2],const); 
type(alpha[2],const); 
type(alpha[k],const); 
'd(alpha[j])'=d(alpha[j]); ![d(alpha[j]) = d(alpha[j])](prod/atlas/help/images/indexing15.gif)
'd(alpha[-1/2])'=d(alpha[-1/2]); ![d(alpha[-1/2]) = 0](prod/atlas/help/images/indexing16.gif)
The following declaration means that for any where n is the dimension. Functions(f[i]=f[i](y[k])); ![{f[i]}](prod/atlas/help/images/indexing19.gif)
type(f[k],func); 
type(f[0],func); 
type(f[-1],func); 
'd(f[j])'=d(f[j]); ![d(f[j]) = Sum(Diff(f[j],y[l[1]])*d(y[l[1]]),l[1] = 1 .. dim)](prod/atlas/help/images/indexing23.gif)
The following declaration means that for any . Functions(h[i,j]=h[i,j](x,y,z)); ![{f[i], h[i,j]}](prod/atlas/help/images/indexing26.gif)
type(h[m,k],func); 
type(h[0,-1],func); 
type(h[-1,i],func); 
'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)](prod/atlas/help/images/indexing30.gif)
The following declaration means that where n is the dimension. Functions(f=f(z[k])); ![{f[i], h[i,j], f}](prod/atlas/help/images/indexing32.gif)
type(f,func); 
'd(f)'=d(f); ![d(f) = Sum(Diff(f,z[l[1]])*d(z[l[1]]),l[1] = 1 .. dim)](prod/atlas/help/images/indexing34.gif)
The following declaration means that . Functions(F=F(z[0],z[3])); ![{f[i], h[i,j], F, f}](prod/atlas/help/images/indexing36.gif)
type(F,func); 
'd(F)'=d(F); ![d(F) = Diff(F,z[0])*d(z[0])+Diff(F,z[3])*d(z[3])](prod/atlas/help/images/indexing38.gif)
The following definition means that where n is the dimension. Functions(G=G(z[0],x[j])); ![{f[i], h[i,j], F, G, f}](prod/atlas/help/images/indexing40.gif)
'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)](prod/atlas/help/images/indexing41.gif)
The following definition means that are vectors for any k and is a vector: Vectors(E[k],U[0]); ![{E[k], U[0]}](prod/atlas/help/images/indexing44.gif)
type(E[i],vect); 
type(E[-3],vect); 
type(U[0],vect); 
type(U[1],vect); 
type(U[i],vect); 
iota[U[0]](d(x)); ![iota[U[0]](d(x))](prod/atlas/help/images/indexing50.gif)
iota[U[3]](d(x));
Error, (in atlas/iota2) U[3] is not a vector
The following definition means that is 1-form for any j; and are 1-form and p-form respectively and 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]}](prod/atlas/help/images/indexing55.gif)
kind(e[b]); ![[0, 1]](prod/atlas/help/images/indexing56.gif)
kind(e[6]); ![[0, 1]](prod/atlas/help/images/indexing57.gif)
kind(omega[1]); ![[0, 1]](prod/atlas/help/images/indexing58.gif)
kind(omega[3]); ![[0, 0]](prod/atlas/help/images/indexing59.gif)
kind(omega[1,k]); ![[0, 2]](prod/atlas/help/images/indexing60.gif)
More complex example: Forms(xi[i,0,k]=3); ![{e[j], omega[1], omega[2], omega[i,j], xi[i,0,k]}](prod/atlas/help/images/indexing61.gif)
kind(xi[a,0,b]); ![[0, 3]](prod/atlas/help/images/indexing62.gif)
kind(xi[1,0,-1/2]); ![[0, 3]](prod/atlas/help/images/indexing63.gif)
kind(xi[i,0,k]); ![[0, 3]](prod/atlas/help/images/indexing64.gif)
kind(xi[i,1,k]); ![[0, 0]](prod/atlas/help/images/indexing65.gif)
kind(xi[i,j,k]); ![[0, 0]](prod/atlas/help/images/indexing66.gif)
See Also: atlas . |