[sage-support] Re: How to define variables over integer

2019-05-08 Thread darwin doppelganger
I forgot to add that you can automatically put the variables in a list with:

Z = list(V.gens())


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/8bfe3d77-6e0b-423c-8147-5f700e237732%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: How to define variables over integer

2019-05-08 Thread darwin doppelganger
Doesn't PolynomialRing() 
do
 
what you want? For example,

n=4
V=PolynomialRing(QQ,n+1,['z%d'%(i) for i in range(n+1)] )
V.inject_variables()

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/5f2a2611-3df6-4d8a-9f71-ba5ff3e33ecf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sage-support] How to define variables over integer

2019-05-08 Thread Santanu Sarkar
I know how to define variables over BooleanPolynomialRing.
This is as follows.

n=4
V=BooleanPolynomialRing(n+1,['z%d'%(i) for i in range(n+1)] )
V.inject_variables()

Can we define similar code over integers (ZZ) or rationals (QQ)?
Also I want to store variables in an array like Z=[z0,z1,z2,z3]
but it should be automatic. I will change only n.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CAOe8sPKEKd0DEWaz-4fWpu5MemssWHUtrNJwaLOS_dCvTkTUXg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.