示例#1
0
    def tensorAAandDD(self, dd_graph):
        """Returns the type DA structure formed by tensoring dd_graph with
        self, with self placed at left and dd_graph placed at right.

        """
        assert dd_graph.tensor_side == 1
        assert dd_graph.algebra1 == self.pmc_alg
        alg_opp = self.pmc_alg.opp()
        # The generating set for the type DA structure and the dd_graph is the
        # same.
        result = SimpleDAStructure(F2, dd_graph.algebra2, alg_opp)
        ddgen_to_dagen_map = {}
        for ddgen in dd_graph.ddgen_node:
            cur_gen = SimpleDAGenerator(
                result, ddgen.idem2, ddgen.idem1.opp().comp(), str(ddgen))
            ddgen_to_dagen_map[ddgen] = cur_gen
            result.addGenerator(cur_gen)

        univ_digraph = UniversalDiGraph(alg_opp)
        for ddgen, d2_pos in dd_graph.ddgen_node.items():
            d1_pos = univ_digraph.getInitialNode()
            aa_pos = self.homology_node[ddgen.idem1.comp()]
            pos = [(d1_pos, d2_pos, aa_pos)]
            end_states = self._searchDoubleD(univ_digraph, dd_graph, pos)[0]
            for d1_end, d2_end, aa_end in end_states:
                gen_from = ddgen_to_dagen_map[ddgen]
                gen_to = ddgen_to_dagen_map[d2_end.ddgen]
                result.addDelta(gen_from, gen_to, d2_end.sd, tuple(d1_end), 1)
        return result
示例#2
0
    def tensorDDandAA(self, dd_graph):
        """Returns the type DA structure formed by tensoring dd_graph with
        self, with dd_graph placed at left and self placed at right.

        """
        # Currently very slow, only really work in genus 1 case
        assert dd_graph.tensor_side == 2
        assert dd_graph.algebra2 == self.pmc_alg.opp()
        alg = self.pmc_alg
        # The generating set for the type DA structure and the dd_graph is the
        # same.
        result = SimpleDAStructure(F2, dd_graph.algebra1, alg)
        ddgen_to_dagen_map = {}
        for ddgen in dd_graph.ddgen_node:
            cur_gen = SimpleDAGenerator(
                result, ddgen.idem1, ddgen.idem2.opp().comp(), str(ddgen))
            ddgen_to_dagen_map[ddgen] = cur_gen
            result.addGenerator(cur_gen)

        univ_digraph = UniversalDiGraph(alg)
        for ddgen, d1_pos in dd_graph.ddgen_node.items():
            d2_pos = univ_digraph.getInitialNode()
            aa_pos = self.homology_node[ddgen.idem2.comp()]
            pos = [(d1_pos, d2_pos, aa_pos)]
            end_states = self._searchDoubleD(dd_graph, univ_digraph, pos)[0]
            for d1_end, d2_end, aa_end in end_states:
                gen_from = ddgen_to_dagen_map[ddgen]
                gen_to = ddgen_to_dagen_map[d1_end.ddgen]
                result.addDelta(gen_from, gen_to, d1_end.sd, tuple(d2_end), 1)
        return result
示例#3
0
def azDA(pmc,mult_one = True):
    "The type DA module associated to the Auroux-Zarev piece. Input: the alpha pointed matched circle."
    algebra = pmc.getAlgebra(mult_one = mult_one)
    answer = SimpleDAStructure(F2, algebra, algebra)
    #Compute the generators
    for a in pmc.getStrandDiagrams(answer.algebra1):
        gen = SimpleDAGenerator(answer, a.left_idem.comp(), a.right_idem, a)
        answer.addGenerator(gen)
    #Terms in the differential coming from the differential on the algebra:
    for x in answer.generators:
        dx = x.name.diff()
        for y in dx.keys():
            ygen = SimpleDAGenerator(answer, y.left_idem.comp(), y.right_idem, y)
            answer.addDelta(x,ygen,x.idem1.toAlgElt(algebra),list(),dx[y])
    #Terms coming from multiplying by algebra elements on the right
    for x in answer.generators:
        xa = x.name
        could_multiply = algebra.getGeneratorsForIdem(left_idem = xa.right_idem)
        for b in could_multiply:
            if not b.isIdempotent():
                xab = xa*b
                for y in xab.keys():
                    ygen = SimpleDAGenerator(answer,y.left_idem.comp(), y.right_idem, y)
                    answer.addDelta(x,ygen,x.idem1.toAlgElt(algebra),[b,],xab[y])
    #Terms coming from differential on CFDD(Id):
    chord_pairs = chordPairs(pmc)
    for (sigma, rho) in chord_pairs:
        for x in algebra.getGeneratorsForIdem(left_idem = rho.right_idem):
            xgen = SimpleDAGenerator(answer,x.left_idem.comp(), x.right_idem, x)
            rhox = rho*x
            for y in rhox.keys():
                ygen = SimpleDAGenerator(answer, y.left_idem.comp(), y.right_idem, y)
                answer.addDelta(xgen, ygen, sigma, list(),rhox[y])    
    return answer