A tensor has the following information associated with it:-
A user can specify a tensor by a black-box function that evaluates the required multilinear map.
Returns the tensor having the frame S and the tensor category Cat. The last entry is assumed to be the codomain of the multilinear map. The user-defined function F should take as input a tuple of elements of the domain and return an element of the codomain. If no tensor category is provided, then Albert's homotopism category is used.
Returns the tensor with tensor category Cat and frame specified by D and C, where D is a sequence of spaces in the domain and C the codomain. The user-defined function F should take as input a tuple of elements of D and return an element of C. If no tensor category is provided, then Albert's homotopism category is used.
> K := GF(541); > U := KMatrixSpace(K,2,3); > my_prod := func< x | x[1]*Transpose(x[2])*x[3] >; > T := Tensor([U,U,U,U], my_prod ); > T; Tensor of valence 3, U3 x U2 x U1 >-> U0 U3 : Full KMatrixSpace of 2 by 3 matrices over GF(541) U2 : Full KMatrixSpace of 2 by 3 matrices over GF(541) U1 : Full KMatrixSpace of 2 by 3 matrices over GF(541) U0 : Full KMatrixSpace of 2 by 3 matrices over GF(541) > A := U![1,0,0,0,0,0]; > <A,A,A>@T; // A is a generalized idempotent [ 1 0 0] [ 0 0 0]We can experiment to see if this triple product is left associative.
> X := [Random(U) : i in [1..5]]; > <<X[1],X[2],X[3]>@T,X[4],X[5]>@T eq > <X[1],<X[4],X[3],X[2]>@T,X[5]>@T; trueTo confirm this we can create a new tensor for the left triple-associators and check that its image is 0.
> my_left_asct := func<X|<<X[1],X[2],X[3]>@T,X[4],X[5]>@T > - <X[1],<X[4],X[3],X[2]>@T,X[5]>@T >; > LT := Tensor([U: i in [0..5]], my_left_asct); > I := Image(LT); > Dimension(I); 0
Most computations with tensors T will be carried out using structure constants Tjv ... j0∈K. Here T is framed by free K-modules [Uv, ..., U0] with each Ui having an ordered bases (B)i=[ei1, ..., eidi]. The interpretation of structure constants is that the associated multilinear function [xv, ..., x1] from Uv x ... x U1 into U0 is determined on bases (B)i as follows: [evjv, ..., e1j1 ] = ∑k=1d0 Tjv ... j0 e0k. Structure constants are input and stored as sequences S in K according to the following assignment. Set f:Zv + 1to Z to be: f(jv, ..., j0) = 1 + ∑s=0v (js - 1)∏t=0s - 1 dt. So S[f(jv, ..., j0)]=Tjv ... j0 specifies the structure constants as a sequence.
Notes.
Let R be a commutative unital ring and D a sequence [dv, ..., d0] giving the dimensions of the R-modules Uv, ..., U0. The intrinsic returns the tensor with frame { Uv, ..., U1 }, codomain U0 and multilinear map defined by the structure constant sequence S. If R is not specified then the parent ring of the first element of S is used. The default tensor category Cat is the homotopism category.
Returns the sequence of structure constants of the given tensor T.
In the special case of bilinear maps U2 x U1 ↣ U0, the structure constant sequences may be presented as lists [M1, ..., Ma] of matrices. This can be considered as a left (resp. right) representation U2to homK(U1, U0), (resp.U1to homK(U2, U0)). Alternatively, bilinear maps can be treated as systems of bilinear forms [M1, ..., Ma] where the matrices are the Gram matrices of bilinear forms φi:U2 x U1 ↣ K. Here the associated bilinear map U2 x U1 ↣ U0 is specified by (u2, u1) |-> ( φ1(u2, u1), ..., φa(u2, u1)).
Given a sequence of matrices M, the bilinear tensor specified by M is returned. The interpretation of the matrices as structure constant sequences is determined by the coordinates s and t which must be integers from the set {2, 1, 0}. Optionally a tensor category C can be specified.
For a tensor T with frame [Kdv, ..., Kd0], a list [M1, ..., Md], d=(dv ... d0)/ds dt, of (ds x dt)-matrices in K representing the tensor as an element of homK(Kds tensor K Kdt, Kd) is returned. For the intrinsic SystemOfForms, T must have valence 2 and the implied values are s=2 and t=1.
> T := Tensor(GF(3), [2 ,2 ,2], [1 ,0 ,0 ,1 ,0 ,1 , -1 ,0]); > T; Tensor of valence 2, U2 x U1 >-> U0 U2 : Full Vector space of degree 2 over GF(3) U1 : Full Vector space of degree 2 over GF(3) U0 : Full Vector space of degree 2 over GF(3) > StructureConstants(T); [ 1, 0, 0, 1, 0, 1, 2, 0 ]Systems of forms can be useful in providing some visually useful information such as symmetry. The choice of coordinates influences the resulting list of matrices.
> AsMatrices(T,1,0);
[
[1 0]
[0 1],
[0 1]
[2 0]
]
> SystemOfForms (T);
[
[1 0]
[0 2],
[0 1]
[1 0]
]
> IsSymmetric (T);
true
> F := [ RandomMatrix(GF(2),2,3) : i in [1..4]]; > T := Tensor(F,2,1); > T; Tensor U2 x U1 >-> U0 U2 : Full Vector space of degree 2 over GF(2) U1 : Full Vector space of degree 3 over GF(2) U0 : Full Vector space of degree 4 over GF(2) > T2 := Tensor( [2,2,2,2], [1..16] ); > F2 := AsMatrices(T2,3,2); > T3 := Tensor(F2, 2, 1); > Eltseq(T2) eq Eltseq(T3); true > T2 eq T3; false > Valence(T2); 3 > Valence(T3); 2
A natural source of tensors is an algebraic object with a distributive property. Each tensor is assigned a category relevant to its origin.
Given an algebra A with an element product that satisfies an appropriate distributive law, return the bilinear tensor given by the product in A.
Given an algebra A return the tensor corresponding to the bilinear commutator map [a, b]=ab - ba on the algebra A.
Given an algebra A return the tensor corresponding to the trilinear associator map [a, b, c]=(ab)c - a(bc) on the algebra A.
> A := MatrixAlgebra( Rationals () , 5 ); > AC := CommutatorTensor( A ); > IsAlternating( AC ); // [X, X] = 0? trueDo three random octonions satisfy the associate law? Hardly ever.
> O := OctonionAlgebra ( GF (541) , -1 , -1 , -1); > T := AssociatorTensor ( O ); > < Random ( O ) , Random ( O ) , Random ( O ) > @ T eq 0; falseBut the left alternative law, (aa)b=a(ab) is always satisfied, as octonions are alternative algebras.
> a := Random ( O ); > b := Random ( O ); > <a ,a ,b > @ T eq 0; true > IsAlternating ( T ); true
Returns the bilinear map of commutation from the associated graded Lie algebra of the lower exponent-p central series η of G. The bilinear map pairs ηs/ηs + 1 with ηt/ηt + 1 into ηs + t/ηs + t + 1. If s=t the tensor category is set to force U2=U1; otherwise it is the general homotopism category.
> P := ClassicalSylow(SL(3,125), 5);
> Q := PCGroup(P); // The group Q wont have explicit knowledge of GF(125).
> Q;
GrpPC : Q of order 1953125 = 5^9
PC-Relations:
Q.4^Q.1 = Q.4 * Q.7^4,
Q.4^Q.2 = Q.4 * Q.8^4,
Q.4^Q.3 = Q.4 * Q.9^4,
Q.5^Q.1 = Q.5 * Q.8^4,
Q.5^Q.2 = Q.5 * Q.9^4,
Q.5^Q.3 = Q.5 * Q.7^3 * Q.8^3,
Q.6^Q.1 = Q.6 * Q.9^4,
Q.6^Q.2 = Q.6 * Q.7^3 * Q.8^3,
Q.6^Q.3 = Q.6 * Q.8^3 * Q.9^3
> T := pCentralTensor(Q,1,1);
> F := Centroid(T); // Recover GF(125)
> Dimension(F);
3
> IsSimple(F);
true
> IsCommutative(F);
true
Returns the polarization of the homogeneous multivariate polynomial f as a tensor and as a multivariate polynomial. Note that the intrinsic does not normalize by 1/d!, where d is the degree of f.
> K<x,y> := PolynomialRing(Rationals(), 2); > T,p := Polarization(x^2*y); > p; 2*$.1*$.3*$.6 + 2*$.1*$.4*$.5 + 2*$.2*$.3*$.5 > T; Tensor of valence 3, U3 x U2 x U1 >-> U0 U3 : Full Vector space of degree 2 over Rational Field U2 : Full Vector space of degree 2 over Rational Field U1 : Full Vector space of degree 2 over Rational Field U0 : Full Vector space of degree 1 over Rational Field > <[1,0],[1,0],[1,0]> @ T; (0) > <[1,0],[1,0],[0,1]> @ T; (2)
A number of new tensors may be constructed from a given tensor.
Returns the alternating tensor induced by the given tensor T. If the tensor is already alternating, then the given tensor is returned.
Returns the antisymmetric tensor induced by the given tensor T. If the tensor is already antisymmetric, then the given tensor is returned.
Returns the symmetric tensor induced by the given tensor T. If the tensor is already symmetric, then the given tensor is returned.
Given a tensor T in hom(Uv, ..., hom(U1, U0) ... ), this intrinsic generates the representation of T in hom(Uvg, ..., hom(U1g, U0g) ... ), where g is a permutation of {0..v}. The permutation g may be given as an element of a permutation group or as a sequence. Both the image and pre-image of 0 under g will be replaced by their K-dual space. For cotensors, g must permute {1..v}.
Magma supports two perspectives for operations with tensors. Firstly, tensors determine multilinear maps and so behave as functions. Secondly, tensors are elements of a tensor space and so behave as elements of a module.
Treating the tensor space as a K-module, we have the standard operations.
Given tensors S and T belonging to the same tensor space V, and an element k belonging to the coefficient ring K, this intrinsic returns the sum or scalar multiple of S and T as elements of v. The corresponding multilinear maps are the sum or scalar multiple of the multilinear maps.
Returns the tensor on vector spaces and an isotopism from the given tensor. This is a forgetful functor that forces all domain and codomain terms to be vector spaces.
For a tensor T with multilinear maps Uv x ... x U1 ↣ U0, this intrinsic creates the associated multilinear form Uv x ... x U1 x U0 * ↣ K. The valence is increased by 1.
Returns the compression of the tensor T. This removes all 1-dimensional spaces in the domain.
> L := LieAlgebra("D4",GF(5));
> T := Tensor(L);
> T;
Tensor of valence 2, U2 x U1 >-> U0
U2 : Lie Algebra of dimension 28 with base ring GF(5)
U1 : Lie Algebra of dimension 28 with base ring GF(5)
U0 : Lie Algebra of dimension 28 with base ring GF(5)
> < L.2, L.11 > @ T;
(1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
>
> S := TensorOnVectorSpaces(T);
> S;
Tensor of valence 2, U2 x U1 >-> U0
U2 : Full Vector space of degree 28 over GF(5)
U1 : Full Vector space of degree 28 over GF(5)
U0 : Full Vector space of degree 28 over GF(5)
> V := Domain(S)[1];
> < L.2, L.11 > @ S eq < V.2, V.11 > @ S;
true
Now we compute the forms associated to S to get a trilinear map.
We shuffle it by the permutation (0, 3) and compress it.
The result is just the shuffle of the original bilinear map S by (0, 2, 1).
> AF := AssociatedForm(S); > AF; Tensor of valence 3, U3 x U2 x U1 >-> U0 U3 : Full Vector space of degree 28 over GF(5) U2 : Full Vector space of degree 28 over GF(5) U1 : Full Vector space of degree 28 over GF(5) U0 : Full Vector space of degree 1 over GF(5) > Eltseq(AF) eq Eltseq(S); true > < L.2, L.11, L.1 > @ AF; (1) > < L.2, L.11, L.2 > @ AF; (0) > > U := Shuffle(AF,[3,1,2,0]); > U; Tensor of valence 3, U3 x U2 x U1 >-> U0 U3 : Full Vector space of degree 1 over GF(5) U2 : Full Vector space of degree 28 over GF(5) U1 : Full Vector space of degree 28 over GF(5) U0 : Full Vector space of degree 28 over GF(5) > > Cmp := Compress(U); > Shf := Shuffle(S,[2,0,1]); > Cmp eq Shf; true
Returns the tensor space that contains tensor T. The default space is the universal tensor space.
Returns the domain of the tensor T as a list of modules.
Returns the codomain of the tensor T.
Returns the valence of the tensor T.
Returns the modules in the frame of tensor T in the form of a list containing the domain modules and the codomain.
Returns the underlying tensor category of tensor T.
Returns the tensor T with the given category.
Decides if the underlying category of tensor T is covariant or contravariant.
> T := RandomTensor(GF(3),[3,4,5,6]);
> T;
Tensor of valence 3, U3 x U2 x U1 >-> U0
U3 : Full Vector space of degree 3 over GF(3)
U2 : Full Vector space of degree 4 over GF(3)
U1 : Full Vector space of degree 5 over GF(3)
U0 : Full Vector space of degree 6 over GF(3)
> Valence(T);
3
>
> BaseRing(T);
Finite field of size 3
>
> Frame(T);
[*
Full Vector space of degree 3 over GF(3),
Full Vector space of degree 4 over GF(3),
Full Vector space of degree 5 over GF(3),
Full Vector space of degree 6 over GF(3)
*]
>
> Domain(T);
[*
Full Vector space of degree 3 over GF(3),
Full Vector space of degree 4 over GF(3),
Full Vector space of degree 5 over GF(3)
*]
>
> Codomain(T);
Full Vector space of degree 6 over GF(3)
>
> Parent(T); // Universal tensor space
Tensor space of dimension 360 over GF(3) with valence 3
U3 : Full Vector space of degree 3 over GF(3)
U2 : Full Vector space of degree 4 over GF(3)
U1 : Full Vector space of degree 5 over GF(3)
U0 : Full Vector space of degree 6 over GF(3)
>
> TensorCategory(T);
Tensor category of Valence 3 (->,->,->,->) ({ 1 },{ 2 }, { 0 },{ 3 })
>
> Cat := TensorCategory([-1,-1,1,1],{{i} : i in [0..3]});
> ChangeTensorCategory(~T, Cat);
> TensorCategory(T);
Tensor category of Valence 3 (<-,<-,->,->) ({ 1 },{ 2 }, { 0 },{ 3 })
Returns the (categorical) image of the tensor T along with a map to the vector space. Thus, if the type of the codomain of T is not ModTupRng, the returned map is an isomorphism from the codomain of T to the free R-module Rd0.
Returns the base ring or field of the tensor.
Returns the nondegenerate multilinear map associated to T along with a homotopism from the given tensor to the returned nondegenerate tensor.
Decides whether T is a degenerate or nondegenerate multilinear map.
Returns the fully nondegenerate multilinear map associated to tensor T along with a cohomotopism from the given tensor to the returned tensor.
Return true if the tensor T is a fully nondegenerate multilinear map.
Return true if the tensor T is an alternating tensor.
Return true if the tensor T is an antisymmetric tensor.
Return true if the tensor T is a symmetric tensor.
> J := Matrix(GF(9),[[0,1,-1],[1,-1,-1],[-1,-1,1]]);
> M := DiagonalJoin(J,ZeroMatrix(GF(9),3,3));
> M;
[ 0 1 2 0 0 0]
[ 1 2 2 0 0 0]
[ 2 2 1 0 0 0]
[ 0 0 0 0 0 0]
[ 0 0 0 0 0 0]
[ 0 0 0 0 0 0]
>
> T := Tensor([M,-M],2,1);
> T;
Tensor of valence 2, U2 x U1 >-> U0
U2 : Full Vector space of degree 6 over GF(3^2)
U1 : Full Vector space of degree 6 over GF(3^2)
U0 : Full Vector space of degree 2 over GF(3^2)
>
> Image(T);
Vector space of degree 2, dimension 1 over GF(3^2)
Generators:
( 1 2)
Echelonized basis:
( 1 2)
Mapping from: Full Vector space of degree 2 over GF(3^2) to
Full Vector space of degree 2 over GF(3^2) given by a rule
>
> Radical(T);
<
Vector space of degree 6, dimension 3 over GF(3^2)
Echelonized basis:
( 0 0 0 1 0 0)
( 0 0 0 0 1 0)
( 0 0 0 0 0 1),
Vector space of degree 6, dimension 3 over GF(3^2)
Echelonized basis:
( 0 0 0 1 0 0)
( 0 0 0 0 1 0)
( 0 0 0 0 0 1)
>
The tensor we built above is degenerate because it has a nontrivial radical.
We will construct the nondegenerate tensor as well as the fully nondegenerate tensor.
> ND := NondegenerateTensor(T); > ND; Tensor of valence 2, U2 x U1 >-> U0 U2 : Full Vector space of degree 3 over GF(3^2) U1 : Full Vector space of degree 3 over GF(3^2) U0 : Full Vector space of degree 2 over GF(3^2) > > FN := FullyNondegenerateTensor(T); > FN; Tensor of valence 2, U2 x U1 >-> U0 U2 : Full Vector space of degree 3 over GF(3^2) U1 : Full Vector space of degree 3 over GF(3^2) U0 : Vector space of degree 2, dimension 1 over GF(3^2) Generators: ( 1 2) Echelonized basis: ( 1 2)
Regarding tensors as multilinear maps makes it possible to define the operations of composition and evaluation for tensors.
Evaluates the tensor T at x∈Uv x ... x U1.
The tensor formed by composing the tensor T with the map f is constructed.
Returns true if the tensors S and T have the same multilinear map.
Tensors of valence 2, also known as bilinear tensors, or as bilinear maps, are commonly described as distributive products. Examples include the product of two elements of an algebra, the action of a ring on a module, or an inner product. Magma supports this interpretation by permitting an infix x * y notation for the evaluation of bilinear tensors. This is achieved by creating special types BmpU[Elt], BmpV[Elt], and BmpW[Elt] for the terms of the frame of a bilinear tensor.
If x and y are associated to the bilinear map B, these operations return <x,y> @ B.
Given a bilinear tensor B with frame [U2, U1, U0], x * B returns the action on the right as a linear map L : U1 -> U0 given by vL = x * v, where x is an element of U2. If x is a subspace of U2, then this returns a sequence of maps, one for each element in the basis for x. The left-hand action is given by B * y. If B is valence 1, then the image of either x or y is returned.
The parent space of the bilinear map element x is returned.
The original bilinear map from which the space X originated is returned.
The left domain U2 of the bilinear map B with frame [U2, U1, U0] is returned. This operation is used when enabling the use of infix notation.
The right domain U1 of the bilinear map B with frame [U2, U1, U0] is returned This operation is used when enabling the use of infix notation.
Returns true if x can be coerced the left domain (right domain) S of a bilinear map. If successful it returns the coerced element.
Returns true if the elements u1 and u2 from the left domain of a bilinear map are equal.
Returns true if the elements v1 and v2 from the right domain of a bilinear map are equal.
Returns true if the subspaces U1 and U2 of the left domain of a bilinear map are equal.
Returns true if the subspaces V1 and V2 of the right domain of a bilinear map are equal.
> B := RandomTensor(GF(5),[4,3,5]); > B; Tensor of valence 2, U2 x U1 >-> U0 U2 : Full Vector space of degree 4 over GF(5) U1 : Full Vector space of degree 3 over GF(5) U0 : Full Vector space of degree 5 over GF(5) > [3,2,0,1]*B*[1,1,2]; (2 1 1 3 4) > [1,0,0,0]*B; Tensor of valence 1, U1 >-> U0 U1 : Full Vector space of degree 3 over GF(5) U0 : Full Vector space of degree 5 over GF(5) > B*[0,2,0]; Tensor of valence 1, U1 >-> U0 U1 : Full Vector space of degree 4 over GF(5) U0 : Full Vector space of degree 5 over GF(5)
> G := SmallGroup(512,10^6); > B := pCentralTensor(G,2,1,1); > B; Tensor of valence 2, U2 x U1 >-> U0 U2 : Full Vector space of degree 5 over GF(2) U1 : Full Vector space of degree 5 over GF(2) U0 : Full Vector space of degree 4 over GF(2) > U := LeftDomain(B); //U2 > V := RightDomain(B); //U1 > U![0,1,0,1,0] * V![1,0,0,0,0]; (1 0 0 1) > U!(G.2*G.4) * V!G.1; (1 0 0 1)This notation can be used to evaluate subspaces.
> H := sub< G | G.2,G.4 >; > U!H * V!G.1; Vector space of degree 4, dimension 2 over GF(2) Generators: (0 0 0 1) (1 0 0 0) Echelonized basis: (1 0 0 0) (0 0 0 1) > U!H * V!G; Vector space of degree 4, dimension 3 over GF(2) Generators: (1 0 0 0) (0 0 1 0) (0 0 0 1) (1 0 0 0) (1 0 0 0) Echelonized basis: (1 0 0 0) (0 0 1 0) (0 0 0 1)
The data associated with a tensor can be accessed in different ways. In the case of tensors given by structure constants this access is the multidimensional analog of choosing a row or column of a matrix. Other operations are a generalization of the transpose of a matrix. Magma does these operations with a degree of efficiency, that is, it may not physically move the values in a structure constant sequence but instead permute the lookup coordinates of the values.
Returns the slice of the structure constants running through the given grid. For a tensor framed by free modules [Uv, ..., U0] with di=dim Ui, a grid is a sequence [Gv, ..., G0] of subsets Gi⊆{1..di}. The slice is the list of entries in the structure constants of the tensor indexed by Gv x ... x G0. Slice returns the structure constants whereas InducedTensor produces a tensor with these structure constants.
> U := VectorSpace(Rationals(),4);
> V := VectorSpace(Rationals(),3);
> W := VectorSpace(Rationals(),2);
> TS := TensorSpace([U,V,W]);
> T := TS![ i : i in [1..24] ];
> Slice(T,[{1..4},{1..3},{1..2}]); // structure constants
[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24 ]
The data Slice extracts from the structure constants of tensor T
can be used as the structure constants for a new tensor.
> Slice(T,[{1..4},{2},{1}]);
[ 3, 9, 15, 21 ]
>
> W1 := VectorSpace(Rationals(),1);
> pi := hom< W -> W1 | <W.1,W1.1>, <W.2,W1!0> >; // project
> Eltseq( (T*V.2)*pi );
[ 3, 9, 15, 21 ]
However, in this example, the tensors are not the same.
If the induced tensor is compressed, then they become equal.
> T_ind := InducedTensor(T,[{1..4},{2},{1}]);
> T_ind;
Tensor of valence 2, U2 x U1 >-> U0
U2 : Full Vector space of degree 4 over Rational Field
U1 : Full Vector space of degree 1 over Rational Field
U0 : Full Vector space of degree 1 over Rational Field
> S := (T*V.2)*pi;
> S;
Tensor of valence 1, U1 >-> U0
U1 : Full Vector space of degree 4 over Rational Field
U0 : Full Vector space of degree 1 over Rational Field
>
> Compress(T_ind) eq S;
true
If T is a tensor contained in hom(Uv tensor ... tensor U1, U0), and i is the index of some term of the frame of T, this intrinsic returns the matrix representing the linear map Ui -> hom(bigotimesj≠iUi, U0) using the bases of each Uj. If i=0, then the returned matrix is given by the representation U0 * -> hom(bigotimes Ui, K).
If T is a tensor contained in hom(Uv tensor ... tensor U1, U0), and i is the index of some term of the frame of T, this intrinsic returns the associated tensor space of T at i>0 together with a matrix given by the foliation of T at i. The returned tensor space is framed by Uv x ... x Ui + 1 x Ui - 1 x ... x U1 ↣ U0 and is generated by the tensors Tu for each u in the basis of Ui.
Given a tensor T, this intrinsic returns the associated cotensor space of T together with a matrix given by the foliation of T at 0. The returned cotensor space has frame Uv x ... x U1 ↣ K and is generated by the tensors Tf for each f in the basis of U0 * .
Given a tensor space S, this intrinsic returns a tensor belonging to S. If S is contravariant, then the returned tensor has the frame Uv x ... x U1 ↣ T. If S is covariant, then the returned tensor has the frame T x Uv x ... x U1 ↣ U0. Note that AsTensor is "inverse" to AsCotensorSpace and AsTensorSpace when i=v.
> T := RandomTensor( GF(7), [2,3,4] );
> Foliation(T,0);
[3 4 3 3 6 4]
[0 6 4 3 3 4]
[0 0 6 2 3 3]
[4 6 4 0 0 3]
>
> Slice(T,[{1,2},{1..3},{3}]); // row 3
[ 0, 0, 6, 2, 3, 3 ]
>
> Slice(T,[{2},{1},{1..4}]); // col 4
[ 3, 3, 2, 0 ]
The cotensor space associated to a tensor is the subcotensor space spanned by
multilinear forms obtained from T. For a fixed basis of U0, we get a
basis for the cotensor space by projecting onto various basis vectors of U0.
> CT := AsCotensorSpace(T); > CT; Cotensor space of dimension 4 over GF(7) with valence 1 U2 : Full Vector space of degree 2 over GF(7) U1 : Full Vector space of degree 3 over GF(7) > > S := Random(CT); > MS := KMatrixSpace(GF(7),2,3); > SystemOfForms(S) subset sub<MS|SystemOfForms(T)>; trueThe same applies for the associated tensor space to a tensor, where a basis is obtained by projecting onto the basis vectors of Ui.
> TS := AsTensorSpace(T,1); > TS; Tensor space of dimension 3 over GF(7) with valence 1 U1 : Full Vector space of degree 2 over GF(7) U0 : Full Vector space of degree 4 over GF(7) > > S := Random(TS); > MS := KMatrixSpace(GF(7),2,4); > AsMatrices(S,1,0) subset sub<MS|AsMatrices(T,2,0)>; true
To access the projections or the objects acting on a specific factor, the following should be used.
Returns the induced sub-object associated to the ith factor of the associated tensor and a projection from the given object to the returned sub-object.
We integrate the invariant theory associated to bilinear and multilinear maps into the realm of tensors.
Returns the sth (categorical) radical as a subspace of Us along with an isomorphism from Us to Kds. If Us is already a vector space, then the returned map is the identity.
Returns the tuple of all the s-radicals for each s∈{1, ..., v}.
Returns the (categorical) coradical of T and a vector space surjection from the codomain to the coradical.
The following are used only for tensors of valence 2.
Returns the adjoint *-algebra of the given bilinear map.
> V := VectorSpace( GF(5), 10 ); > E := ExteriorCotensorSpace( V, 2 ); > E; Cotensor space of dimension 45 over GF(5) with valence 1 U2 : Full Vector space of degree 10 over GF(5) U1 : Full Vector space of degree 10 over GF(5) > > T := Random(E); > S := Random(E); > CT := SubtensorSpace(E,[T,S]); > T2 := AsTensor(CT); > T2; Tensor of valence 2, U2 x U1 >-> U0 U2 : Full Vector space of degree 10 over GF(5) U1 : Full Vector space of degree 10 over GF(5) U0 : Full Vector space of degree 2 over GF(5) > > A := AdjointAlgebra(T2); > RecognizeStarAlgebra(A); true > Star(A); Mapping from: AlgMat: A to AlgMat: A given by a rule [no inverse]
Returns the left nucleus of the bilinear map B as a subalgebra of (End)K(U2) x (End)K(U0).
Returns the mid nucleus of the bilinear map B as a subalgebra of (End)K(U2) x (End)K(U1).
Returns the right nucleus of the bilinear map B as a subalgebra of (End)K(U1) x (End)K(U0).
The following functions can be used for general multilinear maps.
If the centroid of a tensor is a commutative local ring, we can rewrite a tensor over its centroid. We employ the algorithms developed by Brooksbank and Wilson [BW15] to efficiently determine if a matrix algebra is cyclic.
We include some well-known polynomial invariants for bilinear maps.
Returns the centroid of the tensor as a subalgebra of ∏i=0v(End)K(Ui).
> A := MatrixAlgebra(GF(3),25); > f := RandomIrreduciblePolynomial(GF(3),25); > S := sub< A | CompanionMatrix(f) >; // GF(3^25) inside A > T := Tensor(S); > T; Tensor of valence 2, U2 x U1 >-> U0 U2 : Matrix Algebra of degree 25 with 1 generator over GF(3) U1 : Matrix Algebra of degree 25 with 1 generator over GF(3) U0 : Matrix Algebra of degree 25 with 1 generator over GF(3) > C := Centroid(T); > Dimension(C); 25 > Ngens(C); 1
Given a tensor T, returns the derivation Lie algebra of the tensor as a Lie subalgebra of ∏i=0v(End)K(Ui).
Returns the st-nucleus (s≠t) of the tensor as a subalgebra of (End)K(Ui) x (End)K(Uj), where i=max(s, t) and j=min(s, t).
> H := QuaternionAlgebra(Rationals(),-1,-1); > T := Tensor(H); > T; Tensor of valence 2, U2 x U1 >-> U0 U2 : Quaternion Algebra with base ring Rational Field, defined by i^2 = -1, j^2 = -1 U1 : Quaternion Algebra with base ring Rational Field, defined by i^2 = -1, j^2 = -1 U0 : Quaternion Algebra with base ring Rational Field, defined by i^2 = -1, j^2 = -1 > D := DerivationAlgebra(T); > SemisimpleType(D); A1Now we verify that the mid nucleus of T is the quaternion algebra.
> ChangeTensorCategory(~T,HomotopismCategory(2)); > N := Nucleus(T,2,1); > Dimension(N); 4 > N.1^2 eq N!-1; true > N.2^2 eq N!-1; true > N.1*N.2 eq -N.2*N.1; true
If the given tensor T is framed by K-vector spaces, then the returned tensor is framed by E-vector spaces where E is the residue field of the centroid. The returned homotopism is an isotopism of the K-tensors.
> G := ClassicalSylow( GL(3,1024), 2 ); > P := PCPresentation( UnipotentMatrixGroup(G) ); > T := pCentralTensor(P,1,1); > T; Tensor of valence 2, U2 x U1 >-> U0 U2 : Full Vector space of degree 20 over GF(2) U1 : Full Vector space of degree 20 over GF(2) U0 : Full Vector space of degree 10 over GF(2) > TC := TensorOverCentroid(T); > TC; Tensor of valence 2, U2 x U1 >-> U0 U2 : Full Vector space of degree 2 over GF(2^10) U1 : Full Vector space of degree 2 over GF(2^10) U0 : Full Vector space of degree 1 over GF(2^10) > IsAlternating(TC); true
Returns the discriminant of the bilinear map.
Returns the Pfaffian of the antisymmetric bilinear map.
> J := Matrix(GF(7),[[0,1],[-1,0]]);
> J;
[0 1]
[6 0]
> M := [ InsertBlock(ZeroMatrix(GF(7),4,4),J,i,i)
> : i in [1..3] ];
> M;
[
[0 1 0 0]
[6 0 0 0]
[0 0 0 0]
[0 0 0 0],
[0 0 0 0]
[0 0 1 0]
[0 6 0 0]
[0 0 0 0],
[0 0 0 0]
[0 0 0 0]
[0 0 0 1]
[0 0 6 0]
]
> T := Tensor(M,2,1);
> T;
Tensor of valence 2, U2 x U1 >-> U0
U2 : Full Vector space of degree 4 over GF(7)
U1 : Full Vector space of degree 4 over GF(7)
U0 : Full Vector space of degree 3 over GF(7)
> Discriminant(T);
$.1^2*$.3^2
> Pfaffian(T);
$.1*$.3