On Fri, Jan 29, 2010 at 5:06 AM, Santanu Sarkar
<sarkar.santanu....@gmail.com> wrote:
> How one can check weather a polynomial f(x,y) is irreducible over rational
> or not?
>


sage: R.<x,y> = QQ[]
sage: f = (x^3-x*y+y^2-x)*(x^5-3/2*x-y); f
x^8 - x^6*y + x^5*y^2 - x^6 - 3/2*x^4 - x^3*y + 3/2*x^2*y - 1/2*x*y^2
- y^3 + 3/2*x^2 + x*y
sage: f.factor()
(1/2) * (x^3 - x*y + y^2 - x) * (2*x^5 - 3*x - 2*y)
sage: len(f.factor())
2

We should have len(f.factor()) == 1 when f is irreducible.

I'm skeptical that the above function is provably correct, by the way,
since it calls singular, and I don't trust singular's factor function,
personally...

William

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to