Read-only forum archive

get number of ring paramter

get number of ring paramter

jack · Mon Apr 14, 2014 12:07 pm

Hello,

for a ring variable it is possible to get its number using rvar:
Code:
ring rng =(0,a,b),(x,y,z),dp;
rvar(x);
// 1
rvar(y);
// 2


Is the same possible for parameters (here 'a','b') ?

Re: get number of ring paramter

malex · Wed Apr 16, 2014 6:00 am

Code:
> ring rng =(0,a,b),(x,y,z),dp; def R = ring(ringlist(basering)[1]); setring R; R;
//   characteristic : 0
//   number of vars : 2
//        block   1 : ordering lp
//                  : names    a b
//        block   2 : ordering C
> rvar(a);
1
> rvar(b);
2

Re: get number of ring paramter

Jack · Sat Apr 19, 2014 3:28 pm

Doh!

It seems I have to go back to school and learn to ask precise questions.



Second trial:
is there a function in Singular interpreter language which takes as an argument a ring parameter variable
and returns its corresponding index?

If not, I would like to open a feature request for that.