# Basis for $\operatorname{Ext}^1(M,N)$ in QPA

It is possible to calculate for two given modules $$M$$ and $$N$$ $$\operatorname{Ext}_A^1(M,N)$$ using the GAP-package QPA. Assume $$\operatorname{Ext}_A^1(M,N)$$ is n-dimensional.

Question: Is there a way to obtain $$n$$ short exact sequences $$0 \rightarrow N \rightarrow X_i \rightarrow M \rightarrow 0$$ that represent a basis of $$\operatorname{Ext}_A^1(M,N)$$?

Here is a way of doing this in QPA:

gap> Q:= Quiver(3,[[1,2,"a"],[1,2,"b"],[2,2,"c"],[2,3,"d"],[3,1,"e"]]);;
gap> KQ:= PathAlgebra(Rationals, Q);;
gap> AssignGeneratorVariables(KQ);;
gap> relations := [d*e,c^2,a*c*d-b*d,e*a];;
gap> A:= KQ/relations;;
gap> M := SimpleModules(A)[2];
<[ 0, 1, 0 ]>
gap> N := NthSyzygy(M,1);
<[ 0, 1, 2 ]>
gap> ext := ExtOverAlgebra(M,N);
[ <<[ 0, 1, 2 ]> ---> <[ 0, 2, 2 ]>>, [ <<[ 0, 1, 2 ]> ---> <[ 0, 1, 2 ]>>, <<[ 0, 1, 2 ]> ---> <[ 0, 1, 2 ]>> ], function( map ) ... end ]
gap> maps := ext[2];
[ <<[ 0, 1, 2 ]> ---> <[ 0, 1, 2 ]>>, <<[ 0, 1, 2 ]> ---> <[ 0, 1, 2 ]>> ]
#
# The Ext-group has dimension 2.
#
gap> Length(maps);
2
#
# Creating the monomorphisms in the corresponding extensions/short exact sequences.
#
gap> monos := List( maps, h -> PushOut( ext[1], h )[ 1 ] );
[ <<[ 0, 1, 2 ]> ---> <[ 0, 2, 2 ]>>, <<[ 0, 1, 2 ]> ---> <[ 0, 2, 2 ]>> ]
#
# Creating the exact sequences by monos and epis (note the cokernels of the
# monos are isomorphic, but they need not to be identical modules).
#
gap> extensions := List( monos, m -> [ m, CoKernelProjection( m ) ] );
[ [ <<[ 0, 1, 2 ]> ---> <[ 0, 2, 2 ]>>, <<[ 0, 2, 2 ]> ---> <[ 0, 1, 0 ]>> ],
[ <<[ 0, 1, 2 ]> ---> <[ 0, 2, 2 ]>>, <<[ 0, 2, 2 ]> ---> <[ 0, 1, 0 ]>> ] ]