I was going to suggest using "gens gb M", where M is the module, but
it doesn't work, and that seems to be a bug. Meanwhile, one way to
work around it would be to use the polynomial ring QQ[ ] instead, as
in the code below.
i91 : gens gb matrix {{1/1,2},{2,1}}
o91 = | 1 1/2 |
| 0 1 |
2 2
o91 : Matrix QQ <--- QQ
i92 : gens gb matrix {{1/1,0},{0,1}}
o92 = | 1 0 |
| 0 1 |
2 2
o92 : Matrix QQ <--- QQ
i93 : R = QQ[];
i94 : gens gb matrix {{1_R,2},{2,1}}
o94 = | 1 0 |
| 0 1 |
2 2
o94 : Matrix R <--- R
i95 : gens gb matrix {{1_R,0},{0,1}}
o95 = | 1 0 |
| 0 1 |
2 2
o95 : Matrix R <--- R