Ejemplo n.º 1
0
    def test_C2N6(self):
        liealg = cbd.TypeCLieAlgebra(2)
        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 1), (2, 0), (0, 0),
                                                 (2, 0), (1, 0), (0, 1)], 2)
        f_curve = [(6, ), (2, 4), (3, ), (1, 5)]
        self.assertEqual(0, cbb.intersect_F_curve(f_curve))

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 1), (2, 0), (0, 2),
                                                 (0, 1), (1, 0), (0, 2)], 2)
        f_curve = [(3, ), (4, ), (1, 2, 6), (5, )]
        self.assertEqual(0, cbb.intersect_F_curve(f_curve))

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 1), (0, 0), (0, 2),
                                                 (0, 2), (0, 2), (0, 1)], 2)
        f_curve = [(1, 4), (6, ), (3, 5), (2, )]
        self.assertEqual(0, cbb.intersect_F_curve(f_curve))

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 1), (2, 0), (0, 1),
                                                 (0, 0), (1, 0), (0, 0)], 2)
        f_curve = [(2, 3), (6, ), (1, 5), (4, )]
        self.assertEqual(0, cbb.intersect_F_curve(f_curve))

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 0), (2, 0), (1, 0),
                                                 (0, 1), (1, 0), (1, 0)], 2)
        f_curve = [(2, ), (4, 6), (1, ), (3, 5)]
        self.assertEqual(3, cbb.intersect_F_curve(f_curve))

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 0), (0, 0), (0, 1),
                                                 (0, 1), (1, 1), (0, 0)], 2)
        f_curve = [(1, ), (4, 5, 6), (3, ), (2, )]
        self.assertEqual(0, cbb.intersect_F_curve(f_curve))

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 0), (1, 1), (0, 1),
                                                 (1, 0), (0, 2), (0, 1)], 2)
        f_curve = [(3, 5, 6), (2, ), (1, ), (4, )]
        self.assertEqual(0, cbb.intersect_F_curve(f_curve))

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 0), (0, 2), (1, 0),
                                                 (0, 0), (1, 1), (0, 2)], 2)
        f_curve = [(1, ), (5, ), (3, 4), (2, 6)]
        self.assertEqual(0, cbb.intersect_F_curve(f_curve))

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 2), (1, 0), (0, 0),
                                                 (1, 1), (0, 2), (2, 0)], 2)
        f_curve = [(5, ), (2, ), (1, ), (3, 4, 6)]
        self.assertEqual(1, cbb.intersect_F_curve(f_curve))

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 0), (1, 1), (0, 1),
                                                 (1, 1), (1, 1), (0, 0)], 2)
        f_curve = [(1, ), (2, ), (3, ), (4, 5, 6)]
        self.assertEqual(0, cbb.intersect_F_curve(f_curve))
Ejemplo n.º 2
0
 def test_conformal_blocks_ranks(self):
     liealg = cbd.TypeALieAlgebra(3)
     wt1 = tuple([0, 1, 4])
     wt2 = tuple([1, 0, 2])
     cbb = cbd.ConformalBlocksBundle(liealg, [wt1,wt1,wt2,wt2,wt2,wt2], 5)
     self.assertEqual(99, cbb.get_rank(), "Rank incorrect")
     
     liealg = cbd.TypeALieAlgebra(1)
     wt1 = tuple([1])
     cbb = cbd.ConformalBlocksBundle(liealg, [wt1,wt1,wt1,wt1,wt1,wt1,wt1,wt1,wt1,wt1], 1)
     self.assertEqual(1, cbb.get_rank(), "Rank incorrect")
     
     liealg = cbd.TypeALieAlgebra(2)
     wt1 = tuple([0, 1])
     cbb = cbd.ConformalBlocksBundle(liealg, [wt1,wt1,wt1,wt1,wt1,wt1,wt1,wt1,wt1], 2)
