Пример #1
0
def cohom_test(f):
        out = open("cohom"+str(opts.prime)+"-"+str(opts.bounds)+".txt", "a")
        C = CobarComplex(f+2)
        C.get_pickled_cplx()
        #C.make_maps()
        for i in range(1,f+1):
            for bideg in C.get_cplx()[i]._dict.keys():
                d = bideg[0]
                w = bideg[1]
                cohom = C.get_cohomology(i,d,w)
                out.write("Filt, deg, wt"+str(i)+" "+str(d)+" "+str(w)+"\n")
                cc = cohom.get_cohomology()
                out.write(str(cc)+"\n")
                if cc.get_basis():
                    for vect in cc.get_basis():
                        out.write(str(C.element_from_vector(vect, i,d,w))+"\n")
        C.compute_product_structure()
        for thing in C.product_generators:
            out.write(str(thing.get_degree()) + " " + str(thing) + "\n")
        out.close()
        C.pickle_cplx()
Пример #2
0
def cohom_test(f):
    out = open("cohom" + str(opts.prime) + "-" + str(opts.bounds) + ".txt",
               "a")
    C = CobarComplex(f + 2)
    C.get_pickled_cplx()
    #C.make_maps()
    for i in range(1, f + 1):
        for bideg in C.get_cplx()[i]._dict.keys():
            d = bideg[0]
            w = bideg[1]
            cohom = C.get_cohomology(i, d, w)
            out.write("Filt, deg, wt" + str(i) + " " + str(d) + " " + str(w) +
                      "\n")
            cc = cohom.get_cohomology()
            out.write(str(cc) + "\n")
            if cc.get_basis():
                for vect in cc.get_basis():
                    out.write(str(C.element_from_vector(vect, i, d, w)) + "\n")
    C.compute_product_structure()
    for thing in C.product_generators:
        out.write(str(thing.get_degree()) + " " + str(thing) + "\n")
    out.close()
    C.pickle_cplx()