当前位置: 首页>>代码示例>>Python>>正文


Python Ring.ideal方法代码示例

本文整理汇总了Python中jas.Ring.ideal方法的典型用法代码示例。如果您正苦于以下问题:Python Ring.ideal方法的具体用法?Python Ring.ideal怎么用?Python Ring.ideal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jas.Ring的用法示例。


在下文中一共展示了Ring.ideal方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: str

# 需要导入模块: from jas import Ring [as 别名]
# 或者: from jas.Ring import ideal [as 别名]
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 ), 
 ( P W + 2 T Z - 11 B**3 ), 
 ( 99 W - 11 B S + 3 B**2 ),
 ( B**2 + 33/50 B + 2673/10000 )
) 
""";

f = r.ideal( ps );
print "Ideal: " + str(f);
print;


#Katsura equations for N = 3:

#r = Ring( "Rat(u0,u1,u2,u3) L" );
#print "Ring: " + str(r);
#print;

ps = """
(
 u3*u3 + u2*u2 + u1*u1 + u0*u0 + u1*u1 + u2*u2 + u3*u3 - u0,
 u3*0 + u2*u3 + u1*u2 + u0*u1 + u1*u0 + u2*u1 + u3*u2 - u1,
 u3*0 + u2*0 + u1*u3 + u0*u2 + u1*u1 + u2*u0 + u3*u1 - u2,
开发者ID:rjolly,项目名称:jas,代码行数:33,代码来源:syz.py

示例2: str

# 需要导入模块: from jas import Ring [as 别名]
# 或者: from jas.Ring import ideal [as 别名]
 ( a^2 - a ),
 ( f^2 - f ),
 ( p^2 - p ),
 ( u^2 - u )
)
""";

ps = """
(
 ( p f + p ),
 ( p u + p + u + 1 ),
 ( a + u + 1 ),
 ( a + p + 1 )
)
""";


k = r.ideal( ks );
p = r.ideal( ps );

f = k.sum( p );

print "Ideal: " + str(f);
print;

rg = f.GB();
print "Output:", rg;
print;


开发者ID:,项目名称:,代码行数:30,代码来源:

示例3: Ring

# 需要导入模块: from jas import Ring [as 别名]
# 或者: from jas.Ring import ideal [as 别名]
# mark, d-gb diplom example

r = Ring( "Z(x,y,z) L" );
print "Ring: " + str(r);
print;

ps = """
( 
 ( z + x y**2 + 4 x**2 + 1 ),
 ( y**2 z + 2 x + 1 ),
 ( x**2 z + y**2 + x )
) 
""";

f = r.ideal( ps );
print "Ideal: " + str(f);
print;

from edu.jas.ring import EGroebnerBaseSeq;
from edu.jas.ring import DGroebnerBaseSeq;

egbs = EGroebnerBaseSeq();
dgbs = DGroebnerBaseSeq();

#startLog();

eg = egbs.GB( f.list );
rg = r.ideal(list=eg);
print "seq e-GB:", rg;
print "is e-GB:", egbs.isGB(eg);
开发者ID:lukaszzdanikowski,项目名称:randoop,代码行数:32,代码来源:mark.py

示例4: Ring

# 需要导入模块: from jas import Ring [as 别名]
# 或者: from jas.Ring import ideal [as 别名]
r = Ring( "IntFunc(a, c, b) (y2, y1, z1, z2, x) G" );
print "Ring: " + str(r);
print;

[one,a,c,b,y2,y1,z1,z2,x] = r.gens();

p1 = x + 2 * y1 * z1 + 3 * a * y1**2 + 5 * y1**4 + 2 * c * y1;
p2 = x + 2 * y2 * z2 + 3 * a * y2**2 + 5 * y2**4 + 2 * c * y2;
p3 = 2 * z2 + 6 * a * y2 + 20 * y2**3 + 2 * c; 
p4 = 3 * z1**2 + y1**2 + b;
p5 = 3 * z2**2 + y2**2 + b; 

F = [p1,p2,p3,p4,p5];

g = r.ideal( list=F );
print "Ideal: " + str(g);
print;

rg = g.GB();
rg = g.GB();
rg = g.GB();
rg = g.GB();
print "GB:", rg;
print;

bg = rg.isGB();
print "isGB:", bg;
print;

p7 = ( x + 1 ) / ( x**2 - x + 1 );
开发者ID:,项目名称:,代码行数:32,代码来源:

示例5: str

# 需要导入模块: from jas import Ring [as 别名]
# 或者: from jas.Ring import ideal [as 别名]
f1 = 45 * P + 35 * S - 165 * B - 36;
f2 = 35 * P + 40 * Z + 25 * T - 27 * S;
f3 = 15 * W + 25 * S * P + 30 * Z - 18 * T - 165 * B**2;
f4 = - 9 * W + 15 * T * P + 20 * S * Z;
f5 = P * W + 2 * T * Z - 11 * B**3;
f6 = 99 * W - 11 *B * S + 3 * B**2;
f7 = 10000.0 * B**2 + 6600 * B + 2673;
#all ok:
#f7 = f7 + e * f6**0;
#f7 = f7 + 5959345574908321469098512640906154241024000000**2 * f6;
#f7 = f7 + 35555./332 * f1;

F = [ f1, f2, f3, f4, f5, f6, f7 ];
#F = [ f1, f2, f3, f4, f5, f6 ]; 
#print "F = ", [ str(f) for f in F ];
I = r.ideal( "", list=F );
print "Ideal: " + str(I);
print;

#sys.exit();

rg = I.GB();
print "seq Output:", rg;
print;

terminate();
sys.exit();

ps = """
( 
 ( 45 P + 35 S - 165 B - 36 ), 
开发者ID:lukaszzdanikowski,项目名称:randoop,代码行数:33,代码来源:trinks_s.py

示例6: Ring

# 需要导入模块: from jas import Ring [as 别名]
# 或者: from jas.Ring import ideal [as 别名]
r = Ring( "Rat(w1,w2,w3,w4,z1,z2) W( (0,0,0,0,1,1),(1,1,2,2,0,0) )" );
print "Ring: " + str(r);
print;


ps = """
( 
 ( z1^4 z2^2 - w1 ),
 ( z1^5 z2^3 - w2 ),
 ( z1 - w3 ),
 ( z2 - w4 )
) 
""";

f = r.ideal( ps );
print "Ideal: " + str(f);
print;

rg = f.GB();
print "seq Output:", rg;
print;


pf = """
( 
 ( z1^37 z2^20 )
) 
""";

fp = r.ideal( pf );
开发者ID:rjolly,项目名称:jas,代码行数:32,代码来源:intprog.py

示例7: str

# 需要导入模块: from jas import Ring [as 别名]
# 或者: from jas.Ring import ideal [as 别名]
 U3^2 U4 - 1078/9375 A46 U3^2 U4 - 24353/1920000 
  U3^2 U4 - 3/20 A46^4 U3^3 - 21/100 A46^3 U3^3 
 - 91/800 A46^2 U3^3 - 5887/200000 A46 U3^3 
 - 343/128000 U3^3 ) 
) 
""";

pp1 = """
 ( 20 A46 + 7 ),
