Hi Dinakar,
On Mon, Oct 13, 2014 at 11:57:25PM -0700, Travis Scrimshaw wrote:
> I wrote that part of the code and was assuming the user would be
> checking if a root is real or imaginary. However I'm definitely for
> adding this feature and having a method `is_root`. We can check if an
> element in the root space is a root in a finite root system by (the
> perhaps somewhat dumb) checking if it is in the (finite) set of all
> roots, which Sage can generate as you're probably aware. Also what's
> there for is_short/long/imaginary_root follows Prop 5.10 in Kac, so we
> could probably combine all 3 into a simple is_root for finite, affine,
> and ([1]to be implemented #15974) hyperbolic types. Please create a
> ticket on trac and cc me (tscrim) and we can fix things up.
Thanks for your feedback and interest in contributing!
Having a is_root method would indeed be of general interest, and like
Travis I am not sure how to implement it efficiently.
I would be in favor of checking, in is_real_root, that the input is
indeed a root, but *only* if doing so does not add a serious overhead
(that is checking is_root does not cost not much more than checking
is_real_root). Otherwise, I would do like for is_positive_root or
to_simple_root: namely adding in the specifications that the input
*should* be a root. Alternatively, we could add a "check" method, and
is_root would only be checked if check=True.
Cheers,
Nicolas
--
Nicolas M. ThiƩry "Isil" <[email protected]>
http://Nicolas.Thiery.name/
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.