I thiink this hack is pretty worthless unless you have a better notion of "one more than". e.g. factorial( (n-1)*(n+1)) * n^2 is factorial(n^2), right?
On Thursday, June 18, 2015 at 2:19:21 AM UTC-7, Gaurav Dhingra wrote: > > Hi all > > I was looking on the issue https://github.com/sympy/sympy/issues/8531 > though i disagree for that simplification to occur. > > >>> n = Symbol('n', integer=True, positiv=True) > >>> factrial(n)*(n+1) # i think this should not be simplified to > factorial(n+1) > factorial(n)*(n+1) # currently happens, which i think is correct. > > > >>> n = Symbol('n', integer=True, positiv=True) > >>> ( factorial(n)*(n+1) ).rewrite(factorial) > factorial(n)*(n + 1) # why not returned as factorial(n + 1) ?? > > I was thinking if there is currently any way of rewriting it as > `factorial(n + 1)` > > > Gaurav Dhingra > > > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/c5a0f0f0-cd4b-4ba8-aa57-9ca3dd4dfd50%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
