### Navigation

- index
- modules |
- next |
- previous |
- Combinatorics »
- Root Systems »
- Root System Types »

# Root system data for relabelled Cartan types

class `sage.combinat.root_system.type_relabel.``AmbientSpace`(root_system, base_ring)

  Bases: `sage.combinat.root_system.ambient_space.AmbientSpace`

  Ambient space for a relabelled finite Cartan type.

  It is constructed in the canonical way from the ambient space of the original Cartan type, by relabelling the simple roots, fundamental weights, etc.

  EXAMPLES:

      sage: cycle = {1:2, 2:3, 3:4, 4:1}
      sage: L = CartanType(["F",4]).relabel(cycle).root_system().ambient_space(); L
      Ambient space of the Root system of type ['F', 4] relabelled by {1: 2, 2: 3, 3: 4, 4: 1}
      sage: TestSuite(L).run()

  `dimension`()

    Return the dimension of this ambient space.

    See also

    `sage.combinat.root_system.ambient_space.AmbientSpace.dimension()`

    EXAMPLES:

        sage: cycle = {1:2, 2:3, 3:4, 4:1}
        sage: L = CartanType(["F",4]).relabel(cycle).root_system().ambient_space()
        sage: L.dimension()
        4

  `fundamental_weight`(i)

    Return the `i`-th fundamental weight.

    It is constructed by looking up the corresponding simple coroot in the ambient space for the original Cartan type.

    EXAMPLES:

        sage: cycle = {1:2, 2:3, 3:4, 4:1}
        sage: L = CartanType(["F",4]).relabel(cycle).root_system().ambient_space()
        sage: K = CartanType(["F",4]).root_system().ambient_space()
        sage: K.fundamental_weights()
        Finite family {1: (1, 1, 0, 0), 2: (2, 1, 1, 0), 3: (3/2, 1/2, 1/2, 1/2), 4: (1, 0, 0, 0)}
        sage: L.fundamental_weight(1)
        (1, 0, 0, 0)
        sage: L.fundamental_weights()
        Finite family {1: (1, 0, 0, 0), 2: (1, 1, 0, 0), 3: (2, 1, 1, 0), 4: (3/2, 1/2, 1/2, 1/2)}

  `simple_root`(i)

    Return the `i`-th simple root.

    It is constructed by looking up the corresponding simple coroot in the ambient space for the original Cartan type.

    EXAMPLES:

        sage: cycle = {1:2, 2:3, 3:4, 4:1}
        sage: L = CartanType(["F",4]).relabel(cycle).root_system().ambient_space()
        sage: K = CartanType(["F",4]).root_system().ambient_space()
        sage: K.simple_roots()
        Finite family {1: (0, 1, -1, 0), 2: (0, 0, 1, -1), 3: (0, 0, 0, 1), 4: (1/2, -1/2, -1/2, -1/2)}
        sage: K.simple_coroots()
        Finite family {1: (0, 1, -1, 0), 2: (0, 0, 1, -1), 3: (0, 0, 0, 2), 4: (1, -1, -1, -1)}
        sage: L.simple_root(1)
        (1/2, -1/2, -1/2, -1/2)

        sage: L.simple_roots()
        Finite family {1: (1/2, -1/2, -1/2, -1/2), 2: (0, 1, -1, 0), 3: (0, 0, 1, -1), 4: (0, 0, 0, 1)}

        sage: L.simple_coroots()
        Finite family {1: (1, -1, -1, -1), 2: (0, 1, -1, 0), 3: (0, 0, 1, -1), 4: (0, 0, 0, 2)}

