Macaulay2 » Documentation
Packages » PathSignatures » Computing Path Varieties » The universal variety and toric coordinates
next | previous | forward | backward | up | index | toc

The universal variety and toric coordinates

Recall that $K \langle \mathtt{1}, \ldots, \mathtt{d} \rangle$ is isomorphic to the free commutative algebra over the Lyndon words and if we grade each word by its length, the algebra homomorphism $$\phi: K[\mathtt{w} \ | \ \mathtt{w} \ \mathrm{Lyndon}] \cong K \langle \mathtt{1}, \ldots, \mathtt{d} \rangle, \ \mathtt{w} \mapsto \mathtt{w}$$ is an isomorphism of graded vector spaces. The inverse $\psi$ of this isomorphism is computed by lyndonShuffle. Dually, we have the isomorphism of graded vector spaces $$\psi^*: K[\mathtt{w} \ | \ \mathtt{w} \ \mathrm{Lyndon}]^* \cong K \langle \mathtt{1}, \ldots, \mathtt{d} \rangle^*, \ \alpha \mapsto \alpha \circ \psi.$$

We view the two vector spaces $K\langle \mathtt{1}, \ldots, \mathtt{d}\rangle^*$ and $K[\mathtt{w} \ | \ \mathtt{w} \ \mathrm{Lyndon}]^*$ as infinite-dimensional affine spaces. We are interested in the subset $\mathcal U_d$ of those points of $K\langle \mathtt{1}, \ldots, \mathtt{d}\rangle^*$ that define shuffle algebra homomorphisms. This is a Zariski closed set. As $\psi$ is an algebra homomorphism, they correspond to the points of $K[\mathtt{w} \ | \ \mathtt{w} \ \mathrm{Lyndon}]^*$ under $\psi^*$ that define algebra homomorphisms; these are parametrized by the points of the vector space $K^{\mathcal L}$, where $\mathcal L$ is the set of Lyndon words, via the map $$\eta: K^{\mathcal L} \to K[\mathtt{w} \ | \ \mathtt{w} \ \mathrm{Lyndon}]^*, \ x \mapsto ev_x.$$ In particular, $\mathcal U_d$ is parametrized by $\psi^* \circ \eta, \ x \mapsto (\mathtt{w} \mapsto \psi(\mathtt{w})(x))$.

Projecting $\mathcal U_d$ to the degree $k$ component, we obtain a subvariety of $((K^d)^{\otimes k})^* \cong (K^d)^{\otimes k}$, called the universal variety, $\mathcal U_{d,k}$.

As the map $\psi$ is compatible with the projection, $\psi^* \circ \eta$ restricts to a parametrization of $\mathcal U_{d,k}$: it is the image of the induced morphism $$K^{\mathcal L_k} \to (K\langle \mathtt{1}, \ldots, \mathtt{d}\rangle_k)^* \cong (K^d)^{\otimes k}, \ x \mapsto (\psi(\mathtt{w})(x) \cdot \mathtt{w})$$ where $\mathcal L_k$ is the set of Lyndon words of length at most $k$.

As usual, we can compute the ideal that cuts out the image variety as the kernel of the corresponding ring map $$K[x_{\mathtt w} \ | \ \mathtt{w} \text{ of length } k] \to K[y_{\mathtt w} \ | \ \mathtt{w} \text{ Lyndon of length } \leq k].$$ This map can be computed via lyndonShuffle. Let us do this in the example $d=3, k=3$.

i1 : words = toList apply((3:1)..(3:3), i -> new Array from i);
i2 : lwords = lyndonWords(3,3)

o2 = {[1], [1, 1, 2], [1, 1, 3], [1, 2], [1, 2, 2], [1, 2, 3], [1, 3], [1, 3,
     ------------------------------------------------------------------------
     2], [1, 3, 3], [2], [2, 2, 3], [2, 3], [2, 3, 3], [3]}

o2 : List
i3 : R = QQ new Array from apply(words, i->x_i);
i4 : Q = QQ new Array from (apply(lwords,i->y_i) | {Degrees => apply(lwords, i->length(i))});
i5 : A3 = wordAlgebra(3);
i6 : lpolyHT = apply(words, i -> lyndonShuffle(i_A3));
i7 : lpols = apply(lpolyHT, f -> sum(pairs f, (term,coef) -> coef * product(pairs term, (word,ex)-> y_word^ex)));
i8 : lpols_{0..4}

      1 3
o8 = {-y   , y         , y         , - 2y          + y   y      , y         }
      6 [1]   [1, 1, 2]   [1, 1, 3]      [1, 1, 2]    [1] [1, 2]   [1, 2, 2]

