Go to the first, previous, next, last section, table of contents.

### `gr`, `hgr`, `gr_mod`, `dgr`

`gr(plist,vlist,order)`
`hgr(plist,vlist,order)`
`gr_mod(plist,vlist,order,p)`
`dgr(plist,vlist,order,procs)`
  :: Groebner basis computation

return
  list
plist vlist procs
  list
order
  number, list or matrix
p
  prime less than 2^27

- These functions are defined in ``gr'` in the standard library directory.
- They compute a Groebner basis of a polynomial list plist with respect to the variable order vlist and the order type order. `gr()` and `hgr()` compute a Groebner basis over the rationals and `gr_mod` computes over GF(p).
- Variables not included in vlist are regarded as included in the ground field.
- `gr()` uses trace-lifting (an improvement by modular computation) and sugar strategy. `hgr()` uses trace-lifting and a cured sugar strategy by using homogenization.
- `dgr()` executes `gr()`, `dgr()` simultaneously on two process in a child process list procs and returns the result obtained first. The results returned from both the process should be equal, but it is not known in advance which method is faster. Therefore this function is useful to reduce the actual elapsed time.
- The CPU time shown after an exection of `dgr()` indicates that of the master process, and most of the time corresponds to the time for communication.

    [0] load("gr")$
    [64] load("cyclic")$
    [74] G=gr(cyclic(5),[c0,c1,c2,c3,c4],2);
    [c4^15+122*c4^10-122*c4^5-1,...]
    [75] GM=gr_mod(cyclic(5),[c0,c1,c2,c3,c4],2,31991)$
    24628*c4^15+29453*c4^10+2538*c4^5+7363
    [76] (G[0]*24628-GM[0])%31991;
    0

`References`
  section `dp_gr_main`, `dp_gr_mod_main`, `dp_gr_f_main`, `dp_weyl_gr_main`, `dp_weyl_gr_mod_main`, `dp_weyl_gr_f_main`, section `dp_ord`.

Go to the first, previous, next, last section, table of contents.