dynkin_diagram.py 535 B

123456789101112131415161718192021222324
  1. from .cartan_type import CartanType
  2. def DynkinDiagram(t):
  3. """Display the Dynkin diagram of a given Lie algebra
  4. Works by generating the CartanType for the input, t, and then returning the
  5. Dynkin diagram method from the individual classes.
  6. Examples
  7. ========
  8. >>> from sympy.liealgebras.dynkin_diagram import DynkinDiagram
  9. >>> print(DynkinDiagram("A3"))
  10. 0---0---0
  11. 1 2 3
  12. >>> print(DynkinDiagram("B4"))
  13. 0---0---0=>=0
  14. 1 2 3 4
  15. """
  16. return CartanType(t).dynkin_diagram()