32 lines
1.2 KiB
Python
32 lines
1.2 KiB
Python
from sage.all import *
|
|
import itertools
|
|
load('aplK.py')
|
|
load('minimalModel.py')
|
|
#######################################################
|
|
# TESTS
|
|
def findsubsests(S,m):
|
|
return set(itertools.combinations(S,m))
|
|
|
|
simplices = [list(e) for e in findsubsets([0,1,2,3],3)]
|
|
simplices += [list(e) for e in findsubsets([0,1,2,4],3)]
|
|
simplices += [list(e) for e in findsubsets([2,3,4,5],3)]
|
|
S = SimplicialComplex(simplices,is_mutable=False)
|
|
|
|
#S1 = simplicial_complexes.Sphere(2)
|
|
#S2 = simplicial_complexes.Sphere(3)
|
|
#S = S1.wedge(S2, is_mutable=False)
|
|
#S = simplicial_complexes.KleinBottle().suspension()
|
|
#S.set_immutable()
|
|
#S = simplicial_complexes.K3Surface()
|
|
#print("Complejo simplicial")
|
|
#print(S.facets())
|
|
#######################################################
|
|
#S = simplicial_complexes.ComplexProjectivePlane()
|
|
#######################################################
|
|
# S = simplicial_complexes.BrucknerGrunbaumSphere()
|
|
#######################################################
|
|
# S = simplicial_complexes.ProjectivePlane().wedge(simplicial_complexes.Sphere(2), is_mutable=False)
|
|
#######################################################
|
|
[sullivan_model, model_morphism, cohomology_correspondence] = minimal_model(S, max_depth=10, max_dim=5)
|
|
print(sullivan_model)
|