# Multilinear Algebra

- [Introduction](intro.md)

  - [Overview](intro.md#overview)

  - [Verbose Printing](intro.md#verbose-printing)

    - [`Example: Verbose Printing`](intro.md#example-ex-18db1e)

    - [`T : Magma;`](intro.md#literal-literal-t-magma)

    - [`S : Magma;`](intro.md#literal-literal-s-magma)

    - [`C : Magma;`](intro.md#literal-literal-c-magma)

    - [`Example: Print To String`](intro.md#example-ex-525a77)

- [Tensors](tensors.md)

  - [Creating Tensors](tensors.md#creating-tensors)

    - [Black-box Tensors](tensors.md#black-box-tensors)

      - [`Tensor(S, F): SeqEnum, UserProgram → TenSpcElt, List`](tensors.md#function-tensor-seqenum-userprogram)

      - [`Tensor(S, F): List, UserProgram → TenSpcElt, List`](tensors.md#function-tensor-list-userprogram)

      - [`Tensor(S, F, Cat): SeqEnum, UserProgram, TenCat → TenSpcElt, List`](tensors.md#function-tensor-seqenum-userprogram-tencat)

      - [`Tensor(S, F, Cat): List, UserProgram, TenCat → TenSpcElt, List`](tensors.md#function-tensor-list-userprogram-tencat)

      - [`Example: BB Tensors Frame`](tensors.md#example-ex-cdbf81)

      - [`Example: BB Cross Product`](tensors.md#example-ex-82ef8c)

      - [`Tensor(D, C, F): SeqEnum, Any, UserProgram → TenSpcElt, List`](tensors.md#function-tensor-seqenum-any-userprogram)

      - [`Tensor(D, C, F): List, Any, UserProgram → TenSpcElt, List`](tensors.md#function-tensor-list-any-userprogram)

      - [`Tensor(D, C, F, Cat): SeqEnum, Any, UserProgram, TenCat → TenSpcElt, List`](tensors.md#function-tensor-seqenum-any-userprogram-tencat)

      - [`Tensor(D, C, F, Cat): List, Any, UserProgram, TenCat → TenSpcElt, List`](tensors.md#function-tensor-list-any-userprogram-tencat)

      - [`Example: BB Triple Product`](tensors.md#example-ex-e475ab)

    - [Tensors with Structure Constant Sequences](tensors.md#tensors-with-structure-constant-sequences)

      - [`Tensor(D, S): [RngIntElt], SeqEnum → TenSpcElt`](tensors.md#function-tensor-rngintelt-seqenum)

      - [`Tensor(R, D, S): Rng, [RngIntElt], SeqEnum → TenSpcElt`](tensors.md#function-tensor-rng-rngintelt-seqenum)

      - [`Tensor(D, S, Cat): [RngIntElt], SeqEnum, TenCat → TenSpcElt`](tensors.md#function-tensor-rngintelt-seqenum-tencat)

      - [`Tensor(R, D, S, Cat): Rng, [RngIntElt], SeqEnum, TenCat → TenSpcElt`](tensors.md#function-tensor-rng-rngintelt-seqenum-tencat)

      - [`Example: SC Tensors`](tensors.md#example-ex-3135bc)

      - [`StructureConstants(T): TenSpcElt → SeqEnum`](tensors.md#function-structureconstants-tenspcelt)

      - [`Eltseq(T): TenSpcElt → SeqEnum`](tensors.md#function-eltseq-tenspcelt)

      - [`Assign(T, ind, k): TenSpcElt, [RngIntElt], Any → TenSpcElt`](tensors.md#function-assign-tenspcelt-rngintelt-any)

      - [`Assign(~T, ind, k): TenSpcElt, [RngIntElt], Any`](tensors.md#function-assign-tenspcelt-rngintelt-any-ref)

      - [`Example: SC From BB Tensors`](tensors.md#example-ex-73e82c)

      - [`Example: SC Stored`](tensors.md#example-ex-80fd79)

    - [Bilinear Tensors](tensors.md#bilinear-tensors)

      - [`Tensor(M, s, t): [Mtrx], RngIntElt, RngIntElt → TenSpcElt`](tensors.md#function-tensor-mtrx-rngintelt-rngintelt)

      - [`Tensor(M, s, t, C): [Mtrx], RngIntElt, RngIntElt, TenCat → TenSpcElt`](tensors.md#function-tensor-mtrx-rngintelt-rngintelt-tencat)

      - [`Example: Symplectic Form`](tensors.md#example-ex-be1f50)

      - [`AsMatrices(T, s, t): TenSpcElt, RngIntElt, RngIntElt → SeqEnum`](tensors.md#function-asmatrices-tenspcelt-rngintelt-rngintelt)

      - [`SystemOfForms(T): TenSpcElt → SeqEnum`](tensors.md#function-systemofforms-tenspcelt)

      - [`Example: Trilinear As Mats`](tensors.md#example-ex-1d87b3)

    - [Tensors from Algebraic Objects](tensors.md#tensors-from-algebraic-objects)

      - [`Tensor(A): Alg → TenSpcElt, Map`](tensors.md#function-tensor-alg)

      - [`Example: D4Lie Algebra`](tensors.md#example-ex-17021d)

      - [`Tensor(Q): RngUPolRes → TenSpcElt, Map`](tensors.md#function-tensor-rngupolres)

      - [`Example: Witt Algebra`](tensors.md#example-ex-3ead54)

      - [`CommutatorTensor(A): Alg → TenSpcElt, Map`](tensors.md#function-commutatortensor-alg)

      - [`AnticommutatorTensor(A): Alg → TenSpcElt, Map`](tensors.md#function-anticommutatortensor-alg)

      - [`Example: Commutator From Algebra`](tensors.md#example-ex-ad0163)

      - [`Example: Matrix Jordan Algebra`](tensors.md#example-ex-b964df)

      - [`AssociatorTensor(A): Alg → TenSpcElt, Map`](tensors.md#function-associatortensor-alg)

      - [`Example: Associator From Algebra`](tensors.md#example-ex-4acc3b)

      - [`pCentralTensor(G, p, s, t): Grp, RngIntElt, RngIntElt, RngIntElt → TenSpcElt, List`](tensors.md#function-pcentraltensor-grp-rngintelt-rngintelt-rngintelt)

      - [`pCentralTensor(G, s, t): GrpPC, RngIntElt, RngIntElt → TenSpcElt, List`](tensors.md#function-pcentraltensor-grppc-rngintelt-rngintelt)

      - [`pCentralTensor(G, s, t): Grp, RngIntElt, RngIntElt → TenSpcElt, List`](tensors.md#function-pcentraltensor-grp-rngintelt-rngintelt)

      - [`pCentralTensor(G): Grp → TenSpcElt, List`](tensors.md#function-pcentraltensor-grp)

      - [`Example: Tensor P Group`](tensors.md#example-ex-94b48f)

      - [`MatrixTensor(K, S): Fld, [RngIntElt] → TenSpcElt, List`](tensors.md#function-matrixtensor-fld-rngintelt)

      - [`Polarisation(f): MPolElt → TenSpcElt, MPolElt`](tensors.md#function-polarisation-mpolelt)

      - [`Polarisation(f): RngUPolElt → TenSpcElt`](tensors.md#function-polarisation-rngupolelt)

      - [`Polarization(f): MPolElt → TenSpcElt, MPolElt`](tensors.md#function-polarization-mpolelt)

      - [`Polarization(f): RngUPolElt → TenSpcElt`](tensors.md#function-polarization-rngupolelt)

      - [`Example: Tensor Polarization`](tensors.md#example-ex-794950)

    - [New Tensors from Old](tensors.md#new-tensors-from-old)

      - [`AlternatingTensor(T): TenSpcElt → TenSpcElt`](tensors.md#function-alternatingtensor-tenspcelt)

      - [`AntisymmetricTensor(T): TenSpcElt → TenSpcElt`](tensors.md#function-antisymmetrictensor-tenspcelt)

      - [`SymmetricTensor(T): TenSpcElt → TenSpcElt`](tensors.md#function-symmetrictensor-tenspcelt)

      - [`Example: Alternating Tensor`](tensors.md#example-ex-3641e3)

      - [`Example: Make Symmetric`](tensors.md#example-ex-73d5eb)

      - [`Shuffle(T, g): TenSpcElt, GrpPermElt → TenSpcElt`](tensors.md#function-shuffle-tenspcelt-grppermelt)

      - [`Shuffle(T, g): TenSpcElt, SeqEnum → TenSpcElt`](tensors.md#function-shuffle-tenspcelt-seqenum)

      - [`Example: Shuffle To Transpose`](tensors.md#example-ex-e67343)

      - [`Example: Shuffling`](tensors.md#example-ex-ae928f)

      - [`TensorProduct(t, s): TenSpcElt, TenSpcElt → TenSpcElt`](tensors.md#function-tensorproduct-tenspcelt-tenspcelt)

  - [Operations with Tensors](tensors.md#operations-with-tensors)

    - [Elementary Operations](tensors.md#elementary-operations)

      - [`S + T: TenSpcElt, TenSpcElt → TenSpcElt`](tensors.md#operation-op-plus-tenspcelt-tenspcelt)

      - [`S - T: TenSpcElt, TenSpcElt → TenSpcElt`](tensors.md#operation-op-minus-tenspcelt-tenspcelt)

      - [`k * T: RngElt, TenSpcElt → TenSpcElt`](tensors.md#operation-op-times-rngelt-tenspcelt)

      - [`-T: TenSpcElt → TenSpcElt`](tensors.md#operation-operation-tenspcelt-tenspcelt)

      - [`Example: Module Operations`](tensors.md#example-ex-ce9931)

      - [`AssociatedForm(T): TenSpcElt → TenSpcElt`](tensors.md#function-associatedform-tenspcelt)

      - [`Compress(T): TenSpcElt → TenSpcElt`](tensors.md#function-compress-tenspcelt)

      - [`Compress(~T): TenSpcElt`](tensors.md#function-compress-tenspcelt-ref)

      - [`Example: Compress Assoc Form`](tensors.md#example-ex-9d2ed1)

    - [General Properties](tensors.md#general-properties)

      - [`Parent(T): TenSpcElt → TenSpc`](tensors.md#function-parent-tenspcelt)

      - [`Domain(T): TenSpcElt → List`](tensors.md#function-domain-tenspcelt)

      - [`Codomain(T): TenSpcElt → Any`](tensors.md#function-codomain-tenspcelt)

      - [`Valence(T): TenSpcElt → RngIntElt`](tensors.md#function-valence-tenspcelt)

      - [`Frame(T): TenSpcElt → List`](tensors.md#function-frame-tenspcelt)

      - [`BaseRing(T): TenSpcElt → Rng`](tensors.md#function-basering-tenspcelt)

      - [`BaseField(T): TenSpcElt → Fld`](tensors.md#function-basefield-tenspcelt)

      - [`Example: Basic Props`](tensors.md#example-ex-7020de)

      - [`TensorCategory(T): TenSpcElt → TenCat`](tensors.md#function-tensorcategory-tenspcelt)

      - [`ChangeTensorCategory(T, C): TenSpcElt, TenCat → TenSpcElt`](tensors.md#function-changetensorcategory-tenspcelt-tencat)

      - [`ChangeTensorCategory(~T, C): TenSpcElt, TenCat`](tensors.md#function-changetensorcategory-tenspcelt-tencat-ref)

      - [`IsCovariant(T): TenSpcElt → BoolElt`](tensors.md#function-iscovariant-tenspcelt)

      - [`IsContravariant(T): TenSpcElt → BoolElt`](tensors.md#function-iscontravariant-tenspcelt)

      - [`Example: Tensor Cat Props`](tensors.md#example-ex-bef887)

      - [`NondegenerateTensor(T): TenSpcElt → TenSpcElt, Hmtp`](tensors.md#function-nondegeneratetensor-tenspcelt)

      - [`IsNondegenerate(T): TenSpcElt → BoolElt`](tensors.md#function-isnondegenerate-tenspcelt)

      - [`IsDegenerate(T): TenSpcElt → BoolElt`](tensors.md#function-isdegenerate-tenspcelt)

      - [`Example: Nondegeneracy`](tensors.md#example-ex-f6f9ff)

      - [`Image(T): TenSpcElt → ModTupRng`](tensors.md#function-image-tenspcelt)

      - [`FullyNondegenerateTensor(T): TenSpcElt → TenSpcElt, Hmtp`](tensors.md#function-fullynondegeneratetensor-tenspcelt)

      - [`IsFullyNondegenerate(T): TenSpcElt → BoolElt`](tensors.md#function-isfullynondegenerate-tenspcelt)

      - [`Example: Fully Nondegenerate`](tensors.md#example-ex-f9b7b8)

      - [`IsAlternating(T): TenSpcElt → BoolElt`](tensors.md#function-isalternating-tenspcelt)

      - [`IsAntisymmetric(T): TenSpcElt → BoolElt`](tensors.md#function-isantisymmetric-tenspcelt)

      - [`IsSymmetric(T): TenSpcElt → BoolElt`](tensors.md#function-issymmetric-tenspcelt)

      - [`Example: Symmetric Polar`](tensors.md#example-ex-6f9baa)

    - [Tensors As Multilinear Maps](tensors.md#tensors-as-multilinear-maps)

      - [`x @ T: Tup, TenSpcElt → Any`](tensors.md#operation-operation-tup-tenspcelt-any)

      - [`Example: Multi Map Eval`](tensors.md#example-ex-be5d59)

      - [`T * f: TenSpcElt, Map → TenSpcElt`](tensors.md#operation-op-times-tenspcelt-map)

      - [`t * s: TenSpcElt, TenSpcElt → TenSpcElt`](tensors.md#operation-op-times-tenspcelt-tenspcelt)

      - [`S eq T: TenSpcElt, TenSpcElt → BoolElt`](tensors.md#operation-op-eq-tenspcelt-tenspcelt)

      - [`Example: Tensor Comp`](tensors.md#example-ex-0a17aa)

    - [Operations with Bilinear Maps](tensors.md#operations-with-bilinear-maps)

      - [`x * T: Any, TenSpcElt → Any`](tensors.md#operation-op-times-any-tenspcelt)

      - [`T * y: TenSpcElt, Any → Any`](tensors.md#operation-op-times-tenspcelt-any)

      - [`x * T: Any, TenSpc → Any`](tensors.md#operation-op-times-any-tenspc)

      - [`T * y: TenSpc, Any → Any`](tensors.md#operation-op-times-tenspc-any)

      - [`Example: Bimap Infix`](tensors.md#example-ex-4ade75)

      - [`x * y: BmpUElt, BmpVElt → Any`](tensors.md#operation-op-times-bmpuelt-bmpvelt)

      - [`x * y: BmpU, BmpV → Any`](tensors.md#operation-op-times-bmpu-bmpv)

      - [`x * y: BmpUElt, BmpV → Any`](tensors.md#operation-op-times-bmpuelt-bmpv)

      - [`x * y: BmpU, BmpVElt → Any`](tensors.md#operation-op-times-bmpu-bmpvelt)

      - [`LeftDomain(B): TenSpcElt → BmpU`](tensors.md#function-leftdomain-tenspcelt)

      - [`RightDomain(B): TenSpcElt → BmpV`](tensors.md#function-rightdomain-tenspcelt)

      - [`IsCoercible(U,x): BmpU, Any → BoolElt, BmpUElt`](tensors.md#function-iscoercible-bmpu-any)

      - [`IsCoercible(V,x): BmpV, Any → BoolElt, BmpVElt`](tensors.md#function-iscoercible-bmpv-any)

      - [`U ! x: BmpU, Any → BmpUElt`](tensors.md#operation-op-bmpu-any)

      - [`V ! x: BmpV, Any → BmpVElt`](tensors.md#operation-op-bmpv-any)

      - [`Example: Bimap Product`](tensors.md#example-ex-90f3f7)

      - [`Parent(x): BmpUElt → BmpU`](tensors.md#function-parent-bmpuelt)

      - [`Parent(x): BmpVElt → BmpV`](tensors.md#function-parent-bmpvelt)

      - [`Parent(X): BmpU → TenSpcElt`](tensors.md#function-parent-bmpu)

      - [`Parent(X): BmpV → TenSpcElt`](tensors.md#function-parent-bmpv)

      - [`u1 eq u2: BmpUElt, BmpUElt → BoolElt`](tensors.md#operation-op-eq-bmpuelt-bmpuelt)

      - [`v1 eq v2: BmpUElt, BmpUElt → BoolElt`](tensors.md#operation-op-eq-bmpuelt-bmpuelt-2)

      - [`U1 eq U2: BmpU, BmpU → BoolElt`](tensors.md#operation-op-eq-bmpu-bmpu)

      - [`V1 eq V2: BmpV, BmpV → BoolElt`](tensors.md#operation-op-eq-bmpv-bmpv)

      - [`Example: Bimap Product2`](tensors.md#example-ex-77d198)

    - [Manipulating Tensor Data](tensors.md#manipulating-tensor-data)

      - [`Slice(T, grid): TenSpcElt, [SetEnum] → SeqEnum`](tensors.md#function-slice-tenspcelt-setenum)

      - [`InducedTensor(T, grid): TenSpcElt, [SetEnum] → TenSpcElt`](tensors.md#function-inducedtensor-tenspcelt-setenum)

      - [`Example: Tensor Slicing`](tensors.md#example-ex-ff7268)

      - [`SliceAsMatrices(T, grid, a, b): TenSpcElt, [SetEnum], RngIntElt, RngIntElt → SeqEnum`](tensors.md#function-sliceasmatrices-tenspcelt-setenum-rngintelt-rngintelt)

      - [`Example: Slice As Matrices`](tensors.md#example-ex-436f03)

      - [`Foliation(T, i): TenSpcElt, RngIntElt → Mtrx`](tensors.md#function-foliation-tenspcelt-rngintelt)

      - [`Example: Exfoliate Foliation`](tensors.md#example-ex-c6ce4b)

      - [`AsTensorSpace(T, i): TenSpcElt, RngIntElt → TenSpc, Mtrx`](tensors.md#function-astensorspace-tenspcelt-rngintelt)

      - [`AsCotensorSpace(T): TenSpcElt → TenSpc, Mtrx`](tensors.md#function-ascotensorspace-tenspcelt)

      - [`Example: Tensors To Spaces`](tensors.md#example-ex-8523ef)

      - [`AsTensor(S): TenSpc → TenSpcElt`](tensors.md#function-astensor-tenspc)

      - [`Example: Spaces To Tensors`](tensors.md#example-ex-a38c03)

  - [Invariants of Tensors](tensors.md#invariants-of-tensors)

    - [`Induce(X, i): AlgMat, RngIntElt → Map, AlgMat`](tensors.md#function-induce-algmat-rngintelt)

    - [`Induce(X, i): AlgMatLie, RngIntElt → Map, AlgMatLie`](tensors.md#function-induce-algmatlie-rngintelt)

    - [`Induce(X, i): GrpMat, RngIntElt → Map, GrpMat`](tensors.md#function-induce-grpmat-rngintelt)

    - [`Example: Inducing`](tensors.md#example-ex-4be7ac)

    - [`DerivedFrom(~X, t, C, RC : parameters): Any, TenSpcElt, {RngIntElt}, {RngIntElt}`](tensors.md#function-derivedfrom-any-tenspcelt-rngintelt-rngintelt-ref)

    - [Standard Invariants](tensors.md#standard-invariants)

      - [`Radical(T, s): TenSpcElt, RngIntElt → ModTupRng`](tensors.md#function-radical-tenspcelt-rngintelt)

      - [`Radical(T): TenSpcElt → Tup`](tensors.md#function-radical-tenspcelt)

      - [`Coradical(T): TenSpcElt → ModTupRng, Map`](tensors.md#function-coradical-tenspcelt)

      - [`Example: Radicals`](tensors.md#example-ex-fef917)

      - [`Discriminant(B): TenSpcElt → RngMPolElt`](tensors.md#function-discriminant-tenspcelt)

      - [`Example: Discriminating Octonions`](tensors.md#example-ex-8de961)

      - [`Pfaffian(B): TenSpcElt → RngMPolElt`](tensors.md#function-pfaffian-tenspcelt)

      - [`Example: Genus2Pfaff`](tensors.md#example-ex-4cc2d2)

  - [Exporting Tensors](tensors.md#exporting-tensors)

    - [`HeisenbergAlgebra(T): TenSpcElt → AlgGen`](tensors.md#function-heisenbergalgebra-tenspcelt)

    - [`Example: Crafting Algebras`](tensors.md#example-ex-182a22)

    - [`HeisenbergLieAlgebra(T): TenSpcElt → AlgLie`](tensors.md#function-heisenbergliealgebra-tenspcelt)

    - [`Example: Crafting Lie Algberas`](tensors.md#example-ex-19a3f6)

    - [`HeisenbergGroup(T): TenSpcElt → GrpMat`](tensors.md#function-heisenberggroup-tenspcelt)

    - [`HeisenbergGroupPC(T): TenSpcElt → GrpPC`](tensors.md#function-heisenberggrouppc-tenspcelt)

    - [`Example: Crafting P Groups`](tensors.md#example-ex-3bc793)

    - [`Example: P Groups Half Full`](tensors.md#example-ex-ce8a17)

- [Tensor Spaces](tensor_spaces.md)

  - [Constructions of Tensor and Cotensor Spaces](tensor_spaces.md#constructions-of-tensor-and-cotensor-spaces)

    - [Universal Tensor Spaces](tensor_spaces.md#universal-tensor-spaces)

      - [`KTensorSpace(K, S): Fld, [RngIntElt] → TenSpc`](tensor_spaces.md#function-ktensorspace-fld-rngintelt)

      - [`KTensorSpace(K, S, C): Fld, [RngIntElt], TenCat → TenSpc`](tensor_spaces.md#function-ktensorspace-fld-rngintelt-tencat)

      - [`RTensorSpace(R, S): Rng, [RngIntElt] → TenSpc`](tensor_spaces.md#function-rtensorspace-rng-rngintelt)

      - [`RTensorSpace(R, S, C): Rng, [RngIntElt], TenCat → TenSpc`](tensor_spaces.md#function-rtensorspace-rng-rngintelt-tencat)

      - [`Example: Universal K Ten Spc`](tensor_spaces.md#example-ex-9c4d34)

      - [`TensorSpace(S): SeqEnum → TenSpc, List`](tensor_spaces.md#function-tensorspace-seqenum)

      - [`TensorSpace(S): List → TenSpc, List`](tensor_spaces.md#function-tensorspace-list)

      - [`TensorSpace(S, C): SeqEnum, TenCat → TenSpc, List`](tensor_spaces.md#function-tensorspace-seqenum-tencat)

      - [`TensorSpace(S, C): List, TenCat → TenSpc, List`](tensor_spaces.md#function-tensorspace-list-tencat)

      - [`Example: Universal Ten Spc`](tensor_spaces.md#example-ex-d8700c)

      - [`TensorSpace(V, p, q): ModTupFld, RngIntElt, RngIntElt → TenSpc`](tensor_spaces.md#function-tensorspace-modtupfld-rngintelt-rngintelt)

      - [`TensorSpace(K, d, p, q): Fld, RngIntElt, RngIntElt, RngIntElt → TenSpc`](tensor_spaces.md#function-tensorspace-fld-rngintelt-rngintelt-rngintelt)

      - [`Example: Signatured Ten Spc`](tensor_spaces.md#example-ex-170743)

    - [Universal Cotensor Spaces](tensor_spaces.md#universal-cotensor-spaces)

      - [`KCotensorSpace(K, S): Fld, [RngIntElt] → TenSpc`](tensor_spaces.md#function-kcotensorspace-fld-rngintelt)

      - [`KCotensorSpace(K, S, C): Fld, [RngIntElt], TenCat → TenSpc`](tensor_spaces.md#function-kcotensorspace-fld-rngintelt-tencat)

      - [`CotensorSpace(S): SeqEnum → TenSpc`](tensor_spaces.md#function-cotensorspace-seqenum)

      - [`CotensorSpace(S): List → TenSpc, List`](tensor_spaces.md#function-cotensorspace-list)

      - [`CotensorSpace(S, C): SeqEnum, TenCat → TenSpc`](tensor_spaces.md#function-cotensorspace-seqenum-tencat)

      - [`CotensorSpace(S, C): List, TenCat → TenSpc, List`](tensor_spaces.md#function-cotensorspace-list-tencat)

      - [`Example: Universal Co Ten Spc`](tensor_spaces.md#example-ex-a0d0fa)

    - [Some Standard Constructions](tensor_spaces.md#some-standard-constructions)

      - [`AlternatingSpace(T): TenSpc → TenSpc, Map`](tensor_spaces.md#function-alternatingspace-tenspc)

      - [`AntisymmetricSpace(T): TenSpc → TenSpc, Map`](tensor_spaces.md#function-antisymmetricspace-tenspc)

      - [`SymmetricSpace(T): TenSpc → TenSpc, Map`](tensor_spaces.md#function-symmetricspace-tenspc)

      - [`Example: Standard Ten Subspcs`](tensor_spaces.md#example-ex-4fe5c3)

      - [`ExteriorCotensorSpace(V, n): ModTupFld, RngIntElt → TenSpc`](tensor_spaces.md#function-exteriorcotensorspace-modtupfld-rngintelt)

      - [`SymmetricCotensorSpace(V, n): ModTupFld, RngIntElt → TenSpc`](tensor_spaces.md#function-symmetriccotensorspace-modtupfld-rngintelt)

      - [`Example: Standard Co Ten Subspcs`](tensor_spaces.md#example-ex-cd38a4)

  - [Operations on Tensor Spaces](tensor_spaces.md#operations-on-tensor-spaces)

    - [Membership and Comparison with Tensor Spaces](tensor_spaces.md#membership-and-comparison-with-tensor-spaces)

      - [`T in TS: TenSpcElt, TenSpc → BoolElt`](tensor_spaces.md#operation-op-in-tenspcelt-tenspc)

      - [`TS ! T: TenSpc, TenSpcElt → TenSpcElt`](tensor_spaces.md#operation-op-tenspc-tenspcelt)

      - [`TS ! S: TenSpc, SeqEnum → TenSpcElt`](tensor_spaces.md#operation-op-tenspc-seqenum)

      - [`T ! n: TenSpc, RngIntElt → TenSpcElt`](tensor_spaces.md#operation-op-tenspc-rngintelt)

      - [`IsCoercible(TS, x): TenSpc, Any → BoolElt, TenSpcElt`](tensor_spaces.md#function-iscoercible-tenspc-any)

      - [`Example: Coercion`](tensor_spaces.md#example-ex-e939dc)

      - [`S eq T: TenSpc, TenSpc → BoolElt`](tensor_spaces.md#operation-op-eq-tenspc-tenspc)

      - [`S subset T: TenSpc, TenSpc → BoolElt`](tensor_spaces.md#operation-op-subset-tenspc-tenspc)

      - [`IsCoercible(T, S): TenSpc, Any → BoolElt`](tensor_spaces.md#function-iscoercible-tenspc-any-2)

      - [`T ! S: TenSpc, TenSpc → TenSpc`](tensor_spaces.md#operation-op-tenspc-tenspc)

      - [`Example: Ten Spc Containment`](tensor_spaces.md#example-ex-812352)

    - [Tensor Spaces as Modules](tensor_spaces.md#tensor-spaces-as-modules)

      - [`Basis(T): TenSpc → SeqEnum`](tensor_spaces.md#function-basis-tenspc)

      - [`Generators(T): TenSpc → SeqEnum`](tensor_spaces.md#function-generators-tenspc)

      - [`T . i: TenSpc, RngIntElt → TenSpcElt`](tensor_spaces.md#operation-operation-tenspc-rngintelt-tenspcelt)

      - [`NumberOfGenerators(T): TenSpc → RngIntElt`](tensor_spaces.md#function-numberofgenerators-tenspc)

      - [`Ngens(T): TenSpc → RngIntElt`](tensor_spaces.md#function-ngens-tenspc)

      - [`Dimension(T): TenSpc → RngIntElt`](tensor_spaces.md#function-dimension-tenspc)

      - [`# T: TenSpc → RngIntElt`](tensor_spaces.md#operation-operation-tenspc-rngintelt)

      - [`Example: Basic Module`](tensor_spaces.md#example-ex-d57848)

      - [`Random(T): TenSpc → TenSpcElt`](tensor_spaces.md#function-random-tenspc)

      - [`RandomTensor(R, S): Rng, [RngIntElt] → TenSpcElt`](tensor_spaces.md#function-randomtensor-rng-rngintelt)

      - [`RandomTensor(R, S, C): Rng, [RngIntElt], TenCat → TenSpcElt`](tensor_spaces.md#function-randomtensor-rng-rngintelt-tencat)

      - [`RandomCotensor(K, S): Fld, [RngIntElt] → TenSpcElt`](tensor_spaces.md#function-randomcotensor-fld-rngintelt)

      - [`Example: Random Tensors`](tensor_spaces.md#example-ex-377558)

      - [`RandomAlternatingTensor(R, d, n, c): Rng, RngIntElt, RngIntElt, RngIntElt → TenSpcElt`](tensor_spaces.md#function-randomalternatingtensor-rng-rngintelt-rngintelt-rngintelt)

      - [`RandomAlternatingTensor(R, S): Rng, [RngIntElt] → TenSpcElt`](tensor_spaces.md#function-randomalternatingtensor-rng-rngintelt)

      - [`RandomAntisymmetricTensor(R, d, n, c): Rng, RngIntElt, RngIntElt, RngIntElt → TenSpcElt`](tensor_spaces.md#function-randomantisymmetrictensor-rng-rngintelt-rngintelt-rngintelt)

      - [`RandomAntisymmetricTensor(R, S): Rng, [RngIntElt] → TenSpcElt`](tensor_spaces.md#function-randomantisymmetrictensor-rng-rngintelt)

      - [`RandomSymmetricTensor(R, d, n, c): Rng, RngIntElt, RngIntElt, RngIntElt → TenSpcElt`](tensor_spaces.md#function-randomsymmetrictensor-rng-rngintelt-rngintelt-rngintelt)

      - [`RandomSymmetricTensor(R, S): Rng, [RngIntElt] → TenSpcElt`](tensor_spaces.md#function-randomsymmetrictensor-rng-rngintelt)

      - [`Example: Random Sym Ten`](tensor_spaces.md#example-ex-f99231)

    - [Properties of Tensor Spaces](tensor_spaces.md#properties-of-tensor-spaces)

      - [`Valence(T): TenSpc → RngIntElt`](tensor_spaces.md#function-valence-tenspc)

      - [`Frame(T): TenSpc → List`](tensor_spaces.md#function-frame-tenspc)

      - [`BaseRing(T): TenSpc → Rng`](tensor_spaces.md#function-basering-tenspc)

      - [`BaseField(T): TenSpc → Fld`](tensor_spaces.md#function-basefield-tenspc)

      - [`Example: Ten Spc Properties`](tensor_spaces.md#example-ex-40631c)

      - [`TensorCategory(T): TenSpc → TenCat`](tensor_spaces.md#function-tensorcategory-tenspc)

      - [`IsCovariant(T): TenSpc → BoolElt`](tensor_spaces.md#function-iscovariant-tenspc)

      - [`IsContravariant(T): TenSpc → BoolElt`](tensor_spaces.md#function-iscontravariant-tenspc)

      - [`ChangeTensorCategory(T, C): TenSpc, TenCat → TenSpc`](tensor_spaces.md#function-changetensorcategory-tenspc-tencat)

      - [`ChangeTensorCategory(~T, C): TenSpc, TenCat`](tensor_spaces.md#function-changetensorcategory-tenspc-tencat-ref)

      - [`Example: Ten Spc Categories`](tensor_spaces.md#example-ex-066785)

      - [`IsAlternating(T): TenSpc → BoolElt`](tensor_spaces.md#function-isalternating-tenspc)

      - [`IsAntisymmetric(T): TenSpc → BoolElt`](tensor_spaces.md#function-isantisymmetric-tenspc)

      - [`IsSymmetric(T): TenSpc → BoolElt`](tensor_spaces.md#function-issymmetric-tenspc)

      - [`UniversalTensorSpace(T): TenSpc → TenSpc`](tensor_spaces.md#function-universaltensorspace-tenspc)

      - [`UniversalCotensorSpace(T): TenSpc → TenSpc`](tensor_spaces.md#function-universalcotensorspace-tenspc)

      - [`Generic(T): TenSpc → TenSpc`](tensor_spaces.md#function-generic-tenspc)

      - [`Example: Universal Const`](tensor_spaces.md#example-ex-c56f94)

- [Tensor Categories](Tensor_categories.md)

  - [Constructing Tensor Categories](Tensor_categories.md#constructing-tensor-categories)

    - [`TensorCategory(A, P): [RngIntElt], {SetEnum} → TenCat`](Tensor_categories.md#function-tensorcategory-rngintelt-setenum)

    - [`TensorCategory(A, P): Map, {SetEnum} → TenCat`](Tensor_categories.md#function-tensorcategory-map-setenum)

    - [`CotensorCategory(A, P): [RngIntElt], {SetEnum} → TenCat`](Tensor_categories.md#function-cotensorcategory-rngintelt-setenum)

    - [`CotensorCategory(A, P): Map, {SetEnum} → TenCat`](Tensor_categories.md#function-cotensorcategory-map-setenum)

    - [`Example: Basic Cat Const`](Tensor_categories.md#example-ex-2873fe)

    - [`HomotopismCategory(v : parameters): RngIntElt → TenCat`](Tensor_categories.md#function-homotopismcategory-rngintelt)

    - [`CohomotopismCategory(v): RngIntElt → TenCat`](Tensor_categories.md#function-cohomotopismcategory-rngintelt)

    - [`AdjointCategory(v, s, t): RngIntElt, RngIntElt, RngIntElt → TenCat`](Tensor_categories.md#function-adjointcategory-rngintelt-rngintelt-rngintelt)

    - [`LinearCategory(v, s, t): RngIntElt, RngIntElt, RngIntElt → TenCat`](Tensor_categories.md#function-linearcategory-rngintelt-rngintelt-rngintelt)

    - [`Example: Ten Cat Special`](Tensor_categories.md#example-ex-f54041)

  - [Operations on Tensor Categories](Tensor_categories.md#operations-on-tensor-categories)

    - [`C1 eq C2: TenCat, TenCat → BoolElt`](Tensor_categories.md#operation-op-eq-tencat-tencat)

    - [`Valence(C): TenCat → RngIntElt`](Tensor_categories.md#function-valence-tencat)

    - [`Arrows(C): TenCat → SeqEnum`](Tensor_categories.md#function-arrows-tencat)

    - [`RepeatPartition(C): TenCat → SetEnum`](Tensor_categories.md#function-repeatpartition-tencat)

    - [`IsCovariant(C): TenCat → BoolElt`](Tensor_categories.md#function-iscovariant-tencat)

    - [`IsContravariant(C): TenCat → BoolElt`](Tensor_categories.md#function-iscontravariant-tencat)

    - [`Example: Ten Cat Properties`](Tensor_categories.md#example-ex-d61054)

  - [Categorical Operations](Tensor_categories.md#categorical-operations)

    - [Categorical Operations on Tensors](Tensor_categories.md#categorical-operations-on-tensors)

      - [`Subtensor(T, S): TenSpcElt, List → TenSpcElt`](Tensor_categories.md#function-subtensor-tenspcelt-list)

      - [`Subtensor(T, S): TenSpcElt, SeqEnum → TenSpcElt`](Tensor_categories.md#function-subtensor-tenspcelt-seqenum)

      - [`Subtensor(T, D, C): TenSpcElt, List, Any → TenSpcElt`](Tensor_categories.md#function-subtensor-tenspcelt-list-any)

      - [`Subtensor(T, D, C): TenSpcElt, SeqEnum, Any → TenSpcElt`](Tensor_categories.md#function-subtensor-tenspcelt-seqenum-any)

      - [`IsSubtensor(T, S): TenSpcElt, TenSpcElt → BoolElt`](Tensor_categories.md#function-issubtensor-tenspcelt-tenspcelt)

      - [`Example: Subtensors`](Tensor_categories.md#example-ex-b3fa65)

      - [`LocalIdeal(T, S, I): TenSpcElt, List, {RngIntElt} → TenSpcElt`](Tensor_categories.md#function-localideal-tenspcelt-list-rngintelt)

      - [`LocalIdeal(T, S, I): TenSpcElt, SeqEnum, {RngIntElt} → TenSpcElt`](Tensor_categories.md#function-localideal-tenspcelt-seqenum-rngintelt)

      - [`LocalIdeal(T, D, C, I): TenSpcElt, List, Any, {RngIntElt} → TenSpcElt`](Tensor_categories.md#function-localideal-tenspcelt-list-any-rngintelt)

      - [`LocalIdeal(T, D, C, I): TenSpcElt, SeqEnum, Any, {RngIntElt} → TenSpcElt`](Tensor_categories.md#function-localideal-tenspcelt-seqenum-any-rngintelt)

      - [`LocalIdeal(T, S, I): TenSpcElt, TenSpcElt, {RngIntElt} → TenSpcElt`](Tensor_categories.md#function-localideal-tenspcelt-tenspcelt-rngintelt)

      - [`IsLocalIdeal(T, S, I): TenSpcElt, TenSpcElt, {RngIntElt} → BoolElt`](Tensor_categories.md#function-islocalideal-tenspcelt-tenspcelt-rngintelt)

      - [`Example: Local Ideals`](Tensor_categories.md#example-ex-96befc)

      - [`Ideal(T, S): TenSpcElt, List → TenSpcElt`](Tensor_categories.md#function-ideal-tenspcelt-list)

      - [`Ideal(T, S): TenSpcElt, SeqEnum → TenSpcElt`](Tensor_categories.md#function-ideal-tenspcelt-seqenum)

      - [`Ideal(T, D, C): TenSpcElt, List, Any → TenSpcElt`](Tensor_categories.md#function-ideal-tenspcelt-list-any)

      - [`Ideal(T, D, C): TenSpcElt, SeqEnum, Any → TenSpcElt`](Tensor_categories.md#function-ideal-tenspcelt-seqenum-any)

      - [`Ideal(T, S): TenSpcElt, TenSpcElt → TenSpcElt`](Tensor_categories.md#function-ideal-tenspcelt-tenspcelt)

      - [`IsIdeal(T, S): TenSpcElt, TenSpcElt → BoolElt`](Tensor_categories.md#function-isideal-tenspcelt-tenspcelt)

      - [`Example: Ideals`](Tensor_categories.md#example-ex-fad333)

      - [`LocalQuotient(T, S, I : parameters): TenSpcElt, TenSpcElt, {RngIntElt} → TenSpcElt, Hmtp`](Tensor_categories.md#function-localquotient-tenspcelt-tenspcelt-rngintelt)

      - [`Quotient(T, S : parameters): TenSpcElt, TenSpcElt → TenSpcElt, Hmtp`](Tensor_categories.md#function-quotient-tenspcelt-tenspcelt)

      - [`T / S: TenSpcElt, TenSpcElt → TenSpcElt, Hmtp`](Tensor_categories.md#operation-op-div-tenspcelt-tenspcelt)

      - [`Example: Quotients`](Tensor_categories.md#example-ex-0f6850)

    - [Categorical Operations on Tensor Spaces](Tensor_categories.md#categorical-operations-on-tensor-spaces)

      - [`SubConstructor(T, L): TenSpc, Any → TenSpc, Map`](Tensor_categories.md#function-subconstructor-tenspc-any)

      - [`sub< T | L >: TenSpc, Any → TenSpc, Map`](Tensor_categories.md#constructor-constructor-sub-tenspc-any-tenspc-map)

      - [`IsSubtensorSpace(T, S): TenSpc, TenSpc → BoolElt`](Tensor_categories.md#function-issubtensorspace-tenspc-tenspc)

      - [`Example: Subtensor Spaces`](Tensor_categories.md#example-ex-40cd43)

      - [`QuoConstructor(T, X): TenSpc, Any → TenSpc, Map`](Tensor_categories.md#function-quoconstructor-tenspc-any)

      - [`quo< T | X >: TenSpc, Any → TenSpc, Map`](Tensor_categories.md#constructor-constructor-quo-tenspc-any-tenspc-map)

      - [`T / S: TenSpc, TenSpc → TenSpc, Map`](Tensor_categories.md#operation-op-div-tenspc-tenspc)

      - [`Example: Quotient Tensor Spaces`](Tensor_categories.md#example-ex-87c8de)

  - [Homotopisms](Tensor_categories.md#homotopisms)

    - [Constructions of Homotopisms](Tensor_categories.md#constructions-of-homotopisms)

      - [`Homotopism(T, S, M : parameters): TenSpcElt, TenSpcElt, List → Hmtp`](Tensor_categories.md#function-homotopism-tenspcelt-tenspcelt-list)

      - [`Homotopism(T, S, M : parameters): TenSpcElt, TenSpcElt, SeqEnum → Hmtp`](Tensor_categories.md#function-homotopism-tenspcelt-tenspcelt-seqenum)

      - [`Homotopism(T, S, M, C : parameters): TenSpcElt, TenSpcElt, List, TenCat → Hmtp`](Tensor_categories.md#function-homotopism-tenspcelt-tenspcelt-list-tencat)

      - [`Homotopism(T, S, M, C : parameters): TenSpcElt, TenSpcElt, SeqEnum, TenCat → Hmtp`](Tensor_categories.md#function-homotopism-tenspcelt-tenspcelt-seqenum-tencat)

      - [`Homotopism(M, C): List, TenCat → Hmtp`](Tensor_categories.md#function-homotopism-list-tencat)

      - [`Homotopism(M, C): SeqEnum, TenCat → Hmtp`](Tensor_categories.md#function-homotopism-seqenum-tencat)

      - [`IsHomotopism(T, s, H): TenSpcElt, TenSpcElt, Hmtp → BoolElt`](Tensor_categories.md#function-ishomotopism-tenspcelt-tenspcelt-hmtp)

      - [`IsHomotopism(T, s, M): TenSpcElt, TenSpcElt, List → BoolElt`](Tensor_categories.md#function-ishomotopism-tenspcelt-tenspcelt-list)

      - [`IsHomotopism(T, s, M): TenSpcElt, TenSpcElt, SeqEnum → BoolElt`](Tensor_categories.md#function-ishomotopism-tenspcelt-tenspcelt-seqenum)

      - [`IsHomotopism(T, s, M, C): TenSpcElt, TenSpcElt, List, TenCat → BoolElt`](Tensor_categories.md#function-ishomotopism-tenspcelt-tenspcelt-list-tencat)

      - [`IsHomotopism(T, s, M, C): TenSpcElt, TenSpcElt, SeqEnum, TenCat → BoolElt`](Tensor_categories.md#function-ishomotopism-tenspcelt-tenspcelt-seqenum-tencat)

      - [`Example: Homotopism Const`](Tensor_categories.md#example-ex-6fd856)

      - [`Example: Mixed Homotopisms`](Tensor_categories.md#example-ex-d02f12)

    - [Basic Operations with Homotopisms](Tensor_categories.md#basic-operations-with-homotopisms)

      - [`H1 * H2: Hmtp, Hmtp → Hmtp`](Tensor_categories.md#operation-op-times-hmtp-hmtp)

      - [`H . a: Hmtp, RngIntElt → Map`](Tensor_categories.md#operation-operation-hmtp-rngintelt-map)

      - [`Example: Homotopism Ops`](Tensor_categories.md#example-ex-c4051c)

      - [`Precompose(T, f, a): TenSpcElt, Map, RngIntElt → TenSpcElt`](Tensor_categories.md#function-precompose-tenspcelt-map-rngintelt)

      - [`Precompose(T, M, a): TenSpcElt, Mtrx, RngIntElt → TenSpcElt`](Tensor_categories.md#function-precompose-tenspcelt-mtrx-rngintelt)

      - [`T @ H: TenSpcElt, Hmtp → TenSpcElt`](Tensor_categories.md#operation-operation-tenspcelt-hmtp-tenspcelt)

    - [Basic Properties of Homotopisms](Tensor_categories.md#basic-properties-of-homotopisms)

      - [`Domain(H): Hmtp → TenSpcElt`](Tensor_categories.md#function-domain-hmtp)

      - [`Codomain(H): Hmtp → TenSpcElt`](Tensor_categories.md#function-codomain-hmtp)

      - [`Maps(H): Hmtp → List`](Tensor_categories.md#function-maps-hmtp)

      - [`TensorCategory(H): Hmtp → TenCat`](Tensor_categories.md#function-tensorcategory-hmtp)

      - [`ChangeTensorCategory(H, C): Hmtp, TenCat → Hmtp`](Tensor_categories.md#function-changetensorcategory-hmtp-tencat)

      - [`ChangeTensorCategory(~H, C): Hmtp, TenCat`](Tensor_categories.md#function-changetensorcategory-hmtp-tencat-ref)

      - [`Valence(H): Hmtp → RngIntElt`](Tensor_categories.md#function-valence-hmtp)

      - [`Kernel(H): Hmtp → TenSpcElt`](Tensor_categories.md#function-kernel-hmtp)

      - [`Image(H): Hmtp → TenSpcElt`](Tensor_categories.md#function-image-hmtp)

      - [`Example: Homotopism Props`](Tensor_categories.md#example-ex-5a1efc)

      - [`Shuffle(H, g): Hmtp, GrpPermElt → Hmtp`](Tensor_categories.md#function-shuffle-hmtp-grppermelt)

      - [`Shuffle(H, g): Hmtp, [RngIntElt] → Hmtp`](Tensor_categories.md#function-shuffle-hmtp-rngintelt)

- [Linear Invariants of Tensors](Linear-invariants-of-tensors.md)

  - [Invariants for Bilinear Tensors](Linear-invariants-of-tensors.md#invariants-for-bilinear-tensors)

    - [`AdjointAlgebra(B): TenSpcElt → AlgMat`](Linear-invariants-of-tensors.md#function-adjointalgebra-tenspcelt)

    - [`Example: Adjoint Alge`](Linear-invariants-of-tensors.md#example-ex-55dbd9)

    - [`LeftNucleus(B : parameters): TenSpcElt → AlgMat`](Linear-invariants-of-tensors.md#function-leftnucleus-tenspcelt)

    - [`MidNucleus(B): TenSpcElt → AlgMat`](Linear-invariants-of-tensors.md#function-midnucleus-tenspcelt)

    - [`RightNucleus(B): TenSpcElt → AlgMat`](Linear-invariants-of-tensors.md#function-rightnucleus-tenspcelt)

    - [`Example: Going Nuclear`](Linear-invariants-of-tensors.md#example-ex-75db37)

  - [Invariants of General Multilinear Maps](Linear-invariants-of-tensors.md#invariants-of-general-multilinear-maps)

    - [`Centroid(T): TenSpcElt → AlgMat`](Linear-invariants-of-tensors.md#function-centroid-tenspcelt)

    - [`Centroid(T, A): TenSpcElt, {RngIntElt} → AlgMat`](Linear-invariants-of-tensors.md#function-centroid-tenspcelt-rngintelt)

    - [`Example: Centroid`](Linear-invariants-of-tensors.md#example-ex-71158e)

    - [`DerivationAlgebra(T): TenSpcElt → AlgMatLie`](Linear-invariants-of-tensors.md#function-derivationalgebra-tenspcelt)

    - [`DerivationAlgebra(T, A): TenSpcElt, {RngIntElt} → AlgMatLie`](Linear-invariants-of-tensors.md#function-derivationalgebra-tenspcelt-rngintelt)

    - [`Nucleus(T, a, b): TenSpcElt, RngIntElt, RngIntElt → AlgMat`](Linear-invariants-of-tensors.md#function-nucleus-tenspcelt-rngintelt-rngintelt)

    - [`Nucleus(T, A): TenSpcElt, SetEnum → AlgMat`](Linear-invariants-of-tensors.md#function-nucleus-tenspcelt-setenum)

    - [`Example: Restrict Derivation`](Linear-invariants-of-tensors.md#example-ex-84e946)

    - [`SelfAdjointAlgebra(t, a, b): TenSpcElt, RngIntElt, RngIntElt → ModMatFld`](Linear-invariants-of-tensors.md#function-selfadjointalgebra-tenspcelt-rngintelt-rngintelt)

    - [`TensorOverCentroid(T): TenSpcElt → TenSpcElt, Hmtp`](Linear-invariants-of-tensors.md#function-tensorovercentroid-tenspcelt)

    - [`Example: Centroid Unipotent`](Linear-invariants-of-tensors.md#example-ex-93b5e7)

- [Some Extended Examples](Some_examples.md)

  - [Distinguishing Groups](Some_examples.md#distinguishing-groups)

    - [`Example: Payne Grps`](Some_examples.md#example-ex-d908f2)

  - [Simplifying Automorphism Group Computations](Some_examples.md#simplifying-automorphism-group-computations)

    - [`Example: Ext Over Adj`](Some_examples.md#example-ex-c87b8b)
