Ask Your Question

Revision history [back]

Not sure I understand the question. Maybe this helps a little.

Names are slightly changed with respect to the question.

Define two vectors and two symbolic variables:

sage: A = vector(var('x', n=3, latex_name='x'))
sage: B = vector(var('y', n=4, latex_name=r'\epsilon'))
sage: b = SR.var('b', latex_name='b')
sage: z = SR.var('z', latex_name='z')

Produce two new vectors combining the above:

sage: U = vector(SR, len(A) + len(B) + 1, A.list() + B.list() + [b])
sage: U
(x0, x1, x2, y0, y1, y2, y3, b)

sage: V = vector(SR, len(B) + 1, B.list() + [z])
sage: V
(y0, y1, y2, y3, z)