o8 : List
i9 : m = map(Q,R,lpols);

o9 : RingMap Q <-- R

Let us compute the kernel.

i10 : I = ker m;

o10 : Ideal of R
i11 : dim I

o11 = 14
i12 : degree I

o12 = 24
i13 : betti mingens I

             0  1
o13 = total: 1 81
          0: 1  .
          1: . 81

o13 : BettiTally
i14 : (mingens I)_(0,0)

                              2                                           
o14 = x         x          + x          + 2x         x          + 3x      
       [2, 3, 3] [3, 2, 3]    [3, 2, 3]     [2, 3, 3] [3, 3, 2]     [3, 2,
      -----------------------------------------------------------------------
                       2
        x          + 2x          - 3x         x          - 6x         x
      3] [3, 3, 2]     [3, 3, 2]     [2, 3, 2] [3, 3, 3]     [3, 2, 2] [3, 3,
      -----------------------------------------------------------------------
      3]

o14 : R

This agrees with the result in Table 2 of [1].

As $\phi$ is an isomorphism of graded vector spaces, we see that the variety $\mathcal U_{d,k}$ is parametrized by the vector of degree $k$ monomials in Lyndon words after a linear coordinate change on $(K^d)^{\otimes k}$. We can use this to simplify the computation of the universal variety.

i15 : mons = flatten entries basis(3,Q);
i16 : S = QQ[z_1..z_(length mons)];
i17 : m = map(Q,S,mons);

o17 : RingMap Q <-- S
i18 : I = ker m;

o18 : Ideal of S
i19 : dim I

o19 = 14
i20 : degree I

o20 = 24
i21 : betti mingens I

             0  1
o21 = total: 1 81
          0: 1  .
          1: . 81

o21 : BettiTally

Let us compute the matrix of the coordinate change for $d=2, k=4$.

i22 : words = toList apply((4:1)..(4:2), i-> new Array from i);
i23 : lwords = lyndonWords(2,4);
i24 : R = QQ new Array from apply(words,i->x_i);
i25 : Q = QQ new Array from (apply(lwords,i->y_i) | {Degrees => apply(lwords, i->length(i))});
i26 : A2 = wordAlgebra(2);
i27 : lpolyHT = apply(words, i -> lyndonShuffle(i_A2));
i28 : lpols = apply(lpolyHT, f -> sum(pairs f, (term,coef) -> coef * product(pairs term, (word,ex)-> y_word^ex)));
i29 : mons = basis(4,Q)

o29 = | y_[1]^4 y_[1]^3y_[2] y_[1]^2y_[1, 2] y_[1]^2y_[2]^2 y_[1]y_[1, 1, 2]
      -----------------------------------------------------------------------
      y_[1]y_[1, 2]y_[2] y_[1]y_[1, 2, 2] y_[1]y_[2]^3 y_[1, 1, 1, 2] y_[1,
      -----------------------------------------------------------------------
      1, 2]y_[2] y_[1, 1, 2, 2] y_[1, 2]^2 y_[1, 2]y_[2]^2 y_[1, 2, 2]y_[2]
      -----------------------------------------------------------------------
      y_[1, 2, 2, 2] y_[2]^4 |

              1      16
