def decomposition_g0_pth_power(fct): '''Decompose fct as g0 + A^p, if possible. Output: (g0, A).''' omega = fct.diffn().regular_form() g0 = omega.int() A = (fct - g0).pth_root() return (g0, A) def decomposition_g0_p2th_power(fct): '''Decompose fct as g0 + A^(p^2), if possible. Output: (g0, A).''' g0, A = decomposition_g0_pth_power(fct) A0, A1 = decomposition_g0_pth_power(A) return (g0 + A0^p, A1) def decomposition_omega0_hpdh(omega): '''Decompose omega = (regular on U0) + h^(p-1) dh, so that Cartier(omega) = (regular on U0) + dh. Result: (regular on U0, h)''' omega1 = omega.cartier().cartier() omega1 = omega1.inv_cartier().inv_cartier() fct = (omega.cartier() - omega1.cartier()).int() return (omega1, fct) def decomposition_omega8_hpdh(omega, prec = 50): '''Decompose omega = (regular on U8) + h^(p-1) dh, so that Cartier(omega) = (regular on U8) + dh. Result: (regular on U8, h)''' C = omega.curve g = C.genus() Fxy, Rxy, x, y = C.fct_field F = C.base_ring p = C.characteristic Rt. = LaurentSeriesRing(F) omega_analytic = Rt(laurent_analytic_part(omega.expansion_at_infty(prec = prec))) Cv = C.uniformizer() v = Fxy(Cv.function) omega_analytic = Fxy(omega_analytic(t = v)) omega_analytic = superelliptic_function(C, omega_analytic)*Cv.diffn() omega8 = omega - omega_analytic dh = omega.cartier() - omega8.cartier() h = dh.int() return (omega8, h) def decomposition_g8_pth_power(fct, prec = 50): '''Decompose fct as g8 + A^p, if possible. Output: (g8, A).''' C = fct.curve F = C.base_ring Rt. = LaurentSeriesRing(F) Fxy, Rxy, x, y = C.fct_field A = laurent_analytic_part(fct.expansion_at_infty(prec = prec)) Cv = C.uniformizer() v = Cv.function A = A(t = v) A = superelliptic_function(C, A) A = A.pth_root() g8 = fct - A^p return (g8, A) def decomposition_g8_p2th_power(fct): '''Decompose fct as g8 + A^(p^2), if possible. Output: (g8, A).''' g0, A = decomposition_g8_pth_power(fct) A0, A1 = decomposition_g8_pth_power(A) return (g0 + A0^p, A1)