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

sig -- compute the signature of a piecewise polynomial path.

Description

Given a Path $X(t):[0,1]\rightarrow \mathbb{R}^d$, its signature is the linear form $\sigma: T((\mathbb{R}^d)^*)\rightarrow \mathbb{R}$ on the tensor algebra of the dual of $\mathbb{R}^d$, whose image on a decomposable tensor $\alpha_1\otimes \dots\otimes \alpha_k$ is the iterated integral $$ \alpha_1\otimes \dots\otimes \alpha_k\overset{\sigma}{\mapsto} \int_0^1\int_0^{t_k}\dots\int_0^{t_2}\partial(\alpha_1 X)\dots \partial (\alpha_k X) d t_1\dots dt_k. $$ This form does not depend on the parametrization of $X$. In this package, we identify $T((\mathbb{R}^d)^*)$ with the free associative algebra over the alphabet $\{\texttt{1},\dots,\texttt{d}\}$ via $\texttt{i} \mapsto e_i^*$ where $e_1^*, \dots, e_d^*$ is the dual of the canonical basis of $\mathbb{R}^d$. See also wordAlgebra.

i1 : d = 4;
i2 : R = QQ[t];
i3 : X = polyPath(for i from 1 to d list t^i) -- the moment path in dimension d

o3 = Path in 4-dimensional space with 1 polynomial segment:

           2   3   4
     {{t, t , t , t }}

o3 : Path
i4 : A = wordAlgebra(d) -- create the free associative algebra over d letters

o4 = A

o4 : NCPolynomialRing
i5 : w = (new Array from (1..d))_A -- the word 1..d

o5 = Lt Lt Lt Lt
       1  2  3  4

o5 : A

In the example above, the word $\texttt{w}$ corresponds to the simple tensor $e_1^*\otimes\dots \otimes e_d^*$. The signature of $X$ on this word can be computed using sig(Path,NCRingElement).

i6 : sig(X, w)

      2
o6 = --
     15

o6 : QQ
i7 : sig(X,[1]_A)

o7 = 1

o7 : QQ
i8 : sig(X,[2,3]_A)

     3
o8 = -
     5

o8 : QQ

One can also compute the k-th level signature tensor for $k\in \mathbb{N}$ by using sig(Path,ZZ). This returns the tensor as a non-commutative polynomial in symbols Lt_1, ..., Lt_d.

i9 : T = sig(X, 2)

     1   2 3       1       1       4       1   2 2       1       2       3       1   2 1       4       3       2       1   2
o9 = -Lt  +-Lt Lt +-Lt Lt +-Lt Lt +-Lt Lt +-Lt  +-Lt Lt +-Lt Lt +-Lt Lt +-Lt Lt +-Lt  +-Lt Lt +-Lt Lt +-Lt Lt +-Lt Lt +-Lt
     2  4  7  4  3 3  4  2 5  4  1 7  3  4 2  3  5  3  2 4  3  1 3  2  4 5  2  3 2  2  3  2  1 5  1  4 4  1  3 3  1  2 2  1

o9 : QQ{Lt , Lt , Lt , Lt }
          1    2    3    4
i10 : T // wordFormat

      1          3          1          1          4          1          2    
o10 = - [4, 4] + - [4, 3] + - [4, 2] + - [4, 1] + - [3, 4] + - [3, 3] + - [3,
      2          7          3          5          7          2          5    
      -----------------------------------------------------------------------
           1          2          3          1          1          4         
      2] + - [3, 1] + - [2, 4] + - [2, 3] + - [2, 2] + - [2, 1] + - [1, 4] +
           4          3          5          2          3          5         
      -----------------------------------------------------------------------
      3          2          1
      - [1, 3] + - [1, 2] + - [1, 1]
      4          3          2

Note however that neither the symbols nor the ring of this polynomial are made available to the user, in particular they can not be added or multiplied. To obtain the tensor as a NCPolynomial in a given NCRing, use sig(Path,ZZ,NCRing) instead. The following example demonstrates Chen's identity:

i11 : T = 1 + sig(X, 1, A) + sig(X, 2, A);
i12 : S = T * T;
i13 : Ma = matrix (S@2) -- the second component of S as a matrix

o13 = | 2   7/3 5/2  13/5 |
      | 5/3 2   11/5 7/3  |
      | 3/2 9/5 2    15/7 |
      | 7/5 5/3 13/7 2    |

               4       4
o13 : Matrix QQ  <-- QQ
i14 : Y = X ** X -- X concatenated with itself

o14 = Path in 4-dimensional space with 2 polynomial segments:

            2   3   4        2   3   4
      {{t, t , t , t }, {t, t , t , t }}

o14 : Path
i15 : Mb = matrix (sig(Y, 2, A)@2) -- the signature matrix of Y

o15 = | 2   7/3 5/2  13/5 |
      | 5/3 2   11/5 7/3  |
      | 3/2 9/5 2    15/7 |
      | 7/5 5/3 13/7 2    |

               4       4
o15 : Matrix QQ  <-- QQ
i16 : (Ma == Mb)

o16 = true

Ways to use sig:

  • sig(Path,List)
  • sig(Path,NCRingElement)
  • sig(Path,ZZ)
  • sig(Path,ZZ,NCRing)

For the programmer

The object sig is a method function.


The source of this document is in PathSignatures/documentation.m2:1174:0.