From 319965a61eaf8dc33b542f7f4cde28e830d2f977 Mon Sep 17 00:00:00 2001 From: calquezar Date: Thu, 22 Aug 2024 01:58:09 +0200 Subject: [PATCH] Update aplK.py --- aplK.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/aplK.py b/aplK.py index e238293..510755f 100644 --- a/aplK.py +++ b/aplK.py @@ -83,7 +83,7 @@ class AplN(DifferentialGCAlgebra_multigraded, UniqueRepresentation): #return value*factorial(self.n)*prod(self.gens()[self.n+2:]) gens = self.gens() - tExp = [0*randint(0,3) for i in range(self.n+1)] + tExp = [0*randint(0,4) for i in range(self.n+1)] # Random pol in variables t_i, 1<=i<=n yExp = [0]+[1]*self.n exp = tuple(tExp + yExp) #print(value, " - ", exp, flush=True) @@ -140,8 +140,10 @@ class AplN(DifferentialGCAlgebra_multigraded, UniqueRepresentation): listProds = [prod(s) for s in self.findsubsets(self, ygens,ydegree)] listCoefs = [tuple(2*N*[0])] if tdegree>1: - V = VectorSpace(GF(tdegree),N-1) - listCoefs = [tuple([0]+list(v)+N*[0]) for v in V] + #V = VectorSpace(GF(tdegree),N-1) + #listCoefs = [tuple([0]+list(v)+N*[0]) for v in V] + l = list(range(tdegree+1)) + listCoefs = [tuple([0]+ list(i)) for i in cartesian_product((N-1)*[l]).list()] listPolinomials = [self.get_term(self, 1, c, self.gens()) for c in listCoefs] cp = cartesian_product([listProds,listPolinomials]) elements = [prod(c) for c in cp] @@ -587,7 +589,7 @@ class SimplicialAplN(AplN, UniqueRepresentation): basis += apl.get_primitive_basis_of_a_monomial(apl,monomial) basis = list(set(basis)) #basis += p._add_kernel_terms_to_primitive_basis(basis) - t_degree = 0 + t_degree = 2 y_degree = self.total_degree() #self.parent().n #p.total_degree()#p.degree()[0] basis += apl.add_kernel_terms_to_primitive_basis(apl,t_degree, y_degree-1) basis = list(set(basis))