[Next][Prev] [Right] [Left] [Up] [Index] [Root]

Tensor Categories

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.

(i)
for each tensor T framed by [Uv, ..., U0], if X∈(P), then forall i, j∈X, Ui=Uj.

(ii)
Given a second tensor S framed by [Vv, ..., V0], a morphism f:T to S (Magma type Hmtp) will be a list [fv, ..., f0] of homomorphisms as follows:
(Covariant) if A(i)=1 then fi:Uito Vi;
(Constant) if A(i)=0 then Ui=Vi and fi=1Ui; or else
(Contravariant) A(i)= - 1 and fi:Ui <- Vi. So if A(0)=1 then < ∑_(i∈A - 1(1)) ui fi + ∑_(j not∈A - 1( - 1)) vj >S = < ∑_(i∈A - 1(1)) ui + ∑_(j not∈A - 1( - 1)) vj fj >T f0; if A(0)=0 then < ∑_(i∈A - 1(1)) ui fi + ∑_(j not∈A - 1( - 1)) vj >S = < ∑_(i∈A - 1(1)) ui + ∑_(j not∈A - 1( - 1)) vj fj >T; else A(0)= - 1 and < ∑_(i∈A - 1(1)) ui fi + ∑_(j not∈A - 1( - 1)) vj >S f0 = < ∑_(i∈A - 1(1)) ui + ∑_(j not∈A - 1( - 1)) vj fj >T.

Magma manages internally the differences between vectors and covectors and more generally tensors and cotensors. Both types are issued the Magma type TenSpcElt. For operations sensitive to the difference, Magma stores a value of co/contra-variance of the tensor as a property of the tensor category. This the third general property stored in Magma's tensor category type TenCat.

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).

Subsections

Creating Tensor Categories

TensorCategory(A, P) : [RngIntElt], SetEnum -> TenCat
TensorCategory(A, P) : Map, SetEnum -> TenCat
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.
CotensorCategory(A, P) : [RngIntElt], SetEnum -> TenCat
CotensorCategory(A, P) : Map, SetEnum -> TenCat
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.
HomotopismCategory(v : parameters) : RngIntElt -> TenCat
    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.
CohomotopismCategory(v) : RngIntElt -> TenCat
Returns the cohomotopism category -- all domain modules categories are covariant, the codomain is contravariant, and no duplicates considered.
AdjointCategory(v, s, t) : RngIntElt, RngIntElt, RngIntElt -> TenCat
LinearCategory(v, s, t) : RngIntElt, RngIntElt, RngIntElt -> TenCat
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.

Example Multilinear_TenCat_Const (H61E28)

> 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)

Operations on Tensor Categories

We have basic operations for tensor categories.

C1 eq C2 : TenCat, TenCat -> BoolElt
Decides if the tensor categories are the same.
Valence(C) : TenCat -> RngIntElt
Returns the valence of the tensor category.
Arrows(C) : TenCat -> SeqEnum
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.
RepeatPartition(C) : TenCat -> SetEnum
Returns the repeat partition for the tensor category.
IsCovariant(C) : TenCat -> BoolElt
IsContravariant(C) : TenCat -> BoolElt
Decides if the tensor category is covariant or contravariant.

Example Multilinear_TenCat_Prop (H61E29)

> 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 ]

Categorical Operations

Categorical Operations on Tensors

We include functions defined for the category of tensors. Most functions are currently defined only for Albert's homotopism category.

