Opened 13 years ago

Closed 13 years ago

# bug with multindexed ringvars

Reported by: Owned by: gorzel hannes minor 3-1-1 singular-kernel 3-1-1

### Description

Declaration of rings with multiindexed variables, does not work correctly. Sometimes variables are lost.

(Similar behaviour may occur for multiindex parameters?

But this I have not checked at the moment.)

```> ring r0=0,(x(1..2)(1..2)),dp;
> nvars(r0);
4
> maxideal(1);
_[1]=x(1)(1)
_[2]=x(1)(2)
_[3]=x(2)(1)
_[4]=x(2)(2)

> ring r2=0,(x(1..3)(1..2)),dp;
> nvars(r2);
6
> maxideal(1);
_[1]=x(1)(1)
_[2]=x(1)(2)
_[3]=x(2)(1)
_[4]=x(2)(2)
_[5]=x(3)(1)
_[6]=x(3)(2)

> ring r3=0,(x(1..3)(1..2)(1..2)),dp;
> nvars(r3);
2
> maxideal(1);
_[1]=x(1)(1)(1)
_[2]=x(1)(1)(2)
```

Now do fresh start and define the rings in another order. Then it works correctly.

```>  ring r3=0,(x(1..3)(1..2)(1..2)),dp;
>  nvars(r3); // should be 12, now OK
12
>  maxideal(1);
_[1]=x(1)(1)(1)
_[2]=x(1)(1)(2)
_[3]=x(1)(2)(1)
_[4]=x(1)(2)(2)
_[5]=x(2)(1)(1)
_[6]=x(2)(1)(2)
_[7]=x(2)(2)(1)
_[8]=x(2)(2)(2)
_[9]=x(3)(1)(1)
_[10]=x(3)(1)(2)
_[11]=x(3)(2)(1)
_[12]=x(3)(2)(2)
> ring r0=0,(x(1..2)(1..2)),dp;
>  nvars(r0); //  4
4
>  maxideal(1);
_[1]=x(1)(1)
_[2]=x(1)(2)
_[3]=x(2)(1)
_[4]=x(2)(2)
> ring r2=0,(x(1..3)(1..2)),dp;
>  nvars(r2); // 6
6
>  maxideal(1);
_[1]=x(1)(1)
_[2]=x(1)(2)
_[3]=x(2)(1)
_[4]=x(2)(2)
_[5]=x(3)(1)
_[6]=x(3)(2)
>
```

Another short example, showing the same Bug immediatly after start.

```FB Mathematik der Universitaet, D-67653 Kaiserslautern    \

>  ring r4=0,(x(1..2)(1..2)),dp;    // OK
> basering;
//   characteristic : 0
//   number of vars : 4
//        block   1 : ordering dp
//                  : names    x(1)(1) x(1)(2) x(2)(1) x(2)(2)
//        block   2 : ordering C

>  ring r=0,(x(1..2),y,z),dp;  // OK
>  basering;
//   characteristic : 0
//   number of vars : 4
//        block   1 : ordering dp
//                  : names    x(1) x(2) y z
//        block   2 : ordering C

>  ring r7=0,(x(1..2)(1..3)),dp;   // BUG variables lost
>  basering;
//   characteristic : 0
//   number of vars : 3
//        block   1 : ordering dp
//                  : names    x(1)(1) x(1)(2) x(1)(3)
//        block   2 : ordering C
```

-------------------------------------

Code to be copied:

This fails:

``` ring r0=0,(x(1..2)(1..2)),dp;
nvars(r0); //  4
maxideal(1);

ring r2=0,(x(1..3)(1..2)),dp;
nvars(r2); // 6
maxideal(1);

ring r3=0,(x(1..3)(1..2)(1..2)),dp;
nvars(r3); // should be 12 gives 2
maxideal(1);  // variables lost
```

This works:

``` ring r3=0,(x(1..3)(1..2)(1..2)),dp;
nvars(r3); // should be 12, now OK
maxideal(1);

ring r0=0,(x(1..2)(1..2)),dp;
nvars(r0); //  4
maxideal(1);

ring r2=0,(x(1..3)(1..2)),dp;
nvars(r2); // 6
maxideal(1);
```

This does not work:

``` ring r4=0,(x(1..2)(1..2)),dp;
basering;
ring r=0,(x(1..2),y,z),dp;
basering;
ring r7=0,(x(1..2)(1..3)),dp;
basering;
```

### comment:1 Changed 13 years ago by gorzel

Component: dontKnow → singular-kernel 3-1-2 and higher → 3-1-1 changed from somebody to hannes

### comment:2 Changed 13 years ago by hannes

Resolution: → fixed new → closed

remember that x(1) must be undefined if you want to use x(1)(1)

Note: See TracTickets for help on using tickets.