Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168728
Image: ubuntu2004
# Basic test, based only the documentation here: # http://www.sagemath.org/doc/constructions/polynomials.html R = PolynomialRing(QQ, 2, 'ab', order='lp') a,b=R.gens() I=(a^2-b^2-3,a-2*b)*R B=I.groebner_basis(); B
\newcommand{\Bold}[1]{\mathbf{#1}}\left[a - 2 b, b^{2} - 1\right]
# The same test, but variable names are 2 characters R = PolynomialRing(QQ, 2, 'a1,a2', order='lp') a1,a2=R.gens() I=(a1^2-a2^2-3,a1-2*a2)*R B=I.groebner_basis(); B
\newcommand{\Bold}[1]{\mathbf{#1}}\left[a_{1} - 2 a_{2}, a_{2}^{2} - 1\right]
# More complicated test, see # http://140.78.129.14:8081/~tester/monitor.php?id=1323524250664 for details R = PolynomialRing(QQ, 11, 'a1,a2,b1,b2,c1,c2,d1,d2,e1,e2,z1', order='lp') a1,a2,b1,b2,c1,c2,d1,d2,e1,e2,z1=R.gens() I=(2*d1-b1-c1, 2*d2-b2-c2, 2*e1-c1-a1, 2*e2-c2-a2, z1*(((e1-d1)^2+(e2-d2)^2)*4-(a1-b1)^2-(a2-b2)^2)-1)*R B=I.groebner_basis(); B
\newcommand{\Bold}[1]{\mathbf{#1}}\left[1\right]
# Ceva's theorem, see # http://140.78.129.14:8081/~tester/monitor.php?id=1323701214605 as well R = PolynomialRing(QQ, 16, 'a1,a2,b1,b2,c1,c2,d1,d2,e1,e2,f1,f2,g1,g2,z1,z2', order='lp') a1,a2,b1,b2,c1,c2,d1,d2,e1,e2,f1,f2,g1,g2,z1,z2=R.gens() I=(b1*c2-d1*c2-b2*c1+d2*c1+d1*b2-d2*b1,e1*c2-a1*c2-e2*c1+a2*c1+a1*e2-a2*e1,b1*f2-a1*f2-b2*f1+a2*f1+a1*b2-a2*b1,d1*g2-a1*g2-d2*g1+a2*g1+a1*d2-a2*d1,b1*g2-e1*g2-b2*g1+e2*g1+e1*b2-e2*b1,g1*c2-f1*c2-g2*c1+f2*c1+f1*g2-f2*g1,z1*(b1*c2-a1*c2-b2*c1+a2*c1+a1*b2-a2*b1)-1,z2*(((a1-f1)^2+(a2-f2)^2)*((b1-d1)^2+(b2-d2)^2)*((c1-e1)^2+(c2-e2)^2)-((f1-b1)^2+(f2-b2)^2)*((d1-c1)^2+(d2-c2)^2)*((e1-a1)^2+(e2-a2)^2))-1,a1,a2,b1,b2-1)*R B=I.groebner_basis(); B
\newcommand{\Bold}[1]{\mathbf{#1}}\left[1\right]