Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions lib/matrix.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1253,6 +1253,23 @@ function( mat )
end );


#############################################################################
##
#M DefaultFieldOfMatrix( <algext-mat> )
##
InstallMethod( DefaultFieldOfMatrix,
[ "IsMatrix and IsAlgebraicElementCollColl" ],
function( mat )
local fam;

fam:= ElementsFamily( ElementsFamily( FamilyObj( mat) ) );
if not IsBound( fam!.wholeExtension ) then
TryNextMethod();
fi;
return fam!.wholeExtension;
end );


#############################################################################
##
#M BaseDomain( <v> )
Expand Down
4 changes: 4 additions & 0 deletions tst/testinstall/vecmat.tst
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ gap> m = w;
true
gap> IsMutable(w);
false
gap> DefaultFieldOfMatrix( m ) = F;
true
gap> CharacteristicPolynomial( m );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should also add an explicit test of DefaultFieldOfMatrix(m) ?

x_1^3-!Z(3)^0

# identity matrix over a ring with zero divisors
gap> F := Integers mod 6;; m := IdentityMat( 3, F );
Expand Down
Loading