Trivial extension in QPA Software For a given quiver algebra $A$, one can calculate the trivial extension   algebra  $T(A)$ (see Trivial extension of an algebra for the definition) of $A$ with the GAP-package QPA.

Question: Is there an easy way to obtain $A$ as $T(A)$-module in QPA? (note that $A$ is a quotient of $T(A)$ by $D(A)$ and thus a $T(A)$-module in this way)

 A: One can do the following in QPA, where $A$ is some admissible quotient of a path algebra. The code below should work for any admissible quotient of a path algebra. The last line of code gives the indecomposable projective $A$-modules as $T(A)$-modules.  In fact, you can enter any $A$-module $M$ into the command 
RestrictionViaAlgebraHomomorphism(f,M)

and get it as a $T(A)$-module.
gap> A; 
<Rationals[<quiver with 3 vertices and 5 arrows>]/
<two-sided ideal in <Rationals[<quiver with 3 vertices and 5 arrows>]>, 
  (5 generators)>>
gap> TA := TrivialExtensionOfQuiverAlgebra(A);
<Rationals[<quiver with 3 vertices and 8 arrows>]/
<two-sided ideal in <Rationals[<quiver with 3 vertices and 8 arrows>]>, 
  (26 generators)>>
gap> Q := QuiverOfPathAlgebra(A);
<quiver with 3 vertices and 5 arrows>
gap> QTA := QuiverOfPathAlgebra(TA);
<quiver with 3 vertices and 8 arrows>
gap> gensA := GeneratorsOfAlgebraWithOne(A);
[ [(1)*v1], [(1)*v2], [(1)*v3], [(1)*a], [(1)*b], [(1)*c], [(1)*d], [(1)*e] ]
gap> gensTA := GeneratorsOfAlgebraWithOne(TA);
[ [(1)*v1], [(1)*v2], [(1)*v3], [(1)*a], [(1)*b], [(1)*c], [(1)*d], [(1)*e], 
  [(1)*te_a1_1_1], [(1)*te_a1_1_2], [(1)*te_a1_3_3] ]
gap> n := Length(gensTA) - Length(gensA);
3
gap> gensA := ShallowCopy(gensA);
[ [(1)*v1], [(1)*v2], [(1)*v3], [(1)*a], [(1)*b], [(1)*c], [(1)*d], [(1)*e] ]
gap> list := List( [1..n], i -> Zero(A));
[ [<zero> of ...], [<zero> of ...], [<zero> of ...] ]
gap> Append(gensA,list);
gap> gensA;
[ [(1)*v1], [(1)*v2], [(1)*v3], [(1)*a], [(1)*b], [(1)*c], [(1)*d], [(1)*e], 
  [<zero> of ...], [<zero> of ...], [<zero> of ...] ]
gap> f := AlgebraHomomorphismByImages(TA,A,gensTA,gensA);
[ [(1)*v1], [(1)*v2], [(1)*v3], [(1)*a], [(1)*b], [(1)*c], [(1)*d], [(1)*e], 
  [(1)*te_a1_1_1], [(1)*te_a1_1_2], [(1)*te_a1_3_3] ] -> 
[ [(1)*v1], [(1)*v2], [(1)*v3], [(1)*a], [(1)*b], [(1)*c], [(1)*d], [(1)*e], 
  [<zero> of ...], [<zero> of ...], [<zero> of ...] ]
gap> f!.generators := gensTA;
[ [(1)*v1], [(1)*v2], [(1)*v3], [(1)*a], [(1)*b], [(1)*c], [(1)*d], [(1)*e], 
  [(1)*te_a1_1_1], [(1)*te_a1_1_2], [(1)*te_a1_3_3] ]
gap> f!.genimages := gensA;
[ [(1)*v1], [(1)*v2], [(1)*v3], [(1)*a], [(1)*b], [(1)*c], [(1)*d], [(1)*e], 
  [<zero> of ...], [<zero> of ...], [<zero> of ...] ]
gap> P := IndecProjectiveModules(A);
[ <[ 1, 4, 3 ]>, <[ 0, 2, 2 ]>, <[ 1, 2, 2 ]> ]
gap> test := List( P, p -> RestrictionViaAlgebraHomomorphism(f,p));
[ <[ 1, 4, 3 ]>, <[ 0, 2, 2 ]>, <[ 1, 2, 2 ]> ]

