Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Stringification of concatenate expressions

I am not sure for the title of this question

This code

nl=3 
nc=2 
ring=QQ 
A=matrix(ring,nl,nc,[3,2,1,4,1,1])
b=vector(ring,[3,5,6])
# b=random_vector(ring,nc)
c=vector(ring,[4,7])
sign=list([">=",">=","<="])
vsign=list([">=",">="])
Zer =[0 for v in vsign]
x = var("x_", n=nc)
L=list(zip(zip(x,vsign),Zer))
LL=[flatten(v) for v in L]
LL

produce this [[x_0, '>=', 0], [x_1, '>=', 0]]. I would like to obtain [['x_0 >= 0'], ['x_1 >= 0']]. If I transform early all the x_i in string I can obtain easily [['x-0 >= 0'], ['x-1 >= 0']]. I wonder why 'stringify' transform - to _.