Ask Your Question

Revision history [back]

There is

sage: R = ZZ['x']
sage: x = R.gen()
sage: (x^2 + 2*x + 1).is_irreducible()
False
sage: (x^2 - x + 1).is_irreducible()
True

Note that the irreducibility depends on the base ring (the integers in the example above).

sage: xZZ = polygen(ZZ)
sage: xQQ = polygen(QQ)
sage: (2*xZZ).is_irreducible()
False
sage: (2*xQQ).is_irreducible()
True