o29 : Matrix Q  <-- Q
i30 : M = sub(matrix apply(lpols, i -> (flatten entries (coefficients(i, Monomials => mons))#1) ),QQ)

o30 = | 1/24 0   0    0   0  0  0  0   0  0  0  0    0    0  0  0    |
      | 0    0   0    0   0  0  0  0   1  0  0  0    0    0  0  0    |
      | 0    0   0    0   1  0  0  0   -3 0  0  0    0    0  0  0    |
      | 0    0   0    0   0  0  0  0   0  0  1  0    0    0  0  0    |
      | 0    0   1/2  0   -2 0  0  0   3  0  0  0    0    0  0  0    |
      | 0    0   0    0   0  0  0  0   0  0  -2 1/2  0    0  0  0    |
      | 0    0   0    0   0  0  1  0   0  0  0  -1/2 0    0  0  0    |
      | 0    0   0    0   0  0  0  0   0  0  0  0    0    0  1  0    |
      | 0    1/6 -1/2 0   1  0  0  0   -1 0  0  0    0    0  0  0    |
      | 0    0   0    0   0  0  0  0   0  1  0  -1/2 0    0  0  0    |
      | 0    0   0    0   0  1  -2 0   0  -2 2  1/2  0    0  0  0    |
      | 0    0   0    0   0  0  0  0   0  0  0  0    0    1  -3 0    |
      | 0    0   0    1/4 0  -1 1  0   0  1  -1 0    0    0  0  0    |
      | 0    0   0    0   0  0  0  0   0  0  0  0    1/2  -2 3  0    |
      | 0    0   0    0   0  0  0  1/6 0  0  0  0    -1/2 1  -1 0    |
      | 0    0   0    0   0  0  0  0   0  0  0  0    0    0  0  1/24 |

               16       16
o30 : Matrix QQ   <-- QQ
i31 : M^(-1)

o31 = | 24 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  |
      | 0  6 6 0 6 0 0 0 6 0 0 0 0 0 0 0  |
      | 0  6 4 0 2 0 0 0 0 0 0 0 0 0 0 0  |
      | 0  0 0 4 0 4 4 0 0 4 4 0 4 0 0 0  |
      | 0  3 1 0 0 0 0 0 0 0 0 0 0 0 0 0  |
      | 0  0 0 4 0 3 2 0 0 2 1 0 0 0 0 0  |
      | 0  0 0 2 0 1 1 0 0 0 0 0 0 0 0 0  |
      | 0  0 0 0 0 0 0 6 0 0 0 6 0 6 6 0  |
      | 0  1 0 0 0 0 0 0 0 0 0 0 0 0 0 0  |
      | 0  0 0 2 0 1 0 0 0 1 0 0 0 0 0 0  |
      | 0  0 0 1 0 0 0 0 0 0 0 0 0 0 0 0  |
      | 0  0 0 4 0 2 0 0 0 0 0 0 0 0 0 0  |
      | 0  0 0 0 0 0 0 6 0 0 0 4 0 2 0 0  |
      | 0  0 0 0 0 0 0 3 0 0 0 1 0 0 0 0  |
      | 0  0 0 0 0 0 0 1 0 0 0 0 0 0 0 0  |
      | 0  0 0 0 0 0 0 0 0 0 0 0 0 0 0 24 |

               16       16
o31 : Matrix QQ   <-- QQ

Note that the coordinate change differs from the one described in Example 21 of [2] as our toric parametrization does not arise from the exponential map on the Lie algebra. We can easily construct this coordinate change as well, by using lieBasis and tensorExp:

i32 : A2 = wordAlgebra(2, CoefficientRing => Q)

o32 = A2

o32 : NCPolynomialRing
i33 : lbasis = apply(lwords, i -> lieBasis(i,A2));
i34 : lT = sum(0..length(lbasis)-1, i-> Q_i * lbasis_i);
i35 : gT = tensorExp(lT,4);
i36 : lpols = apply(words, i-> gT @ i_A2)

        1 4                    1                 1 2             1 3         
o36 = {--y   , y             + -y   y          + -y   y       + --y   y   , -
       24 [1]   [1, 1, 1, 2]   2 [1] [1, 1, 2]   6 [1] [1, 2]   24 [1] [2]   
      -----------------------------------------------------------------------
                       1                  1 3                       
      3y             - -y   y          + --y   y   , y             +
        [1, 1, 1, 2]   2 [1] [1, 1, 2]   24 [1] [2]   [1, 1, 2, 2]  
      -----------------------------------------------------------------------
      1                 1                 1                   1 2   2   
      -y   y          + -y         y    + -y   y      y    + --y   y   ,
      2 [1] [1, 2, 2]   2 [1, 1, 2] [2]   6 [1] [1, 2] [2]   24 [1] [2] 
      -----------------------------------------------------------------------
                       1                  1 3                           1 2  
      3y             - -y   y          + --y   y   , - 2y             + -y   
        [1, 1, 1, 2]   2 [1] [1, 1, 2]   24 [1] [2]      [1, 1, 2, 2]   2 [1,
      -----------------------------------------------------------------------
                                             1                   1 2   2     
         - y   y          - y         y    + -y   y      y    + --y   y   , -
      2]    [1] [1, 2, 2]    [1, 1, 2] [2]   6 [1] [1, 2] [2]   24 [1] [2]   
      -----------------------------------------------------------------------
      1 2                          1 2   2                    1              
      -y       + y   y          + --y   y   , y             + -y         y   
      2 [1, 2]    [1] [1, 2, 2]   24 [1] [2]   [1, 2, 2, 2]   2 [1, 2, 2] [2]
      -----------------------------------------------------------------------
        1        2      1     3                      1                
      + -y      y    + --y   y   , - y             + -y   y          -
        6 [1, 2] [2]   24 [1] [2]     [1, 1, 1, 2]   2 [1] [1, 1, 2]  
      -----------------------------------------------------------------------
      1 2             1 3          1 2                          1 2   2   
      -y   y       + --y   y   , - -y       + y         y    + --y   y   ,
      6 [1] [1, 2]   24 [1] [2]    2 [1, 2]    [1, 1, 2] [2]   24 [1] [2] 
      -----------------------------------------------------------------------
                       1 2                                          1        
      2y             + -y       - y   y          - y         y    - -y   y   
        [1, 1, 2, 2]   2 [1, 2]    [1] [1, 2, 2]    [1, 1, 2] [2]   6 [1] [1,
      -----------------------------------------------------------------------
                1 2   2                       1                  1     3     
        y    + --y   y   , - 3y             - -y         y    + --y   y   , -
      2] [2]   24 [1] [2]      [1, 2, 2, 2]   2 [1, 2, 2] [2]   24 [1] [2]   
      -----------------------------------------------------------------------
                      1                 1                 1                 
      y             + -y   y          + -y         y    - -y   y      y    +
       [1, 1, 2, 2]   2 [1] [1, 2, 2]   2 [1, 1, 2] [2]   6 [1] [1, 2] [2]  
      -----------------------------------------------------------------------
       1 2   2                     1                  1     3                
      --y   y   , 3y             - -y         y    + --y   y   , - y         
      24 [1] [2]    [1, 2, 2, 2]   2 [1, 2, 2] [2]   24 [1] [2]     [1, 2, 2,
      -----------------------------------------------------------------------
           1                 1        2      1     3     1 4
         + -y         y    - -y      y    + --y   y   , --y   }
      2]   2 [1, 2, 2] [2]   6 [1, 2] [2]   24 [1] [2]  24 [2]

o36 : List
i37 : M = sub(matrix apply(lpols, i -> (flatten entries (coefficients(i, Monomials => mons))#1) ),QQ);

               16       16
o37 : Matrix QQ   <-- QQ
i38 : M^(-1)

o38 = | 24 0   0    0   0    0    0    0   0   0    0    0    0    0    0  
      | 0  6   6    0   6    0    0    0   6   0    0    0    0    0    0  
      | 0  3   1    0   -1   0    0    0   -3  0    0    0    0    0    0  
      | 0  0   0    4   0    4    4    0   0   4    4    0    4    0    0  
      | 0  1/2 -1/2 0   -1/2 0    0    0   1/2 0    0    0    0    0    0  
      | 0  0   0    2   0    1    0    0   0   0    -1   0    -2   0    0  
      | 0  0   0    1/3 0    -1/6 1/3  0   0   -2/3 -1/6 0    1/3  0    0  
      | 0  0   0    0   0    0    0    6   0   0    0    6    0    6    6  
      | 0  0   -1/6 0   1/6  0    0    0   0   0    0    0    0    0    0  
      | 0  0   0    1/3 0    -1/6 -2/3 0   0   1/3  -1/6 0    1/3  0    0  
      | 0  0   0    1/6 0    -1/6 0    0   0   0    1/6  0    -1/6 0    0  
      | 0  0   0    1   0    0    -1   0   0   -1   0    0    1    0    0  
      | 0  0   0    0   0    0    0    3   0   0    0    1    0    -1   -3 
      | 0  0   0    0   0    0    0    1/2 0   0    0    -1/2 0    -1/2 1/2
      | 0  0   0    0   0    0    0    0   0   0    0    -1/6 0    1/6  0  
      | 0  0   0    0   0    0    0    0   0   0    0    0    0    0    0  
      -----------------------------------------------------------------------
      0  |
      0  |
      0  |
      0  |
      0  |
      0  |
      0  |
      0  |
      0  |
      0  |
      0  |
      0  |
      0  |
      0  |
      0  |
      24 |

               16       16
o38 : Matrix QQ   <-- QQ

This is the matrix from Example 21 in [2]. Note that while we obtained the coordinate change by inverting the map that sends a word to its coefficient in the exponential (which is a linear combination of Lyndon word monomials), in [2] the coordinate change is obtained directly without computing the exponential. Both strategies yield the same result by Lemma 18 in loc. cit..

References

Améndola, C., Friz, P., & Sturmfels, B. (2019, January). Varieties of signature tensors. In Forum of Mathematics, Sigma (Vol. 7, p. e10). Cambridge University Press.

Galuppi, F. (2019). The rough Veronese variety. Linear algebra and its applications, 583, 282-299.


The source of this document is in PathSignatures.m2:337:0.