class `sage.combinat.root_system.type_relabel.``CartanType`(type, relabelling)

  Bases: `sage.structure.unique_representation.UniqueRepresentation`, `sage.structure.sage_object.SageObject`, `sage.combinat.root_system.cartan_type.CartanType_abstract`

  A class for relabelled Cartan types.

  `ascii_art`(label=<function <lambda> at 0xe5f73e9c>)

    Returns an ascii art representation of this Cartan type

    EXAMPLES:

        sage: print CartanType(["G", 2]).relabel({1:2,2:1}).ascii_art()
          3
        O=<=O
        2   1
        sage: print CartanType(["B", 3, 1]).relabel([1,3,2,0]).ascii_art()
            O 1
            |
            |
        O---O=>=O
        3   2   0
        sage: print CartanType(["F", 4, 1]).relabel(lambda n: 4-n).ascii_art()
        O---O---O=>=O---O
        4   3   2   1   0

  `dual`()

    Implements `sage.combinat.root_system.cartan_type.CartanType_abstract.dual()`, using that taking the dual and relabelling are commuting operations.

    EXAMPLES:

        sage: T = CartanType(["BC",3, 2])
        sage: cycle = {1:2, 2:3, 3:0, 0:1}
        sage: T.relabel(cycle).dual().dynkin_diagram()
        O=>=O---O=>=O
        1   2   3   0
        BC3~* relabelled by {0: 1, 1: 2, 2: 3, 3: 0}
        sage: T.dual().relabel(cycle).dynkin_diagram()
        O=>=O---O=>=O
        1   2   3   0
        BC3~* relabelled by {0: 1, 1: 2, 2: 3, 3: 0}

  `dynkin_diagram`()

    Returns the Dynkin diagram for this Cartan type.

    EXAMPLES:

        sage: CartanType(["G", 2]).relabel({1:2,2:1}).dynkin_diagram()
          3
        O=<=O
        2   1
        G2 relabelled by {1: 2, 2: 1}

    TESTS:

    To be compared with the examples in `ascii_art()`:

        sage: sorted(CartanType(["G", 2]).relabel({1:2,2:1}).dynkin_diagram().edges())
        [(1, 2, 3), (2, 1, 1)]
        sage: sorted(CartanType(["B", 3, 1]).relabel([1,3,2,0]).dynkin_diagram().edges())
        [(0, 2, 1), (1, 2, 1), (2, 0, 2), (2, 1, 1), (2, 3, 1), (3, 2, 1)]
        sage: sorted(CartanType(["F", 4, 1]).relabel(lambda n: 4-n).dynkin_diagram().edges())
        [(0, 1, 1), (1, 0, 1), (1, 2, 1), (2, 1, 2), (2, 3, 1), (3, 2, 1), (3, 4, 1), (4, 3, 1)]

  `index_set`()

    EXAMPLES:

        sage: ct = CartanType(['G', 2]).relabel({1:2,2:1})
        sage: ct.index_set()
        (1, 2)

  `is_affine`()

    EXAMPLES:

        sage: ct = CartanType(['G', 2]).relabel({1:2,2:1})
        sage: ct.is_affine()
        False

  `is_crystallographic`()

    EXAMPLES:

        sage: ct = CartanType(['G', 2]).relabel({1:2,2:1})
        sage: ct.is_crystallographic()
        True

  `is_finite`()

    EXAMPLES:

        sage: ct = CartanType(['G', 2]).relabel({1:2,2:1})
        sage: ct.is_finite()
        True

  `is_irreducible`()

    EXAMPLES:

        sage: ct = CartanType(['G', 2]).relabel({1:2,2:1})
        sage: ct.is_irreducible()
        True

  `rank`()

    EXAMPLES:

        sage: ct = CartanType(['G', 2]).relabel({1:2,2:1})
        sage: ct.rank()
        2

  `type`()

    Return the type of `self` or `None` if unknown.

    EXAMPLES:

        sage: ct = CartanType(['G', 2]).relabel({1:2,2:1})
        sage: ct.type()
        'G'

