cali.log 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551
  1. Codemist Standard Lisp 3.54 for DEC Alpha: May 23 1994
  2. Dump file created: Mon May 23 10:39:11 1994
  3. REDUCE 3.5, 15-Oct-93 ...
  4. Memory allocation: 6023424 bytes
  5. +++ About to read file tstlib.red
  6. CALI 2.1. Last update 22/10/93
  7. % Author H.-G. Graebe | Univ. Leipzig | Version 20.10.93
  8. % graebe@informatik.uni-leipzig.d400.de
  9. COMMENT
  10. This is an example session demonstrating and testing the facilities
  11. offered by the commutative algebra package CALI.
  12. END COMMENT;
  13. algebraic;
  14. on echo;
  15. % Example 1 : Generating ideals of affine and projective points.
  16. vars:={t,x,y,z};
  17. vars := {t,x,y,z}
  18. setring(vars,degreeorder vars,revlex);
  19. {{t,x,y,z},{{1,1,1,1}},revlex,{1,1,1,1}}
  20. mm:=mat((1,1,1,1),(1,2,3,4),(2,1,4,3));
  21. [1 1 1 1]
  22. [ ]
  23. mm := [1 2 3 4]
  24. [ ]
  25. [2 1 4 3]
  26. % The ideal with zero set at the point in A^4 with coordinates
  27. % equal to the row vectors of mm :
  28. setideal(m1,affine_points mm);
  29. 2
  30. {x - 3*x + 2,
  31. 2
  32. t - 3*t + 2,
  33. t*x - x - t + 1,
  34. z - 3*x - 2*t + 4,
  35. y - 2*x - 3*t + 4}
  36. % All parameters are as they should be :
  37. gbasis m1$
  38. dim m1;
  39. 0
  40. degree m1;
  41. 3
  42. groebfactor m1;
  43. {{z - 1,y - 1,x - 1,t - 1},
  44. {z - 3,y - 4,x - 1,t - 2},
  45. {z - 4,y - 3,x - 2,t - 1}}
  46. resolve m1$
  47. bettinumbers m1;
  48. {1,5,9,7,2}
  49. % The ideal with zero set at the point in P^3 with homogeneous
  50. % coordinates equal to the row vectors of mm :
  51. setideal(m2,proj_points mm);
  52. 2 2
  53. {2*y - 7*t*y - 2*t*x + 7*t ,
  54. 2
  55. 4*x*y - 5*t*y - 10*t*x + 11*t ,
  56. 2 2
  57. 8*x - 3*t*y - 18*t*x + 13*t ,
  58. z - y - x + t}
  59. % All parameters as they should be ?
  60. gbasis m2$
  61. dim m2;
  62. 1
  63. degree m2;
  64. 3
  65. groebfactor m2;
  66. 2 2
  67. {{7*t - 2*t*x - 7*t*y + 2*y ,
  68. 2
  69. 11*t - 10*t*x - 5*t*y + 4*x*y,
  70. 2 2
  71. 13*t - 18*t*x - 3*t*y + 8*x ,
  72. t - x - y + z}}
  73. % It seems to be prime ?
  74. isprime m2;
  75. no
  76. % Not, of course, but it is known to be unmixed. Hence we can use
  77. easyprimarydecomposition m2;
  78. {{{ - 3*t + 2*z, - 2*t + y, - t + 2*x},
  79. { - 3*t + 2*z, - 2*t + y, - t + 2*x}},
  80. {{ - t + z, - t + y, - t + x},
  81. { - t + z, - t + y, - t + x}},
  82. {{ - 4*t + z, - 3*t + y, - 2*t + x},
  83. { - 4*t + z, - 3*t + y, - 2*t + x}}}
  84. % Example 2 :
  85. % An affine monomial curve with generic point (t^7,t^9,t^10).
  86. setideal(m,affine_monomial_curve({7,9,10},{x,y,z}));
  87. 3 3
  88. { - z + x *y,
  89. 2 4
  90. - y *z + x ,
  91. 3 2
  92. y - x*z }
  93. % The base ring was changed as side effect :
  94. getring();
  95. {{x,y,z},{{7,9,10}},revlex,{7,9,10}}
  96. vars:=first getring m;
  97. vars := {x,y,z}
  98. % Some advanced commutative algebra .
  99. % The analytic spread of m.
  100. analytic_spread m;
  101. 3
  102. % The Rees ring Rees_R(vars) over R=S/m.
  103. blowup(m,vars,{u,v,w});
  104. 2 3
  105. {u *v*x - w ,
  106. 3 2
  107. u *x - v *w,
  108. 2 2
  109. u*v*x - w *z,
  110. 2 2
  111. u *x - v*w*y,
  112. 3 2
  113. v*x - w*z ,
  114. 3 2
  115. u*x - w*y ,
  116. 3 3
  117. x *y - z ,
  118. 4 2
  119. x - y *z,
  120. 2 3
  121. - u*w + v ,
  122. 2 2
  123. v *y - w *x,
  124. 2
  125. v*y - w*x*z,
  126. 2 3
  127. - x*z + y ,
  128. v*z - w*y,
  129. u*z - w*x,
  130. u*y - v*x}
  131. % gr_R(vars), the associated graded ring of the irrelevant ideal
  132. % over R. The short way.
  133. interreduce sub(x=0,y=0,z=0,ws);
  134. 3 2 2 3
  135. {w ,v *w, - u*w + v }
  136. % The long (and more general) way. Gives the result in another
  137. % embedding.
  138. % Reste the base ring, since it was changed by blowup as a side
  139. % effect.
  140. setring getring m$
  141. assgrad(m,vars,{u,v,w});
  142. 3
  143. {w ,
  144. 2
  145. v *w,
  146. z,
  147. y,
  148. x,
  149. 2 3
  150. - u*w + v }
  151. % Comparing the Rees algebra and the symmetric algebra of M :
  152. setring getring m$
  153. setideal(rees,blowup({},m,{a,b,c}));
  154. 2 2 3
  155. { - y *a + z *b + x *c,
  156. - x*a + y*b + z*c,
  157. 2 4 3 3
  158. y *z*a - x *a - z *b + x *y*b}
  159. setring getring m$
  160. setideal(sym,sym(m,{a,b,c}));
  161. 2 2 3
  162. {y *a - z *b - x *c,
  163. x*a - y*b - z*c}
  164. gbasis rees$
  165. gbasis sym$
  166. modequalp(rees,sym);
  167. yes
  168. % Symbolic powers :
  169. setring getring m$
  170. setideal(m2,idealpower(m,2));
  171. 6 3 3 6 2
  172. {z - 2*x *y*z + x *y ,
  173. 4 2 4 2 8
  174. y *z - 2*x *y *z + x ,
  175. 6 3 2 2 4
  176. y - 2*x*y *z + x *z ,
  177. 2 4 3 3 4 3 7
  178. y *z - x *y *z - x *z + x *y,
  179. 3 3 5 3 4 4 2
  180. y *z - x*z - x *y + x *y*z ,
  181. 5 2 3 4 3 5 2
  182. y *z - x*y *z - x *y + x *z }
  183. % Let's compute a second symbolic power :
  184. setideal(m3,symbolic_power(m,2));
  185. 6 3 3 6 2
  186. {z - 2*x *y*z + x *y ,
  187. 4 2 4 2 8
  188. y *z - 2*x *y *z + x ,
  189. 6 3 2 2 4
  190. y - 2*x*y *z + x *z ,
  191. 5 2 5 3 2 2 7
  192. y*z + x *y - 3*x *y *z + x *z,
  193. 2 4 3 3 4 3 7
  194. y *z - x *y *z - x *z + x *y,
  195. 3 3 5 3 4 4 2
  196. y *z - x*z - x *y + x *y*z ,
  197. 5 2 3 4 3 5 2
  198. y *z - x*y *z - x *y + x *z }
  199. % It is different from the ordinary second power.
  200. % Hence m2 has a trivial component.
  201. gbasis m2$
  202. gbasis m3$
  203. modequalp(m2,m3);
  204. no
  205. % Here is the primary decomposition :
  206. pd:=primarydecomposition m2;
  207. 6 2 3 3 6
  208. pd := {{{x *y - 2*x *y*z + z ,
  209. 8 4 2 4 2
  210. x - 2*x *y *z + y *z ,
  211. 2 4 3 2 6
  212. x *z - 2*x*y *z + y ,
  213. 7 3 2 2 2 5 5
  214. x *z - 3*x *y *z + x *y + y*z ,
  215. 7 4 3 3 3 2 4
  216. x *y - x *z - x *y *z + y *z ,
  217. 4 2 3 4 5 3 3
  218. x *y*z - x *y - x*z + y *z ,
  219. 5 2 4 3 2 3 5
  220. x *z - x *y - x*y *z + y *z},
  221. 3 3
  222. { - x *y + z ,
  223. 4 2
  224. - x + y *z,
  225. 2 3
  226. - x*z + y }},
  227. 6
  228. {{z ,
  229. 2 4
  230. y *z ,
  231. 3 3
  232. y *z ,
  233. 4 2
  234. y *z ,
  235. 5
  236. y *z,
  237. 6
  238. y ,
  239. x},
  240. {z,y,x}}}
  241. % Compare the result with m2 :
  242. setideal(m4,matintersect(first first pd, first second pd));
  243. 6 3 3 6 2
  244. {z - 2*x *y*z + x *y ,
  245. 4 2 4 2 8
  246. y *z - 2*x *y *z + x ,
  247. 6 3 2 2 4
  248. y - 2*x*y *z + x *z ,
  249. 5 3 5 4 2 2 8
  250. x*y*z + x *y - 3*x *y *z + x *z,
  251. 2 4 3 3 4 3 7
  252. y *z - x *y *z - x *z + x *y,
  253. 3 3 5 3 4 4 2
  254. y *z - x*z - x *y + x *y*z ,
  255. 5 2 3 4 3 5 2
  256. y *z - x*y *z - x *y + x *z }
  257. gbasis m4$
  258. modequalp(m2,m4);
  259. yes
  260. % Compare the result with m3 :
  261. setideal(m4,first first pd)$
  262. gbasis m4$
  263. modequalp(m3,m4);
  264. yes
  265. % The trivial component can also be removed with a
  266. % stable quotient computation :
  267. setideal(m5,matstabquot(m2,vars))$
  268. gbasis m5$
  269. modequalp(m3,m5);
  270. yes
  271. % Example 3 : The Macaulay curve.
  272. setideal(m,proj_monomial_curve({0,1,3,4},{w,x,y,z}));
  273. 3 2
  274. {y - x*z ,
  275. 2 2
  276. x *z - w*y ,
  277. 3 2
  278. x - w *y,
  279. x*y - w*z}
  280. vars:=first getring();
  281. vars := {w,x,y,z}
  282. gbasis m;
  283. 3 2
  284. {y - x*z ,
  285. 2 2
  286. x *z - w*y ,
  287. 3 2
  288. x - w *y,
  289. x*y - w*z}
  290. % Test whether m is prime :
  291. isprime m;
  292. yes
  293. % A resolution of m :
  294. resolve m;
  295. {
  296. [ 3 2 ]
  297. [ y - x*z ]
  298. [ ]
  299. [ 2 2]
  300. [x *z - w*y ]
  301. [ ]
  302. [ 3 2 ]
  303. [ x - w *y ]
  304. [ ]
  305. [ x*y - w*z ]
  306. ,
  307. [ 2 ]
  308. [x z 0 - y ]
  309. [ ]
  310. [w y 0 - x*z]
  311. [ ]
  312. [0 x - z w*y ]
  313. [ ]
  314. [ 2 ]
  315. [0 w - y x ]
  316. ,
  317. [w - x y - z]
  318. ,
  319. [0]
  320. }
  321. % m has depth = 1 as can be seen from the
  322. gradedbettinumbers m;
  323. {{0},{2,3,3,3},{4,4,4,4},{5}}
  324. % Another way to see the non perfectness of m :
  325. hilbseries m;
  326. 3 2
  327. - w + 2*w + 2*w + 1
  328. ------------------------
  329. 2
  330. w - 2*w + 1
  331. % Just a third approach. Divide out a parameter system :
  332. ps:=for i:=1:2 collect random_linear_form(vars,1000);
  333. ps := {274*w + 842*x - 589*y - 453*z,2*(105*w + 27*x + 33*y + 170*z)}
  334. setideal(m1,matsum(m,ps))$
  335. gbasis m1$
  336. % dim should be zero and degree > degree m = 4.
  337. dim m1;
  338. 0
  339. degree m1;
  340. 5
  341. % The projections of m on the coord. hyperplanes.
  342. for each x in vars collect eliminate(m,{x});
  343. 2 3
  344. {{ - x*z + y },
  345. 3 4
  346. { - w*z + y },
  347. 3 4
  348. { - w *z + x },
  349. 2 3
  350. { - w *y + x }}
  351. % Example 4 : Two submodules of S^4.
  352. % Get the stored result of the earlier computation.
  353. r:=resolve m$
  354. % See whether cali!=degrees contains a relict from earlier
  355. % computations.
  356. getdegrees();
  357. {}
  358. % Introduce the 2nd and 3rd syzygy module as new modules.
  359. % Both are submodules in S^4.
  360. setmodule(m1,second r)$
  361. setmodule(m2,third r)$
  362. gbasis m1;
  363. [ 2 ]
  364. [ - x - z 0 y ]
  365. [ ]
  366. [ - w - y 0 x*z]
  367. [ ]
  368. [ 0 x - z w*y]
  369. [ ]
  370. [ 2 ]
  371. [ 0 w - y x ]
  372. [ ]
  373. [ w*x x*y + w*z - y*z 0 ]
  374. [ ]
  375. [ 3 2 2 2 ]
  376. [ 0 x - w *y - x *z + w*y 0 ]
  377. [ ]
  378. [ 2 2 2 2 ]
  379. [ w *y x *z + w*y - x*z 0 ]
  380. [ ]
  381. [ 3 2 2 3 ]
  382. [ x x *z + w*y - y 0 ]
  383. [ ]
  384. [ 2 2 3 2 ]
  385. [x *z - w*y - y + x*z 0 0 ]
  386. % The second is already a gbasis.
  387. setgbasis m2;
  388. [w - x y - z]
  389. getleadterms m1;
  390. [ 2 ]
  391. [ 0 0 0 y ]
  392. [ ]
  393. [ 0 0 0 x*z]
  394. [ ]
  395. [ 0 0 0 w*y]
  396. [ ]
  397. [ 2 ]
  398. [ 0 0 0 x ]
  399. [ ]
  400. [w*x 0 0 0 ]
  401. [ ]
  402. [ 3 ]
  403. [ 0 x 0 0 ]
  404. [ ]
  405. [ 2 ]
  406. [w *y 0 0 0 ]
  407. [ ]
  408. [ 3 ]
  409. [ x 0 0 0 ]
  410. [ ]
  411. [ 2 ]
  412. [x *z 0 0 0 ]
  413. getleadterms m2;
  414. [w 0 0 0]
  415. % Since rk(F/M)=rk(F/in(M)), they have ranks 1 resp. 3.
  416. dim m1;
  417. 4
  418. indepvarsets m1;
  419. {{w,x,y,z}}
  420. % Its intersection is zero :
  421. matintersect(m1,m2);
  422. [0 0 0 0]
  423. % Its sum :
  424. setmodule(m3,matsum(m1,m2));
  425. [ 2 ]
  426. [ - x - z 0 y ]
  427. [ ]
  428. [ 2 ]
  429. [ 0 w - y x ]
  430. [ ]
  431. [ 0 x - z w*y ]
  432. [ ]
  433. [ w - x y - z ]
  434. [ ]
  435. [ 0 - y - x y x*z - z]
  436. gbasis m3;
  437. 2
  438. mat(( - x, - z,0,y ),
  439. 2
  440. (0,w, - y,x ),
  441. (0,x, - z,w*y),
  442. (w, - x,y, - z),
  443. 3 2 2 2
  444. (0,x - w *y, - x *z + w*y ,0),
  445. (0, - y - x,y,x*z - z),
  446. 3 3 3 2 2 2 2 2
  447. (0,0,x *z - x *y - w*y + w*x*z - w*x*y + w *y + x*y*z - w*z ,
  448. 0),
  449. 2
  450. (0,x*y + x + w*z + y + x, - y*z - x*y - y,z),
  451. 2 2 2 2
  452. (0,x *z + w*y - w*x - w *z - x*z - w*y - w*x,
  453. 2 2 2
  454. - x*z + w*y*z - w*y + w*x*y + z + w*y, - w*z),
  455. 3 2 2
  456. (x ,w*x + w *z + x*z + w*y + w*x,
  457. 3 2 2 2
  458. - y + x*z - w*y*z + w*y - w*x*y - z - w*y,w*z),
  459. 2
  460. (x *z - x*z,
  461. 3 2 2 2 2 2
  462. - y + x*z + w*y*z - w*x*z - w *y - z + y - x - y - x,
  463. 2 3 2 2 2 2 2
  464. - y *z + y + x*y*z - x*y - x *z + x *y + w*y - y + x*y + y,
  465. y*z - z),
  466. 3 2 2 2 3 2 2
  467. (0,w*y - w*x*z - 2*w *y*z + w *x*z + w *y + 2*w*z - 2*w*y
  468. 2 2 2 2 2
  469. + 2*w*x + w *z + y*z + 3*x*z + 2*w*y + 2*w*x, - x *z + x *y*z
  470. 2 3 2 2 2 2 2
  471. + 2*w*y *z - w*y - w*x*y*z + w*x*y + w*x *z - w*x *y - w *y
  472. 2 2 2 2
  473. - y*z + x*z - x*y*z - w*y*z + 2*w*y - 2*w*x*y - 2*z - y*z
  474. 2
  475. - 2*w*y,z + 2*w*z))
  476. dim m3;
  477. 3
  478. % Hence it has a nontrivial annihilator :
  479. annihilator m3;
  480. 2 2 2 2 3 2 3 3
  481. {w *y - w*x*y + w*x*z - w*y - w*z - x *y + x *z + x*y*z}
  482. % To get a meaningful Hilbert series make m1 homogeneous :
  483. setdegrees {1,x,x,x};
  484. {1,x,x,x}
  485. % Reevaluate m1 with the new column degrees.
  486. setmodule(m1,m1)$
  487. gbasis m1;
  488. [ 2 ]
  489. [ - x - z 0 y ]
  490. [ ]
  491. [ - w - y 0 x*z]
  492. [ ]
  493. [ 0 x - z w*y]
  494. [ ]
  495. [ 2 ]
  496. [ 0 w - y x ]
  497. [ ]
  498. [ w*x x*y + w*z - y*z 0 ]
  499. [ ]
  500. [ 3 2 2 2 ]
  501. [ 0 x - w *y - x *z + w*y 0 ]
  502. [ ]
  503. [ 2 2 2 2 ]
  504. [ w *y x *z + w*y - x*z 0 ]
  505. [ ]
  506. [ 3 2 3 2 ]
  507. [ - x + w *y 0 y - x*z 0 ]
  508. [ ]
  509. [ 2 2 3 2 ]
  510. [ - x *z + w*y y - x*z 0 0 ]
  511. hilbseries m1;
  512. 7 6 5 4 3
  513. w - 5*w + 8*w - 2*w - 5*w + 3*w + 1
  514. ------------------------------------------
  515. 4 3 2
  516. w - 4*w + 6*w - 4*w + 1
  517. % Example 5 : From the MACAULAY manual (D.Bayer, M.Stillman).
  518. % An elliptic curve on the Veronese in P^5.
  519. rvars:={x,y,z}$
  520. svars:={a,b,c,d,e,f}$
  521. r:=setring(rvars,degreeorder rvars,revlex)$
  522. s:=setring(svars,{for each x in svars collect 2},revlex)$
  523. map:={s,r,{a=x^2,b=x*y,c=x*z,d=y^2,e=y*z,f=z^2}};
  524. map := {{{a,
  525. b,
  526. c,
  527. d,
  528. e,
  529. f},
  530. {{2,2,2,2,2,2}},
  531. revlex,
  532. {1,1,1,1,1,1}},
  533. {{x,y,z},
  534. {{1,1,1}},
  535. revlex,
  536. {1,1,1}},
  537. 2
  538. {a=x ,
  539. b=x*y,
  540. c=x*z,
  541. 2
  542. d=y ,
  543. e=y*z,
  544. 2
  545. f=z }}
  546. preimage({y^2z-x^3-x*z^2},map);
  547. { - b*f + c*e,
  548. 2
  549. - a*f + c ,
  550. - a*e + b*c,
  551. 2
  552. - a*d + b ,
  553. 2
  554. - a*c - c*f + e ,
  555. - a*c - c*f + d*f,
  556. - a*b - b*f + d*e,
  557. 2
  558. - a - a*f + c*d,
  559. 2
  560. - a - a*f + b*e}
  561. % Example 6 : The preimage under a rational map.
  562. r:=setring({x,y},{},lex)$
  563. s:=setring({t},{},lex)$
  564. map:={r,s,{x=2t/(t^2+1),y=(t^2-1)/(t^2+1)}};
  565. map := {{{x,y},{},lex,{1,1}},
  566. {{t},{},lex,{1}},
  567. 2
  568. 2*t t - 1
  569. {x=--------,y=--------}}
  570. 2 2
  571. t + 1 t + 1
  572. % The preimage of (0) is the equation of the circle :
  573. ratpreimage({},map);
  574. 2 2
  575. {x + y - 1}
  576. % The preimage of the point (t=3/2) :
  577. ratpreimage({2t-3},map);
  578. {13*y - 5,13*x - 12}
  579. % Example 7 : A zerodimensional ideal.
  580. setring({x,y,z},{},lex)$
  581. setideal(n,{x**2 + y + z - 3,x + y**2 + z - 3,x + y + z**2 - 3});
  582. 2 2 2
  583. {x + y + z - 3,x + y + z - 3,x + y + z - 3}
  584. % The groebner algorithm with factorization :
  585. groebfactor n;
  586. 2
  587. {{x + z - 1,y + z - 1,z - 2*z - 1},
  588. 2
  589. {x - z,z - 2,y + z - 1},
  590. 2
  591. {y - z,z - 2,x + z - 1},
  592. {x + 3,y + 3,z + 3},
  593. {x - 1,y - 1,z - 1}}
  594. % Change the term order and reevaluate n :
  595. setring({x,y,z},{{1,1,1}},revlex)$
  596. setideal(n,n);
  597. 2 2 2
  598. {x + z + y - 3,y + z + x - 3,z + y + x - 3}
  599. gbasis n;
  600. 2 2 2
  601. {z + y + x - 3,y + z + x - 3,x + z + y - 3}
  602. % its primes :
  603. zeroprimes n;
  604. 2
  605. {{x - 2, - x + y,x + z - 1},
  606. 2
  607. {x - 2, - x + z,x + y - 1},
  608. 2
  609. {x - 2*x - 1,x + z - 1,x + y - 1},
  610. {z + 3,y + 3,x + 3},
  611. {z - 1,y - 1,x - 1}}
  612. % a vector space basis of S/n :
  613. getkbase n;
  614. {1,x,x*y,x*y*z,x*z,y,y*z,z}
  615. % Example 8 : A modular computation.
  616. on modular$
  617. setmod 181;
  618. 1
  619. setideal(n1,n);
  620. 2 2 2
  621. {x + z + y + 178,y + z + x + 178,z + y + x + 178}
  622. zeroprimes n1;
  623. 2
  624. {{x + 179,180*(x + 180*y),x + z + 180},
  625. 2
  626. {x + 179,180*(x + 180*z),x + y + 180},
  627. 2
  628. {x + 179*x + 180,x + z + 180,x + y + 180},
  629. {z + 180,y + 180,x + 180},
  630. {z + 3,y + 3,x + 3}}
  631. setmod 7;
  632. 181
  633. setideal(n1,n);
  634. 2 2 2
  635. {x + z + y + 4,y + z + x + 4,z + y + x + 4}
  636. zeroprimes n1;
  637. {{z + 6,y + 6,x + 6},
  638. {z + 4,y + 4,x + 2},
  639. {z + 4,y + 2,x + 4},
  640. {z + 2,y + 4,x + 4},
  641. {z + 3,y + 3,x + 3}}
  642. % Hence some of the primes glue together mod 7.
  643. zeroprimarydecomposition n1;
  644. {{{z + 6,y + 6,x + 6},
  645. {z + 6,y + 6,x + 6}},
  646. {{z + 4,y + 4,x + 2},
  647. {z + 4,y + 4,x + 2}},
  648. {{z + 4,y + 2,x + 4},
  649. {z + 4,y + 2,x + 4}},
  650. {{z + 2,y + 4,x + 4},
  651. {z + 2,y + 4,x + 4}},
  652. 2
  653. {{x + y + z + 4,
  654. 2
  655. x + y + z + 4,
  656. 2
  657. x + y + z + 4,
  658. 3*(x + 5*y*z + 2*y + 2*z + 5),
  659. x*z + 6*x + 3*y + 6*z + 1,
  660. x*y + 6*x + 6*y + 3*z + 1},
  661. {z + 3,y + 3,x + 3}}}
  662. off modular$
  663. % Example 9 : Independent sets once more.
  664. n:=10$
  665. vars:=for i:=1:(2*n) collect mkid(x,i)$
  666. setring(vars,{},lex)$
  667. setideal(m,for j:=0:n collect
  668. for i:=(j+1):(j+n) product mkid(x,i));
  669. {x1*x2*x3*x4*x5*x6*x7*x8*x9*x10,
  670. x2*x3*x4*x5*x6*x7*x8*x9*x10*x11,
  671. x3*x4*x5*x6*x7*x8*x9*x10*x11*x12,
  672. x4*x5*x6*x7*x8*x9*x10*x11*x12*x13,
  673. x5*x6*x7*x8*x9*x10*x11*x12*x13*x14,
  674. x6*x7*x8*x9*x10*x11*x12*x13*x14*x15,
  675. x7*x8*x9*x10*x11*x12*x13*x14*x15*x16,
  676. x8*x9*x10*x11*x12*x13*x14*x15*x16*x17,
  677. x9*x10*x11*x12*x13*x14*x15*x16*x17*x18,
  678. x10*x11*x12*x13*x14*x15*x16*x17*x18*x19,
  679. x11*x12*x13*x14*x15*x16*x17*x18*x19*x20}
  680. setgbasis m$
  681. indepvarsets m;
  682. {{x2,x3,x4,x5,x6,x7,x8,x9,x10,x12,x13,x14,x15,x16,x17,x18,x19,x20},
  683. {x1,x3,x4,x5,x6,x7,x8,x9,x10,x12,x13,x14,x15,x16,x17,x18,x19,x20},
  684. {x1,x2,x4,x5,x6,x7,x8,x9,x10,x12,x13,x14,x15,x16,x17,x18,x19,x20},
  685. {x1,x2,x3,x5,x6,x7,x8,x9,x10,x12,x13,x14,x15,x16,x17,x18,x19,x20},
  686. {x1,x2,x3,x4,x6,x7,x8,x9,x10,x12,x13,x14,x15,x16,x17,x18,x19,x20},
  687. {x1,x2,x3,x4,x5,x7,x8,x9,x10,x12,x13,x14,x15,x16,x17,x18,x19,x20},
  688. {x1,x2,x3,x4,x5,x6,x8,x9,x10,x12,x13,x14,x15,x16,x17,x18,x19,x20},
  689. {x1,x2,x3,x4,x5,x6,x7,x9,x10,x12,x13,x14,x15,x16,x17,x18,x19,x20},
  690. {x1,x2,x3,x4,x5,x6,x7,x8,x10,x12,x13,x14,x15,x16,x17,x18,x19,x20},
  691. {x1,x2,x3,x4,x5,x6,x7,x8,x9,x12,x13,x14,x15,x16,x17,x18,x19,x20},
  692. {x1,x3,x4,x5,x6,x7,x8,x9,x10,x11,x13,x14,x15,x16,x17,x18,x19,x20},
  693. {x1,x2,x4,x5,x6,x7,x8,x9,x10,x11,x13,x14,x15,x16,x17,x18,x19,x20},
  694. {x1,x2,x3,x5,x6,x7,x8,x9,x10,x11,x13,x14,x15,x16,x17,x18,x19,x20},
  695. {x1,x2,x3,x4,x6,x7,x8,x9,x10,x11,x13,x14,x15,x16,x17,x18,x19,x20},
  696. {x1,x2,x3,x4,x5,x7,x8,x9,x10,x11,x13,x14,x15,x16,x17,x18,x19,x20},
  697. {x1,x2,x3,x4,x5,x6,x8,x9,x10,x11,x13,x14,x15,x16,x17,x18,x19,x20},
  698. {x1,x2,x3,x4,x5,x6,x7,x9,x10,x11,x13,x14,x15,x16,x17,x18,x19,x20},
  699. {x1,x2,x3,x4,x5,x6,x7,x8,x10,x11,x13,x14,x15,x16,x17,x18,x19,x20},
  700. {x1,x2,x3,x4,x5,x6,x7,x8,x9,x11,x13,x14,x15,x16,x17,x18,x19,x20},
  701. {x1,x2,x4,x5,x6,x7,x8,x9,x10,x11,x12,x14,x15,x16,x17,x18,x19,x20},
  702. {x1,x2,x3,x5,x6,x7,x8,x9,x10,x11,x12,x14,x15,x16,x17,x18,x19,x20},
  703. {x1,x2,x3,x4,x6,x7,x8,x9,x10,x11,x12,x14,x15,x16,x17,x18,x19,x20},
  704. {x1,x2,x3,x4,x5,x7,x8,x9,x10,x11,x12,x14,x15,x16,x17,x18,x19,x20},
  705. {x1,x2,x3,x4,x5,x6,x8,x9,x10,x11,x12,x14,x15,x16,x17,x18,x19,x20},
  706. {x1,x2,x3,x4,x5,x6,x7,x9,x10,x11,x12,x14,x15,x16,x17,x18,x19,x20},
  707. {x1,x2,x3,x4,x5,x6,x7,x8,x10,x11,x12,x14,x15,x16,x17,x18,x19,x20},
  708. {x1,x2,x3,x4,x5,x6,x7,x8,x9,x11,x12,x14,x15,x16,x17,x18,x19,x20},
  709. {x1,x2,x3,x5,x6,x7,x8,x9,x10,x11,x12,x13,x15,x16,x17,x18,x19,x20},
  710. {x1,x2,x3,x4,x6,x7,x8,x9,x10,x11,x12,x13,x15,x16,x17,x18,x19,x20},
  711. {x1,x2,x3,x4,x5,x7,x8,x9,x10,x11,x12,x13,x15,x16,x17,x18,x19,x20},
  712. {x1,x2,x3,x4,x5,x6,x8,x9,x10,x11,x12,x13,x15,x16,x17,x18,x19,x20},
  713. {x1,x2,x3,x4,x5,x6,x7,x9,x10,x11,x12,x13,x15,x16,x17,x18,x19,x20},
  714. {x1,x2,x3,x4,x5,x6,x7,x8,x10,x11,x12,x13,x15,x16,x17,x18,x19,x20},
  715. {x1,x2,x3,x4,x5,x6,x7,x8,x9,x11,x12,x13,x15,x16,x17,x18,x19,x20},
  716. {x1,x2,x3,x4,x6,x7,x8,x9,x10,x11,x12,x13,x14,x16,x17,x18,x19,x20},
  717. {x1,x2,x3,x4,x5,x7,x8,x9,x10,x11,x12,x13,x14,x16,x17,x18,x19,x20},
  718. {x1,x2,x3,x4,x5,x6,x8,x9,x10,x11,x12,x13,x14,x16,x17,x18,x19,x20},
  719. {x1,x2,x3,x4,x5,x6,x7,x9,x10,x11,x12,x13,x14,x16,x17,x18,x19,x20},
  720. {x1,x2,x3,x4,x5,x6,x7,x8,x10,x11,x12,x13,x14,x16,x17,x18,x19,x20},
  721. {x1,x2,x3,x4,x5,x6,x7,x8,x9,x11,x12,x13,x14,x16,x17,x18,x19,x20},
  722. {x1,x2,x3,x4,x5,x7,x8,x9,x10,x11,x12,x13,x14,x15,x17,x18,x19,x20},
  723. {x1,x2,x3,x4,x5,x6,x8,x9,x10,x11,x12,x13,x14,x15,x17,x18,x19,x20},
  724. {x1,x2,x3,x4,x5,x6,x7,x9,x10,x11,x12,x13,x14,x15,x17,x18,x19,x20},
  725. {x1,x2,x3,x4,x5,x6,x7,x8,x10,x11,x12,x13,x14,x15,x17,x18,x19,x20},
  726. {x1,x2,x3,x4,x5,x6,x7,x8,x9,x11,x12,x13,x14,x15,x17,x18,x19,x20},
  727. {x1,x2,x3,x4,x5,x6,x8,x9,x10,x11,x12,x13,x14,x15,x16,x18,x19,x20},
  728. {x1,x2,x3,x4,x5,x6,x7,x9,x10,x11,x12,x13,x14,x15,x16,x18,x19,x20},
  729. {x1,x2,x3,x4,x5,x6,x7,x8,x10,x11,x12,x13,x14,x15,x16,x18,x19,x20},
  730. {x1,x2,x3,x4,x5,x6,x7,x8,x9,x11,x12,x13,x14,x15,x16,x18,x19,x20},
  731. {x1,x2,x3,x4,x5,x6,x7,x9,x10,x11,x12,x13,x14,x15,x16,x17,x19,x20},
  732. {x1,x2,x3,x4,x5,x6,x7,x8,x10,x11,x12,x13,x14,x15,x16,x17,x19,x20},
  733. {x1,x2,x3,x4,x5,x6,x7,x8,x9,x11,x12,x13,x14,x15,x16,x17,x19,x20},
  734. {x1,x2,x3,x4,x5,x6,x7,x8,x10,x11,x12,x13,x14,x15,x16,x17,x18,x20},
  735. {x1,x2,x3,x4,x5,x6,x7,x8,x9,x11,x12,x13,x14,x15,x16,x17,x18,x20},
  736. {x1,x2,x3,x4,x5,x6,x7,x8,x9,x11,x12,x13,x14,x15,x16,x17,x18,x19}}
  737. dim m;
  738. 18
  739. degree m;
  740. 55
  741. % Example 10 : An example from [ Alonso, Mora, Raimondo ]
  742. vars := {z,x,y}$
  743. r:=setring(vars,{},lex)$
  744. setideal(m,{x^3+(x^2-y^2)*z+z^4,y^3+(x^2-y^2)*z-z^4});
  745. 4 2 2 3
  746. {z + z*x - z*y + x ,
  747. 4 2 2 3
  748. - z + z*x - z*y + y }
  749. gbasis m$
  750. dim m;
  751. 1
  752. degree m;
  753. 12
  754. % 2 = codim m is the codimension of the curve m. The defining
  755. % equations of the singular locus with their nilpotent structure.
  756. singular_locus(m,2);
  757. 4 3 3
  758. {2*z + x - y ,
  759. 3 2 3 2 2 4
  760. 12*z *y + 8*x *y + 3*x *y - 11*y ,
  761. 2 2 3 3
  762. 2*z*x - 2*z*y + x + y ,
  763. 2 3 3 2 2 4
  764. 2*z*x*y - 2*z*y + x *y + 3*x *y + y ,
  765. 2 3 4 5 4 4 3 2 3
  766. 24*z *y - 42*z*y + 3*x + 3*x *y + 22*x + 18*x *y + 16*x *y
  767. 2 3 4 3 5 4
  768. + 21*x *y + 3*x*y - 16*x*y + 18*y - 22*y }
  769. groebfactor ws;
  770. {{z,x,y},
  771. {27*z - 64,81*x + 256,81*y - 256}}
  772. % Hence this curve has two singular points :
  773. % (x=y=z=0) and (y=-x=256/81,z=64/27)
  774. % Let's find the brances of the curve through the origin.
  775. % The first critical tropism is (-1,-1,-1).
  776. off noetherian$
  777. setring(vars,{{-1,-1,-1}},lex)$
  778. setideal(m,m);
  779. 2 2 3 4
  780. {z*x - z*y + x + z ,
  781. 2 2 3 4
  782. z*x - z*y + y - z }
  783. % Let's test Lazard's approach.
  784. off lazy$
  785. gbasis m;
  786. 3 3 4
  787. {x - y + 2*z ,
  788. 2 2 3 4
  789. z*x - z*y + y - z ,
  790. 2 3 3 5 4
  791. z*x*y - z*y - x*y + 2*z + z *x,
  792. 2 3 4 5 5 5 4 2 4 4 2
  793. x *y + x*y + y - 2*z *x - 2*z *y - z *x - z *x*y - z *y ,
  794. 5 5 6 6 6 5 5 2
  795. 6*z*y + 2*x*y - 2*y - 4*z *x - 4*z *y - 2*z *x*y - 8*z *y
  796. 4 3 4 2 4 3
  797. + z *x - 2*z *x*y + 3*z *y }
  798. dim m;
  799. 1
  800. degree m;
  801. 9
  802. % Find the tangent directions not in z-direction :
  803. tangentcone m;
  804. 3 3
  805. {x - y ,
  806. 2 2 3
  807. z*x - z*y + y ,
  808. 2 3 3
  809. z*x*y - z*y - x*y ,
  810. 2 3 4 5
  811. x *y + x*y + y ,
  812. 5 5 6
  813. 6*z*y + 2*x*y - 2*y }
  814. setideal(n,sub(z=1,ws));
  815. 3 3
  816. {x - y ,
  817. 2 2 3
  818. x - y + y ,
  819. 2 3 3
  820. x*y - y - x*y ,
  821. 2 3 4 5
  822. x *y + x*y + y ,
  823. 5 5 6
  824. 6*y + 2*x*y - 2*y }
  825. setring r$
  826. on noetherian$
  827. setideal(n,n)$
  828. gbasis n;
  829. 7 6 5
  830. {y - 3*y + 3*y ,
  831. 2 3 2
  832. x + y - y ,
  833. 2 6 5 4 3
  834. x*y - y + 2*y - y - y }
  835. degree n;
  836. 9
  837. % The points of n outside the origin.
  838. matstabquot(n,{x,y});
  839. 2
  840. {x - y + 3,y - 3*y + 3}
  841. % Hence there are two branches x=z'*(a-3+x'),y=z'*(a+y'),z=z'
  842. % with the algebraic number a : a^2-3a+3=0
  843. % and the new equations for (z',x',y') :
  844. setrules {a^2=>3a-3};
  845. 2
  846. {a => 3*a - 3}
  847. sub(x=z*(a-3+x),y=z*(a+y),m);
  848. 3 3 2 2 2 3 2
  849. {z *(a + 3*a *x - 9*a + 3*a*x - 16*a*x - 2*a*y + 21*a + x - 8*x
  850. 2
  851. + 21*x - y + z - 18),
  852. 3 3 2 2 2 3 2
  853. z *(a + 3*a *y + 2*a*x + 3*a*y - 2*a*y - 6*a + x - 6*x + y - y
  854. - z + 9)}
  855. setideal(m1,matqquot(ws,z));
  856. 3 2 3 2
  857. {x + (3*a - 7)*x - (5*a - 6)*x + y + (3*a - 2)*y + (5*a - 9)*y,
  858. 2 3 2
  859. z - x - (2*a - 6)*x - y - (3*a - 1)*y - (7*a - 9)*y}
  860. % This defines a loc. smooth system at the origin, since the
  861. % jacobian at the origin of the gbasis is nonsingular :
  862. off noetherian$
  863. % Test Mora's approach.
  864. on lazy$
  865. setring getring m;
  866. {{z,x,y},{{-1,-1,-1}},lex,{1,1,1}}
  867. setideal(m1,m1);
  868. 2 2 3 3
  869. { - (5*a - 6)*x + (5*a - 9)*y + (3*a - 7)*x + (3*a - 2)*y + x + y
  870. ,
  871. 2 2 3
  872. z - (2*a - 6)*x - (7*a - 9)*y - x - (3*a - 1)*y - y }
  873. gbasis m1;
  874. 2 2 3
  875. {z - (2*a - 6)*x - (7*a - 9)*y - x - (3*a - 1)*y - y ,
  876. 2 2 3 3
  877. - (5*a - 6)*x + (5*a - 9)*y + (3*a - 7)*x + (3*a - 2)*y + x + y
  878. }
  879. % clear the rules previously set.
  880. setrules {};
  881. {}
  882. % Example 11 : The standard basis of another example.
  883. % Comparing Mora's and Lazard's approaches.
  884. vars:={x,y}$
  885. setring(vars,localorder vars,lex);
  886. {{x,y},{{-1,-1}},lex,{1,1}}
  887. ff:=x^5+y^11+(x+x^3)*y^9;
  888. 5 3 9 9 11
  889. ff := x + x *y + x*y + y
  890. setideal(p,flatten matjac({ff},vars));
  891. 4 9 2 9
  892. {5*x + y + 3*x *y ,
  893. 8 10 3 8
  894. 9*x*y + 11*y + 9*x *y }
  895. % Mora's approach : Only top reduction allowed.
  896. gbasis p;
  897. 8 10 3 8
  898. {9*x*y + 11*y + 9*x *y ,
  899. 4 9 2 9
  900. 5*x + y + 3*x *y ,
  901. 16 7 10 3 14 17 10 8
  902. 73205*y - 120285*x *y + 239580*x *y + 6561*y - 32805*x *y
  903. 6 12 2 17
  904. + 147015*x *y + 19683*x *y }
  905. % Lazard's approach : Total normal forms of homogenized polynomials
  906. % allowed. Hence the computation produces other normal forms.
  907. off lazy;
  908. setideal(p,p)$
  909. gbasis p;
  910. 4 9 2 9
  911. {5*x + y + 3*x *y ,
  912. 8 10 3 8
  913. 9*x*y + 11*y + 9*x *y ,
  914. 16 17 10 8 6 12 2 16
  915. 73205*y + 6561*y - 32805*x *y + 294030*x *y - 292820*x *y
  916. 9 10 5 14 2 17
  917. + 120285*x *y - 239580*x *y + 19683*x *y }
  918. dim p;
  919. 0
  920. degree p;
  921. 40
  922. % Example 12 : A local intersection.
  923. setring({x,y,z},{},revlex);
  924. {{x,y,z},{},revlex,{1,1,1}}
  925. on lazy;
  926. m1:=matintersect({x-y^2,y-x^2},{x-z^2,z-x^2},{y-z^2,z-y^2});
  927. 2 2 3 3 2 2
  928. m1 := {y*z - y *z - x *y*z + x *y *z ,
  929. 2 4 4 2
  930. x*z - x*y - x *z + x *y ,
  931. 2 4 4 2
  932. x*y - x*y *z - x *y + x *y *z}
  933. % Delete polynomial units post factum :
  934. deleteunits ws;
  935. 2
  936. {y*z,x*(y - z),x*y}
  937. interreduce ws;
  938. {x*y,x*z,y*z}
  939. % Detecting polynomial units early :
  940. on detectunits;
  941. m1:=matintersect({x-y^2,y-x^2},{x-z^2,z-x^2},{y-z^2,z-y^2});
  942. m1 := {x*y,x*z,y*z}
  943. off detectunits;
  944. % Return to a noetherian term order:
  945. vars:={x,y,z}$
  946. setring(vars,degreeorder vars,revlex);
  947. {{x,y,z},{{1,1,1}},revlex,{1,1,1}}
  948. on noetherian;
  949. % Example 13 : Use of "mod".
  950. % Polynomials modulo ideals :
  951. setideal(m,{2x^2+y+5,3y^2+z+7,7z^2+x+1});
  952. 2 2 2
  953. {2*x + y + 5,3*y + z + 7,7*z + x + 1}
  954. x^2*y^2*z^2 mod m;
  955. - x*y*z - 7*x*y - 5*x*z - 35*x - y*z - 7*y - 5*z - 35
  956. --------------------------------------------------------
  957. 42
  958. % Lists of polynomials modulo ideals :
  959. {x^3,y^3,z^3} mod gbasis m;
  960. x*( - y - 5) y*( - z - 7) - z*(x + 1)
  961. {--------------,--------------,--------------}
  962. 2 3 7
  963. % Matrices modulo modules :
  964. mm:=mat((x^4,y^4,z^4));
  965. [ 4 4 4]
  966. mm := [x y z ]
  967. mm1:=tp<< ideal2mat m>>;
  968. [ 2 2 2 ]
  969. mm1 := [2*x + y + 5 3*y + z + 7 x + 7*z + 1]
  970. mm mod mm1;
  971. 2
  972. y + 10*y + 25 2 2 2 2 4 3
  973. mat((----------------,( - 6*x *y - 2*x *z - 14*x + 4*y + 3*y
  974. 4
  975. 2 3 2 2 2
  976. + 15*y + y*z + 7*y + 5*z + 35)/4,( - 2*x - 14*x *z - 2*x
  977. 2 4 2
  978. + x*y + 5*x + 7*y*z + y + 4*z + 35*z + 5)/4))
  979. % Example 14 : Powersums through elementary symmetric functions.
  980. vars:={a,b,c,d,e1,e2,e3,e4}$
  981. setring(vars,{},lex)$
  982. m:=interreduce {a+b+c+d-e1,
  983. a*b+a*c+a*d+b*c+b*d+c*d-e2,
  984. a*b*c+a*b*d+a*c*d+b*c*d-e3,
  985. a*b*c*d-e4};
  986. m := {a + b + c + d - e1,
  987. 4 3 2
  988. d - d *e1 + d *e2 - d*e3 + e4,
  989. 2 2 2
  990. b + b*c + b*d - b*e1 + c + c*d - c*e1 + d - d*e1 + e2,
  991. 3 2 2 2 3 2
  992. c + c *d - c *e1 + c*d - c*d*e1 + c*e2 + d - d *e1 + d*e2
  993. - e3}
  994. for n:=1:5 collect a^n+b^n+c^n+d^n mod m;
  995. {e1,
  996. 2
  997. e1 - 2*e2,
  998. 3
  999. e1 - 3*e1*e2 + 3*e3,
  1000. 4 2 2
  1001. e1 - 4*e1 *e2 + 4*e1*e3 + 2*e2 - 4*e4,
  1002. 5 3 2 2
  1003. e1 - 5*e1 *e2 + 5*e1 *e3 + 5*e1*e2 - 5*e1*e4 - 5*e2*e3}
  1004. % Example 15 : The setrules mechanism.
  1005. setring({x,y,z},{},lex)$
  1006. setrules {aa^3=>aa+1};
  1007. 3
  1008. {aa => aa + 1}
  1009. setideal(m,{x^2+y+z-aa,x+y^2+z-aa,x+y+z^2-aa});
  1010. 2 2 2
  1011. {x + y + z - aa,x + y + z - aa,x + y + z - aa}
  1012. gbasis m;
  1013. 2 2
  1014. {y - y - z + z,
  1015. 6 4 3 2 2
  1016. z - (3*aa + 1)*z + 4*z + (3*aa - 2*aa - 2)*z - (4*aa - 4)*z
  1017. 2
  1018. + (3*aa - 3*aa - 1),
  1019. 2
  1020. x + y + z - aa,
  1021. 2 4 2 2
  1022. 2*y*z - (2*aa - 2)*y + z - (2*aa - 1)*z + (aa - aa)}
  1023. % Clear the rules previously set.
  1024. setrules {};
  1025. {}
  1026. % Example 16 : The same example with advanced coefficient domains.
  1027. load arnum;
  1028. defpoly aa^3-aa-1;
  1029. setideal(m,{x^2+y+z-aa,x+y^2+z-aa,x+y+z^2-aa});
  1030. 2 2 2
  1031. {x + y + z - aa,x + y + z - aa,x + y + z - aa}
  1032. gbasis m;
  1033. 2 2
  1034. {y - y - z + z,
  1035. 6 4 3 2 2
  1036. z - (3*aa + 1)*z + 4*z + (3*aa - 2*aa - 2)*z - (4*aa - 4)*z
  1037. 2
  1038. + (3*aa - 3*aa - 1),
  1039. 2
  1040. x + y + z - aa,
  1041. 2 1 4 1 2 1 2 1
  1042. y*z - (aa - 1)*y + ---*z - (aa - ---)*z + (---*aa - ---*aa)}
  1043. 2 2 2 2
  1044. % The following needs some more time since factorization of arnum's
  1045. % is not so easy :
  1046. groebfactor m;
  1047. 2
  1048. {{x + (aa - aa - 1),
  1049. 2
  1050. y - (aa - aa),
  1051. 2
  1052. z + (aa - aa - 1)},
  1053. 2
  1054. {x - (aa - aa - 1),
  1055. 2
  1056. y - (aa - aa - 1),
  1057. 2
  1058. z + (aa - aa - 2)},
  1059. 2
  1060. {x - (aa - aa - 1),
  1061. 2
  1062. y + (aa - aa - 2),
  1063. 2
  1064. z - (aa - aa - 1)},
  1065. 2
  1066. {x + (aa - aa - 1),
  1067. 2
  1068. y + (aa - aa - 1),
  1069. 2
  1070. z - (aa - aa)},
  1071. 2
  1072. {x - z,y - z,z + 2*z - aa},
  1073. 2
  1074. {x - (aa - aa),
  1075. 2
  1076. y + (aa - aa - 1),
  1077. 2
  1078. z + (aa - aa - 1)},
  1079. 2
  1080. {x + (aa - aa - 2),
  1081. 2
  1082. y - (aa - aa - 1),
  1083. 2
  1084. z - (aa - aa - 1)}}
  1085. off arnum;
  1086. off rational;
  1087. % Example 17 : The square of the 2-minors of a symmetric 3x3-matrix.
  1088. vars:=for i:=1:6 collect mkid(x,i);
  1089. vars := {x1,
  1090. x2,
  1091. x3,
  1092. x4,
  1093. x5,
  1094. x6}
  1095. setring(vars,degreeorder vars,revlex);
  1096. {{x1,x2,x3,x4,x5,x6},{{1,1,1,1,1,1}},revlex,{1,1,1,1,1,1}}
  1097. % Generating the ideal :
  1098. mm:=mat((x1,x2,x3),(x2,x4,x5),(x3,x5,x6));
  1099. [x1 x2 x3]
  1100. [ ]
  1101. mm := [x2 x4 x5]
  1102. [ ]
  1103. [x3 x5 x6]
  1104. m:=minors(mm,2);
  1105. 2
  1106. m := { - x4*x6 + x5 ,
  1107. - x2*x6 + x3*x5,
  1108. - x2*x5 + x3*x4,
  1109. 2
  1110. - x1*x6 + x3 ,
  1111. - x1*x5 + x2*x3,
  1112. 2
  1113. - x1*x4 + x2 }
  1114. setideal(n,idealpower(m,2));
  1115. 4 2 2 2
  1116. {x5 - 2*x4*x5 *x6 + x4 *x6 ,
  1117. 2 2 2 2
  1118. x3 *x5 - 2*x2*x3*x5*x6 + x2 *x6 ,
  1119. 4 2 2 2
  1120. x3 - 2*x1*x3 *x6 + x1 *x6 ,
  1121. 2 2 2 2
  1122. x2 *x3 - 2*x1*x2*x3*x5 + x1 *x5 ,
  1123. 4 2 2 2
  1124. x2 - 2*x1*x2 *x4 + x1 *x4 ,
  1125. 3 2 2
  1126. x3*x5 - x3*x4*x5*x6 - x2*x5 *x6 + x2*x4*x6 ,
  1127. 2 2 3
  1128. x3*x4*x5 - x3*x4 *x6 - x2*x5 + x2*x4*x5*x6,
  1129. 3 2 2
  1130. x3 *x5 - x2*x3 *x6 - x1*x3*x5*x6 + x1*x2*x6 ,
  1131. 2 3
  1132. x2*x3*x5 - x2*x3*x4*x6 - x1*x5 + x1*x4*x5*x6,
  1133. 2 2 2
  1134. x2*x3 *x5 - x2 *x3*x6 - x1*x3*x5 + x1*x2*x5*x6,
  1135. 3 2 2
  1136. x2*x3 - x1*x3 *x5 - x1*x2*x3*x6 + x1 *x5*x6,
  1137. 2 2 2 2 2
  1138. x2 *x5 - x2 *x4*x6 - x1*x4*x5 + x1*x4 *x6,
  1139. 2 3
  1140. x2 *x3*x5 - x2 *x6 - x1*x3*x4*x5 + x1*x2*x4*x6,
  1141. 2 3 2
  1142. x2 *x3*x4 - x2 *x5 - x1*x3*x4 + x1*x2*x4*x5,
  1143. 3 2 2
  1144. x2 *x3 - x1*x2*x3*x4 - x1*x2 *x5 + x1 *x4*x5,
  1145. 2 2 2 2 2
  1146. x3 *x4*x6 - 2*x2*x3*x5*x6 + x2 *x6 + x1*x5 *x6 - x1*x4*x6 ,
  1147. 2 2 3
  1148. x3 *x4*x5 - 2*x2*x3*x4*x6 + x2 *x5*x6 - x1*x5 + x1*x4*x5*x6,
  1149. 2 2 2 2 2
  1150. x3 *x4 - 2*x2*x3*x4*x5 + x2 *x4*x6 + x1*x4*x5 - x1*x4 *x6,
  1151. 3 2 2
  1152. x3 *x4 - x2 *x3*x6 - x1*x3*x5 - x1*x3*x4*x6 + 2*x1*x2*x5*x6,
  1153. 2 3 2
  1154. x2*x3 *x4 - x2 *x6 - 2*x1*x3*x4*x5 + x1*x2*x5 + x1*x2*x4*x6,
  1155. 2 2 2 2 2
  1156. x1*x3 *x4 - 2*x1*x2*x3*x5 + x1*x2 *x6 + x1 *x5 - x1 *x4*x6}
  1157. % The ideal itself :
  1158. gbasis n;
  1159. 4 2 2 2
  1160. {x5 - 2*x4*x5 *x6 + x4 *x6 ,
  1161. 2 2 2 2
  1162. x3 *x5 - 2*x2*x3*x5*x6 + x2 *x6 ,
  1163. 4 2 2 2
  1164. x3 - 2*x1*x3 *x6 + x1 *x6 ,
  1165. 2 2 2 2
  1166. x2 *x3 - 2*x1*x2*x3*x5 + x1 *x5 ,
  1167. 4 2 2 2
  1168. x2 - 2*x1*x2 *x4 + x1 *x4 ,
  1169. 3 2 2
  1170. x3*x5 - x3*x4*x5*x6 - x2*x5 *x6 + x2*x4*x6 ,
  1171. 2 2 3
  1172. x3*x4*x5 - x3*x4 *x6 - x2*x5 + x2*x4*x5*x6,
  1173. 3 2 2
  1174. x3 *x5 - x2*x3 *x6 - x1*x3*x5*x6 + x1*x2*x6 ,
  1175. 2 3
  1176. x2*x3*x5 - x2*x3*x4*x6 - x1*x5 + x1*x4*x5*x6,
  1177. 2 2 2
  1178. x2*x3 *x5 - x2 *x3*x6 - x1*x3*x5 + x1*x2*x5*x6,
  1179. 3 2 2
  1180. x2*x3 - x1*x3 *x5 - x1*x2*x3*x6 + x1 *x5*x6,
  1181. 2 2 2 2 2
  1182. x2 *x5 - x2 *x4*x6 - x1*x4*x5 + x1*x4 *x6,
  1183. 2 3
  1184. x2 *x3*x5 - x2 *x6 - x1*x3*x4*x5 + x1*x2*x4*x6,
  1185. 2 3 2
  1186. x2 *x3*x4 - x2 *x5 - x1*x3*x4 + x1*x2*x4*x5,
  1187. 3 2 2
  1188. x2 *x3 - x1*x2*x3*x4 - x1*x2 *x5 + x1 *x4*x5,
  1189. 2 2 2 2 2
  1190. x3 *x4*x6 - 2*x2*x3*x5*x6 + x2 *x6 + x1*x5 *x6 - x1*x4*x6 ,
  1191. 2 2 3
  1192. x3 *x4*x5 - 2*x2*x3*x4*x6 + x2 *x5*x6 - x1*x5 + x1*x4*x5*x6,
  1193. 2 2 2 2 2
  1194. x3 *x4 - 2*x2*x3*x4*x5 + x2 *x4*x6 + x1*x4*x5 - x1*x4 *x6,
  1195. 3 2 2
  1196. x3 *x4 - x2 *x3*x6 - x1*x3*x5 - x1*x3*x4*x6 + 2*x1*x2*x5*x6,
  1197. 2 3 2
  1198. x2*x3 *x4 - x2 *x6 - 2*x1*x3*x4*x5 + x1*x2*x5 + x1*x2*x4*x6,
  1199. 2 2 2 2 2
  1200. x1*x3 *x4 - 2*x1*x2*x3*x5 + x1*x2 *x6 + x1 *x5 - x1 *x4*x6}
  1201. length n;
  1202. 21
  1203. dim n;
  1204. 3
  1205. degree n;
  1206. 16
  1207. % Its unmixed radical.
  1208. unmixedradical n;
  1209. 2
  1210. { - x4*x6 + x5 ,
  1211. - x2*x6 + x3*x5,
  1212. 2
  1213. - x1*x6 + x3 ,
  1214. x2*x5 - x3*x4,
  1215. - x1*x5 + x2*x3,
  1216. 2
  1217. - x1*x4 + x2 }
  1218. % Its equidimensional hull. This needs some more time :
  1219. n1:=eqhull n;
  1220. 2 2 2 4
  1221. n1 := {x4 *x6 - 2*x4*x5 *x6 + x5 ,
  1222. 2 2 2 2
  1223. x2 *x6 - 2*x2*x3*x5*x6 + x3 *x5 ,
  1224. 2 2 2 4
  1225. x1 *x6 - 2*x1*x3 *x6 + x3 ,
  1226. 2 2 2 2
  1227. x1 *x5 - 2*x1*x2*x3*x5 + x2 *x3 ,
  1228. 2 2 2 4
  1229. x1 *x4 - 2*x1*x2 *x4 + x2 ,
  1230. 2 2 3
  1231. x2*x4*x6 - x2*x5 *x6 - x3*x4*x5*x6 + x3*x5 ,
  1232. 3 2 2
  1233. x2*x4*x5*x6 - x2*x5 - x3*x4 *x6 + x3*x4*x5 ,
  1234. 2 2 3
  1235. x1*x2*x6 - x1*x3*x5*x6 - x2*x3 *x6 + x3 *x5,
  1236. 3 2
  1237. x1*x4*x5*x6 - x1*x5 - x2*x3*x4*x6 + x2*x3*x5 ,
  1238. 2 2 2
  1239. x1*x2*x5*x6 - x1*x3*x5 - x2 *x3*x6 + x2*x3 *x5,
  1240. 2 2 3
  1241. x1 *x5*x6 - x1*x2*x3*x6 - x1*x3 *x5 + x2*x3 ,
  1242. 2 2 2 2 2
  1243. x1*x4 *x6 - x1*x4*x5 - x2 *x4*x6 + x2 *x5 ,
  1244. 3 2
  1245. x1*x2*x4*x6 - x1*x3*x4*x5 - x2 *x6 + x2 *x3*x5,
  1246. 2 3 2
  1247. x1*x2*x4*x5 - x1*x3*x4 - x2 *x5 + x2 *x3*x4,
  1248. 2 2 3
  1249. x1 *x4*x5 - x1*x2 *x5 - x1*x2*x3*x4 + x2 *x3,
  1250. 2 2 2
  1251. - x1*x4*x6 + x1*x5 + x2 *x6 - 2*x2*x3*x5 + x3 *x4}
  1252. length n1;
  1253. 16
  1254. setideal(n1,n1)$
  1255. gbasis n1$
  1256. submodulep(n,n1);
  1257. yes
  1258. submodulep(n1,n);
  1259. no
  1260. % Hence there is an embedded component. Let's find it making an
  1261. % excursion to symbolic mode. Of course, this can be done also
  1262. % algebraically.
  1263. symbolic;
  1264. nil
  1265. n:=get('n,'basis);
  1266. (dpmat 21 0 ((1 ((((0 0 0 0 0 4) 4) . 1) (((0 0 0 0 1 2 1) 4) . -2) (((0 0 0 0 2
  1267. 0 2) 4) . 1)) 3 0 nil) (2 ((((0 0 0 2 0 2) 4) . 1) (((0 0 1 1 0 1 1) 4) . -2) ((
  1268. (0 0 2 0 0 0 2) 4) . 1)) 3 0 nil) (3 ((((0 0 0 4) 4) . 1) (((0 1 0 2 0 0 1) 4) .
  1269. -2) (((0 2 0 0 0 0 2) 4) . 1)) 3 0 nil) (4 ((((0 0 2 2) 4) . 1) (((0 1 1 1 0 1)
  1270. 4) . -2) (((0 2 0 0 0 2) 4) . 1)) 3 0 nil) (5 ((((0 0 4) 4) . 1) (((0 1 2 0 1) 4
  1271. ) . -2) (((0 2 0 0 2) 4) . 1)) 3 0 nil) (6 ((((0 0 0 1 0 3) 4) . 1) (((0 0 0 1 1
  1272. 1 1) 4) . -1) (((0 0 1 0 0 2 1) 4) . -1) (((0 0 1 0 1 0 2) 4) . 1)) 4 0 nil) (7
  1273. ((((0 0 0 1 1 2) 4) . 1) (((0 0 0 1 2 0 1) 4) . -1) (((0 0 1 0 0 3) 4) . -1) (((
  1274. 0 0 1 0 1 1 1) 4) . 1)) 4 0 nil) (8 ((((0 0 0 3 0 1) 4) . 1) (((0 0 1 2 0 0 1) 4
  1275. ) . -1) (((0 1 0 1 0 1 1) 4) . -1) (((0 1 1 0 0 0 2) 4) . 1)) 4 0 nil) (9 ((((0
  1276. 0 1 1 0 2) 4) . 1) (((0 0 1 1 1 0 1) 4) . -1) (((0 1 0 0 0 3) 4) . -1) (((0 1 0
  1277. 0 1 1 1) 4) . 1)) 4 0 nil) (10 ((((0 0 1 2 0 1) 4) . 1) (((0 0 2 1 0 0 1) 4) .
  1278. -1) (((0 1 0 1 0 2) 4) . -1) (((0 1 1 0 0 1 1) 4) . 1)) 4 0 nil) (11 ((((0 0 1 3
  1279. ) 4) . 1) (((0 1 0 2 0 1) 4) . -1) (((0 1 1 1 0 0 1) 4) . -1) (((0 2 0 0 0 1 1)
  1280. 4) . 1)) 4 0 nil) (12 ((((0 0 2 0 0 2) 4) . 1) (((0 0 2 0 1 0 1) 4) . -1) (((0 1
  1281. 0 0 1 2) 4) . -1) (((0 1 0 0 2 0 1) 4) . 1)) 4 0 nil) (13 ((((0 0 2 1 0 1) 4) .
  1282. 1) (((0 0 3 0 0 0 1) 4) . -1) (((0 1 0 1 1 1) 4) . -1) (((0 1 1 0 1 0 1) 4) . 1)
  1283. ) 4 0 nil) (14 ((((0 0 2 1 1) 4) . 1) (((0 0 3 0 0 1) 4) . -1) (((0 1 0 1 2) 4)
  1284. . -1) (((0 1 1 0 1 1) 4) . 1)) 4 0 nil) (15 ((((0 0 3 1) 4) . 1) (((0 1 1 1 1) 4
  1285. ) . -1) (((0 1 2 0 0 1) 4) . -1) (((0 2 0 0 1 1) 4) . 1)) 4 0 nil) (16 ((((0 0 0
  1286. 2 1 0 1) 4) . 1) (((0 0 1 1 0 1 1) 4) . -2) (((0 0 2 0 0 0 2) 4) . 1) (((0 1 0 0
  1287. 0 2 1) 4) . 1) (((0 1 0 0 1 0 2) 4) . -1)) 5 0 nil) (17 ((((0 0 0 2 1 1) 4) . 1)
  1288. (((0 0 1 1 1 0 1) 4) . -2) (((0 0 2 0 0 1 1) 4) . 1) (((0 1 0 0 0 3) 4) . -1) ((
  1289. (0 1 0 0 1 1 1) 4) . 1)) 5 0 nil) (18 ((((0 0 0 2 2) 4) . 1) (((0 0 1 1 1 1) 4)
  1290. . -2) (((0 0 2 0 1 0 1) 4) . 1) (((0 1 0 0 1 2) 4) . 1) (((0 1 0 0 2 0 1) 4) .
  1291. -1)) 5 0 nil) (19 ((((0 0 0 3 1) 4) . 1) (((0 0 2 1 0 0 1) 4) . -1) (((0 1 0 1 0
  1292. 2) 4) . -1) (((0 1 0 1 1 0 1) 4) . -1) (((0 1 1 0 0 1 1) 4) . 2)) 5 0 nil) (20 (
  1293. (((0 0 1 2 1) 4) . 1) (((0 0 3 0 0 0 1) 4) . -1) (((0 1 0 1 1 1) 4) . -2) (((0 1
  1294. 1 0 0 2) 4) . 1) (((0 1 1 0 1 0 1) 4) . 1)) 5 0 nil) (21 ((((0 1 0 2 1) 4) . 1)
  1295. (((0 1 1 1 0 1) 4) . -2) (((0 1 2 0 0 0 1) 4) . 1) (((0 2 0 0 0 2) 4) . 1) (((0
  1296. 2 0 0 1 0 1) 4) . -1)) 5 0 nil)) nil)
  1297. % This needs even more time than the eqhull, of course.
  1298. u:=primarydecomposition!* n;
  1299. (((dpmat 16 0 ((1 ((((0 0 0 0 0 4) 4) . 1) (((0 0 0 0 1 2 1) 4) . -2) (((0 0 0 0
  1300. 2 0 2) 4) . 1)) 3 0 nil) (2 ((((0 0 0 4) 4) . 1) (((0 1 0 2 0 0 1) 4) . -2) (((0
  1301. 2 0 0 0 0 2) 4) . 1)) 3 0 nil) (3 ((((0 0 4) 4) . 1) (((0 1 2 0 1) 4) . -2) (((0
  1302. 2 0 0 2) 4) . 1)) 3 0 nil) (4 ((((0 0 0 2 0 2) 4) . 1) (((0 0 1 1 0 1 1) 4) . -2
  1303. ) (((0 0 2 0 0 0 2) 4) . 1)) 3 0 nil) (5 ((((0 0 2 2) 4) . 1) (((0 1 1 1 0 1) 4)
  1304. . -2) (((0 2 0 0 0 2) 4) . 1)) 3 0 nil) (6 ((((0 0 0 1 0 3) 4) . 1) (((0 0 0 1 1
  1305. 1 1) 4) . -1) (((0 0 1 0 0 2 1) 4) . -1) (((0 0 1 0 1 0 2) 4) . 1)) 4 0 nil) (7
  1306. ((((0 0 0 3 0 1) 4) . 1) (((0 0 1 2 0 0 1) 4) . -1) (((0 1 0 1 0 1 1) 4) . -1) (
  1307. ((0 1 1 0 0 0 2) 4) . 1)) 4 0 nil) (8 ((((0 0 0 1 1 2) 4) . 1) (((0 0 0 1 2 0 1)
  1308. 4) . -1) (((0 0 1 0 0 3) 4) . -1) (((0 0 1 0 1 1 1) 4) . 1)) 4 0 nil) (9 ((((0 0
  1309. 1 3) 4) . 1) (((0 1 0 2 0 1) 4) . -1) (((0 1 1 1 0 0 1) 4) . -1) (((0 2 0 0 0 1
  1310. 1) 4) . 1)) 4 0 nil) (10 ((((0 0 2 0 0 2) 4) . 1) (((0 0 2 0 1 0 1) 4) . -1) (((
  1311. 0 1 0 0 1 2) 4) . -1) (((0 1 0 0 2 0 1) 4) . 1)) 4 0 nil) (11 ((((0 0 2 1 1) 4)
  1312. . 1) (((0 0 3 0 0 1) 4) . -1) (((0 1 0 1 2) 4) . -1) (((0 1 1 0 1 1) 4) . 1)) 4
  1313. 0 nil) (12 ((((0 0 3 1) 4) . 1) (((0 1 1 1 1) 4) . -1) (((0 1 2 0 0 1) 4) . -1)
  1314. (((0 2 0 0 1 1) 4) . 1)) 4 0 nil) (13 ((((0 0 2 1 0 1) 4) . 1) (((0 0 3 0 0 0 1)
  1315. 4) . -1) (((0 1 0 1 1 1) 4) . -1) (((0 1 1 0 1 0 1) 4) . 1)) 4 0 nil) (14 ((((0
  1316. 0 1 2 0 1) 4) . 1) (((0 0 2 1 0 0 1) 4) . -1) (((0 1 0 1 0 2) 4) . -1) (((0 1 1
  1317. 0 0 1 1) 4) . 1)) 4 0 nil) (15 ((((0 0 1 1 0 2) 4) . 1) (((0 0 1 1 1 0 1) 4) .
  1318. -1) (((0 1 0 0 0 3) 4) . -1) (((0 1 0 0 1 1 1) 4) . 1)) 4 0 nil) (16 ((((0 0 0 2
  1319. 1) 3) . 1) (((0 0 1 1 0 1) 3) . -2) (((0 0 2 0 0 0 1) 3) . 1) (((0 1 0 0 0 2) 3)
  1320. . 1) (((0 1 0 0 1 0 1) 3) . -1)) 5 0 nil)) nil) (dpmat 6 0 ((1 ((((0 0 0 0 0 2)
  1321. 2) . 1) (((0 0 0 0 1 0 1) 2) . -1)) 2 0 nil) (2 ((((0 0 0 1 0 1) 2) . 1) (((0 0
  1322. 1 0 0 0 1) 2) . -1)) 2 0 nil) (3 ((((0 0 0 2) 2) . 1) (((0 1 0 0 0 0 1) 2) . -1)
  1323. ) 2 0 nil) (4 ((((0 0 0 1 1) 2) . -1) (((0 0 1 0 0 1) 2) . 1)) 2 0 nil) (5 ((((0
  1324. 0 1 1) 2) . 1) (((0 1 0 0 0 1) 2) . -1)) 2 0 nil) (6 ((((0 0 2) 2) . 1) (((0 1 0
  1325. 0 1) 2) . -1)) 2 0 nil)) nil)) ((dpmat 18 0 ((1 ((((0 0 0 0 0 4) 4) . 1)) 1 0
  1326. nil) (2 ((((0 0 0 1 0 3) 4) . 1)) 1 0 nil) (3 ((((0 0 0 2 0 2) 4) . 1)) 1 0 nil)
  1327. (4 ((((0 0 0 3 0 1) 4) . 1)) 1 0 nil) (5 ((((0 0 0 4) 4) . 1)) 1 0 nil) (6 ((((0
  1328. 0 1 0 0 3) 4) . 1)) 1 0 nil) (7 ((((0 0 1 1 0 2) 4) . 1)) 1 0 nil) (8 ((((0 0 1
  1329. 2 0 1) 4) . 1)) 1 0 nil) (9 ((((0 0 1 3) 4) . 1)) 1 0 nil) (10 ((((0 0 2 0 0 2)
  1330. 4) . 1)) 1 0 nil) (11 ((((0 0 2 1 0 1) 4) . 1)) 1 0 nil) (12 ((((0 0 2 2) 4) . 1
  1331. )) 1 0 nil) (13 ((((0 0 3 0 0 1) 4) . 1)) 1 0 nil) (14 ((((0 0 3 1) 4) . 1)) 1 0
  1332. nil) (15 ((((0 0 4) 4) . 1)) 1 0 nil) (16 ((((0 0 0 0 0 0 1) 1) . 1)) 1 0 nil) (
  1333. 17 ((((0 0 0 0 1) 1) . 1)) 1 0 nil) (18 ((((0 1) 1) . 1)) 1 0 nil)) nil) (dpmat
  1334. 6 0 ((1 ((((0 0 0 0 0 0 1) 1) . 1)) 1 0 nil) (2 ((((0 0 0 0 0 1) 1) . 1)) 1 0
  1335. nil) (3 ((((0 0 0 0 1) 1) . 1)) 1 0 nil) (4 ((((0 0 0 1) 1) . 1)) 1 0 nil) (5 ((
  1336. ((0 0 1) 1) . 1)) 1 0 nil) (6 ((((0 1) 1) . 1)) 1 0 nil)) nil)))
  1337. for each x in u collect easydim!* second x;
  1338. (3 0)
  1339. for each x in u collect degree!* first x;
  1340. (16 20)
  1341. % Hence the embedded component is a trivial one. Let's divide it
  1342. % out by a stable ideal quotient calculation :
  1343. algebraic;
  1344. setideal(n2,matstabquot(n,vars));
  1345. 4 2 2 2
  1346. {x5 - 2*x4*x5 *x6 + x4 *x6 ,
  1347. 2 2 2 2
  1348. x3 *x5 - 2*x2*x3*x5*x6 + x2 *x6 ,
  1349. 4 2 2 2
  1350. x3 - 2*x1*x3 *x6 + x1 *x6 ,
  1351. 2 2 2 2
  1352. x2 *x3 - 2*x1*x2*x3*x5 + x1 *x5 ,
  1353. 4 2 2 2
  1354. x2 - 2*x1*x2 *x4 + x1 *x4 ,
  1355. 3 2 2
  1356. x3*x5 - x3*x4*x5*x6 - x2*x5 *x6 + x2*x4*x6 ,
  1357. 2 2 3
  1358. x3*x4*x5 - x3*x4 *x6 - x2*x5 + x2*x4*x5*x6,
  1359. 3 2 2
  1360. x3 *x5 - x2*x3 *x6 - x1*x3*x5*x6 + x1*x2*x6 ,
  1361. 2 3
  1362. x2*x3*x5 - x2*x3*x4*x6 - x1*x5 + x1*x4*x5*x6,
  1363. 2 2 2
  1364. x2*x3 *x5 - x2 *x3*x6 - x1*x3*x5 + x1*x2*x5*x6,
  1365. 3 2 2
  1366. x2*x3 - x1*x3 *x5 - x1*x2*x3*x6 + x1 *x5*x6,
  1367. 2 2 2 2 2
  1368. x2 *x5 - x2 *x4*x6 - x1*x4*x5 + x1*x4 *x6,
  1369. 2 3
  1370. x2 *x3*x5 - x2 *x6 - x1*x3*x4*x5 + x1*x2*x4*x6,
  1371. 2 3 2
  1372. x2 *x3*x4 - x2 *x5 - x1*x3*x4 + x1*x2*x4*x5,
  1373. 3 2 2
  1374. x2 *x3 - x1*x2*x3*x4 - x1*x2 *x5 + x1 *x4*x5,
  1375. 2 2 2
  1376. x3 *x4 - 2*x2*x3*x5 + x2 *x6 + x1*x5 - x1*x4*x6}
  1377. gbasis n2$
  1378. modequalp(n1,n2);
  1379. yes
  1380. end;
  1381. (cali 151861 4167)
  1382. End of Lisp run after 151.87+4.96 seconds