Ask Your Question

How did simplify_full() manipulate this expression?

asked 2019-08-30 10:48:04 -0600

joakim_uhlin gravatar image

This is sort of a follow up to a previous question of mine:

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.):

var('n k')

def LHS(n,k):
    return n/2*(

def RHS(n,k):
    return (n/k)*(2**(n/2-k))*binomial(n/2-2,k-2)*binomial(k-2,k/2-1)


This outputs


which is what I want but I would like to prove this identity with pen-and-paper 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?

edit retag flag offensive close merge delete


rburing gravatar imagerburing ( 2019-09-05 03:33:54 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2019-08-30 11:50:35 -0600

Emmanuel Charpentier gravatar image

updated 2019-09-05 01:36:52 -0600


sage: (LHS(n,k)-RHS(n,k)).simplify_factorial().canonicalize_radical()

is a big fat red hint...

EDIT : The big fat red hint is that canonicalize_radical transforms an "horrible`expression to someting more palatable...

edit flag offensive delete link more


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.

joakim_uhlin gravatar imagejoakim_uhlin ( 2019-08-30 13:05:52 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-08-30 10:48:04 -0600

Seen: 162 times

Last updated: Sep 05 '19