Thanks to all.  The machine is still up, as I was able to stop the
computation with Crtl-C.

Now I see it, of course that's what V.sum(W) says that it does, except
that it in fact makes no sense, since adding up the (infinitely many)
elements of W has nothing to do with V.

I don't quite know how I missed V+W -- thanks, David!

John

On 8 November 2012 10:38, P Purkayastha <ppu...@gmail.com> wrote:
> On 11/08/2012 05:36 PM, John Cremona wrote:
>>
>> Either I am doing something wrong or a simple operation which should
>> be fast is in fact very slow, but I do not know why.
>>
>> If V,W are vector spaces over QQ, subspaces of  the same ambient
>> space, then V.sum(W) should return their sum, with an echelon basis
>> obtained from the bases of V and W.  But this takes a stupidly long
>> time.  For example:
>>
>> sage: Q100=QQ^100
>> sage: V=Q100.subspace([Q100.random_element()])
>> sage: W=Q100.subspace([Q100.random_element()])
>>
>> # so V,W are both 1-dimensional
>>
>> sage: V.sum(W)
>> sage: time V.sum(W)
>>
>> # takes forever (on 5.3) -- why?
>>
>> John
>>
>
> What Francis said is correct. V.sum(W) sums the elements in W. Over QQ, the
> number of elements is not finite. I am surprised if your machine is still
> up, because it should have just exhausted all memory! :)
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To post to this group, send email to sage-devel@googlegroups.com.
> To unsubscribe from this group, send email to
> sage-devel+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.


Reply via email to