Ejemplo n.º 1
0
def delta_ell_case_2(module: Module, x: ETangleStrands, a1: int,
                     a2: int) -> Module.TensorElement:
    c1 = module.left_algebra.ring.one()
    c2 = x.etangle.ring.one()
    powers = x.idempotent_and_left_strands().figure_8_case_2a(a1, a2)
    if powers is None:
        return module.zero()
    for orange, power in powers.items():
        if x.etangle.strand_index_to_left_sign(orange) == 1:
            c1 *= x.etangle.left_algebra_strand_index_to_variable(
                orange)**power
        else:
            c2 *= x.etangle.strand_index_to_variable(orange)**power
    elt = x.left_idempotent()
    y = ETangleStrands(x.etangle, swap_values(x.left_strands, a1, a2),
                       x.right_strands)
    return (c1 * elt)**(c2 * y.to_generator(module))
Ejemplo n.º 2
0
def delta_ell_case_4(module: Module, x: ETangleStrands, a1: int,
                     a2: int) -> Module.TensorElement:
    c1 = module.left_algebra.ring.one()
    c2 = x.etangle.ring.one()
    powers = x.idempotent_and_left_strands().figure_8_case_4a(a1, a2)
    if powers is None:
        return module.zero()
    for orange, power in powers.items():
        if x.etangle.strand_index_to_left_sign(orange) == 1:
            c1 *= x.etangle.left_algebra_strand_index_to_variable(
                orange)**power
        else:
            c2 *= x.etangle.strand_index_to_variable(orange)**power
    b1 = x.left_strands[a1]
    b2 = a2
    elt_strands = x.left_idempotent_strands()
    elt_strands[b2] = a1
    new_left_strands = dict(x.left_strands)
    del new_left_strands[a1]
    new_left_strands[a2] = b1
    elt = x.etangle.left_algebra.generator(elt_strands)
    y = ETangleStrands(x.etangle, new_left_strands, x.right_strands)
    return (c1 * elt)**(c2 * y.to_generator(module))