What is the sensible notion of parent() for a vector that I drew out of a 
vector subspace?
For instance, what should be printed by the following lines?

VS = (QQ^3).subspace([ (1, 1 ,1) ])
v = VS.an_element()
print v.parent()

One possibility is that QQ^3 should be printed. Alternatively, and the 
current behaviour of Sage, is to return the vector subspace VS as the 
parent.

This surprises me at least. I think of parent() vaguely in the general 
sense of type (not Python's primitive notion of type, of course, but a more 
advanced type
system). By that logic, I would say that the vector v above is foremost of 
the "type" QQ^3 element. It also happens to be in many vector subspaces of 
QQ^3 but
that doesn't matter. But there might be a bigger picture I'm not seeing 
here.

What do people say?

[ ]: Vectors drawn from a subspace have that subspace as parent.
[ ]: Vectors over R^n should have R^n as parent, no matter where they "came 
from".


This relates to the thread 
https://groups.google.com/forum/#!topic/sage-devel/rvs5E6AEXVc and to what 
should be patched to avoid the surprising behaviour mentioned there. More 
precisely, if the current parent-behaviour should be retained, a check 
should be introduced when modifying copies of vectors from VS. If the 
parent-behaviour is changed, however, no other patch is necessary.

Best,
Johan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to