def de_rham_witt_lift_form0(omega): C = omega.curve omega_regular = omega.regular_form() #Present omega0 in the form P dx + Q dy #Now the obvious lift of omega0 = P dx + Q dy to de Rham-Witt is [P] d[x] + [Q] d[y] return omega_regular.dx.teichmuller()*(C.x.teichmuller().diffn()) + omega_regular.dy.teichmuller()*(C.y.teichmuller().diffn()) def de_rham_witt_lift_form8(omega): C = omega.curve g = C.genus() omega_regular = second_patch(omega).regular_form() omega_regular = (second_patch(omega_regular.dx), second_patch(omega_regular.dy)) u = (C.x)^(-1) v = (C.y)/(C.x)^(g+1) omega_lift = omega_regular[0].teichmuller()*(u.teichmuller().diffn()) + omega_regular[1].teichmuller()*(v.teichmuller().diffn()) return omega_lift def de_rham_witt_lift(cech_class, prec = 50): C = cech_class.curve g = C.genus() omega0 = cech_class.omega0 omega8 = cech_class.omega8 fct = cech_class.f omega0_lift = de_rham_witt_lift_form0(omega0) omega8_lift = de_rham_witt_lift_form8(omega8) aux = omega0_lift - omega8_lift - fct.teichmuller().diffn() # now aux is of the form (V(smth) + dV(smth), V(smth)) if aux.h1.function != 0: raise ValueError('Something went wrong - aux is not of the form (V(smth) + dV(smth), V(smth)).') decom_aux_h2 = decomposition_g0_g8(aux.h2, prec=prec) #decompose dV(smth) in aux as smth regular on U0 - smth regular on U8. aux_h2 = decom_aux_h2[0] aux_f = decom_aux_h2[2] aux_omega0 = decomposition_omega0_omega8(aux.omega, prec=prec)[0] result = superelliptic_drw_cech(omega0_lift - aux_omega0.verschiebung(), fct.teichmuller() + aux_h2.verschiebung() + aux_f.verschiebung()) return result def crystalline_cohomology_basis(self, prec = 50, info = 0): result = [] prec1 = prec for i, a in enumerate(self.de_rham_basis()): if info: print("Computing " + str(i) +". basis element") while True: try: result += [de_rham_witt_lift(a, prec = prec1)] break except IndexError: prec1 += 100 result += [de_rham_witt_lift(a, prec = prec1)] return result superelliptic.crystalline_cohomology_basis = crystalline_cohomology_basis