Ejemplo n.º 3
0
    def test_conformal_blocks_divisors(self):
        liealg = cbd.TypeALieAlgebra(1)
        cbb = cbd.ConformalBlocksBundle(liealg, [[1], [1], [1], [1]], 1)
        self.assertEqual(1, cbb.get_rank(), "Rank incorrect")
        self.assertEqual(1, cbb.get_norm_sym_divisor_ray()[0], "Divisor incorrect")

        cbb = cbd.ConformalBlocksBundle(liealg, [[1], [1], [1], [1], [1], [1]], 1)
        self.assertEqual(1, cbb.get_rank(), "Rank incorrect")
        ray = cbb.get_norm_sym_divisor_ray()
        self.assertEqual(2, ray[0], "Divisor incorrect")
        self.assertEqual(1, ray[1], "Divisor incorrect")

        cbb = cbd.ConformalBlocksBundle(liealg, [[1], [1], [1], [1], [1], [1], [1], [1]], 1)
        self.assertEqual(1, cbb.get_rank(), "Rank incorrect")
        ray = cbb.get_norm_sym_divisor_ray()
        self.assertEqual(3, ray[0], "Divisor incorrect")
        self.assertEqual(2, ray[1], "Divisor incorrect")
        self.assertEqual(4, ray[2], "Divisor incorrect")

        liealg = cbd.TypeALieAlgebra(5)
        cbb = cbd.ConformalBlocksBundle(liealg, [[0,1,0,0,0],[0,1,0,0,0],[0,1,0,0,0],[0,1,0,0,0],[0,1,0,0,0],[0,1,0,0,0]], 1)
        self.assertEqual(1, cbb.get_rank(), "Rank incorrect")
        ray = cbb.get_norm_sym_divisor_ray()
        self.assertEqual(1, ray[0], "Divisor incorrect")
        self.assertEqual(3, ray[1], "Divisor incorrect")

        liealg = cbd.TypeALieAlgebra(6)
        cbb = cbd.ConformalBlocksBundle(liealg, [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 1], [0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0],
                                                 [0, 1, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0]], 1)
        self.assertEqual(1, cbb.get_rank(), "Rank incorrect")
        ray = cbb.get_norm_sym_divisor_ray()
        self.assertEqual(4, ray[0], "Divisor incorrect")
        self.assertEqual(5, ray[1], "Divisor incorrect")

        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 1], [0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0],
                                         [0, 1, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0]], 2)
        self.assertEqual(7, cbb.get_rank(), "Rank incorrect")
        ray = cbb.get_norm_sym_divisor_ray()
        self.assertEqual(1, ray[0], "Divisor incorrect")
        self.assertEqual(3, ray[1], "Divisor incorrect")

        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 1], [0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0],
                                         [0, 1, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0]], 3)
        self.assertEqual(8, cbb.get_rank(), "Rank incorrect")
        ray = cbb.get_norm_sym_divisor_ray()
        self.assertEqual(0, ray[0], "Divisor incorrect")
        self.assertEqual(0, ray[1], "Divisor incorrect")

        liealg = cbd.TypeALieAlgebra(3)
        cbb = cbd.ConformalBlocksBundle(liealg, [[0, 1, 4], [0, 1, 4], [1, 0, 1], [1, 0, 1], [1, 0, 1], [1, 0, 1]], 5)
        self.assertEqual(10, cbb.get_rank(), "Rank incorrect")
        ray = cbb.get_norm_sym_divisor_ray()
        self.assertEqual(8, ray[0], "Divisor incorrect")
        self.assertEqual(9, ray[1], "Divisor incorrect")
Ejemplo n.º 4
0
    def test_F_curve(self):
        liealg = cbd.TypeALieAlgebra(4)
        wt = tuple([0, 1, 0, 0])
        wt2 = tuple([0, 0, 1, 0])
        wt3 = tuple([0, 0, 0, 1])
        cbb = cbd.ConformalBlocksBundle(liealg, [wt, wt2, wt2, wt2, wt3], 1)
        self.assertEqual(1, cbb.get_rank(), "Rank incorrect")
        self.assertEqual(0, cbb.intersect_F_curve([[1, 2], [3], [4], [5]]), "F-curve intersection incorrect")
        self.assertEqual(1, cbb.intersect_F_curve([[1], [2, 3], [4], [5]]), "F-curve intersection incorrect")
        self.assertEqual(2, cbb.intersect_F_curve([[1], [2], [3], [4, 5]]), "F-curve intersection incorrect")

        liealg = cbd.TypeALieAlgebra(6)
        wt = tuple([0, 0, 1, 0, 0, 0])
        wt2 = tuple([0, 0, 0, 1, 0, 0])
        wt3 = tuple([0, 0, 0, 0, 0, 1])
        cbb = cbd.ConformalBlocksBundle(liealg, [wt,wt2,wt2,wt2,wt3], 1)
        self.assertEqual(1, cbb.get_rank(), "Rank incorrect")
        self.assertEqual(1, cbb.intersect_F_curve([[1],[2,3],[4],[5]]), "F-curve intersection incorrect")
        self.assertEqual(0, cbb.intersect_F_curve([[1, 2], [3], [4], [5]]), "F-curve intersection incorrect")
        self.assertEqual(3, cbb.intersect_F_curve([[1], [2], [3], [4,5]]), "F-curve intersection incorrect")
