def space(self): r''' Calculates the space of cocyles modulo coboundaries, as a Z-module. TESTS: sage: from darmonpoints.sarithgroup import * sage: from darmonpoints.cohomology_abstract import * sage: from darmonpoints.ocmodule import * sage: GS = BigArithGroup(5, 6,1,use_shapiro=False,outfile='/tmp/darmonpoints.tmp') # optional - magma sage: G = GS.large_group() # optional - magma sage: V = OCVn(5,1) # optional - magma sage: Coh = CohomologyGroup(G,V,trivial_action = False) # optional - magma ''' verb = get_verbose() set_verbose(0) V = self.coefficient_module() R = V.base_ring() Vdim = V.dimension() G = self.group() gens = G.gens() ambient = R**(Vdim * len(gens)) # Now find the subspace of cocycles A = Matrix(R, Vdim * len(gens), 0) for r in G.get_relation_words(): Alist = self.fox_gradient(r) newA = block_matrix(Alist, nrows = 1) A = A.augment(newA.transpose()) A = A.transpose() cocycles = ambient.submodule([ambient(o) for o in A.right_kernel_matrix().rows()]) gmat = block_matrix([self._gen_pows[i][1] - 1 for i in range(len(G.gens()))], nrows = len(G.gens())) coboundaries = cocycles.submodule([ambient(o) for o in gmat.columns()]) ans = cocycles.quotient(coboundaries) set_verbose(verb) return ans
def acting_matrix(self, g, prec=None): dim = len(self.basis()) ans = Matrix(self._V.base_ring(), dim, 0) for v in self.basis(): gv = g * v gvlist = [] for w in gv._val: try: wlist = list(w) except TypeError: wlist = list(w._moments) if prec is None: gvlist.extend(wlist) else: gvlist.extend(wlist[:prec]) ans = ans.augment(Matrix(self._V.base_ring(), dim, 1, gvlist)) return ans
def acting_matrix(self, g, prec = None): dim = len(self.basis()) ans = Matrix(self._V.base_ring(),dim, 0) for v in self.basis(): gv = g * v gvlist = [] for w in gv._val: try: wlist = list(w) except TypeError: wlist = list(w._moments) if prec is None: gvlist.extend(wlist) else: gvlist.extend(wlist[:prec]) ans = ans.augment(Matrix(self._V.base_ring(),dim,1,gvlist)) return ans
def space(self): r''' Calculates the space of cocyles modulo coboundaries, as a Z-module. TESTS: sage: from darmonpoints.sarithgroup import * sage: from darmonpoints.cohomology_abstract import * sage: from darmonpoints.ocmodule import * sage: GS = BigArithGroup(5, 6,1,use_shapiro=False,outfile='/tmp/darmonpoints.tmp') # optional - magma sage: G = GS.large_group() # optional - magma sage: V = OCVn(5,1) # optional - magma sage: Coh = CohomologyGroup(G,V,trivial_action = False) # optional - magma ''' verb = get_verbose() set_verbose(0) V = self.coefficient_module() R = V.base_ring() Vdim = V.dimension() G = self.group() gens = G.gens() ambient = R**(Vdim * len(gens)) # Now find the subspace of cocycles A = Matrix(R, Vdim * len(gens), 0) for nr, r in enumerate(G.get_relation_words()): set_verbose(verb) verbose('Processing relation word %s' % nr) set_verbose(0) Alist = [ MatrixSpace(R, Vdim, Vdim)(self.GA_to_local(o)) for o in self.fox_gradient(tuple(r)) ] newA = block_matrix(Alist, nrows=1) A = A.augment(newA.transpose()) A = A.transpose() cocycles = ambient.submodule( [ambient(o) for o in A.right_kernel_matrix().rows()]) gmat = block_matrix( [self._acting_matrix(g, Vdim) - 1 for g in G.gens()], nrows=len(G.gens())) coboundaries = cocycles.submodule([ambient(o) for o in gmat.columns()]) ans = cocycles.quotient(coboundaries) set_verbose(verb) return ans