#16820: Implement ABCs for Lie algebras and finite dimensional given by 
structure
cofficients
-------------------------------------+-------------------------------------
       Reporter:  tscrim             |        Owner:  tscrim
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.7
      Component:  algebra            |   Resolution:
       Keywords:  lie algebras,      |    Merged in:
  days64                             |    Reviewers:
        Authors:  Travis Scrimshaw   |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  021ed1e344f8a30bc08407ac9069cb950429ff6d
  public/lie_algebras/fd_structure_coeff-16820|     Stopgaps:
   Dependencies:  #16819             |
-------------------------------------+-------------------------------------

Comment (by tscrim):

 Replying to [comment:25 darij]:
 > Replying to [comment:23 tscrim]:
 > > It at least covers all 3-dim Lie algebras over char 0 fields (up to
 isomorphism); I will check when I get home what generality they meant (and
 put a reference if you think it's necessary).
 >
 > Ah, please add the reference. That's quite an interesting result.

 IIRC, it's mostly just doing some linear algebra, going rank by rank, and
 using the constraint by the Jacobi identity. However I will add it.

 > > Also for this change:
 > > {{{#!diff
 > > +        if hasattr(self, "module") and x in self.module():
 > > +            return self.from_vector(x)
 > > }}}
 > > I think you should do
 > > {{{#!python
 > > try:
 > >     if x in self.module():
 > >         return self.from_vector(x)
 > > except AttributeError:
 > >     pass
 > > }}}
 >
 > Does this do something different or is it just more pythonic?
 > I am worried about this try-except game as I can't tell whether the
 AttributeError comes from self.module() or from the self.from_vector(x).

 It is more pythonic (and faster, but not noticably). You are the one who
 wanted the rule of 3s contract, and because of the category almost every
 Lie algebra which has a module attribute also has a `from_vector`. Also
 I'd say the failure is more graceful this way as if either one is not
 implemented, then it results in an unable to do the coercion/conversion
 type error.

 > > For the `FromAssociative.lift`...well there's some ambiguity there as
 to whether we want to lift to the UEA or just some enveloping algebra. I
 opted to lift just to the defining algebra (which I forgot to change in
 the docs) as this seemed the most natural. We will also have to deal with
 subalgebras and a `lift` there.
 >
 > I am in favor of renaming it then. The abstract `lift` lazy_attribute in
 `sage/categories/lie_algebras.py` explicitly speaks of the UEA in its doc.
 A `lift` that can go anywhere depending on the concrete algebra will be
 rather useless.

 Renaming which one? Also it's far from useless to lift to some enveloping
 algebra as you would want to convert between say, SGA and the Lie algebra.

 > > For the tested methods, it was originally returning an element from a
 matrix Lie algebra, but through refactoring this had changed. This can be
 remedied by changing the 3 to 1, i.e.: `L =
 lie_algebras.three_dimensional_by_rank(QQ, 1)`.
 >
 > Nope, they are still not wrappers.

 Whoops, yes. Do `sl(QQ, 2, representation='matrix')` or one of the upper
 triangular matrix Lie algebras.

 > > I'm also not happy with the corner cases being allowed as all
 properties become vacuous.
 >
 > The corner cases need to be allowed, and I've already caught at least 2
 bugs by inserting tests for them.

 No, they don't have to be allowed. In fact, because they are the empty
 set, they aren't really well-defined to me.

--
Ticket URL: <http://trac.sagemath.org/ticket/16820#comment:27>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" 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-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to