┌────────────────────────────────────────────────────────────────────┐ │ Sage Version 6.0, Release Date: 2013-12-17 │ │ Type "notebook()" for the browser-based notebook interface. │ │ Type "help()" for help. │ └────────────────────────────────────────────────────────────────────┘ sage: sage: K = QQ[exp(2*pi*I/23)] sage: K Number Field in a with defining polynomial x^22 + x^21 + x^20 + x^19 + x^18 + x^17 + x^16 + x^15 + x^14 + x^13 + x^12 + x^11 + x^10 + x^9 + x^8 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + x + 1 sage: CyclotomicField(23) Cyclotomic Field of order 23 and degree 22 sage: F = CyclotomicField(23) sage: F.defining_polynomial() x^22 + x^21 + x^20 + x^19 + x^18 + x^17 + x^16 + x^15 + x^14 + x^13 + x^12 + x^11 + x^10 + x^9 + x^8 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + x + 1 sage: F.ring_of_integers().gens() [1, zeta23, zeta23^2, zeta23^3, zeta23^4, zeta23^5, zeta23^6, zeta23^7, zeta23^8, zeta23^9, zeta23^10, zeta23^11, zeta23^12, zeta23^13, zeta23^14, zeta23^15, zeta23^16, zeta23^17, zeta23^18, zeta23^19, zeta23^20, zeta23^21] sage: CyclotomicField? sage: R = ZZ[sqrt(23)] sage: R Order in Number Field in sqrt23 with defining polynomial x^2 - 23 sage: R.is_integrally_closed() True sage: R.factor(2) --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) in () ----> 1 R.factor(Integer(2)) /Applications/Sage-6.0.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/structure/parent.so in sage.structure.parent.Parent.__getattr__ (sage/structure/parent.c:6823)() /Applications/Sage-6.0.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/structure/misc.so in sage.structure.misc.getattr_from_other_class (sage/structure/misc.c:1606)() AttributeError: 'AbsoluteOrder_with_category' object has no attribute 'factor' sage: K=QQ[23^(1/2)] sage: K.factor(2) (Fractional ideal (sqrt23 - 5))^2 sage: K.factor(23) (Fractional ideal (sqrt23))^2 sage: K.factor(1+K.gen()) (Fractional ideal (-2*sqrt23 + 9)) * (Fractional ideal (sqrt23 - 5)) sage: