def tex(self):
        ## In case of a named value just return it.
        if self.name:
            return r"{\mathrm{%s}}" % (tex_encode(self.name))

        if self.constuction[0] == "Gen+":
            gather = [v.tex() for v in self.constuction[1:]]
            Sum = " \cdot ".join(gather)
            return "{%s}" % Sum

        if self.constuction[0] == "Gen*":
            base = self.constuction[1].tex()
            exps = [v.tex() for v in self.constuction[2:]]
            exps = " \cdot ".join(exps)
            ret = "{%s}^{%s}" % (base, exps)
            return ret
dataset/ETHPy150Open gdanezis/petlib/examples/genzkp.py/Gen.tex/original