Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 11 years ago

Tomas gravatar image

resize a vector

I would like to define a new vector in Sage u=[O,P,σ] using a previously defined vecotor x=[O,P] and a new variable σ.

My code looks like:

var(’O, P');

var('sigma');

x = vector([O,P]);

u = vector([x, sigma]);

Which gives an error:

TypeError: unable to find a common ring for all elements

Apparently this is because vector() requires the variables to be of the same ring. In my case

x.parent()

Vector space of dimension 2 over Symbolic Ring

and

sigma.parent() Symbolic Ring

There is any way how to connect this two objects (u, σ) together to create one vector?

click to hide/show revision 2
No.2 Revision

resize a vector

I would like to define a new vector in Sage u=[O,P,σ] using a previously defined vecotor x=[O,P] and a new variable σ.

My code looks like:

var(’O, P');

var('sigma');

x = vector([O,P]);

u = vector([x, sigma]);

Which gives an error:

TypeError: unable to find a common ring for all elements

Apparently this is because vector() requires the variables to be of the same ring. In my case

x.parent()

Vector space of dimension 2 over Symbolic Ring

and

sigma.parent() Symbolic Ring

There is any way how to connect this two objects (u, (x, σ) together to create one vector?

click to hide/show revision 3
No.3 Revision

resize append a variable to a vector

I would like to define a new vector in Sage u=[O,P,σ] using a previously defined vecotor x=[O,P] and a new variable σ.

My code looks like:

var(’O, P');

var('sigma');

x = vector([O,P]);

u = vector([x, sigma]);

Which gives an error:

TypeError: unable to find a common ring for all elements

Apparently this is because vector() requires the variables to be of the same ring. In my case

x.parent()

Vector space of dimension 2 over Symbolic Ring

and

sigma.parent() Symbolic Ring

There is any way how to connect this two objects (x, σ) together to create one vector?