Magma allows tensors and tensor spaces to change categories. Unless a user specifies otherwise, all tensors are assigned a category that is natural to the method by which it was created. For example a tensor created from an algebra will be assigned an algebra category, whereas a tensor created by structure constants will be assigned the Albert homotopism category. Tensor categories influence the behavior of commands such as kernels and images as well as the algebraic invariants such as derivation algebras of a tensor.
Our conventions follow [Wil13]. In particular given a tensor T framed by [Uv, ..., U0] then a tensor category for T will specify a function A:{0 ... v}to {-1, 0, 1} along with a partition (P) of {0, ..., v} such that the following rules apply to the tensors and morphisms in the category.
We use the phrase tensor category exclusively for categories that describe tensors and tensor spaces. In other words, the data structure of a tensor category is a function A:{0, ..., v} -> {-1, 0, 1} and a partition P of {0, ..., v}. It is useful to distinguish from tensors and cotensors at the categorical level, so a tensor category is either covariant or contravariant as well (in the latter case, referred to as a cotensor category).
Sets up a covariant tensor space category with specified direction of arrows A, and a partition P indicating variables to be treated as equivalent. The fiber A - 1(1) denotes the covariant variables, A - 1(0) identifies the constant variables, and A - 1( - 1) marks the contra-variant variables.
Sets up a contra-variant tensor space category with specified direction of arrows A, and a partition P indicating variables to be treated as equivalent. The fiber A - 1(1) denotes the covariant variables, A - 1(0) identifies the constant variables, and A - 1( - 1) marks the contra-variant variables.
Contravariant: BoolElt Default: false
Returns Albert's homotopism category -- all modules categories are covariant and no duplicates considered. Set the optional parameter Contravariant to true to make it a cotensor category.
Returns the cohomotopism category -- all domain modules categories are covariant, the codomain is contravariant, and no duplicates considered.
Returns the tensor category where all modules are constant except in position s and t. Both s and t are in {0, ..., v}. Position s is covariant, position t is contravariant.
> Cat := TensorCategory([1,-1,0],{{0},{1},{2}});
> Cat;
Tensor category of Valence 2 (->,<-,==) ({ 1 },{ 2 },{ 0 })
>
> TS := KTensorSpace(GF(5),[5,3,4],Cat);
> TS;
Tensor space of dimension 60 over GF(5) with valence 2
U2 : Full Vector space of degree 5 over GF(5)
U1 : Full Vector space of degree 3 over GF(5)
U0 : Full Vector space of degree 4 over GF(5)
> TensorCategory(TS);
Tensor category of Valence 2 (->,<-,==) ({ 1 },{ 2 },{ 0 })
>
> IsContravariant(TS);
false
All the tensor constructors that allow a TenCat input can be used to make cotensors.
> Cat := HomotopismCategory(2 : Contravariant := true);
> Cat;
Cotensor category of valence 2 (->,->) ({ 1 },{ 2 })
> T := Tensor(GF(5),[2,2],[1..4],Cat);
> T;
Cotensor of valence 1, U2 x U1 >-> K
U2 : Full Vector space of degree 2 over GF(5)
U1 : Full Vector space of degree 2 over GF(5)
We have basic operations for tensor categories.
Decides if the tensor categories are the same.
Returns the valence of the tensor category.
Returns the sequence of arrows of the tensor category. A -1 signifies an a contravariant index, a 0 signifies a constant index, and a 1 signifies a covariant index.
Returns the repeat partition for the tensor category.
Decides if the tensor category is covariant or contravariant.
> C1 := TensorCategory([1,1,-1,1],{{0,3},{1},{2}});
> C1;
Tensor category of Valence 3 (->,->,<-,->) ({ 1 },{ 2 },
{ 0, 3 })
>
> A := map< {0..3} -> {-1,0,1} | x :-> 1 >;
> C2 := TensorCategory(A,{{0..3}});
> C2;
Tensor category of Valence 3 (->,->,->,->) ({ 0 .. 3 })
>
> C1 eq C2;
false
> RepeatPartition(C2);
{ 0 .. 3 }
> Valence(C2);
3
> Arrows(C2);
[ 1, 1, 1, 1 ]
We include functions defined for the category of tensors. Most functions are currently defined only for Albert's homotopism category.
Returns the smallest submap of T containing S.
Returns the smallest submap of T containing D in the domain and C in the codomain.
Decides whether S is a subtensor of T.
Returns the local ideal of T at I constaining S.
Returns the local ideal of T at I constaining D in the domain and C in the codomain.
Returns the local ideal of T at I constaining S as a submap.
Decides if S is a local ideal of T at I.
Returns the ideal of T containing S.
Returns the ideal of T containing D in the domain and C in the codomain.
Returns the ideal of T containing S as a submap.
Decides if S is an ideal of T.
Check: BoolElt Default: true
Returns the local quotient of T by S at I. If you know S is a local ideal of T at I, set Check to false to skip the verification. A homotopism is also returned, mapping from T to T/S.
Check: BoolElt Default: true
Returns the quotient of T by S. If you know S is an ideal of T, set Check to false to skip the verification. A homotopism is also returned, mapping from T to T/S.
> T := RandomTensor(GF(5),[4,4,2]); > T := RandomTensor(GF(5),[4,4,2]); > T; Tensor of valence 2, U2 x U1 >-> U0 U2 : Full Vector space of degree 4 over GF(5) U1 : Full Vector space of degree 4 over GF(5) U0 : Full Vector space of degree 2 over GF(5) > > F := Frame(T); > L := [* F[1]![1,1,1,0], F[2]![0,0,0,1], F[3]![0,0] *]; > S := Subtensor(T,L); > S; Tensor of valence 2, U2 x U1 >-> U0 U2 : Vector space of degree 4, dimension 1 over GF(5) Generators: (1 1 1 0) Echelonized basis: (1 1 1 0) U1 : Vector space of degree 4, dimension 1 over GF(5) Generators: (0 0 0 1) Echelonized basis: (0 0 0 1) U0 : Vector space of degree 2, dimension 1 over GF(5) Generators: (0 2) Echelonized basis: (0 1) > > IsSubtensor(T,S); trueNow we construct the ideal of T containing S.
> I := Ideal(T,S); > I; Tensor of valence 2, U2 x U1 >-> U0 U2 : Vector space of degree 4, dimension 1 over GF(5) Generators: (1 1 1 0) Echelonized basis: (1 1 1 0) U1 : Vector space of degree 4, dimension 1 over GF(5) Generators: (0 0 0 1) Echelonized basis: (0 0 0 1) U0 : Full Vector space of degree 2 over GF(5) Generators: (1 0) (0 1) > > IsIdeal(T,I); trueFinally, we construct the quotient of T by I.
> T/I; Tensor of valence 2, U2 x U1 >-> U0 U2 : Full Vector space of degree 3 over GF(5) U1 : Full Vector space of degree 3 over GF(5) U0 : Full Vector space of degree 0 over GF(5) Maps from U2 x U1 >-> U0 to V2 x V1 >-> V0. U2 -> V2: Mapping from: Full Vector space of degree 4 over GF(5) to Full Vector space of degree 3 over GF(5) U1 -> V1: Mapping from: Full Vector space of degree 4 over GF(5) to Full Vector space of degree 3 over GF(5) U0 -> V0: Mapping from: Full Vector space of degree 2 over GF(5) to Full Vector space of degree 0 over GF(5)
We have categorical notions for tensor spaces as well.
Returns the subtensor space of T generated by the tensors in the sequence L.
Returns the subtensor space of T generated by the tensor t.
Decides if the tensor space S is a subtensor space of T.
Returns the quotient tensor space of T by S.
> T := KTensorSpace(GF(2),[4,4,2]);
> T;
Tensor space of dimension 32 over GF(2) with valence 2
U2 : Full Vector space of degree 4 over GF(2)
U1 : Full Vector space of degree 4 over GF(2)
U0 : Full Vector space of degree 2 over GF(2)
>
> L := [ T.i : i in [1..Ngens(T)] | IsEven(i) ];
> S := SubtensorSpace(T, L);
> S;
Tensor space of dimension 16 over GF(2) with valence 2
U2 : Full Vector space of degree 4 over GF(2)
U1 : Full Vector space of degree 4 over GF(2)
U0 : Full Vector space of degree 2 over GF(2)
> SystemOfForms(Random(S));
[
[0 0 0 0]
[0 0 0 0]
[0 0 0 0]
[0 0 0 0],
[1 0 0 0]
[0 1 0 1]
[1 0 0 0]
[0 0 1 0]
]
Now we compute the quotient tensor space Q=T/S.
> Q := T/S;
> Q;
Tensor space of dimension 16 over GF(2) with valence 2
U2 : Full Vector space of degree 4 over GF(2)
U1 : Full Vector space of degree 4 over GF(2)
U0 : Full Vector space of degree 2 over GF(2)
> SystemOfForms(Random(Q));
[
[0 0 0 0]
[1 1 1 0]
[1 0 1 1]
[1 1 0 1],
[0 0 0 0]
[0 0 0 0]
[0 0 0 0]
[0 0 0 0]
]
> SystemOfForms(Q![1 : i in [1..32]]);
[
[1 1 1 1]
[1 1 1 1]
[1 1 1 1]
[1 1 1 1],
[0 0 0 0]
[0 0 0 0]
[0 0 0 0]
[0 0 0 0]
]
Magma provides functions for homotopisms. Homotopisms are also equipped with a tensor category.
Returns the homotopism from T to S given by the list of maps M and the category C. The default tensor category is the same as tensor categories for T and S.
> TS := KTensorSpace(GF(4),[2,3,4]); > T := Random(TS); > S := Random(TS); > M := [* Random(KMatrixSpace(GF(4),i,i)) : i in [2..4] *]; > H := Homotopism(T,S,M); > H; Maps from U2 x U1 >-> U0 to V2 x V1 >-> V0. U2 -> V2: [ 1 0] [ 0 0] U1 -> V1: [ 0 $.1 $.1^2] [ 1 1 $.1] [ $.1 $.1 $.1^2] U0 -> V0: [ 1 1 $.1 $.1^2] [ 0 1 $.1^2 $.1] [ 0 0 $.1 $.1^2] [ $.1 $.1^2 $.1 0] > > > M[2] := map< Frame(TS)[2] -> Frame(TS)[2] | x :-> x >; > H2 := Homotopism(T,S,M); > H2; Maps from U2 x U1 >-> U0 to V2 x V1 >-> V0. U2 -> V2: [ 1 0] [ 0 0] U1 -> V1: Mapping from: Full Vector space of degree 3 over GF(2^2) to Full Vector space of degree 3 over GF(2^2) given by a rule [no inverse] U0 -> V0: [ 1 1 $.1 $.1^2] [ 0 1 $.1^2 $.1] [ 0 0 $.1 $.1^2] [ $.1 $.1^2 $.1 0]
We provide some operations for homotopisms.
Returns the composition of the homotopisms H1 and H2.
Returns the domain tensor of H.
Returns the codomain tensor of H.
Returns the of maps for the various modules in the domain and codomain tensors.
Returns the tensor category of H.
Changes the tensor category of H to the given category.
Returns the kernel of H as an ideal of its domain tensor.
Returns the image of H as a submap of the codomain tensor.
> T := RandomTensor(GF(7),[5,4,3]); > F := Frame(T); > > I := [* hom< F[j] -> F[j] | [< F[j].i,F[j].i > : > i in [1..Dimension(F[j])]] > : j in [1..3] *]; > H := Homotopism(T,T,I); > > Image(H); Tensor of valence 2, U2 x U1 >-> U0 U2 : Full Vector space of degree 5 over GF(7) U1 : Full Vector space of degree 4 over GF(7) U0 : Full Vector space of degree 3 over GF(7) > Kernel(H); Tensor of valence 2, U2 x U1 >-> U0 U2 : Vector space of degree 5, dimension 0 over GF(7) U1 : Vector space of degree 4, dimension 0 over GF(7) U0 : Vector space of degree 3, dimension 0 over GF(7)If the tensor is over vector spaces, then matrices can be used to create a homotopism.
> M := [* RandomMatrix(GF(7),i,i) : i in [5,4,3] *]; > G := Homotopism(T,T,M); > G; Maps from U2 x U1 >-> U0 to V2 x V1 >-> V0. U2 -> V2: [5 3 6 0 4] [6 0 0 1 1] [6 4 3 1 5] [3 4 6 1 4] [2 4 1 3 2] U1 -> V1: [5 5 0 3] [3 5 1 3] [3 6 1 5] [2 3 5 4] U0 -> V0: [6 4 1] [2 6 5] [1 2 3]Homotopisms can be composed so long as Magma can compose each of the individual maps.
> G*G; Maps from U2 x U1 >-> U0 to V2 x V1 >-> V0. U2 -> V2: [3 6 3 0 5] [0 5 1 4 2] [1 5 0 2 1] [2 4 4 2 2] [4 2 0 0 5] U1 -> V1: [4 3 6 0] [4 6 0 6] [4 3 4 3] [0 4 0 0] U0 -> V0: [3 1 1] [1 5 5] [6 1 6]We can change the underlying category for the homotopism G to get a different morphism.
> Cat := TensorCategory([1,-1,1],{{0},{1},{2}});
> G := Homotopism(T,T,M,Cat);
> G;
Maps from U2 x U1 >-> U0 to V2 x V1 >-> V0.
U2 -> V2:
[5 3 6 0 4]
[6 0 0 1 1]
[6 4 3 1 5]
[3 4 6 1 4]
[2 4 1 3 2]
U1 <- V1:
[5 5 0 3]
[3 5 1 3]
[3 6 1 5]
[2 3 5 4]
U0 -> V0:
[6 4 1]
[2 6 5]
[1 2 3]
>
> Image(G);
Tensor of valence 2, U2 x U1 >-> U0
U2 : Full Vector space of degree 5 over GF(7)
U1 : Vector space of degree 4, dimension 0 over GF(7)
U0 : Vector space of degree 3, dimension 2 over GF(7)
Echelonized basis:
(1 0 4)
(0 1 3)
>
> Kernel(G);
Tensor of valence 2, U2 x U1 >-> U0
U2 : Vector space of degree 5, dimension 0 over GF(7)
U1 : Full Vector space of degree 4 over GF(7)
U0 : Vector space of degree 3, dimension 1 over GF(7)
Echelonized basis:
(1 4 0)