Homomorphisms of finitely generated Abelian groups¶
Homomorphisms between finite Abelian groups.
- class dual_pairs.abelian_group_homomorphism.AbelianGroupHomomorphism(*args: Any, **kwargs: Any)¶
A homomorphism between finitely generated Abelian groups.
- cokernel()¶
Return the cokernel of
self
.OUTPUT:
The cokernel of
self
as an Abelian group C (given by Smith normal form generators) together with a surjective homomorphism from the codomain ofself
to C.EXAMPLES:
sage: from dual_pairs.abelian_group_homomorphism import hom sage: A = AbelianGroup([2, 2, 0]) sage: B = AbelianGroup([2, 2, 0, 2, 0, 2, 0, 2, 0, 0]) sage: im_gens = (B([1, 1, 0, 1, 0, 1, 0, 0, 0, 0]), ....: B([0, 0, 0, 0, 0, 0, 0, 1, 0, 0]), ....: B([0, 0, 0, 0, 0, 0, 2, 0, -2, 0])) sage: hom(A, B, im_gens).cokernel() Abelian group morphism: From: Multiplicative Abelian group isomorphic to C2 x C2 x Z x C2 x Z x C2 x Z x C2 x Z x Z To: Multiplicative Abelian group isomorphic to C2 x C2 x C2 x C2 x Z x Z x Z x Z Defn: f0 |--> f1*f2*f3 f1 |--> f2 f2 |--> f4 f3 |--> f1 f4 |--> f5 f5 |--> f3 f6 |--> f6 f7 |--> 1 f8 |--> f0*f6 f9 |--> f7
- inverse_image(x)¶
Return an inverse image of
x
underself
.EXAMPLES:
sage: from dual_pairs.abelian_group_homomorphism import hom sage: A = AbelianGroup([2, 4, 0]) sage: B = AbelianGroup([4, 8, 0]) sage: im_gens = (B([2, 4, 0]), ....: B([1, 2, 0]), ....: B([0, 4, 2])) sage: h = hom(A, B, im_gens) sage: y = h(A.random_element()) sage: h(h.inverse_image(y)) == y True
- kernel()¶
Return the kernel of
self
.OUTPUT:
The kernel of
self
as an Abelian group K (given by Smith normal form generators) together with an injective homomorphism from K to the domain ofself
.EXAMPLES:
sage: from dual_pairs.abelian_group_homomorphism import hom sage: A = AbelianGroup([2, 2, 0]) sage: B = AbelianGroup([2, 2, 0, 2, 0, 2, 0, 2, 0, 0]) sage: im_gens = (B([1, 1, 0, 1, 0, 1, 0, 0, 0, 0]), ....: B([0, 0, 0, 0, 0, 0, 0, 1, 0, 0]), ....: B([0, 0, 0, 0, 0, 0, 2, 0, -2, 0])) sage: hom(A, B, im_gens).kernel() Abelian group morphism: From: Trivial Abelian group To: Multiplicative Abelian group isomorphic to C2 x C2 x Z Defn:
- solve_left(h)¶
Return a solution g of g * self == h.
TODO: this is wrong; generalise inverse_image() instead
- solve_right(h)¶
Return a solution g of self * g == h.
TODO: this may not always work (maybe if self is injective?)
- dual_pairs.abelian_group_homomorphism.homology(f, g)¶
Return the homology group of the pair (f, g).
- dual_pairs.abelian_group_homomorphism.solve_mod(M, N, D)¶
Return an integral solution of
X * M == N (mod D)
.EXAMPLES:
sage: from dual_pairs.abelian_group_homomorphism import solve_mod sage: M = Matrix([(-1, -1, 0, -1, 0, 1, 0, 1, 0, 0), ....: (-1, -1, 0, -1, 0, 1, 0, 0, 0, 0), ....: (0, 0, 0, 0, 0, 0, 1, 0, -1, 0)]) sage: N = Matrix([(1, 1, 0, 1, 0, 1, 0, 0, 0, 0), ....: (0, 0, 0, 0, 0, 0, 0, 1, 0, 0), ....: (0, 0, 0, 0, 0, 0, 2, 0, -2, 0)]) sage: D = vector([2, 2, 0, 2, 0, 2, 0, 2, 0, 0]) sage: solve_mod(M, N, D) [0 1 0] [1 1 0] [0 0 2]
- dual_pairs.abelian_group_homomorphism.solve_mod_right(M, N, D)¶
Return an integral solution of
M * X == N (mod D)
.EXAMPLES:
sage: from dual_pairs.abelian_group_homomorphism import solve_mod_right sage: M = Matrix([(-1, -1, 0, -1), ....: (0, 0, 0, 0)]) sage: N = Matrix([(1, 1, 0, 1), ....: (0, 0, 0, 0)]) sage: D = vector([2, 0]) sage: solve_mod_right(M, N, D) [ 0 0 0 0] [-1 -1 0 -1] [ 0 0 0 0] [ 0 0 0 0]