the free module of rank i
| 1170 | |
| 1171 | /// the free module of rank i |
| 1172 | ideal id_FreeModule (int i, const ring r) |
| 1173 | { |
| 1174 | assume(i >= 0); |
| 1175 | if (r->isLPring) |
| 1176 | { |
| 1177 | PrintS("In order to address bimodules, the command freeAlgebra should be used."); |
| 1178 | } |
| 1179 | ideal h = idInit(i, i); |
| 1180 | |
| 1181 | for (int j=0; j<i; j++) |
| 1182 | { |
| 1183 | h->m[j] = p_One(r); |
| 1184 | p_SetComp(h->m[j],j+1,r); |
| 1185 | p_SetmComp(h->m[j],r); |
| 1186 | } |
| 1187 | |
| 1188 | return h; |
| 1189 | } |
| 1190 | |
| 1191 | /*2 |
| 1192 | *computes recursively all monomials of a certain degree |
no test coverage detected