示例#1
0
def test_orthogonal_hecke_insertion():
    w = (4, 5, 1, 1, 3, 2)
    i = (1, 1, 3, 4, 4, 6)

    insertion, recording = InsertionAlgorithm.orthogonal_hecke(w)

    p = Tableau({(1, 1): 1, (1, 2): 2, (1, 3): 4, (1, 4): 5, (2, 2): 3})
    q = Tableau({
        (1, 1): 1,
        (1, 2): 2,
        (1, 3): (-3, -4),
        (1, 4): -6,
        (2, 2): 5
    })
    assert insertion == p
    assert recording == q
    assert InsertionAlgorithm.inverse_orthogonal_hecke(p, q) == (w, (1, 2, 3,
                                                                     4, 5, 6))

    insertion, recording = InsertionAlgorithm.orthogonal_hecke(w, i)

    q = Tableau({
        (1, 1): 1,
        (1, 2): 1,
        (1, 3): (-3, -4),
        (1, 4): -6,
        (2, 2): 4
    })
    assert insertion == p
    assert recording == q
    assert InsertionAlgorithm.inverse_orthogonal_hecke(p, q) == (w, i)
示例#2
0
 def forward(self):
     if not self.is_symplectic:
         return lambda x, y: InsertionAlgorithm.orthogonal_hecke(
             x, y, self.multisetvalued)
     else:
         return lambda x, y: InsertionAlgorithm.symplectic_hecke(
             x, y, self.multisetvalued)
示例#3
0
def test_shifted_growth_words(n=4):
    c = True
    reasons = set()
    for a in Permutation.involutions(n):
        for w in a.get_involution_words():
            print(w)
            p, q = InsertionAlgorithm.orthogonal_hecke(w)
            g, e, c, r = Partition.shifted_growth_diagram(w)
            reasons |= set([x for row in r for x in row])
            # Partition.print_growth_diagram(g)
            # Partition.print_growth_diagram(e)
            # Partition.print_growth_diagram(c)
            # print(p)
            # print(q)
            pp, qq = Tableau.from_shifted_growth_diagram(g, e, c)
            # print(pp)
            # print(qq)
            assert p == pp and q == qq
    print(sorted(reasons))
示例#4
0
def test_shifted_growth_diagram():
    w = (4, 2, 1, 1, 2, 3, 2)
    g, e, c, r = Partition.shifted_growth_diagram(w)
    Partition.print_growth_diagram(g)
    Partition.print_growth_diagram(e)
    Partition.print_growth_diagram(c)

    gtest = [[[], [], [], [], [], [], [], []],
             [[], [], [], [1], [1], [1], [1], [1]],
             [[], [], [1], [2], [2], [2], [2], [2]],
             [[], [], [1], [2], [2], [2], [3], [3, 1]],
             [[], [1], [2], [3], [3], [3, 1], [3, 1], [3, 2]]]
    gtest = [[tuple(x) for x in row] for row in gtest]
    assert g == gtest

    etest = [[False, False, False, False, False, False, False, False],
             [False, False, False, False, False, False, False, False],
             [False, False, False, True, True, False, False, False],
             [False, False, False, True, True, False, False, False],
             [False, False, True, True, True, False, False, True]]
    assert e == etest

    ctest = [[None, None, None, None, None, None, None, None],
             [None, None, None, None, 1, None, None, None],
             [None, None, None, None, 2, 1, None, 1],
             [None, None, None, None, 2, 1, None, None],
             [None, None, None, None, 3, None, 2, None]]
    assert c == ctest

    p, q = Tableau.from_shifted_growth_diagram(g, e, c)
    pp, qq = InsertionAlgorithm.orthogonal_hecke(w)
    print(p)
    print(q)
    assert p == pp and q == qq

    w = (4, 5, 1, 2, 3, 4, 6, 5, 6, 4)
    g, e, c, r = Partition.shifted_growth_diagram(w)
    Partition.print_growth_diagram(g)
    Partition.print_growth_diagram(e)
    Partition.print_growth_diagram(c)
    Partition.print_growth_diagram(r)

    p, q = Tableau.from_shifted_growth_diagram(g, e, c)
    pp, qq = InsertionAlgorithm.orthogonal_hecke(w)
    print(p)
    print(q)
    assert p == pp and q == qq

    w = (1, 3, 2, 5, 6, 4, 3, 5, 2, 4, 5, 6)
    g, e, c, r = Partition.shifted_growth_diagram(w)
    Partition.print_growth_diagram(g)
    Partition.print_growth_diagram(e)
    Partition.print_growth_diagram(c)
    Partition.print_growth_diagram(r)

    p, q = Tableau.from_shifted_growth_diagram(g, e, c)
    pp, qq = InsertionAlgorithm.orthogonal_hecke(w)
    print(p)
    print(q)
    assert p == pp and q == qq

    w = (3, 2, 1)
    g, e, c, r = Partition.shifted_growth_diagram(w)
    Partition.print_growth_diagram(g)
    Partition.print_growth_diagram(e)
    Partition.print_growth_diagram(c)
    Partition.print_growth_diagram(r)

    p, q = Tableau.from_shifted_growth_diagram(g, e, c)
    pp, qq = InsertionAlgorithm.orthogonal_hecke(w)
    print(p)
    print(q)
    assert p == pp and q == qq