Finding generators of subgroups of free abelian groups.
Let N be a finitely generated abelian group. Let M be a subgroup of N with the same rank as that of N. Given an Z-basis v1,…,vm of M and an element v∈N, find a basis of the group generated by v1,…,vm,v.
I am fairly certain that doing so is possible, but I cannot come up with an effective algorithm. Does anyone have code that is similar to this?