class `sage.combinat.root_system.type_relabel.``CartanType_affine`(type, relabelling)

  Bases: `sage.combinat.root_system.type_relabel.CartanType`, `sage.combinat.root_system.cartan_type.CartanType_affine`

  TESTS:

      sage: ct = CartanType(['D',4,3]); ct
      ['G', 2, 1]^* relabelled by {0: 0, 1: 2, 2: 1}

      sage: L = ct.root_system().ambient_space(); L
      Ambient space of the Root system of type ['G', 2, 1]^* relabelled by {0: 0, 1: 2, 2: 1}
      sage: L.classical()
      Ambient space of the Root system of type ['G', 2]
      sage: TestSuite(L).run()

  `basic_untwisted`()

    Return the basic untwisted Cartan type associated with this affine Cartan type.

    Given an affine type \(X_n^{(r)}\), the basic untwisted type is \(X_n\). In other words, it is the classical Cartan type that is twisted to obtain `self`.

    EXAMPLES:

        sage: ct = CartanType(['A', 5, 2]).relabel({0:1, 1:0, 2:2, 3:3})
        sage: ct.basic_untwisted()
        ['A', 5]

  `classical`()

    Return the classical Cartan type associated with `self`.

    EXAMPLES:

        sage: A41 = CartanType(['A',4,1])
        sage: A41.dynkin_diagram()
        0
        O-----------+
        |           |
        |           |
        O---O---O---O
        1   2   3   4
        A4~

        sage: T = A41.relabel({0:1, 1:2, 2:3, 3:4, 4:0})
        sage: T
        ['A', 4, 1] relabelled by {0: 1, 1: 2, 2: 3, 3: 4, 4: 0}
        sage: T.dynkin_diagram()
        1
        O-----------+
        |           |
        |           |
        O---O---O---O
        2   3   4   0
        A4~ relabelled by {0: 1, 1: 2, 2: 3, 3: 4, 4: 0}

        sage: T0 = T.classical()
        sage: T0
        ['A', 4] relabelled by {1: 2, 2: 3, 3: 4, 4: 0}
        sage: T0.dynkin_diagram()
        O---O---O---O
        2   3   4   0
        A4 relabelled by {1: 2, 2: 3, 3: 4, 4: 0}

  `is_untwisted_affine`()

    Implements :meth:’CartanType_affine.is_untwisted_affine`

    A relabelled Cartan type is untwisted affine if the original is.

    EXAMPLES:

        sage: CartanType(['B', 3, 1]).relabel({1:2, 2:3, 3:0, 0:1}).is_untwisted_affine()
        True

  `special_node`()

    Returns a special node of the Dynkin diagram

    See also

    `special_node()`

    It is obtained by relabelling of the special node of the non relabelled Dynkin diagram.

    EXAMPLES:

        sage: CartanType(['B', 3, 1]).special_node()
        0
        sage: CartanType(['B', 3, 1]).relabel({1:2, 2:3, 3:0, 0:1}).special_node()
        1

class `sage.combinat.root_system.type_relabel.``CartanType_finite`(type, relabelling)

  Bases: `sage.combinat.root_system.type_relabel.CartanType`, `sage.combinat.root_system.cartan_type.CartanType_finite`

  INPUT:

  - `type` – a Cartan type
  - `relabelling` – a function (or a list, or a dictionary)

  Returns an isomorphic Cartan type obtained by relabelling the nodes of the Dynkin diagram. Namely the node with label `i` is relabelled `f(i)` (or, by `f[i]` if `f` is a list or dictionary).

  EXAMPLES:

  We take the Cartan type \(B_4\):

      sage: T = CartanType(['B',4])
      sage: T.dynkin_diagram()
      O---O---O=>=O
      1   2   3   4
      B4

  And relabel its nodes:

      sage: cycle = {1:2, 2:3, 3:4, 4:1}

      sage: T = T.relabel(cycle)
      sage: T.dynkin_diagram()
      O---O---O=>=O
      2   3   4   1
      B4 relabelled by {1: 2, 2: 3, 3: 4, 4: 1}
      sage: sorted(T.dynkin_diagram().edges())
      [(1, 4, 1), (2, 3, 1), (3, 2, 1), (3, 4, 1), (4, 1, 2), (4, 3, 1)]

  Multiple relabelling are recomposed into a single one:

      sage: T = T.relabel(cycle)
      sage: T.dynkin_diagram()
      O---O---O=>=O
      3   4   1   2
      B4 relabelled by {1: 3, 2: 4, 3: 1, 4: 2}

      sage: T = T.relabel(cycle)
      sage: T.dynkin_diagram()
      O---O---O=>=O
      4   1   2   3
      B4 relabelled by {1: 4, 2: 1, 3: 2, 4: 3}

  And trivial relabelling are honoured nicely:

      sage: T = T.relabel(cycle)
      sage: T.dynkin_diagram()
      O---O---O=>=O
      1   2   3   4
      B4

  Test that the produced Cartan type is in the appropriate abstract classes (see trac ticket #13724):

      sage: ct = CartanType(['B',4]).relabel(cycle)
      sage: TestSuite(ct).run()
      sage: from sage.combinat.root_system import cartan_type
      sage: isinstance(ct, cartan_type.CartanType_finite)
      True
      sage: isinstance(ct, cartan_type.CartanType_simple)
      True
      sage: isinstance(ct, cartan_type.CartanType_affine)
      False
      sage: isinstance(ct, cartan_type.CartanType_crystallographic)
      True
      sage: isinstance(ct, cartan_type.CartanType_simply_laced)
      False

      sage: ct = CartanType(['A',3,1]).relabel({0:3,1:2, 2:1,3:0})
      sage: TestSuite(ct).run()
      sage: isinstance(ct, cartan_type.CartanType_simple)
      True
      sage: isinstance(ct, cartan_type.CartanType_finite)
      False
      sage: isinstance(ct, cartan_type.CartanType_affine)
      True
      sage: isinstance(ct, cartan_type.CartanType_crystallographic)
      True
      sage: isinstance(ct, cartan_type.CartanType_simply_laced)
      True

  Check for the original issues of trac ticket #13724:

      sage: A3 = CartanType("A3")
      sage: A3.cartan_matrix()
      [ 2 -1  0]
      [-1  2 -1]
      [ 0 -1  2]
      sage: A3r = A3.relabel({1:2,2:3,3:1})
      sage: A3r.cartan_matrix()
      [ 2  0 -1]
      [ 0  2 -1]
      [-1 -1  2]

      sage: ct = CartanType(["D",4,3]).classical(); ct
      ['G', 2]
      sage: ct.symmetrizer()
      Finite family {1: 1, 2: 3}

  `AmbientSpace`

    alias of `AmbientSpace`

  `affine`()

    Return the affine Cartan type associated with `self`.

    EXAMPLES:

        sage: B4 = CartanType(['B',4])
        sage: B4.dynkin_diagram()
        O---O---O=>=O
        1   2   3   4
        B4
        sage: B4.affine().dynkin_diagram()
            O 0
            |
            |
        O---O---O=>=O
        1   2   3   4
        B4~

    If possible, this reuses the original label for the special node:

        sage: T = B4.relabel({1:2, 2:3, 3:4, 4:1}); T.dynkin_diagram()
        O---O---O=>=O
        2   3   4   1
        B4 relabelled by {1: 2, 2: 3, 3: 4, 4: 1}
        sage: T.affine().dynkin_diagram()
            O 0
            |
            |
        O---O---O=>=O
        2   3   4   1
        B4~ relabelled by {0: 0, 1: 2, 2: 3, 3: 4, 4: 1}

    Otherwise, it chooses a label for the special_node in \(0,1,...\):

        sage: T = B4.relabel({1:0, 2:1, 3:2, 4:3}); T.dynkin_diagram()
        O---O---O=>=O
        0   1   2   3
        B4 relabelled by {1: 0, 2: 1, 3: 2, 4: 3}
        sage: T.affine().dynkin_diagram()
            O 4
            |
            |
        O---O---O=>=O
        0   1   2   3
        B4~ relabelled by {0: 4, 1: 0, 2: 1, 3: 2, 4: 3}

    This failed before trac ticket #13724:

        sage: ct = CartanType(["G",2]).dual(); ct
        ['G', 2] relabelled by {1: 2, 2: 1}
        sage: ct.affine()
        ['G', 2, 1] relabelled by {0: 0, 1: 2, 2: 1}

        sage: ct = CartanType(["F",4]).dual(); ct
        ['F', 4] relabelled by {1: 4, 2: 3, 3: 2, 4: 1}
        sage: ct.affine()
        ['F', 4, 1] relabelled by {0: 0, 1: 4, 2: 3, 3: 2, 4: 1}

    TESTS:

    Check that we don’t inadvertently change the internal relabelling of `ct`:

        sage: ct
        ['F', 4] relabelled by {1: 4, 2: 3, 3: 2, 4: 1}

### Navigation

- index
- modules |
- next |
- previous |
- Combinatorics »
- Root Systems »
- Root System Types »