Subtensor(T, S) : TenSpcElt, List -> TenSpcElt
Returns the smallest submap of T containing S.
Subtensor(T, D, C) : TenSpcElt, List, Any -> TenSpcElt
Returns the smallest submap of T containing D in the domain and C in the codomain.
IsSubtensor(T, S) : TenSpcElt, TenSpcElt -> BoolElt
Decides whether S is a subtensor of T.
LocalIdeal(T, S, I) : TenSpcElt, List, RngIntElt -> TenSpcElt
Returns the local ideal of T at I constaining S.
LocalIdeal(T, D, C, I) : TenSpcElt, List, Any, RngIntElt -> TenSpcElt
Returns the local ideal of T at I constaining D in the domain and C in the codomain.
LocalIdeal(T, S, I) : TenSpcElt, TenSpcElt, RngIntElt -> TenSpcElt
Returns the local ideal of T at I constaining S as a submap.
IsLocalIdeal(T, S, I) : TenSpcElt, TenSpcElt, RngIntElt -> BoolElt
Decides if S is a local ideal of T at I.
Ideal(T, S) : TenSpcElt, List -> TenSpcElt
Returns the ideal of T containing S.
Ideal(T, D, C) : TenSpcElt, List, Any -> TenSpcElt
Returns the ideal of T containing D in the domain and C in the codomain.
Ideal(T, S) : TenSpcElt, TenSpcElt -> TenSpcElt
Returns the ideal of T containing S as a submap.
IsIdeal(T, S) : TenSpcElt, TenSpcElt -> BoolElt
Decides if S is an ideal of T.
LocalQuotient(T, S, I : parameters) : TenSpcElt, TenSpcElt, RngIntElt -> TenSpcElt, Hmtp
    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.
Quotient(T, S : parameters) : TenSpcElt, TenSpcElt -> TenSpcElt, Hmtp
    Check: BoolElt                      Default: true
T / S : TenSpcElt, TenSpcElt -> TenSpcElt, Hmtp
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.

Example Multilinear_Ten_Cat_Ops (H61E30)

> 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);
true
Now 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);
true
Finally, 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)

Categorical Operations on Tensor Spaces

We have categorical notions for tensor spaces as well.

SubtensorSpace(T, L) : TenSpc, [TenSpcElt] -> TenSpc
Returns the subtensor space of T generated by the tensors in the sequence L.
SubtensorSpace(T, t) : TenSpc, TenSpcelt -> TenSpc
Returns the subtensor space of T generated by the tensor t.
IsSubtensorSpace(T, S) : TenSpc, TenSpc -> BoolElt
Decides if the tensor space S is a subtensor space of T.
Quotient(T, S) : TenSpc, TenSpc -> TenSpc
T / S : TenSpc, TenSpc -> TenSpc
Returns the quotient tensor space of T by S.

Example Multilinear_TenSpc_Cat_Ops (H61E31)

> 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]
]

Homotopisms

Magma provides functions for homotopisms. Homotopisms are also equipped with a tensor category.

Constructions of Homotopisms
Homotopism(T, S, M) : TenSpcElt, TenSpcElt, List -> Hmtp
Homotopism(T, S, M, C) : TenSpcElt, TenSpcElt, List, TenCat -> Hmtp
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.

Example Multilinear_Hmtp_Const (H61E32)

> 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]

Basic Operations with Homotopisms

We provide some operations for homotopisms.

H1 * H2 : Hmtp, Hmtp -> Hmtp
Returns the composition of the homotopisms H1 and H2.
Domain(H) : Hmtp -> TenSpcElt
Returns the domain tensor of H.
Codomain(H) : Hmtp -> TenSpcElt
Returns the codomain tensor of H.
Maps(H) : Hmtp -> List
Returns the of maps for the various modules in the domain and codomain tensors.
TensorCategory(H) : Hmtp -> TenCat
Returns the tensor category of H.
ChangeTensorCategory(H, C) : Hmtp, TenCat -> Hmtp
ChangeTensorCategory( H, C) : Hmtp, TenCat ->
Changes the tensor category of H to the given category.
Kernel(H) : Hmtp -> TenSpcElt
Returns the kernel of H as an ideal of its domain tensor.
Image(H) : Hmtp -> TenSpcElt
Returns the image of H as a submap of the codomain tensor.

Example Multilinear_Hmtp_Ops (H61E33)

> 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)

 [Next][Prev] [Right] [Left] [Up] [Index] [Root]

Version: V2.25 of Tue Dec 3 10:52:18 AEDT 2019