Macaulay2 » Documentation
Packages » PathSignatures :: wordFormat
next | previous | forward | backward | up | index | toc

# wordFormat -- display a tensor in word notation

## Description

A more readable display of tensors can be obtained through the following convention. Let $Lt_1,\dots, Lt_d$ be the generators of $R$, then an array of integers $[i_1,\dots, i_k]$ such that $0<i_l<d+1, \forall 1\leq l\leq k$ yields the decomposable tensor $$Lt_{i_1} Lt_{i_2}\cdot\dots\cdot Lt_{i_{k-1}} Lt_{i_k}$$ of $R$. This notation can then be extended linearly to any tensor.

    i1 : R = wordAlgebra(2);

    i2 : f = ([1,2]_R ** [1,2]_R) -- shuffle product of Lt_1*Lt_1 with itself displayed as a non commutative polynomial

                           2   2
    o2 = 2Lt Lt Lt Lt +4Lt  Lt
            1  2  1  2    1   2

    o2 : R

    i3 : f // wordFormat -- f displayed in the above notation

    o3 = 2 [1, 2, 1, 2] + 4 [1, 1, 2, 2]

## See also

- wordAlgebra -- create a free algebra over a given alphabet
- Array _ NCPolynomialRing

## Ways to use wordFormat:

- `wordFormat(NCRingElement)`

## For the programmer

The object wordFormat is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/PathSignatures/documentation.m2:159:0.