def test_molecular_correspondence(n=8):
    for mu in Partition.generate(n, even_parts=True):
        mu = Partition.transpose(mu)
        mapping = construct_molecular_correspondence(mu)
        for v in mapping:
            w = mapping[v]
            assert irsk(v).transpose() == dual_irsk(w)
def test_star(n=8):
    for nu in Partition.generate(n, even_parts=True):
        mu = Partition.transpose(nu)
        lu = Partition.transpose(tuple(2 * mu[i]
                                       for i in range(0, len(mu), 2)))
        assert mu == Partition.transpose(
            tuple(2 * lu[i] for i in range(0, len(lu), 2)))
def get_molecules_n(n, verbose=False):
    ans = {}
    for mu in Partition.generate(n, even_parts=True):
        mu = Partition.transpose(mu)
        molecule = molecule_n(mu)
        ans[mu] = molecule
    return ans
def print_mn_operators(n=8):
    def wstr(w):
        return ' $\\barr{c}' + str(
            w) + ' \\\\ ' + w.oneline_repr() + ' \\earr$ '

    ans = []
    for n in range(2, n + 1, 2):
        for mu in Partition.generate(n):
            s = []
            i = 0
            for t in Tableau.standard(mu):
                u = dual_irsk(irsk_inverse(t), n).transpose()
                s += ['\n&\n'.join([t.tex(), u.tex()])]
                i += 1
                if i * t.max_row() >= 24:
                    s += [
                        '\n\\end{tabular} \\newpage \\begin{tabular}{ccccc}  Tableau &  Tableau \\\\ \\hline '
                    ]
                    i = 0
            s = '\n \\\\ \\\\ \n'.join(s)
            ans += [
                '\\begin{tabular}{ccccc} Tableau &  Tableau \\\\ \\hline \\\\ \\\\ \n'
                + s + '\n\\end{tabular}'
            ]

    ans = '\n\n\\newpage\n\n'.join(ans + [''])
    with open(
            '/Users/emarberg/Dropbox/projects/affine-transitions/notes/eric_notes/examples.tex',
            'w') as f:
        f.write(ans)
        f.close()
def print_tableau_operation(n=6):
    mapping = {}
    for mu in Partition.generate(n):
        for tab in Tableau.standard(mu):
            w = irsk_inverse(tab)
            ntab = dual_irsk(w, sum(mu)).transpose()
            mapping[tab] = ntab
            print(tab)
            print('w =', w)
            print(ntab)
            #lines = str(tab).split('\n')
            #nlines = str(ntab).split('\n')
            #assert len(lines) == len(nlines)
            #print('\n'.join([lines[i] + ' -> ' + nlines[i] for i in range(len(lines))]))
            print()
            print()
            print()
            print()
    orders = {}
    for tab in mapping:
        o = 1
        x = mapping[tab]
        while x != tab:
            o += 1
            x = mapping[x]
        orders[tab] = o
    return orders, mapping
def test_anti_representatives(n=8):
    for nu in Partition.generate(n, even_parts=True):
        mu = Partition.transpose(nu)
        lu = Partition.transpose(tuple(2 * mu[i]
                                       for i in range(0, len(mu), 2)))
        print(mu)
        print(lu)
        print()

        assert representative_m(lu) == anti_representative_n(mu)
Ejemplo n.º 7
0
def test_from_string(m=4):
    for n in range(m):
        for mu in Partition.generate(n, strict=True):
            for t in Tableau.semistandard_shifted_marked(n, mu):
                u = Tableau(str(t))
                if u != t:
                    print(t)
                    print(u)
                    print(t.boxes, u.boxes)
                    print()
                assert Tableau(str(t)) == t
def print_molecular_correspondence(n=8):
    def wstr(w):
        return ' $\\barr{c}' + str(
            w) + ' \\\\ ' + w.oneline_repr() + ' \\earr$ '

    ans = []
    for n in range(2, n + 1, 2):
        for mu in Partition.generate(n, even_parts=True):
            s = []
            mu = Partition.transpose(mu)
            mapping = construct_molecular_correspondence(mu)
            i = 0
            for v in mapping:
                w = mapping[v]
                # w = w * Permutation.longest_element(n)
                t, _ = rsk(v)
                p, q = rsk(w, n)
                s += [
                    '\n&\n'.join(
                        [wstr(v),
                         t.tex(),
                         wstr(w),
                         dual_irsk(w).tex()])
                ]
                i += 1
                if i * t.max_row() >= 24:
                    s += [
                        '\n\\end{tabular} \\newpage \\begin{tabular}{ccccc}\nM & Tableau &  N & & \\\\ \\hline '
                    ]
                    i = 0
            s = '\n \\\\ \\\\ \n'.join(s)
            ans += [
                '\\begin{tabular}{ccccc}\nM & Tableau &   N & & \\\\ \\hline \\\\ \\\\ \n'
                + s + '\n\\end{tabular}'
            ]

    ans = '\n\n\\newpage\n\n'.join(ans + [''])
    with open(
            '/Users/emarberg/Dropbox/projects/affine-transitions/notes/eric_notes/examples.tex',
            'w') as f:
        f.write(ans)
        f.close()
def test_tilde_representatives(n=8):
    for nu in Partition.generate(n):
        w = tilde_representative_n(nu)
        v = anti_representative_m(Partition.transpose(nu))
        assert w == v