working on primitive basis
This commit is contained in:
parent
94060060c4
commit
dc7ee07d37
@ -7,8 +7,8 @@ S1 = simplicial_complexes.Sphere(2)
|
||||
S2 = simplicial_complexes.Sphere(3)
|
||||
S = S1.wedge(S2, is_mutable=False)
|
||||
#S = simplicial_complexes.K3Surface()
|
||||
print("Complejo simplicial")
|
||||
print(S.facets())
|
||||
#print("Complejo simplicial")
|
||||
#print(S.facets())
|
||||
#######################################################
|
||||
#S = simplicial_complexes.ComplexProjectivePlane()
|
||||
#######################################################
|
||||
|
||||
@ -22,11 +22,11 @@ for b in basis:
|
||||
dim = len(b)//2 - 1
|
||||
terms.append(p._get_term(1, b, apl.gens()))
|
||||
terms.sort(reverse=False)
|
||||
|
||||
"""
|
||||
with open("output/primitive_basis_without_kernel:terms.txt", 'w') as fp:
|
||||
print("original polynomial: " + str(p),file=fp)
|
||||
print(terms,file=fp)
|
||||
|
||||
"""
|
||||
#print("primitive basis without kernel terms")
|
||||
#print(terms)
|
||||
|
||||
@ -61,7 +61,7 @@ def get_kernel_terms(p, kernel_basis, parent, degree):
|
||||
return list(set(kernel_terms))
|
||||
|
||||
|
||||
|
||||
"""
|
||||
basis = []
|
||||
|
||||
for degree in range(5):
|
||||
@ -70,5 +70,20 @@ for degree in range(5):
|
||||
for b in basis:
|
||||
print(b,file=fp)
|
||||
#implicit fp.close() here as "with" scope ends.
|
||||
|
||||
"""
|
||||
|
||||
import itertools
|
||||
def findsubsets(S,m):
|
||||
return set(itertools.combinations(S, m))
|
||||
|
||||
apl = p.parent()
|
||||
N = len(apl.gens())/2
|
||||
ygens = apl.gens()[N+1:] #N+1 because we remove y0 generator
|
||||
degree = 3
|
||||
listProds = [prod(s) for s in findsubsets(ygens,degree)]
|
||||
V = VectorSpace(GF(degree),N-1)
|
||||
listCoefs = [tuple([0]+list(v)+N*[0]) for v in V]
|
||||
listPolinomials = [p._get_term(1, c, parent.gens()) for c in listCoefs]
|
||||
cp = cartesian_product([lista,listPolinomials])
|
||||
elements = [prod(c) for c in cp]
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user