jakobkroeker / test_singular

manage a personal issue list for Singular CAS
0 stars 0 forks source link

reduce() hangs because of coefficient explosion? #234

Open jakobkroeker opened 9 years ago

jakobkroeker commented 9 years ago
ring rng = (0),(x,y),(lp(2),C);
short = 0 ;
intvec op = 100663296,16787537;
 option(set, op) ;
 option() ;
 // option() ;//options: redTail intStrategy redefine loadLib usage prompt warn
system("random", 1231489266);
ideal I = 18*x^6+19*x^4*y-22*x^2*y^2+20*x*y^4-24*x*y,-18*x^6-28*x^4*y^2+5*x^3*y^3+24*x^2*y^3-15;
// printIdealInfo (I);
// numVars     = 2;
// maxAbsCoeff = 28;
// maxDeg      = 6;
// maxTerms    = 5;
// numGens     = 2;
dbprint( 1, "ideal I = " + string( I ) + ";" );
option(prot);
ideal gI =  std(I); //coefficient explosion
string(gI);
reduce (I, gI ); // hangs

the coefficients of gI are much smaller in M2 in comparison to Singular:

R = QQ[x,y, MonomialOrder=>Lex]

I = ideal{18*x^6+19*x^4*y-22*x^2*y^2+20*x*y^4-24*x*y,-18*x^6-28*x^4*y^2+5*x^3*y^3+24*x^2*y^3-15};

gI = gens gb I
toString gI

gI % I
(gens I) % gI
450000000*y^27+3111274880000*y^26+4907505280000*y^25-6200433800000*y^24-19998488166400*y^23-13920816979200*y^22+22320666914400*y^
      21+57139022972160*y^20+1591079882880*y^19-43553117069760*y^18-72421329280896*y^17+34888064469312*y^16+37785820290336*y^15+52283652703296*y
      ^14-58576823842464*y^13+2285338020372*y^12-28310517452160*y^11+35150827887360*y^10-16548702536790*y^9+24170862726000*y^8-19174958708760*y^
      7+4024659622527*y^6-258897060000*y^4+326980557000*y^3+79716150000,
      108644217526690709237179494038637988567897227117705147062650537944283564297070031775987734025534021397593373513654714494494914837200698378
      931622724352911315097194494247876759773197637950260000*x-
      125333382508062180041176956434083318689465918885819760857612473885899217530835365821161410264804598381909260754378244476234237386372919855

      761715702423233284503851667395449755997989550000000*y^26-
      866622058635120059555539528471993438766017955088454532994050790387679449516704588860340386283905572444967699492464169583798878304135476720
      984353203394137258268465072524305796767759594261120000*y^25-
      187892202782874554226461136178916580344696976779619428683571850359865233812108225586960554763666238786273144278286769505404511330442098155
      1860409932813275867167311100530873752009202788110720000*y^24+
      609095303400533817483402727353969012093167520260561233459862837307871771525194985094208257998643031519238863718121527234751528013481919374
      63402173098509543889674956310502452421771962286200000*y^23+
      429712994650814512786113860584400206314424297710654759386383811019988266228266048724375053275553699136752675157384540358970339550336678786
      7801488217736954241237088816476885423369615837781913600*y^22+
      651635787169754095157427397479621407097578837275212200699808445835831459767814840996071692098890959058605199350180359632655304053536038863
      9547541566162327146904100614171813011837570613305260800*y^21+
      118727989539716286075439827719390623435602202447980270183177588951784976772252387672813885170475006914335660868667484584425985809512050399
      2636409941001652662982459511117473855997360993022434400*y^20-
      101319823894946479827405010336162075602074340923923084768899813082406683731885216077322895433826608750136570515043177767670266425764279774
      24055238534057127696320223536654745182732164877429379840*y^19-
      620333048726274644563598020517573747742456068616622345002417685182548827436091316294281823456963324059025342154829475923808618831392590929
      6119907470711071477097839271111523896334119820345653120*y^18-
      780577454412272531420981571569005261200764152464772552343547293546090910399527125151770981751132474049468682590760998410162116123644352216
      262245461786704727366631369998544778068632277683677760*y^17+
      126854167850089851849727080547390815530809338936882770996090883066533937840797962541434111005068870592737833188118100908137052962472160835
      42959907617354886445736924071464911507818011823056050304*y^16-
      101251016144021824806842700418743259785252628816922017631189223844064518071858136857677206473134945044503368111191036188295912976977654343
      1765846415642564050180223802078522761164433522817297088*y^15+
      231314699969814817045103676200068792685281713869856905857925011658251306305195826812242790030690384289571798390595676365269796318893385116
      089568769980683937288806913976781571129907674837519136*y^14-
      117716486331756196995607423167214750388278176059523339400804283726511398319749714337039479032530237574466501232077782948184041145328145122
      84831829268168527913733825889661310224268843463993427904*y^13+
      691322696609532777266790362362477301928094811059027927056648542787714137038709320115189418669180822280059254409000878215971955372725633646
      7155423490414249421518799328168851154133013352640298336*y^12-
      448039456651819434093926155946712727030830909921393464375787551833189131797510352694818913128780028648271995574105468609220624137531265497
      5792013299467868572091023712474706129711082603594062028*y^11+
      790509021559600451552250938674140624407888170454842441103587664537540678240282780420629504100404669024172985673557998425551363126512819583
      5796798805613028791678421833267627618265931307763795840*y^10-
      540001230283296249116390615975845273753405909382429418814880740045181307497212851272290302800378614214321488492586972142546314624979732974
      1547893094712715363418134614467456595613376461928256640*y^9+
      401639707635734644349217887136210286244959178706183577153296808450581786533586386843676329151492070952156048267375534178316164997970807729
      6583028813143173000977926530013698879543619702516699210*y^8-
      587904501578293827589686460760787349478706021932501002725917264162955744961208960568957605393863946038276841699865730039066856425721522604
      6268480522442793628142155118555412297994725944883594000*y^7+
      365520131233041738077836128500693636584279540901154422892022103390484377402357176282177812836363936266376511884673180908702428648106185600
      2957934616058630819459075350526799350347557050526083240*y^6-
      904208596146916967593596003182238153037389799540513541859964487550283632881476784750935507537949395456792428624109576364797117300333035945
      266113235359476425750948374190710383130851735284571873*y^5-
      838245115035937268209936143634232158312941984184430211964896440565330714036655578543951398310749575776016881381064273346747333845803578219
      92778683663784234947494197706542912121321366904680000*y^4+
      426763893703950011111051555290484111214929427647698121401320014959572035398130152087247215456536282159652394623230168110893174073641295681
      309855649029123947299639723270428227638338793231384000*y^3-
      460449284802690735589160532880469565666819575327616849916576344066055500014965513146751482741262092686761092150190292363470594212738577042
      737541846889734204462104809169934036425378662923477500*y^2-
      142967562890444423029779254260883139585645393061102754164193771168685800325524068687764502671697052989972702643809708328321369108907185983
      17288315029194529532177491663757521332756593648000000*y+
      622096078601936304976545956391407122443340973427183891747960030478702213904816618274487983438978447972976252588687268944196574696731024326
      0288782757835471001525063282494719529382350151000000