Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Factorial simplification error

I've run into an issue when running simplify on an equation containing a factorial:

sage: var('n') sage: z1 = (-1)^(1/2(n - 1))factorial(n) == 0 sage: z2 = 0 == (-1)^(1/2(n - 1))factorial(n) sage: z1.simplify_trig() -In(-1)^(1/2n) != 0 sage: z2.simplify_trig() 0 == -I(-1)^(1/2n)factorial(n)

My best guess is when sage sends the equation down to maxima for simplification it's interpreting

(-1)^(1/2(n - 1))n! = 0

as

(-1)^(1/2(n - 1))n != 0

Any ideas on how I can work around this?

Factorial simplification error

I've run into an issue when running simplify on an equation containing a factorial:

sage: var('n')
sage: z1 =  (-1)^(1/2(n (-1)^(1/2*(n - 1))factorial(n) 1))*factorial(n) == 0
sage: z2 = 0 == (-1)^(1/2(n (-1)^(1/2*(n - 1))factorial(n)
1))*factorial(n)
sage: z1.simplify_trig()
-In(-1)^(1/2n) -I*n*(-1)^(1/2*n) != 0
sage: z2.simplify_trig()
0 == -I(-1)^(1/2n)factorial(n)

-I*(-1)^(1/2*n)*factorial(n)

My best guess is when sage sends the equation down to maxima for simplification it's interpreting

(-1)^(1/2(n

(-1)^(1/2*(n - 1))n! 1))*n!  =  0

0

as

(-1)^(1/2(n

(-1)^(1/2*(n - 1))n 1))*n   !=   0

0

Any ideas on how I can work around this?

Factorial simplification error

I've run into an issue when running simplify on an equation containing a factorial:

sage: var('n')
sage: z1 =  (-1)^(1/2*(n - 1))*factorial(n) == 0
sage: z2 = 0 == (-1)^(1/2*(n - 1))*factorial(n)
sage: z1.simplify_trig()
-I*n*(-1)^(1/2*n) z1.simplify()
n*(-1)^(1/2*n - 1/2) != 0
sage: z2.simplify_trig()
z2.simplify()
0 == -I*(-1)^(1/2*n)*factorial(n)
(-1)^(1/2*n - 1/2)*factorial(n)

My best guess is when sage sends the equation down to maxima for simplification it's interpreting

(-1)^(1/2*(n - 1))*n!  =  0

as

(-1)^(1/2*(n - 1))*n   !=   0

Any ideas on how I can work around this?