""";

pp2 = """
 ( 5480334637123239936000000000000000000 A46^32 + 23330567455181792870400000000000000000 A46^31 - 22260410953422455439360000000000000000 A46^30 - 379039147753503876710400000000000000000 A46^29 - 1305289515920841108357120000000000000000 A46^28 - 2661894008686715272062566400000000000000 A46^27 - 3732109213267597335472373760000000000000 A46^26 - 3719328899522099347074318336000000000000 A46^25 - 2513175000419852400394764288000000000000 A46^24 - 801907472074794268996141056000000000000 A46^23 + 559468735767998648283977220096000000000 A46^22 + 1161692745234469227508358814105600000000 A46^21 + 1115120737963786660933876454522880000000 A46^20 + 754183677763034219243933188227072000000 A46^19 + 366205139138005719200006792439398400000 A46^18 + 95407136698255889087520898673541120000 A46^17 - 35897763757636362165902256717692928000 A46^16 - 68696958358719191677546842722559590400 A46^15 - 55382563098545072682320366954843996160 A46^14 - 32223104574376823941781148035505979392 A46^13 - 14867126462105106300205537184606126080 A46^12 - 5596017809975575801376014016653721600 A46^11 - 1730893404306213749794640488178116608 A46^10 - 438698743729822786570094575456788480 A46^9 - 90199241991532353478039712103521280 A46^8 - 14778859703096558479650421488297984 A46^7 - 1874056025467134008603806670325120 A46^6 - 174876413639867324175892636604160 A46^5 - 10843113615171040141214782270464 A46^4 - 325577720150105105056746125600 A46^3 + 6040454553390756509792153750 A46^2 + 761038687880048862537750000 A46 + 13745464623924567359765625 ),
""";

pp = ps % pp1;

f = r.ideal( pp );
print "Ideal: " + str(f);
print;

startLog();

rg = f.GB();
print "seq Output:", rg;
print;

#sys.exit();


开发者ID:rjolly,项目名称:jas,代码行数:30,代码来源:rose_part.py

示例8: Rat

# 需要导入模块: from jas import Ring [as 别名]
# 或者: from jas.Ring import ideal [as 别名]
Rat(x1,x2,x3,y1,y2) G|3|
""";

ps = """
(
 ( y1 + y2 - 1 ),
 ( x1 - y1^2 - y1 - y2 ),
 ( x2 - y1 - y2^2 ),
 ( x3 - y1 y2 )
)
""";

r = Ring( rs );
print "Ring: " + str(r);

i = r.ideal( ps );
print "Ideal: " + str(i);

g = i.GB();
print "seq GB:", g;



rsi = """
# polynomial ring:
Rat(x1,x2,x3) G
""";

ri = Ring( rsi );
print "Ring: " + str(ri);
开发者ID:rjolly,项目名称:jas,代码行数:32,代码来源:preimage.py

示例9: str

# 需要导入模块: from jas import Ring [as 别名]
# 或者: from jas.Ring import ideal [as 别名]
f1 = 45 * P + 35 * S - 165 * B - 36
f2 = 35 * P + 40 * Z + 25 * T - 27 * S
f3 = 15 * W + 25 * S * P + 30 * Z - 18 * T - 165 * B ** 2
f4 = -9 * W + 15 * T * P + 20 * S * Z
f5 = P * W + 2 * T * Z - 11 * B ** 3
f6 = 99 * W - 11 * B * S + 3 * B ** 2
f7 = 10000 * B ** 2 + 6600 * B + 2673
# all ok:
# f7 = f7 + e * f6**0;
# f7 = f7 + 5959345574908321469098512640906154241024000000**2 * f6;
# f7 = f7 + 35555./332 * f1;

F = [f1, f2, f3, f4, f5, f6, f7]
# F = [ f1, f2, f3, f4, f5, f6 ];
# print "F = ", [ str(f) for f in F ];
I = r.ideal("", list=F)
print "Ideal: " + str(I)
print

# sys.exit();

rg = I.GB()
print "seq Output:", rg
print

terminate()
sys.exit()

ps = """
( 
 ( 45 P + 35 S - 165 B - 36 ), 
开发者ID:rjolly,项目名称:jas,代码行数:33,代码来源:trinks_s.py


注:本文中的jas.Ring.ideal方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。