Dear sage-devel, I believe that the following:
sage: gamma(x).full_simplify() factorial(x - 1) is not correct, because in Sage factorial(x) is defined only if x is a non-negative integer. The problem arises because behind the scenes full_simplify() uses Maxima, and for Maxima factorial(x) is equivalent to gamma(x+1). I can think of two ways to fix this. Given a symbolic expression symb, we could: a) make symb.full_simplify() return an expression in terms of gamma() rather than an expression in terms of factorial(); b) check whether symb contains any subexpression of the form gamma(foo). If so, symb.full_simplify() should return an expression in terms of gamma(); if not, symb.full_simplify() should return an expression in terms of factorial(). Option (a) is easy to implement but I think it is the wrong way to go. There may be many Sage users who would want to simplify expressions containing factorials (e.g. combinations of binomial coefficients) but who don't know what the gamma function is. But in order to implement option (b), I need to be able to test whether a symbolic expression contains any subexpression of the form gamma(foo). Can the pattern matching functionality in pynac handle this? Or is there another way to do it? Best, Tom --- Tom Coates Royal Society University Research Fellow Reader in Pure Mathematics Imperial College London -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org