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))
def delta1_2(module: TypeDA, x: ETangleStrands, a: AMinus.Generator) -> Module.TensorElement: return x.left_idempotent().to_element()**m2(module, x, a)
def delta1_1(module: TypeDA, x: ETangleStrands) -> Module.TensorElement: return x.left_idempotent().to_element() ** (d_plus(module, x) + d_minus(module, x) + d_mixed(module, x)) \ + delta_ell(module, x)