Skip to content

Commit

Permalink
memory.gi: add BaseDomain for matrix with memory
Browse files Browse the repository at this point in the history
  • Loading branch information
wilfwilson authored and fingolfin committed Jul 14, 2019
1 parent a2d5dd9 commit 74006cb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/memory.gi
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@ InstallOtherMethod( \*, "for a matrix with memory and a scalar",true,
return M!.el * s;
end);

InstallOtherMethod( BaseDomain, "for a matrix with memory", true,
[ IsMatrix and IsObjWithMemory ], 0,
M -> BaseDomain(M!.el) );

InstallOtherMethod(ProjectiveOrder,"object with memory",true,
[IsObjWithMemory],0,
function(a)
Expand Down
6 changes: 6 additions & 0 deletions tst/testinstall/matrix.tst
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,9 @@ gap> IsLowerTriangularMat([[1,0],[1,1]]);
true
gap> IsLowerTriangularMat([[1,1],[0,1]]);
false

#
gap> m := Z(5)^0 * [[0, 1], [1, 0]];;
gap> m := GeneratorsWithMemory([m])[1];;
gap> BaseDomain(m) = GF(5);
true

0 comments on commit 74006cb

Please sign in to comment.