20190830 13:05:52 0500  commented answer  How did simplify_full() manipulate this expression? Right. As the expression obtained by writing "(LHS(n,k)RHS(n,k)).simplify_factorial()" is quite horrible, I suspect that Sage will not be able to give me any good insight into how to prove this equality. 
20190830 10:48:04 0500  asked a question  How did simplify_full() manipulate this expression? This is sort of a follow up to a previous question of mine: https://ask.sagemath.org/question/475... I wanted to prove a certain combinatorial equality. Now, to prove this identity in Sage, I can define the two function $\text{LHS}(n,k)$ and $\text{RHS}(n,k)$ representing the left and righthand side and make sure that $\text{LHS}(n,k)\text{RHS}(n,k)=0$ with the following code (actually the code provides a proof of a slightly more general identity, which holds for other values of $n, k$ as well.): This outputs which is what I want but I would like to prove this identity with penandpaper and this seems to be a bit tricky. I wonder if there is a way to see how exactly simplify_full() were able simplify the expressions? 
20190820 16:38:35 0500  commented answer  Checking identity of two combinatorial expressions Thank you for your answer. I am still interested in the second question but if I get no other replies, I will accept your answer. 
20190820 16:36:07 0500  commented answer  Checking identity of two combinatorial expressions I am currently using 8.3, using the notebook if that is of any relevance. 
20190820 15:42:42 0500  asked a question  Checking identity of two combinatorial expressions I have a reason to believe that a certain combinatorial identity holds for even integers $n, k$ that satisfies $2 \leq k \leq n/2$ and $n\geq 4$. To test it in Sage, I denote the expression on the right and lefthandside as the functions RHS$(n,k)$ and LHS$(n,k)$ respectively and check if they agree for a variety of values $n$ and $k$. But when run the following code I get the output which would indicate that the identity does not hold for $n=10$, $k=4$. However, when I write I get the output TRUE (I also double checked this by hand, and both sides agree and are equal to $30$ in this case).

20190413 17:01:48 0500  received badge  ● Nice Question (source) 
20190413 17:01:34 0500  received badge  ● Nice Answer (source) 
20190411 09:03:45 0500  received badge  ● SelfLearner (source) 
20190411 09:03:45 0500  received badge  ● Teacher (source) 
20190411 08:42:31 0500  commented answer  Setting t=0 in a nonsymmetric EMacdonald polynomial Big thanks for this very pedagogical answer! 
20190411 08:33:37 0500  answered a question  Constructing all NElattice paths from $(0,0)$ to $(m,n)$ I fixed this myself but in case anyone is interested I will leave this as an answer. I decided to use the kbits from this thread to generate all binary strings of length $n$ with $m$ ones. Such strings are in a natural bijection with $NE$lattice paths from $(0,0)$ to $(n,m)$. After that, I can get the heights of all the paths by writing Note: Sage has a "height" function on words, but this is not what I am looking for. In the definition of height that I am using, the height of an $NE$path is geometrically the biggest distance that the path is away from the main diagonal. 
20190411 02:56:49 0500  asked a question  Setting t=0 in a nonsymmetric EMacdonald polynomial Suppose I have a nonsymmetric EMacdonald polynomial indexed by, say, $\mu=(0,1,1)$. Then I can write and I get a polynomial in three variables and with coefficients in $\mathbb{Q}(q,t)$: However, I am confused about how I can work with this polynomial. For my purposes, I would like to study the specialization $t=0$. It would be really neat if there were some way to get write something like so I could easily specialize variables as I go along. 
20190411 01:50:27 0500  asked a question  Constructing all NElattice paths from $(0,0)$ to $(m,n)$ If I consider only Dyck Paths, I can do write something like this: to obtain the height of all Dyck paths of length $3$. However, I would like to do the same thing but using $NE$lattice paths from $(0,0)$ to $(m,n)$. Is there an easy way to do this in Sage? 
20190323 09:35:36 0500  received badge  ● Nice Question (source) 
20190323 06:26:52 0500  asked a question  Evaluating polynomials in Z[x] at roots of unity. Suppose that I have a polynomial $p(x)$ with integer coeffcients, then I can easily evaluate this at some integer to get an exact answer. That is, I can write something like But If I instead want to evaluate this polynomial at a root of unity (I take $w$ to be a primitive $5$:th root of unity in the example below but any root of unity would do), then I may write say Which is a correct answer but written in a very complicated form. Alternatively, I can write which is an approximation of the correct answers. In the above case, we actually have $p(w)=w^2$ and I am wondering if there is an easy way to always obtain such an answer. For a general $p(x)$ with integer coefficients and $w$ that is a primitive $n$:th root of unity, we can write $p(w)$ on the form $$a_0+a_1 w + a_2 w^2 + \dots +a_{n1} w^{n1}$$ where the $a_i$:s are integers. Is there a good way to get the $p(w)$ on this form in Sage? 
20190319 10:36:27 0500  commented question  Major index of skewSYT Added the definition of major index. 
20190319 07:56:58 0500  received badge  ● Organizer (source) 
20190319 07:33:16 0500  received badge  ● Editor (source) 
20190319 07:29:57 0500  asked a question  Major index of skewSYT For a standard Young tableaux (SYT), I can compute the major index as follows: Is there a way to compute the major index of a skewSYT currently? Something like: At the moment, it seems major_index() is not defined for the SkewTableauclass. EDIT: The major index of a (skew) standard Young tableau $T$, denoted $\mathrm{maj}(T)$, is defined as follows. A descent of $T$ is an entry $i$ such that $i+1$ appears strictly below $i$ in $T$. Define $\mathrm{maj}(T)$ as the sum of all descents of $T$. For example, the major index of the skew standard Young tableau above is $2+4=6$. FindStat has a definition, although they only define it for nonskew tableau. But the definition extends trivially to skewshapes as well. 
20190312 05:26:15 0500  commented answer  Obtaining a poset from Posets(n) This partially solved my issues. But I would, if possible, like to use the major_indexfunction on the posets of Poset(n). So I would like to write something like `P = Posets(3) Q = next(iter(P)) major_index(Q)` but this gives me a similar error. 
20190310 08:53:21 0500  asked a question  Obtaining a poset from Posets(n) I have defined function that takes a poset $P$ as input and outputs the major index generating polynomial over all linear extensions of $P$. Here, the major index of a certain linear extension of $P$ is given by the major index of the corresponding permutation, see e.g. http://mathworld.wolfram.com/LinearEx... for an example of this correspondence. If I write, for example Then I get which is the correct output. I would like to use Posets(n) to generate all posets (up to isomorphism) with $n$ vertices. However, when I write I get the error: Clearly the error is due to the line But I don't understand how Posets(n) works and why I cannot just write lst[3] to obtain a poset. 
20190310 04:53:44 0500  received badge  ● Supporter (source) 
20190306 09:09:36 0500  received badge  ● Student (source) 
20190305 15:50:13 0500  received badge  ● Scholar (source) 
20190305 11:13:27 0500  asked a question  Obtaining integers from a linear extension of a poset. I'm quite new to Sage so this might be a very easy question. Suppose that I have defined a linear extension of a poset in Sage like this: Is there a way for me to make this linear extension into a permutation? That is, I would like to obtain the permutation [1,4,2,3] from p. 