Ask Your Question

Revision history [back]

How to transpose two variables of an expression

Hello, I am using Sagemath version 10.3 I want to work with Double Affine Hecke Algebra (DAHA) generators, which are operators from $\mathbb{Q} (q,t) [x_{1}, \dots , x_{m} ] \rightarrow \mathbb{Q} (q,t) [x_{1}, \dots , x_{m} ]$ $$ T_{i} (f) = tf + \dfrac{tx_{i} - x_{i+1} }{ x_{i} - x_{i+1} } (K_{i,i+1}f -f) $$ Where $K_{i,i+1} f(x_{1}, \ldots , x_{i}, x_{i+1}, \ldots x_{m} ) = f(x_{1}, \ldots , x_{i+1}, x_{i}, \ldots x_{m} )$, is the action which interchanges the two variables $x_{i}$ and $x_{i+1}$. I tried to write it down but I don't know how to do this on expressions, I didn't found the $K_{i,i+1}$ so I wrote it using functions for $m=3$.

I wrote this:

t = PolynomialRing(RationalField(), 't,z_0,z_1,z_2').gen() def T1(f): expr=tf(z_0,z_1,z_2)+(tz_0-z_1)(f(z_1,z_0,z_2)-f(z_0,z_1,z_2))/(z_0-z_1) out=expr.simplify_full() return out def T2(f): expr=tf(z_0,z_1,z_2)+(tz_1-z_2)(f(z_0,z_2,z_1)-f(z_0,z_1,z_2))/(z_1-z_2) out=expr.simplify_full() return out

My problem with this approach is that I cannot use T2(T1(f)), I have to do a(z_0,z_1,z_2)=T1(f) T2(a) And with bigger $m$ it becomes more cumbersome.

Any advice?

How to transpose two variables of an expression

Hello, I am using Sagemath version 10.3 I want to work with Double Affine Hecke Algebra (DAHA) generators, which are operators from $\mathbb{Q} (q,t) [x_{1}, \dots , x_{m} ] \rightarrow \mathbb{Q} (q,t) [x_{1}, \dots , x_{m} ]$ $$ T_{i} (f) = tf + \dfrac{tx_{i} - x_{i+1} }{ x_{i} - x_{i+1} } (K_{i,i+1}f -f) $$ Where $K_{i,i+1} f(x_{1}, \ldots , x_{i}, x_{i+1}, \ldots x_{m} ) = f(x_{1}, \ldots , x_{i+1}, x_{i}, \ldots x_{m} )$, is the action which interchanges the two variables $x_{i}$ and $x_{i+1}$. I tried to write it down but I don't know how to do this on expressions, I didn't found the $K_{i,i+1}$ so I wrote it using functions for $m=3$.

I wrote this:

t = PolynomialRing(RationalField(), 't,z_0,z_1,z_2').gen()
def T1(f):
    expr=tf(z_0,z_1,z_2)+(tz_0-z_1)(f(z_1,z_0,z_2)-f(z_0,z_1,z_2))/(z_0-z_1)
expr=t*f(z_0,z_1,z_2)+(t*z_0-z_1)*(f(z_1,z_0,z_2)-f(z_0,z_1,z_2))/(z_0-z_1)
    out=expr.simplify_full()
    return out
def T2(f):
    expr=tf(z_0,z_1,z_2)+(tz_1-z_2)(f(z_0,z_2,z_1)-f(z_0,z_1,z_2))/(z_1-z_2)
expr=t*f(z_0,z_1,z_2)+(t*z_1-z_2)*(f(z_0,z_2,z_1)-f(z_0,z_1,z_2))/(z_1-z_2)
    out=expr.simplify_full()
    return out

out

My problem with this approach is that I cannot use T2(T1(f)), I have to do do

a(z_0,z_1,z_2)=T1(f)
T2(a)

And with bigger $m$ it becomes more cumbersome.

Any advice?