221{
224
226 {
227 WerrorS(
"rings must have same characteristic" );
229 }
230
233 {
234 WerrorS(
"only works for global orderings" );
236 }
237
239 {
240 WerrorS(
"rings must have same number of variables" );
242 }
243
245 {
246 WerrorS(
"rings must have same number of parameters" );
248 }
249
250 if ( state !=
WalkOk )
return state;
251
252
253
254 int nvar = sring->N;
255 int npar =
rPar(sring);
256 int * pperm;
257 char **snames;
258 char **dnames;
259
260 if ( npar > 0 )
261 {
262 snames=sring->cf->extRing->names;
263 dnames=dring->cf->extRing->names;
264 pperm= (
int *)
omAlloc0( (npar+1)*
sizeof( int ) );
265 }
266 else
267 {
271 }
272
274 dring->names, nvar, dnames, npar, vperm, pperm,
275 dring->cf->type);
276
277 for (
k= nvar; (
k > 0) && (state ==
WalkOk);
k-- )
279 {
280 WerrorS(
"variable names do not agree" );
282 }
283
284 for (
k= npar; (
k > 0) && (state ==
WalkOk);
k-- )
285 if ( pperm[
k-1] >= 0 )
286 {
287 WerrorS(
"parameter names do not agree" );
289 }
290
291
292
293 for (
k= nvar; (
k > 0) && (state ==
WalkOk);
k-- )
294 if ( vperm[
k] != (
k) )
295 {
296 WerrorS(
"orders of variables do not agree" );
298 }
299
300
301 for (
k= npar; (
k > 0) && (state ==
WalkOk);
k-- )
302 if ( pperm[
k-1] != (-
k) )
303 {
304 WerrorS(
"orders of parameters do not agree" );
306 }
307
310
311 if ( state !=
WalkOk )
return state;
312
313
314 if ( (sring->qideal !=
NULL) || (dring->qideal !=
NULL) )
315 {
316 WerrorS(
"rings are not allowed to be qrings");
318 }
319
321 while(dring->order[
i]!=0){
329 )
330 {
332 }
334 }
335
337 while(sring->order[
i]!=0)
338 {
346 )
347 {
349 }
351 }
352
353 return state;
354}
void WerrorS(const char *s)
void maFindPerm(char const *const *const preim_names, int preim_n, char const *const *const preim_par, int preim_p, char const *const *const names, int n, char const *const *const par, int nop, int *perm, int *par_perm, n_coeffType ch)
#define omFreeSize(addr, size)
static int rPar(const ring r)
(r->cf->P)
static short rVar(const ring r)
#define rVar(r) (r->N)
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
@ WalkIncompatibleDestRing
@ WalkIncompatibleSourceRing