Introduction

This chapter discusses Magma operations with multilinear algebra. The notation follows [FMW19] closely and can be viewed as companion literature. Wherever possible we follow the conventions in use in physics [Wey50, Chapter V], differential geometry [Lee13, Chapter 10], and algebra [Lan12]. Necessary categorical formalism is drawn largely from [Wil13]. The package covers:

(1)
Tensors and multilinear functions and their associated groups and algebras.
(2)
Spaces of tensors.
(3)
Categories of tensors and tensor spaces.
(4)
Linear invariants of tensors.

Contents

Overview

We set up some notation used throughout. Define K to be a commutative ring (typically a field), ν to be a nonnegative integer, and a sequence of right K-modules U0, ..., Uν. Set [ν]={0, ..., ν}, and for a subset A⊂[ν], let bar(A)=[ν] - A. Let oslasha∈[ν] Ua denote the set of multilinear maps Uν x ... U1 ↣ U0. Here, we use ↣ exclusively for multilinear maps.

A tensor space T is a K-module equipped with a monomorphism < .| : T -> oslasha∈[ν]Ua. Tensors are elements of T, (Uν, ..., U0) is the frame, and ν + 1 is the valence. In Dirac styled < t| "bra t" and |u > "ket u" notation, we evaluate < t | ∈oslasha∈[ν]Ua on inputs |u >=|uν, ..., u1 >∈Uν x ... x U1 denote < t | u > or < t | uν, ..., u1 >.

The module U0 is reserved for the codomain which in turn makes reverse indexing the simplest notation. Every tensor in Magma is treated as an element of a tensor space which is, by default, a universal tensor space: oslasha∈[ν] Ua = homK(Uν, ..., homK(U1, U0) ... ). In Magma, the tensor space determines the associated multilinear function of a given tensor T. Evaluation of T mimics the application of a map Uv x ... x U1to U0, for instance,

> <u_v, ..., u_1> @ T;
Special attention is given to bilinear maps *:U2 x U1 ↣ U0 including the ability to use infix notation u_2 * u_1. Tensor spaces have type TenSpc and behave like modules in that they have subspaces and quotient spaces. Tensors have type TenSpcElt and behave in a similar way to Magma matrices.

A library of commonly used exceptional tensors is provided. These include octonion algebras and exceptional Jordan algebras.

Tensor categories, type TenCat, provide Magma with the information needed to interpret the contents of a tensor space. For example, one tensor category may treat a (d x d)-matrix F over a field K as a linear map Kdto Kd, while another assigns the same matrix to a bilinear form Kd x Kd ↣ K. Functors are provided to change tensor categories and to define standard categories.

Verbose Printing

The string "TensorSpace" and an integer, either 0 or 1, is now acceptable input to SetVerbose. Level 0 turns off printing, and level 1 turns it on.

Example Multilinear_VerbosePrinting (H62E1)

We demonstrate the verbose printing. Currently, we only have verbose printing when we solve linear systems. To turn on all the printing statements, set "TensorSpace" to 1.
> SetVerbose("TensorSpace", 1);
>
> t := RandomTensor(GF(2), [32, 32, 32]);
> D := DerivationAlgebra(t);
Construting a 3072 by 32768 matrix over Finite field of size 2.
Adding in possible fusion data.
Computing the nullspace of a 3072 by 32768 matrix.
T : Magma;
S : Magma;
C : Magma;
Prints strings that can be executed in Magma to construct the given object. If T is a black-box tensor where structure constants cannot be computed, then the printed string is the same as print T, which cannot be executed to construct T.

Example Multilinear_PrintToString (H62E2)

We first construct a tensor category, tensor space, and a tensor contained in the tensor space.

> C := TensorCategory([1, 1, 0], {{0}, {1,2}});
> C;
Tensor category of valence 3 (->,->,==) ({ 0 },{ 1, 2 })
>
> T := KTensorSpace(GF(2), [10, 10, 2], C);
> T;
Tensor space of dimension 200 over GF(2) with valence 3
U2 : Full Vector space of degree 10 over GF(2)
U1 : Full Vector space of degree 10 over GF(2)
U0 : Full Vector space of degree 2 over GF(2)
>
> t := T![1..200];
> t;
Tensor of valence 3, U2 x U1 >-> U0
U2 : Full Vector space of degree 10 over GF(2)
U1 : Full Vector space of degree 10 over GF(2)
U0 : Full Vector space of degree 2 over GF(2)

Now we will print at "Magma" level each of the objects we created.

> C:Magma;
TensorCategory([ 1, 1, 0 ], { PowerSet(IntegerRing()) |
{ IntegerRing() | 0 },
{ IntegerRing() | 1, 2 }
})
>
> T:Magma;
TensorSpace([*VectorSpace(GF(2), 10), VectorSpace(GF(2), 10),
VectorSpace(GF(2),2)*], TensorCategory([ 1, 1, 0 ], {
PowerSet(IntegerRing()) |
{ IntegerRing() | 0 },
{ IntegerRing() | 1, 2 }
}))
>
> t:Magma;
Tensor(GF(2), [ 10, 10, 2 ], [ GF(2) | 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0 ], TensorCategory([ 1, 1, 0 ], { PowerSet(IntegerRing()) |
{ IntegerRing() | 0 },
{ IntegerRing() | 1, 2 }
}))
V2.28, 13 July 2023