From dadf7da90e31fbdd32963ae9bbcd6b6798a71092 Mon Sep 17 00:00:00 2001 From: Montessinos Mickael Gerard Bernard Date: Wed, 13 Mar 2024 11:08:38 +0200 Subject: [PATCH] Added kernel --- vector_bundle/hom_bundle.py | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/vector_bundle/hom_bundle.py b/vector_bundle/hom_bundle.py index aebf147..aaeee2b 100644 --- a/vector_bundle/hom_bundle.py +++ b/vector_bundle/hom_bundle.py @@ -377,6 +377,51 @@ class HomBundle(VectorBundle): image = VectorBundle(K, ideals, g_fi, identity_matrix(K, g_fi.ncols())) return image, C_inf + def kernel(self, f): + r""" + Return a kernel of global homomorphism ``f`` which is an element of + `H^0(\mathrm{self})`. + + That is, a vector bundle `V` together with an injective morphism of `V` + into ``self.domain`` such that the image of `V` in ``self.domain`` + is the kernel of ``f``. + + EXAMPLES :: + + sage: from vector_bundle import trivial_bundle, canonical_bundle + sage: F. = FunctionField(GF(7)) + sage: R. = F[] + sage: K. = F.extension(y^2 - x^3 - x) + sage: triv = trivial_bundle(K) + sage: can = canonical_bundle(K) + sage: V1 = triv.direct_sum(can) + sage: V2 = can.direct_sum(triv) + sage: hom = V1.hom(V2) + sage: kernel, map = hom.kernel(matrix(K, [[0, 1], [0, 0]])) + sage: kernel.isomorphism_to(triv) is not None + True + sage: kernel.hom(V1).coordinates_in_h0(map) + (1, 0) + """ + dom = self._domain + cod = self._codomain + ideals, _, U_fi = function_field_utility.pseudo_hermite_form( + dom._ideals, + f*dom._g_finite, + transformation=True) + _, U_inf = function_field_utility.hermite_form_infinite_polymod( + f*dom._g_infinite, + transformation=True) + r = f.rank() + n = f.ncols() + ideals = ideals[:n-r] + C_fi = U_fi[:,:n-r] + C_inf = U_inf[:,:n-r] + g_fi = C_inf.solve_right(C_fi) + K = self._function_field + image = VectorBundle(K, ideals, g_fi, identity_matrix(K, g_fi.ncols())) + return image, C_inf + def is_isomorphism(self, f): r""" Check if f is an isomorphism from ``self.domain()`` to