code stringlengths 1 1.72M | language stringclasses 1
value |
|---|---|
#
# jython examples for jas.
# $Id$
#
from jas import Ring
from jas import Ideal
# ? example
r = Ring( "Rat(x,y,z) L" );
print "Ring: " + str(r);
print;
ps = """
(
( z^3 - y ),
( y z - x ),
( y^3 - x^2 z ),
( x z^2 - y^2 )
)
""";
f = Ideal( r, ps );
print "Ideal: " + str(f);
print;
from edu.jas.gbmod impor... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring
from jas import Ideal
from jas import startLog
from jas import terminate
# Nabashima, ISSAC 2007, example F5
# integral function coefficients
r = Ring( "IntFunc(b, a, c) (x,y) L" );
print "Ring: " + str(r);
print;
ps = """
(
( { a } x^2 y + {... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring
from jas import Ideal
from jas import startLog
from jas import terminate
# Nabashima, ISSAC 2007, example Ex-Fig-2
# integral function coefficients
r = Ring( "IntFunc(a, b, c) (x) L" );
print "Ring: " + str(r);
print;
ps = """
(
( { a } x^3 )... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring
from jas import Ideal
from jas import startLog
from jas import terminate
# ideal intersection example
r = Ring( "Rat(x,y,z) L" );
print "Ring: " + str(r);
print;
ps1 = """
(
( x - 1 ),
( y - 1 ),
( z - 1 )
)
""";
ps2 = """
(
( x - 2 ),
(... | Python |
#
# jython examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import SolvableRing, SolvPolyRing, PolyRing, SolvableIdeal
from jas import QQ, Quat
# WA_32 solvable polynomial example
p = PolyRing(QQ(),"a,b,e1,e2,e3");
#is automatic: [one,a,b,e1,e2,e3] = p.gens();
relation... | Python |
#
# jython examples for jas.
# $Id$
#
## \begin{PossoExample}
## \Name{Hawes2}
## \Parameters{a;b;c}
## \Variables{x;y[2];z[2]}
## \begin{Equations}
## x+2y_1z_1+3ay_1^2+5y_1^4+2cy_1 \&
## x+2y_2z_2+3ay_2^2+5y_2^4+2cy_2 \&
## 2 z_2+6ay_2+20 y_2^3+2c \&
## 3 z_1^2+y_1^2+b \&
## 3z_2^2+y_2^2+b \&
## \end{Equations}
## \e... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring
from jas import Ideal
from jas import startLog
from jas import terminate
from edu.jas.arith import BigRational
# Legendre polynomial example
# P(0) = 1
# P(1) = x
# P(n) = 1/n [ (2n-1) * x * P(n-1) - (n-1) * P(n-2) ]
r = Ring( "Q(x) L" );
#r = ... | Python |
#
# jython for jas example 3 integer programming.
# $Id$
#
# CLO2, p374,c
# 3 A + 2 B + C + D = 45
# A + 2 B + 3 C + E = 21
# 2 A + B + C + F = 18
#
# max: 3 A + 4 B + 2 C
#
import sys;
from jas import Ring
from jas import Ideal
#r = Ring( "Rat(w1,w2,w3,w4,w5,w6,z1,z2,z3) W( (0,0,0,0,0,0,1,1,1),(-3,-4,-2,0,... | Python |
#
# jython examples for jas.
# $Id$
#
from jas import SolvableModule
from jas import SolvableSubModule
# Quantum plane example
rsan = """
AN[ (i) (i^2 + 1) ] (Y,X,x,y) G
RelationTable
(
( y ), ( x ), ( {i} x y )
( X ), ( Y ), ( {i} Y X )
)
""";
rsc = """
C(Y,X,x,y) G |2|
RelationTable
(
( y ), ( x ), ( 0i1 x y )... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from java.lang import System
from java.lang import Integer
from jas import Ring, PolyRing
from jas import QQ, DD, EF
from jas import terminate
from jas import startLog
# polynomial examples: real root tower over Q
r = EF(QQ()).realExtend("q","q^3 - 3", "[1,2]").re... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import QQ
from jas import DD
from jas import Ring
from jas import SeriesRing
from jas import startLog
from edu.jas.ps import Coefficients
from edu.jas.ps import UnivPowerSeriesMap
# example for power series
#
#
#
# rational number examples
#
psr = SeriesR... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring, PolyRing, ParamIdeal, QQ
from jas import startLog, terminate
# Raksanyi & Walter example
# integral/rational function coefficients
r = PolyRing(PolyRing(QQ(),"a1,a2,a3,a4",PolyRing.grad),"x1,x2,x3,x4",PolyRing.lex);
#print "r = " + str(r);
... | Python |
#
# jython examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import PolyRing, QQ, ZM
from jas import terminate
from jas import startLog
# polynomial examples: squarefree: characteristic 0
r = PolyRing(QQ(),"x, y, z",PolyRing.lex)
print "Ring: " + str(r);
print;
[one,x,... | Python |
#
# jruby examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import SolvableRing, SolvPolyRing, PolyRing, RingElem
from jas import QQ, startLog, SLR
# Ore extension solvable polynomial example, Gomez-Torrecillas, 2003
pcz = PolyRing(QQ(),"x,y,z");
#is automatic: [one,x,y,... | Python |
#
# jython examples for jas.
# $Id$
#
#from java.lang import System
from jas import WordRing, WordPolyRing, WordIdeal, PolyRing, SolvPolyRing
from jas import terminate, startLog
from jas import QQ, ZZ, GF, ZM
# non-commutative polynomial examples: solvable polynomials example
r = WordPolyRing(QQ(),"a,b,e1,e2,e3");
... | Python |
#
# jython examples for jas.
from jas import SolvableRing
# U(sl_2_e) example
rs = """
# solvable polynomials, U(sl_2_e):
Rat(e,h) G
RelationTable
(
( h ), ( e ), ( e h + 2 e )
)
""";
r = SolvableRing( rs );
print "SolvableRing: " + str(r);
print;
ps = """
(
( e^2 + h^3 )
)
""";
f = r.ideal( ps );
print "Solv... | Python |
#
# jython examples for jas.
# $Id$
#
## \begin{PossoExample}
## \Name{Hawes2}
## \Parameters{a;b;c}
## \Variables{x;y[2];z[2]}
## \begin{Equations}
## x+2y_1z_1+3ay_1^2+5y_1^4+2cy_1 \&
## x+2y_2z_2+3ay_2^2+5y_2^4+2cy_2 \&
## 2 z_2+6ay_2+20 y_2^3+2c \&
## 3 z_1^2+y_1^2+b \&
## 3z_2^2+y_2^2+b \&
## \end{Equations}
## \e... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from java.lang import System
from java.lang import Integer
from jas import Ring
from jas import PolyRing
from jas import Ideal
from jas import terminate
from jas import startLog
from jas import QQ, DD, CR
# polynomial examples: complex factorization via algebraic f... | Python |
#
# jython examples for jas.
# $Id$
#
#from java.lang import System
from jas import WordRing, WordPolyRing, WordIdeal, PolyRing, SolvPolyRing
from jas import terminate, startLog
from jas import QQ, ZZ, GF, ZM
# non-commutative polynomial examples: solvable polynomials example
#r = WordPolyRing(QQ(),"a,b,e1,e2,e3");... | Python |
#
# jython examples for jas.
# $Id$
#
from jas import Ring
from jas import Ideal
# ? example
r = Ring( "Rat(x,y,z) L" );
print "Ring: " + str(r);
print;
ps = """
(
( z^3 - y ),
( y z - x ),
( y^3 - x^2 z ),
( x z^2 - y^2 )
)
""";
f = Ideal( r, ps );
print "Ideal: " + str(f);
print;
rg = f.GB();
print "seq O... | Python |
#
# jython examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import Ring
from jas import Ideal
from jas import terminate
from jas import startLog
# polynomial examples: factorization
#r = Ring( "Mod 1152921504606846883 (x,y,z) L" );
#r = Ring( "Rat(x,y,z) L" );
#r = Ring... | Python |
#
# jython examples for jas.
# $Id$
#
import sys
from java.lang import System
from jas import PolyRing, Ideal
from jas import terminate, startLog
from jas import ZM, RF, QQ, DD
# system biology examples: GB in RF()
# see: Informatik Spektrum, 2009, February,
# Laubenbacher, Sturmfels: Computer Algebra in der System... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import QQ, DD, Ring
from jas import MultiSeriesRing, MPS
from jas import startLog
from edu.jas.ps import MultiVarCoefficients
from edu.jas.ps import MultiVarPowerSeriesMap
# example for power series
#
#
#
# rational number examples
#
psr = MultiSeriesRing... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring, Ideal
from jas import startLog, terminate
# sicora, e-gb example
r = Ring( "Z(t) L" );
print "Ring: " + str(r);
print;
ps = """
(
( 2 t + 1 ),
( t**2 + 1 )
)
""";
f = r.ideal( ps );
print "Ideal: " + str(f);
print;
#startLog();
g = f.eGB... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from java.lang import System
from java.lang import Integer
from jas import Ring, PolyRing
from jas import terminate
from jas import startLog
from jas import QQ, ZM, RF
# polynomial examples: ideal radical decomposition, inseparable case, 0-dim
cr = PolyRing(ZM(5),... | Python |
#
# jython examples for jas.
# $Id$
#
from jas import SolvableRing
# exterior calculus example
# Hartley and Tuckey, 1993,
# GB in Clifford and Grassmann algebras
rs = """
# exterior calculus example:
Rat(a,b,c,f,g,h,u,v,w,x,y,z) L
RelationTable
(
( b ), ( a ), ( - a b ),
( c ), ( a ), ( - a c ),
( f ), ( a ), (... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import QQ, Ring, PolyRing, Ideal
from jas import startLog, terminate
# trinks 6/7 example
#r = Ring( "Mod 19 (B,S,T,Z,P,W) L" );
#r = Ring( "Mod 1152921504606846883 (B,S,T,Z,P,W) L" ); # 2^60-93
#r = Ring( "Quat(B,S,T,Z,P,W) L" );
#r = Ring( "Z(B,S,T,Z,P,W... | Python |
#
# jython examples for jas.
# $Id$
#
from jas import SolvableRing
from edu.jas.poly import ModuleList;
from edu.jas.gbmod import SolvableSyzygyAbstract;
# WA_32 example
rs = """
# solvable polynomials, Weyl algebra A_3,2:
Rat(a,b,e1,e2,e3) G3|
RelationTable
(
( e3 ), ( e1 ), ( e1 e3 - e1 ),
( e3 ), ( e2 ), ( ... | Python |
#
# jython for jas example 3 integer programming.
# $Id$
#
# CLO2, p374,c
# 3 A + 2 B + C + D = 45
# A + 2 B + 3 C + E = 21
# 2 A + B + C + F = 18
#
# max: 3 A + 4 B + 2 C
#
import sys;
from jas import Ring
from jas import Ideal
r = Ring( "Rat(w1,w2,w3,w4,w5,w6,z1,z2,z3) W( (0,0,0,0,0,0,1,1,1),(-3,-4,-2,0,0... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring, PolyRing, SolvPolyRing
from jas import Ideal
from jas import Module, SubModule, SolvableModule, SolvableSubModule
from jas import startLog
from jas import terminate
from jas import ZZ, QQ, ZM, GF, DD, CC, Quat, Oct, AN, RealN, RF, RC, LC, RR, PS,... | Python |
#
# read output of jas runnings and prepare input for gnuplot
#
import re;
import os;
exam = "kat_6";
runs = "t16";
#bname = exam + "_" + runs;
bname = "k6seqpair-3"
fname = bname + ".out";
oname = bname + ".po";
f=open(fname,"r");
print f;
o=open(oname,"w");
print o;
res = {};
resold = {};
for line in f:
if ... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring
from jas import Ideal
from jas import startLog
# example cyclic6, optimize term order
# optimal is no change
#r = Ring( "Rat (x1,x2,x3,x4,x5,x6) G" );
#r = Ring( "Mod 3 (x1,x2,x3,x4,x5,x6) L" );
#r = Ring( "Rat (x6,x5,x4,x3,x2,x1) G" );
#r =... | Python |
#
# jython examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import PolyRing, ZM, QQ
from jas import terminate
from jas import startLog
# polynomial examples: factorization over Z_p
r = PolyRing(ZM(1152921504606846883,field=True),"(x)",PolyRing.lex);
#r = PolyRing(ZM(19)... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import PolyRing, QQ, RF
from jas import Ideal
from jas import startLog
from jas import terminate
# Suzuki and Sato, ISSAC 2006, example 1
# integral function coefficients
#r = PolyRing( QQ(),"b,a,z,y,x", PolyRing.lex );
#r = PolyRing( RF( PolyRing(QQ(),"a,... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import PolyRing, QQ, RF
from jas import Ideal
from jas import startLog
from jas import terminate
# Montes JSC 2002, 33, 183-208, example 11.2
# integral function coefficients
r = PolyRing( PolyRing(QQ(),"f, e, d, c, b, a",PolyRing.lex), "y,x", PolyRing.lex... | Python |
#
# jython examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import Ring, PolyRing
from jas import terminate
from jas import startLog
from jas import QQ, DD
# polynomial examples: real roots over Q for zero dimensional ideals
#r = Ring( "Rat(x) L" );
#r = Ring( "Q(x) L"... | Python |
#
# jython examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import Ring, PolyRing
from jas import terminate
from jas import startLog
from jas import QQ, DD
# polynomial examples: real roots over Q for zero dimensional ideals
r = PolyRing(QQ(),"q,w,s,x",PolyRing.lex);
... | Python |
#
# jython examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import Ring, PolyRing
from jas import terminate
from jas import startLog
from jas import QQ, DD
# polynomial examples: zero dimensional ideals prime and primary decomposition
#r = Ring( "Rat(x) L" );
#r = Ring... | Python |
#
# jython examples for jas.
# $Id$
#
#from java.lang import System
from jas import WordRing, WordPolyRing, WordIdeal
from jas import terminate, startLog
from jas import QQ, ZZ, GF, ZM
# non-commutative polynomial examples: evans example
r = WordPolyRing(QQ(),"x,y,z");
print "WordPolyRing: " + str(r);
print;
[one,... | Python |
#
# jython examples for jas.
# $Id$
#
#import sys;
from jas import Ring, PolyRing, Ideal
from jas import ZZ
from jas import startLog
# e-gb and d-gb example to compare with hermit normal form
r = PolyRing( ZZ(), "x4,x3,x2,x1", PolyRing.lex );
print "Ring: " + str(r);
print;
[one,x4,x3,x2,x1] = r.gens();
f1 = x1 +... | Python |
#
# jython examples for jas.
# $Id$
#
from jas import SolvableRing
# WA_1 example
rs = """
# solvable polynomials, Weyl algebra A_1:
Rat(p,t,x,d) G
RelationTable
(
( d ), ( x ), ( x d + 1 )
)
""";
r = SolvableRing( rs );
print "SolvableRing: " + str(r);
print;
ps = """
(
( x^7 ),
( x d + 7 )
)
""";
i7 = r.id... | Python |
#
# jython examples for jas.
# $Id$
#
import sys
from java.lang import System
from jas import Ring, RF, QQ, PolyRing
from jas import terminate
from jas import startLog
# elementary integration
r = PolyRing(QQ(),"x",PolyRing.lex);
print "r = " + str(r);
rf = RF(r);
print "rf = " + str(rf.factory());
[one,x] = rf.ge... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring
from jas import Ideal
from jas import startLog
from jas import terminate
# Nabashima, ISSAC 2007, example F3
# integral function coefficients
r = Ring( "IntFunc(c, b, a, d) (x) L" );
print "Ring: " + str(r);
print;
ps = """
(
( { a } x^4 + { ... | Python |
#
# jython examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import Ring
from jas import Ideal
# sparse polynomial powers
#r = Ring( "Mod 1152921504606846883 (x,y,z) G" );
#r = Ring( "Rat(x,y,z) G" );
#r = Ring( "C(x,y,z) G" );
r = Ring( "Z(x,y,z) L" );
print "Ring: " +... | Python |
#
# jython examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import Ring, PolyRing
from jas import terminate
from jas import startLog
from jas import QQ, DD
# polynomial examples: ideal radical decomposition
#r = Ring( "Rat(x) L" );
#r = Ring( "Q(x) L" );
r = PolyRing(Q... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring
from jas import ParamIdeal
from jas import startLog
from jas import terminate
# simple example for comprehensive GB
# integral/rational function coefficients
#r = Ring( "RatFunc(u,v) (x,y) L" );
r = Ring( "IntFunc(u,v) (x,y) L" );
print "Ring: ... | Python |
import sys;
from jas import Ring, PolyRing, ParamIdeal, QQ, ZM, RR
from jas import startLog, terminate
# Boolean coefficient boolean GB
# see S. Inoue and A. Nagai "On the Implementation of Boolean Groebner Bases" in ASCM 2009
# Z_2 regular ring coefficent example
r = PolyRing(RR(ZM(2),3),"x,y",PolyRing.lex);
prin... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring
from jas import Ideal
from jas import startLog
from jas import terminate
# Raksanyi & Walter example
# rational function coefficients
r = Ring( "IntFunc(a1, a2, a3, a4) (x1, x2, x3, x4) L" );
print "Ring: " + str(r);
print;
ps = """
(
( x4 - {... | Python |
#
# jython examples for jas.
# $Id$
#
from jas import SolvableRing
# U(sl_3) example
rs = """
# solvable polynomials, U(sl_3):
Rat(Xa,Xb,Xc,Ya,Yb,Yc,Ha,Hb) G
RelationTable
(
( Xb ), ( Xa ), ( Xa Xb - Xc ),
( Ya ), ( Xa ), ( Xa Ya - Ha ),
( Yc ), ( Xa ), ( Xa Yc + Yb ),
( Ha ), ( Xa ), ( Xa Ha + 2 Xa ),
( Hb ),... | Python |
#
# jython examples for jas.
# $Id$
#
## \begin{PossoExample}
## \Name{Hawes2}
## \Parameters{a;b;c}
## \Variables{x;y[2];z[2]}
## \begin{Equations}
## x+2y_1z_1+3ay_1^2+5y_1^4+2cy_1 \&
## x+2y_2z_2+3ay_2^2+5y_2^4+2cy_2 \&
## 2 z_2+6ay_2+20 y_2^3+2c \&
## 3 z_1^2+y_1^2+b \&
## 3z_2^2+y_2^2+b \&
## \end{Equations}
## \e... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring
from jas import Ideal
from jas import startLog
from jas import terminate
# Nabashima, ISSAC 2007, example F2
# integral function coefficients
r = Ring( "IntFunc(b, a) (x,y) L" );
print "Ring: " + str(r);
print;
ps = """
(
( { a } x^2 y^3 + { ... | Python |
#
# jython examples for jas.
# $Id$
#
import sys
from java.lang import System
from jas import PolyRing, Ideal
from jas import QQ, AN, RF
from jas import terminate, startLog
# polynomial examples: prime/primary decomposition in Q[w2,x,wx,y,z]
Q = PolyRing(QQ(),"w2,x,wx,y,z",PolyRing.lex);
print "Q = " + str(Q);... | Python |
#
# jython examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import PolyRing, QQ, ZM, AN
from jas import terminate
from jas import startLog
# polynomial examples: squarefree: characteristic p, finite algebraic
ar = PolyRing(ZM(7,field=True),"i",PolyRing.lex)
[one,i] = ar... | Python |
#
# jython examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import PolyRing, QQ, ZM, RF
from jas import terminate
from jas import startLog
# polynomial examples: squarefree: characteristic p, infinite
r = PolyRing( RF(PolyRing(ZM(5,field=True),"u, v",PolyRing.lex)), "x ... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring, PolyRing, Ideal
from jas import QQ, ZZ, RF
from jas import startLog, terminate
# example: Algebraic Statistics
# Drton, Sturmfels, Sullivant, example 2.1.3
r = PolyRing(RF(PolyRing(QQ(),"u0,u1,u2,u12",PolyRing.lex)),"l1,l2",PolyRing.grad);
pr... | Python |
#
# jython examples for jas.
# $Id$
#
from jas import SolvableRing
# WA_32 solvable polynomial example
rs = """
# solvable polynomials, Weyl algebra A_3,2:
Rat(a,b,e1,e2,e3) G|3|
RelationTable
(
( e3 ), ( e1 ), ( e1 e3 - e1 ),
( e3 ), ( e2 ), ( e2 e3 - e2 )
)
""";
r = SolvableRing( rs );
print "SolvableRing: " +... | Python |
#
# jython examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import Ring
from jas import Ideal
from jas import terminate
from jas import startLog
# polynomial examples: factorization over Z
r = Ring( "Z(x) L" );
print "Ring: " + str(r);
print;
[one,x] = r.gens();
#f =... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from java.lang import System
from java.lang import Integer
from jas import Ring
from jas import PolyRing
from jas import Ideal
from jas import QQ, AN
from jas import terminate
from jas import startLog
# polynomial examples: absolute factorization over Q(i)
Qr = Pol... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from java.lang import System
from java.lang import Integer
from jas import Ring, PolyRing
from jas import terminate, startLog, noThreads
from jas import QQ, ZM, RF
# polynomial examples: ideal radical decomposition, inseparable cases, dim > 0
#noThreads(); # must ... | Python |
#
# jython examples for jas.
# $Id$
#
from jas import Ring
from jas import Ideal
# trinks 7 example
r = Ring( "Rat(B,S,T,Z,P,W) L" );
print "Ring: " + str(r);
print;
ps = """
(
( 45 P + 35 S - 165 B - 36 ),
( 35 P + 40 Z + 25 T - 27 S ),
( 15 W + 25 S P + 30 Z - 18 T - 165 B**2 ),
( - 9 W + 15 T P + 20 S Z... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring
from jas import Ideal
# pppj 2006 paper examples
r = Ring( "Z(x1,x2,x3) L" );
print "Ring: " + str(r);
print;
ps = """
(
( 3 x1^2 x3^4 + 7 x2^5 - 61 )
)
""";
#f = Ideal( r, ps );
#print "Ideal: " + str(f);
#print;
f = r.ideal( ps );
print... | Python |
#
# jython examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import Ring
from jas import Ideal
from jas import terminate
from jas import startLog
# polynomial examples: factorization over Z_p
#r = Ring( "Mod 1152921504606846883 (x) L" );
#r = Ring( "Mod 19 (x) L" );
r = ... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring, PolyRing, Ideal, PSIdeal, QQ, ZM
from jas import startLog, terminate
# example from CLO(UAG), 4.4
#R = PolyRing( ZM(32003), "x,y,z" );
R = PolyRing( QQ(), "x,y,z" );
print "Ring: " + str(R);
print;
[one,x,y,z] = R.gens();
f1 = x**5 - x * y**6... | Python |
#
# jython examples for jas.
from jas import SolvableRing
# U(sl_2_f) example
rs = """
# solvable polynomials, U(sl_2_f):
Rat(f,h) G
RelationTable
(
( h ), ( f ), ( f h - 2 f )
)
""";
r = SolvableRing( rs );
print "SolvableRing: " + str(r);
print;
ps = """
(
( h^2 + f^3 )
)
""";
f = r.ideal( ps );
print "Sol... | Python |
#
# jython examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import Ring
from jas import Ideal
from jas import terminate
from jas import startLog
# polynomial examples: factorization
#r = Ring( "Mod 1152921504606846883 (x,y,z) L" );
#r = Ring( "Rat(x,y,z) L" );
#r = Ring... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring
from jas import Ideal
from jas import startLog
from jas import terminate
# Nabashima, ISSAC 2007, example Ex-4.3
# integral function coefficients
r = Ring( "IntFunc(a, b) (y,x) L" );
print "Ring: " + str(r);
print;
ps = """
(
( x y + x ),
( ... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring
from jas import ParamIdeal
from jas import startLog
from jas import terminate
# 2 univariate polynomials of degree 2 example for comprehensive GB
# integral/rational function coefficients
#r = Ring( "RatFunc(u,v) (x,y) L" );
r = Ring( "IntFunc(... | Python |
#
# jython examples for jas.
# $Id$
#
## \begin{PossoExample}
## \Name{Hawes2}
## \Parameters{a;b;c}
## \Variables{x;y[2];z[2]}
## \begin{Equations}
## x+2y_1z_1+3ay_1^2+5y_1^4+2cy_1 \&
## x+2y_2z_2+3ay_2^2+5y_2^4+2cy_2 \&
## 2 z_2+6ay_2+20 y_2^3+2c \&
## 3 z_1^2+y_1^2+b \&
## 3z_2^2+y_2^2+b \&
## \end{Equations}
## \e... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from java.lang import System
from java.lang import Integer
from jas import Ring, PolyRing
from jas import terminate, startLog, noThreads
from jas import QQ, ZM, RF, AN
# polynomial examples: ideal radical decomposition, example 8.16 in GB book, base field with p-th... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import PolyRing, QQ, RF
from jas import Ideal
from jas import startLog
from jas import terminate
# Montes JSC 2002, 33, 183-208, example 5.1, simplified
# integral function coefficients
r = PolyRing( PolyRing(QQ(),"a, b",PolyRing.lex), "u,z,y,x", PolyRing.... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from java.lang import System
from java.lang import Integer
from jas import Ring, PolyRing
from jas import terminate
from jas import startLog
from jas import QQ, DD
# polynomial examples: complex roots over Q for zero dimensional ideal `cyclic5'
#r = Ring( "Q(x) L" ... | Python |
#
# jython examples for jas.
# $Id$
#
from jas import SolvableRing
# U(sl_3) example
rs = """
# solvable polynomials, U(sl_3):
Rat(Xa,Xb,Xc,Ya,Yb,Yc,Ha,Hb) G
RelationTable
(
( Xb ), ( Xa ), ( Xa Xb - Xc ),
( Ya ), ( Xa ), ( Xa Ya - Ha ),
( Yc ), ( Xa ), ( Xa Yc + Yb ),
( Ha ), ( Xa ), ( Xa Ha + 2 Xa ),
( Hb ),... | Python |
#
# jython examples for jas.
# $Id$
#
from java.lang import System
from jas import PolyRing, Ideal
from jas import terminate, startLog
from jas import ZM
# system biology examples: GB in Z_2
# see: Informatik Spektrum, 2009, February,
# Laubenbacher, Sturmfels: Computer Algebra in der Systembiologie
r = PolyRing(ZM... | Python |
#
# jython examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import Ring
from jas import Ideal
from jas import terminate
from jas import startLog
# polynomial examples: absolute factorization over Q
#r = Ring( "Rat(x) L" );
r = Ring( "Q(x) L" );
print "Ring: " + str(r);... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring
from jas import Ideal
from jas import startLog
from jas import terminate
# trinks 6/7 example
#r = Ring( "Mod 19 (B,S,T,Z,P,W) L" );
#r = Ring( "Mod 1152921504606846883 (B,S,T,Z,P,W) L" ); # 2^60-93
#r = Ring( "Quat(B,S,T,Z,P,W) L" );
#r = Ring... | Python |
#
# jruby examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import SolvableRing, SolvPolyRing, PolyRing, RingElem
from jas import QQ, startLog, SLC
# Ore extension solvable polynomial example, Gomez-Torrecillas, 2003
pcz = PolyRing(QQ(),"x,y,z");
#is automatic: [one,x,y,... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from java.lang import System
from java.lang import Integer
from jas import Ring, PolyRing
from jas import terminate
from jas import startLog
from jas import QQ, DD
# polynomial examples: real roots over Q
r = PolyRing(QQ(),"I,x,y,z",PolyRing.lex);
print "Ring: " +... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import PolyRing, Ideal, ZZ
from jas import startLog, terminate
# tuzun, e-gb example
r = PolyRing(ZZ(), "(t)" );
print "Ring: " + str(r);
[one,t] = r.gens();
print "one: " + str(one);
print "t: " + str(t);
print;
f1 = 2 * t + 1;
f2 = t**2 + 1;
F = [f1... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import PolyRing, QQ, RF
from jas import Ideal
from jas import startLog
from jas import terminate
# Montes JSC 2002, 33, 183-208, example 11.4
# integral function coefficients
R = PolyRing( PolyRing(QQ(),"Q2, P2, Q1, P1",PolyRing.lex), "f3, e3, f2, e2", Pol... | Python |
#
# jython examples for jas.
# $Id$
#
## \begin{PossoExample}
## \Name{Hawes2}
## \Parameters{a;b;c}
## \Variables{x;y[2];z[2]}
## \begin{Equations}
## x+2y_1z_1+3ay_1^2+5y_1^4+2cy_1 \&
## x+2y_2z_2+3ay_2^2+5y_2^4+2cy_2 \&
## 2 z_2+6ay_2+20 y_2^3+2c \&
## 3 z_1^2+y_1^2+b \&
## 3z_2^2+y_2^2+b \&
## \end{Equations}
## \e... | Python |
#
# jython for jas example 3 integer programming.
# $Id$
#
# CLO2, p374,a,b
# 3 A + 2 B + C + D = 10
# 4 A + B + C = 5
#
# max: 2 A + 3 B + C + 5 D
#
import sys;
from jas import Ring
from jas import Ideal
#r = Ring( "Rat(w1,w2,w3,w4,z1,z2) W( (0,0,0,0,1,1),(-2,-3,-1,-5,0,0) )" );
#r = Ring( "Rat(w1,w2,w3,w4,z... | Python |
#
# jython examples for jas.
from jas import SolvableModule
from jas import SolvableSubModule
# Quantum plane example
rsan = """
# not with twosidedGB, because of field
AN[ (i) (i^2 + 1) ] (Y,X,x,y) G
RelationTable
(
( y ), ( x ), ( {i} x y )
( X ), ( Y ), ( {i} Y X )
)
""";
rsc = """
# not supported: C(Y,X,x,y) ... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import SolvableRing
from jas import startLog, terminate
# WA_32 example
rs = """
# solvable polynomials, Weyl algebra A_3,2:
Rat(a,b,e1,e2,e3) G
RelationTable
(
( e3 ), ( e1 ), ( e1 e3 - e1 ),
( e3 ), ( e2 ), ( e2 e3 - e2 )
)
""";
r = SolvableRing( rs )... | Python |
#
# jython examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import PolyRing, QQ
from jas import terminate
from jas import startLog
# polynomial examples: factorization
cr = PolyRing(QQ(),"x",PolyRing.lex );
print "Ring cr: " + str(cr);
r = PolyRing(cr,"y,z",PolyRing.le... | Python |
import sys;
from jas import Ring, PolyRing, ParamIdeal, QQ, ZM, RR
from jas import startLog, terminate
# Boolean coefficient boolean GB
# see S. Inoue and A. Nagai "On the Implementation of Boolean Groebner Bases" in ASCM 2009
# Z_2 regular ring coefficent example
r = PolyRing(RR(ZM(2),3),"a,x,y",PolyRing.lex);
pr... | Python |
#
# jython examples for jas.
# $Id$
#
from jas import SolvableRing
from edu.jas.application import Ideal
# U_t, dim 2 and WA_1 example
rs1 = """
# solvable polynomials, U_t, dim_2 and Weyl algebra A_1:
Rat(D,X,a,b) G|2|
RelationTable
(
( b ), ( a ), ( a b + %s a )
( X ), ( D ), ( D X + 1 )
)
""";
rs1c = """
# so... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring
from jas import Ideal
from jas import startLog
from jas import terminate
# Nabashima, ISSAC 2007, example F7
# integral function coefficients
r = Ring( "IntFunc(a, b) (z,y,x) G" );
print "Ring: " + str(r);
print;
ps = """
(
( x^3 - { a } ),
... | Python |
#
# jython examples for jas.
# $Id$
#
from jas import SolvableRing
from jas import startLog, terminate
from edu.jas.application import Ideal
# U_sl_2 and WA_1 example
rs1 = """
# solvable polynomials, U_sl_2 and Weyl algebra A_1:
Rat(D,X,e,f,h) G|3|
RelationTable
(
( f ), ( e ), ( e f - h ),
( h ), ( e ), ( e h ... | Python |
#
# jython examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import Ring
from jas import Ideal
from jas import terminate
from jas import startLog
# polynomial examples: gcd
#r = Ring( "Mod 1152921504606846883 (x,y,z) L" );
#r = Ring( "Rat(x,y,z) L" );
#r = Ring( "C(x,y,z... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring, PolyRing, RF, ZZ, ZM
from jas import Ideal
from jas import startLog
from jas import terminate
#startLog();
# Lewis example
# integral function coefficients
#r = Ring( "IntFunc(a1,a2,a3,b1,b2,b3,c1,c2,c3,d1,d2,d3,e1,e2,e3) (t1,t2,t3) G" );
#r ... | Python |
#
# jython examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import PolyRing, QQ, ZM
from jas import terminate
from jas import startLog
# polynomial examples: squarefree: characteristic p, finite
#r = PolyRing(QQ(),"x, y, z",PolyRing.lex)
r = PolyRing(ZM(5,field=True),"x... | Python |
#
# jython examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import PolyRing, AN, QQ
from jas import Ideal
from jas import terminate
from jas import startLog
# polynomial examples: factorization over Q(i)
#r = Ring( "AN[ (i) (i^2 + 1) ] (x) L" );
#r = Ring( "AN[ (a) (4 a... | Python |
#
# jython examples for jas.
# $Id$
#
import sys
from java.lang import System
from jas import PolyRing, ZM, QQ, RF
from jas import terminate
from jas import startLog
# polynomial examples: factorization over Z_p
p = 5;
cr = PolyRing(ZM(p,field=True),"u",PolyRing.lex );
print "Ring cr: " + str(cr);
[one,u] = cr.ge... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from java.lang import System
from java.lang import Integer
from jas import Ring, PolyRing
from jas import terminate, startLog, noThreads
from jas import QQ, ZM, RF, AN
# polynomial examples: ideal radical decomposition, modified from example 8.16 in GB book
# noTh... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring
from jas import PolyRing
from jas import Ideal
from jas import startLog
from jas import terminate
from jas import ZZ, QQ, ZM, DD, RF, CC
#r = Ring( "Mod 19 (B,S,T,Z,P,W) L" );
#r = Ring( "Mod 1152921504606846883 (B,S,T,Z,P,W) L" ); # 2^60-93
#r =... | Python |
#
# jython examples for jas.
# $Id$
#
from java.lang import System
from java.lang import Integer
from jas import Ring, PolyRing
from jas import terminate
from jas import startLog
from jas import QQ, DD
# polynomial examples: zero dimensional ideals radical decomposition
#r = Ring( "Rat(x) L" );
#r = Ring( "Q(x) L"... | Python |
#
# jython examples for jas.
# $Id$
#
from jas import Ring
from jas import Ideal
# logic example from Kreutzer JdM 2008
r = Ring( "Mod 2 (a,f,p,u) G" );
print "Ring: " + str(r);
print;
ks = """
(
( a^2 - a ),
( f^2 - f ),
( p^2 - p ),
( u^2 - u )
)
""";
ps = """
(
( p f + p ),
( p u + p + u + 1 ),
( a + u +... | Python |
#
# jython examples for jas.
# $Id$
#
import sys;
from jas import Ring, PolyRing, Ideal
from jas import QQ, ZZ
from jas import startLog, terminate
# example: Algebraic Statistics
# Drton, Sturmfels, Sullivant, example 2.1.3
#r = PolyRing(QQ(),"l1,l2",PolyRing.grad);
r = PolyRing(QQ(),"l1,l2",PolyRing.lex);
print ... | Python |
#
# jython examples for jas.
# $Id$
#
## \begin{PossoExample}
## \Name{Hawes2}
## \Parameters{a;b;c}
## \Variables{x;y[2];z[2]}
## \begin{Equations}
## x+2y_1z_1+3ay_1^2+5y_1^4+2cy_1 \&
## x+2y_2z_2+3ay_2^2+5y_2^4+2cy_2 \&
## 2 z_2+6ay_2+20 y_2^3+2c \&
## 3 z_1^2+y_1^2+b \&
## 3z_2^2+y_2^2+b \&
## \end{Equations}
## \e... | Python |
#
# jython examples for jas.
# $Id$
#
from jas import Ring
from jas import Ideal
from edu.jas.gb import Katsura;
# katsura examples
knum = 4
tnum = 2;
#r = Ring( "Mod 19 (B,S,T,Z,P,W) L" );
#r = Ring( "Mod 1152921504606846883 (B,S,T,Z,P,W) L" ); # 2^60-93
#r = Ring( "Quat(B,S,T,Z,P,W) L" );
#r = Ring( "Z(B,S,T,Z,P... | Python |
Subsets and Splits
SQL Console for ajibawa-2023/Python-Code-Large
Provides a useful breakdown of language distribution in the training data, showing which languages have the most samples and helping identify potential imbalances across different language groups.