def experiment():
    """
    Computes the rank and divisor of conformal block bundles with random weights.
    :return: Null
    """
    rank = 5
    level = 3
    num_points = 10
    tries = 100

    liealg = cbd.TypeALieAlgebra(rank, store_fusion=True, exact=False)
    A_l = liealg.get_weights(level)
    print("Weight", "Rank", "Divisor")
    for i in range(tries):
        weights = [random.choice(A_l) for i in range(num_points)]
        if sum([sum(liealg._convert_funds_to_epsilons(wt))
                for wt in weights]) % (rank + 1) != 0:
            continue
        cbb = cbd.ConformalBlocksBundle(liealg, weights, level)
        if cbb.get_rank() > 0:
            divisor = cbb.get_symmetrized_divisor()
            print(weights, cbb.get_rank(), divisor)
        else:
            print(weights, cbb.get_rank(), 0)
def experiment():
    """
    Generates Macaulay 2 test cases, runs them using Swinarski's program, then outputs new unit tests if successful
    :return: Null
    """
    rank = 2
    level = 2
    num_points = 6
    tries = 10

    liealg = cbd.TypeCLieAlgebra(rank)
    A_l = liealg.get_weights(level)
    m2file = open("TestFCurve.m2", "w")
    m2file.write("loadPackage(\"ConformalBlocks\");\n")
    m2file.write("sl_" + str(rank+1) + " = simpleLieAlgebra(\"C\", " + str(rank) + ");\n")
    test_cases = []
    for i in range(tries):
        weights = [random.choice(A_l) for i in range(num_points)]
        cbb = cbd.ConformalBlocksBundle(liealg, weights, level)
        f_curve = random.choice(cbb.get_F_curves())
        test_cases.append((weights, f_curve))

        wt_str = "{"
        for wt in weights:
            if len(wt) == 1:
                wt_str += "{" + str(wt)[1] + "}, "
            else:
                wt_str += "{" + str(wt)[1:-1] + "}, "
        wt_str = wt_str[:-2] + "}"

        f_str = "{"
        for part in f_curve:
            if len(part) == 1:
                f_str += "{" + str(part)[1] + "}, "
            else:
                f_str += "{" + str(part)[1:-1] + "}, "
        f_str = f_str[:-2] + "}"

        m2file.write("V = conformalBlockVectorBundle(sl_" + str(rank+1) + ", " + str(level)  + ", " + wt_str + ", 0);\n")
        m2file.write("if " + str(cbb.intersect_F_curve(f_curve)) +
                     " != FCurveDotConformalBlockDivisor(" + f_str + ", V) then error(\"Bundle " + "(sl_" + str(rank+1) +
                     ", " + str(level)  + ", " + wt_str + ") incorrect intersection with F-curve " + f_str + "\");\n")

    m2file.write("print(\"OK\");\n")
    m2file.close()

    test_out = subprocess.check_output(["M2", "--script", "TestFCurve.m2"])
    if test_out == "OK\n":
        print("liealg = cbd.TypeCLieAlgebra(" + str(rank) + ")")
        for case in test_cases:
            weights = case[0]
            f_curve = case[1]
            cbb = cbd.ConformalBlocksBundle(liealg, weights, level)
            print("cbb = cbd.ConformalBlocksBundle(liealg, " + str(weights) + ", " + str(level) + ")")
            print("f_curve = " + str(f_curve))
            print("self.assertEqual(" + str(cbb.intersect_F_curve(f_curve)) +
                  ", cbb.intersect_F_curve(f_curve))")
            print("")
        print("OK")
    else:
        print(test_out)
    def test_B3N5(self):
        #Level 1
        liealg = cbd.TypeBLieAlgebra(3)
        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 0, 0), (1, 0, 0), (0, 0, 1), (0, 0, 1), (1, 0, 0)], 1)
        self.assertEqual(1, cbb.get_rank(),
                         "Rank incorrect: ([(0, 0, 0), (1, 0, 0), (0, 0, 1), (0, 0, 1), (1, 0, 0)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 1)], 1)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(1, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 1)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 0, 1), (0, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0)], 1)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(0, 0, 1), (0, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 0, 0), (0, 0, 1), (0, 0, 0), (0, 0, 0), (0, 0, 1)], 1)
        self.assertEqual(1, cbb.get_rank(),
                         "Rank incorrect: ([(1, 0, 0), (0, 0, 1), (0, 0, 0), (0, 0, 0), (0, 0, 1)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 0, 0), (0, 0, 0), (1, 0, 0), (0, 0, 1), (1, 0, 0)], 1)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(0, 0, 0), (0, 0, 0), (1, 0, 0), (0, 0, 1), (1, 0, 0)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 0, 0), (0, 0, 1), (1, 0, 0), (0, 0, 0), (0, 0, 0)], 1)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(0, 0, 0), (0, 0, 1), (1, 0, 0), (0, 0, 0), (0, 0, 0)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 0, 0), (1, 0, 0), (0, 0, 0), (0, 0, 0), (1, 0, 0)], 1)
        self.assertEqual(1, cbb.get_rank(),
                         "Rank incorrect: ([(0, 0, 0), (1, 0, 0), (0, 0, 0), (0, 0, 0), (1, 0, 0)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 0, 0), (0, 0, 1), (1, 0, 0), (1, 0, 0), (0, 0, 0)], 1)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(1, 0, 0), (0, 0, 1), (1, 0, 0), (1, 0, 0), (0, 0, 0)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 0, 0), (1, 0, 0), (0, 0, 1), (0, 0, 0), (1, 0, 0)], 1)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(0, 0, 0), (1, 0, 0), (0, 0, 1), (0, 0, 0), (1, 0, 0)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 0, 1), (0, 0, 0), (0, 0, 0), (0, 0, 1), (0, 0, 0)], 1)
        self.assertEqual(1, cbb.get_rank(),
                         "Rank incorrect: ([(0, 0, 1), (0, 0, 0), (0, 0, 0), (0, 0, 1), (0, 0, 0)], 1)")

        #Level 2
        liealg = cbd.TypeBLieAlgebra(3)
        cbb = cbd.ConformalBlocksBundle(liealg, [(2, 0, 0), (0, 0, 0), (0, 0, 0), (2, 0, 0), (0, 0, 1)], 2)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(2, 0, 0), (0, 0, 0), (0, 0, 0), (2, 0, 0), (0, 0, 1)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 0, 0), (0, 0, 1), (2, 0, 0), (0, 0, 0), (1, 0, 1)], 2)
        self.assertEqual(1, cbb.get_rank(),
                         "Rank incorrect: ([(1, 0, 0), (0, 0, 1), (2, 0, 0), (0, 0, 0), (1, 0, 1)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 1, 0), (1, 0, 0), (1, 0, 1), (2, 0, 0), (1, 0, 1)], 2)
        self.assertEqual(2, cbb.get_rank(),
                         "Rank incorrect: ([(0, 1, 0), (1, 0, 0), (1, 0, 1), (2, 0, 0), (1, 0, 1)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 0, 1), (2, 0, 0), (0, 1, 0), (2, 0, 0), (0, 0, 1)], 2)
        self.assertEqual(1, cbb.get_rank(),
                         "Rank incorrect: ([(1, 0, 1), (2, 0, 0), (0, 1, 0), (2, 0, 0), (0, 0, 1)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 0, 0), (1, 0, 0), (0, 0, 1), (0, 0, 2), (2, 0, 0)], 2)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(0, 0, 0), (1, 0, 0), (0, 0, 1), (0, 0, 2), (2, 0, 0)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 0, 0), (1, 0, 1), (2, 0, 0), (1, 0, 0), (0, 0, 2)], 2)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(0, 0, 0), (1, 0, 1), (2, 0, 0), (1, 0, 0), (0, 0, 2)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(2, 0, 0), (1, 0, 0), (0, 0, 1), (0, 1, 0), (0, 0, 2)], 2)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(2, 0, 0), (1, 0, 0), (0, 0, 1), (0, 1, 0), (0, 0, 2)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 0, 2), (0, 0, 2), (0, 0, 1), (0, 0, 1), (1, 0, 0)], 2)
        self.assertEqual(4, cbb.get_rank(),
                         "Rank incorrect: ([(0, 0, 2), (0, 0, 2), (0, 0, 1), (0, 0, 1), (1, 0, 0)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 0, 2), (1, 0, 0), (1, 0, 1), (1, 0, 1), (0, 0, 1)], 2)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(0, 0, 2), (1, 0, 0), (1, 0, 1), (1, 0, 1), (0, 0, 1)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 0, 0), (0, 0, 2), (1, 0, 1), (1, 0, 0), (0, 0, 1)], 2)
        self.assertEqual(2, cbb.get_rank(),
                         "Rank incorrect: ([(0, 0, 0), (0, 0, 2), (1, 0, 1), (1, 0, 0), (0, 0, 1)], 2)")

        #Level 3
        liealg = cbd.TypeBLieAlgebra(3)
        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 0, 2), (3, 0, 0), (2, 0, 1), (2, 0, 0), (1, 0, 1)], 3)
        self.assertEqual(3, cbb.get_rank(),
                         "Rank incorrect: ([(0, 0, 2), (3, 0, 0), (2, 0, 1), (2, 0, 0), (1, 0, 1)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 0, 1), (2, 0, 0), (1, 0, 2), (3, 0, 0), (1, 0, 1)], 3)
        self.assertEqual(3, cbb.get_rank(),
                         "Rank incorrect: ([(0, 0, 1), (2, 0, 0), (1, 0, 2), (3, 0, 0), (1, 0, 1)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 1, 0), (2, 0, 0), (0, 0, 0), (1, 1, 0), (2, 0, 1)], 3)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(0, 1, 0), (2, 0, 0), (0, 0, 0), (1, 1, 0), (2, 0, 1)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 0, 0), (1, 0, 2), (0, 0, 0), (0, 0, 0), (0, 0, 1)], 3)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(0, 0, 0), (1, 0, 2), (0, 0, 0), (0, 0, 0), (0, 0, 1)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 1, 0), (1, 0, 0), (1, 0, 2), (2, 0, 1), (0, 1, 1)], 3)
        self.assertEqual(11, cbb.get_rank(),
                         "Rank incorrect: ([(1, 1, 0), (1, 0, 0), (1, 0, 2), (2, 0, 1), (0, 1, 1)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 0, 3), (0, 0, 3), (0, 0, 3), (1, 1, 0), (0, 0, 2)], 3)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(0, 0, 3), (0, 0, 3), (0, 0, 3), (1, 1, 0), (0, 0, 2)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 0, 2), (0, 1, 0), (0, 1, 0), (0, 0, 3), (0, 0, 3)], 3)
        self.assertEqual(7, cbb.get_rank(),
                         "Rank incorrect: ([(1, 0, 2), (0, 1, 0), (0, 1, 0), (0, 0, 3), (0, 0, 3)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(2, 0, 1), (1, 0, 0), (2, 0, 0), (0, 1, 1), (1, 0, 0)], 3)
        self.assertEqual(3, cbb.get_rank(),
                         "Rank incorrect: ([(2, 0, 1), (1, 0, 0), (2, 0, 0), (0, 1, 1), (1, 0, 0)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 0, 1), (1, 1, 0), (1, 0, 2), (1, 0, 2), (1, 1, 0)], 3)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(0, 0, 1), (1, 1, 0), (1, 0, 2), (1, 0, 2), (1, 1, 0)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(3, 0, 0), (0, 0, 0), (0, 1, 1), (0, 0, 3), (0, 1, 1)], 3)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(3, 0, 0), (0, 0, 0), (0, 1, 1), (0, 0, 3), (0, 1, 1)], 3)")
    def test_A1N5(self):
        #Level 1
        liealg = cbd.TypeALieAlgebra(1)
        cbb = cbd.ConformalBlocksBundle(liealg, [(1,), (0,), (0,), (1,), (0,)], 1)
        self.assertEqual(1, cbb.get_rank(), "Rank incorrect: ([(1,), (0,), (0,), (1,), (0,)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1,), (0,), (1,), (0,), (0,)], 1)
        self.assertEqual(1, cbb.get_rank(), "Rank incorrect: ([(1,), (0,), (1,), (0,), (0,)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1,), (1,), (0,), (0,), (1,)], 1)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(1,), (1,), (0,), (0,), (1,)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0,), (0,), (1,), (0,), (0,)], 1)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(0,), (0,), (1,), (0,), (0,)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0,), (0,), (0,), (1,), (1,)], 1)
        self.assertEqual(1, cbb.get_rank(), "Rank incorrect: ([(0,), (0,), (0,), (1,), (1,)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1,), (0,), (0,), (1,), (0,)], 1)
        self.assertEqual(1, cbb.get_rank(), "Rank incorrect: ([(1,), (0,), (0,), (1,), (0,)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0,), (0,), (0,), (0,), (1,)], 1)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(0,), (0,), (0,), (0,), (1,)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1,), (1,), (0,), (0,), (1,)], 1)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(1,), (1,), (0,), (0,), (1,)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0,), (1,), (0,), (0,), (0,)], 1)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(0,), (1,), (0,), (0,), (0,)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0,), (0,), (1,), (1,), (0,)], 1)
        self.assertEqual(1, cbb.get_rank(), "Rank incorrect: ([(0,), (0,), (1,), (1,), (0,)], 1)")

        #Level 2
        liealg = cbd.TypeALieAlgebra(1)
        cbb = cbd.ConformalBlocksBundle(liealg, [(2,), (0,), (0,), (2,), (0,)], 2)
        self.assertEqual(1, cbb.get_rank(), "Rank incorrect: ([(2,), (0,), (0,), (2,), (0,)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1,), (1,), (1,), (1,), (2,)], 2)
        self.assertEqual(2, cbb.get_rank(), "Rank incorrect: ([(1,), (1,), (1,), (1,), (2,)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1,), (0,), (2,), (0,), (2,)], 2)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(1,), (0,), (2,), (0,), (2,)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0,), (2,), (2,), (1,), (2,)], 2)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(0,), (2,), (2,), (1,), (2,)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0,), (2,), (1,), (1,), (1,)], 2)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(0,), (2,), (1,), (1,), (1,)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(2,), (2,), (1,), (2,), (1,)], 2)
        self.assertEqual(1, cbb.get_rank(), "Rank incorrect: ([(2,), (2,), (1,), (2,), (1,)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(2,), (2,), (2,), (1,), (0,)], 2)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(2,), (2,), (2,), (1,), (0,)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(2,), (1,), (1,), (0,), (2,)], 2)
        self.assertEqual(1, cbb.get_rank(), "Rank incorrect: ([(2,), (1,), (1,), (0,), (2,)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(2,), (1,), (1,), (1,), (0,)], 2)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(2,), (1,), (1,), (1,), (0,)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0,), (0,), (2,), (2,), (2,)], 2)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(0,), (0,), (2,), (2,), (2,)], 2)")

        #Level 3
        liealg = cbd.TypeALieAlgebra(1)
        cbb = cbd.ConformalBlocksBundle(liealg, [(3,), (1,), (1,), (2,), (1,)], 3)
        self.assertEqual(2, cbb.get_rank(), "Rank incorrect: ([(3,), (1,), (1,), (2,), (1,)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0,), (0,), (0,), (3,), (2,)], 3)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(0,), (0,), (0,), (3,), (2,)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1,), (1,), (2,), (3,), (1,)], 3)
        self.assertEqual(2, cbb.get_rank(), "Rank incorrect: ([(1,), (1,), (2,), (3,), (1,)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0,), (2,), (1,), (2,), (1,)], 3)
        self.assertEqual(2, cbb.get_rank(), "Rank incorrect: ([(0,), (2,), (1,), (2,), (1,)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(2,), (0,), (3,), (2,), (2,)], 3)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(2,), (0,), (3,), (2,), (2,)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0,), (1,), (0,), (1,), (2,)], 3)
        self.assertEqual(1, cbb.get_rank(), "Rank incorrect: ([(0,), (1,), (0,), (1,), (2,)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0,), (1,), (2,), (0,), (1,)], 3)
        self.assertEqual(1, cbb.get_rank(), "Rank incorrect: ([(0,), (1,), (2,), (0,), (1,)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0,), (3,), (3,), (1,), (3,)], 3)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(0,), (3,), (3,), (1,), (3,)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1,), (2,), (3,), (2,), (0,)], 3)
        self.assertEqual(1, cbb.get_rank(), "Rank incorrect: ([(1,), (2,), (3,), (2,), (0,)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0,), (3,), (3,), (1,), (2,)], 3)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(0,), (3,), (3,), (1,), (2,)], 3)")
    def test_A2N6(self):
        #Level 2
        liealg = cbd.TypeALieAlgebra(2)
        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 1), (2, 0), (0, 1), (2, 0), (0, 0), (0, 2)], 2)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(1, 1), (2, 0), (0, 1), (2, 0), (0, 0), (0, 2)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 1), (0, 2), (0, 1), (1, 0), (0, 1), (0, 2)], 2)
        self.assertEqual(2, cbb.get_rank(), "Rank incorrect: ([(0, 1), (0, 2), (0, 1), (1, 0), (0, 1), (0, 2)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(2, 0), (0, 2), (0, 1), (1, 1), (1, 1), (1, 1)], 2)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(2, 0), (0, 2), (0, 1), (1, 1), (1, 1), (1, 1)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 2), (2, 0), (0, 2), (2, 0), (2, 0), (1, 1)], 2)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(0, 2), (2, 0), (0, 2), (2, 0), (2, 0), (1, 1)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 1), (2, 0), (2, 0), (0, 2), (1, 0), (1, 0)], 2)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(1, 1), (2, 0), (2, 0), (0, 2), (1, 0), (1, 0)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 0), (1, 1), (1, 0), (0, 1), (0, 2), (0, 0)], 2)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(0, 0), (1, 1), (1, 0), (0, 1), (0, 2), (0, 0)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 0), (2, 0), (0, 0), (1, 0), (1, 1), (2, 0)], 2)
        self.assertEqual(1, cbb.get_rank(), "Rank incorrect: ([(1, 0), (2, 0), (0, 0), (1, 0), (1, 1), (2, 0)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 2), (0, 2), (0, 2), (0, 1), (0, 1), (0, 0)], 2)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(0, 2), (0, 2), (0, 2), (0, 1), (0, 1), (0, 0)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 1), (0, 1), (0, 0), (0, 1), (1, 0), (1, 0)], 2)
        self.assertEqual(3, cbb.get_rank(), "Rank incorrect: ([(1, 1), (0, 1), (0, 0), (0, 1), (1, 0), (1, 0)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 0), (1, 0), (2, 0), (0, 1), (1, 1), (1, 0)], 2)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(1, 0), (1, 0), (2, 0), (0, 1), (1, 1), (1, 0)], 2)")

        #Level 3
        liealg = cbd.TypeALieAlgebra(2)
        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 0), (2, 0), (1, 0), (1, 1), (1, 0), (0, 1)], 3)
        self.assertEqual(4, cbb.get_rank(), "Rank incorrect: ([(0, 0), (2, 0), (1, 0), (1, 1), (1, 0), (0, 1)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 0), (1, 0), (2, 1), (0, 2), (1, 1), (3, 0)], 3)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(1, 0), (1, 0), (2, 1), (0, 2), (1, 1), (3, 0)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 2), (1, 2), (0, 1), (0, 3), (0, 1), (1, 1)], 3)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(1, 2), (1, 2), (0, 1), (0, 3), (0, 1), (1, 1)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 1), (0, 2), (2, 0), (2, 1), (1, 2), (0, 2)], 3)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(1, 1), (0, 2), (2, 0), (2, 1), (1, 2), (0, 2)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 3), (1, 0), (1, 2), (3, 0), (0, 3), (0, 2)], 3)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(0, 3), (1, 0), (1, 2), (3, 0), (0, 3), (0, 2)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 2), (0, 1), (1, 0), (1, 2), (0, 3), (0, 2)], 3)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(1, 2), (0, 1), (1, 0), (1, 2), (0, 3), (0, 2)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 1), (1, 2), (2, 0), (2, 1), (0, 3), (0, 1)], 3)
        self.assertEqual(3, cbb.get_rank(), "Rank incorrect: ([(0, 1), (1, 2), (2, 0), (2, 1), (0, 3), (0, 1)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(1, 1), (1, 1), (0, 2), (0, 2), (0, 0), (1, 0)], 3)
        self.assertEqual(6, cbb.get_rank(), "Rank incorrect: ([(1, 1), (1, 1), (0, 2), (0, 2), (0, 0), (1, 0)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 1), (3, 0), (3, 0), (0, 0), (0, 2), (1, 0)], 3)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(0, 1), (3, 0), (3, 0), (0, 0), (0, 2), (1, 0)], 3)")

        cbb = cbd.ConformalBlocksBundle(liealg, [(0, 2), (2, 0), (3, 0), (1, 2), (0, 1), (2, 1)], 3)
        self.assertEqual(0, cbb.get_rank(), "Rank incorrect: ([(0, 2), (2, 0), (3, 0), (1, 2), (0, 1), (2, 1)], 3)")
    def test_C3N7(self):
        #Level 1
        liealg = cbd.TypeCLieAlgebra(3)
        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [(0, 1, 0), (0, 0, 1), (0, 0, 0), (0, 1, 0), (0, 0, 0), (0, 0, 1), (0, 0, 1)],
                                        1)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(0, 1, 0), (0, 0, 1), (0, 0, 0), (0, 1, 0), (0, 0, 0), (0, 0, 1), (0, 0, 1)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [(0, 0, 1), (0, 1, 0), (0, 1, 0), (1, 0, 0), (1, 0, 0), (0, 0, 0), (0, 1, 0)],
                                        1)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(0, 0, 1), (0, 1, 0), (0, 1, 0), (1, 0, 0), (1, 0, 0), (0, 0, 0), (0, 1, 0)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [(1, 0, 0), (0, 1, 0), (0, 1, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (1, 0, 0)],
                                        1)
        self.assertEqual(2, cbb.get_rank(),
                         "Rank incorrect: ([(1, 0, 0), (0, 1, 0), (0, 1, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (1, 0, 0)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [(0, 0, 0), (0, 0, 1), (0, 1, 0), (0, 0, 0), (0, 1, 0), (0, 0, 0), (0, 1, 0)],
                                        1)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(0, 0, 0), (0, 0, 1), (0, 1, 0), (0, 0, 0), (0, 1, 0), (0, 0, 0), (0, 1, 0)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [(1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (0, 0, 1), (0, 0, 0), (1, 0, 0)],
                                        1)
        self.assertEqual(3, cbb.get_rank(),
                         "Rank incorrect: ([(1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (0, 0, 1), (0, 0, 0), (1, 0, 0)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [(1, 0, 0), (1, 0, 0), (0, 0, 0), (1, 0, 0), (0, 1, 0), (0, 0, 0), (0, 0, 1)],
                                        1)
        self.assertEqual(2, cbb.get_rank(),
                         "Rank incorrect: ([(1, 0, 0), (1, 0, 0), (0, 0, 0), (1, 0, 0), (0, 1, 0), (0, 0, 0), (0, 0, 1)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [(1, 0, 0), (0, 1, 0), (0, 1, 0), (0, 0, 1), (1, 0, 0), (0, 0, 1), (0, 0, 0)],
                                        1)
        self.assertEqual(2, cbb.get_rank(),
                         "Rank incorrect: ([(1, 0, 0), (0, 1, 0), (0, 1, 0), (0, 0, 1), (1, 0, 0), (0, 0, 1), (0, 0, 0)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [(0, 1, 0), (0, 0, 1), (1, 0, 0), (0, 0, 0), (0, 0, 1), (0, 0, 0), (0, 0, 1)],
                                        1)
        self.assertEqual(1, cbb.get_rank(),
                         "Rank incorrect: ([(0, 1, 0), (0, 0, 1), (1, 0, 0), (0, 0, 0), (0, 0, 1), (0, 0, 0), (0, 0, 1)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [(1, 0, 0), (0, 1, 0), (1, 0, 0), (0, 1, 0), (0, 1, 0), (0, 0, 1), (0, 0, 1)],
                                        1)
        self.assertEqual(3, cbb.get_rank(),
                         "Rank incorrect: ([(1, 0, 0), (0, 1, 0), (1, 0, 0), (0, 1, 0), (0, 1, 0), (0, 0, 1), (0, 0, 1)], 1)")

        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [(0, 1, 0), (0, 1, 0), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 1, 0), (0, 1, 0)],
                                        1)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(0, 1, 0), (0, 1, 0), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 1, 0), (0, 1, 0)], 1)")

        #Level 2
        liealg = cbd.TypeCLieAlgebra(3)
        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [(1, 0, 0), (0, 1, 0), (0, 0, 1), (1, 1, 0), (0, 1, 1), (0, 1, 0), (1, 1, 0)],
                                        2)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(1, 0, 0), (0, 1, 0), (0, 0, 1), (1, 1, 0), (0, 1, 1), (0, 1, 0), (1, 1, 0)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [(0, 2, 0), (2, 0, 0), (1, 1, 0), (1, 0, 1), (1, 0, 0), (0, 0, 1), (0, 0, 2)],
                                        2)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(0, 2, 0), (2, 0, 0), (1, 1, 0), (1, 0, 1), (1, 0, 0), (0, 0, 1), (0, 0, 2)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [(2, 0, 0), (0, 0, 1), (0, 0, 2), (0, 1, 1), (2, 0, 0), (0, 0, 2), (0, 2, 0)],
                                        2)
        self.assertEqual(3, cbb.get_rank(),
                         "Rank incorrect: ([(2, 0, 0), (0, 0, 1), (0, 0, 2), (0, 1, 1), (2, 0, 0), (0, 0, 2), (0, 2, 0)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [(0, 1, 1), (0, 2, 0), (0, 0, 1), (1, 0, 1), (0, 1, 1), (0, 2, 0), (0, 1, 0)],
                                        2)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(0, 1, 1), (0, 2, 0), (0, 0, 1), (1, 0, 1), (0, 1, 1), (0, 2, 0), (0, 1, 0)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [(0, 0, 2), (0, 0, 1), (0, 1, 1), (0, 0, 0), (1, 0, 1), (0, 0, 1), (0, 0, 0)],
                                        2)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(0, 0, 2), (0, 0, 1), (0, 1, 1), (0, 0, 0), (1, 0, 1), (0, 0, 1), (0, 0, 0)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [(1, 1, 0), (1, 1, 0), (1, 0, 0), (0, 2, 0), (1, 0, 0), (1, 0, 0), (0, 1, 0)],
                                        2)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(1, 1, 0), (1, 1, 0), (1, 0, 0), (0, 2, 0), (1, 0, 0), (1, 0, 0), (0, 1, 0)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [(0, 0, 0), (1, 1, 0), (0, 0, 0), (1, 1, 0), (1, 1, 0), (0, 2, 0), (2, 0, 0)],
                                        2)
        self.assertEqual(0, cbb.get_rank(),
                         "Rank incorrect: ([(0, 0, 0), (1, 1, 0), (0, 0, 0), (1, 1, 0), (1, 1, 0), (0, 2, 0), (2, 0, 0)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [(1, 0, 0), (2, 0, 0), (0, 2, 0), (2, 0, 0), (1, 0, 0), (0, 2, 0), (0, 2, 0)],
                                        2)
        self.assertEqual(25, cbb.get_rank(),
                         "Rank incorrect: ([(1, 0, 0), (2, 0, 0), (0, 2, 0), (2, 0, 0), (1, 0, 0), (0, 2, 0), (0, 2, 0)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [(1, 0, 0), (1, 1, 0), (0, 2, 0), (0, 2, 0), (2, 0, 0), (0, 2, 0), (2, 0, 0)],
                                        2)
        self.assertEqual(44, cbb.get_rank(),
                         "Rank incorrect: ([(1, 0, 0), (1, 1, 0), (0, 2, 0), (0, 2, 0), (2, 0, 0), (0, 2, 0), (2, 0, 0)], 2)")

        cbb = cbd.ConformalBlocksBundle(liealg,
                                        [(0, 2, 0), (0, 1, 0), (0, 0, 2), (0, 2, 0), (1, 0, 1), (0, 1, 0), (2, 0, 0)],
                                        2)
        self.assertEqual(23, cbb.get_rank(),
                         "Rank incorrect: ([(0, 2, 0), (0, 1, 0), (0, 0, 2), (0, 2, 0), (1, 0, 1), (0, 1, 0), (2, 0, 0)], 2)")