ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 11 Oct 2017 21:50:44 +0200Why can one not factor 0?https://ask.sagemath.org/question/39127/why-can-one-not-factor-0/I was trying to understand the structure of (a-b), where "a" and "b" were two very large expressions. So I was doing things like (a-b).simplify_full().factor(). I discovered the following anomaly.
sage: var ('a', 'b') #Adequate for illustration
(a, b)
sage: (a-b); (a-b).factor()
a - b
a - b
sage: b=a #By chance, "a" and "b" were equivalent.
sage: (a-b); (a-b).factor()
0
Traceback (most recent call last):
...
ArithmeticError: factorization of 0 is not defined
I would have expected 0.factor() to give 0.
Richard_LWed, 11 Oct 2017 21:50:44 +0200https://ask.sagemath.org/question/39127/