Advertisement
JoelSjogren

Untitled

Nov 9th, 2020
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. box% sage
  2. ┌────────────────────────────────────────────────────────────────────┐
  3. │ SageMath version 9.2, Release Date: 2020-10-24 │
  4. │ Using Python 3.8.6. Type "help()" for help. │
  5. └────────────────────────────────────────────────────────────────────┘
  6. sage: R.<x1,x2,x3,s1,s2,s3> = PolynomialRing(QQ, order='lex')
  7. sage: G = ideal(-s1+x1+x2+x3,-s2+x1*x2+x1*x3+x2*x3,-s3+x1*x2*x3).groebner_basis()
  8. sage: G
  9. [x1 + x2 + x3 - s1, x2^2 + x2*x3 - x2*s1 + x3^2 - x3*s1 + s2, x3^3 - x3^2*s1 + x3*s2 - s3]
  10. sage: (x1^2*x2^2 + x1^2*x3^2 + x2^2*x3^2).reduce(G)
  11. -2*s1*s3 + s2^2
  12. sage: -2*(x1+x2+x3)*(x1*x2*x3) + (x1*x2+x1*x3+x2*x3)^2
  13. x1^2*x2^2 + x1^2*x3^2 + x2^2*x3^2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement