Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Turn BaseField into a synonym of BaseDomain (DO NOT MERGE) #3562

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
7 changes: 1 addition & 6 deletions hpcgap/lib/vec8bit.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1170,11 +1170,6 @@ InstallMethod( ConstructingFilter, "for an 8bit vector",
InstallMethod( ConstructingFilter, "for an 8bit matrix",
[ Is8BitMatrixRep ], function(v) return Is8BitMatrixRep; end );

InstallMethod( BaseField, "for a compressed 8bit matrix",
[Is8BitMatrixRep], function(m) return DefaultFieldOfMatrix(m); end );
InstallMethod( BaseField, "for a compressed 8bit vector",
[Is8BitVectorRep], function(v) return GF(Q_VEC8BIT(v)); end );

InstallMethod( NewVector, "for Is8BitVectorRep, GF(q), and a list",
[ Is8BitVectorRep, IsField and IsFinite, IsList ],
function( filter, f, l )
Expand Down Expand Up @@ -1228,7 +1223,7 @@ InstallMethod( IdentityMatrix, "for a compressed 8bit matrix",
[IsInt, Is8BitMatrixRep],
function(rows,m)
local f,n;
f := BaseField(m);
f := BaseDomain(m);
n := IdentityMat(rows,f);
ConvertToMatrixRep(n,Size(f));
return n;
Expand Down
5 changes: 0 additions & 5 deletions hpcgap/lib/vecmat.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2491,11 +2491,6 @@ InstallMethod( ConstructingFilter, "for a gf2 vector",
InstallMethod( ConstructingFilter, "for a gf2 matrix",
[ IsGF2MatrixRep ], function(v) return IsGF2MatrixRep; end );

InstallMethod( BaseField, "for a compressed gf2 matrix",
[IsGF2MatrixRep], function(m) return GF(2); end );
InstallMethod( BaseField, "for a compressed gf2 vector",
[IsGF2VectorRep], function(v) return GF(2); end );

InstallMethod( NewVector, "for IsGF2VectorRep, GF(2), and a list",
[ IsGF2VectorRep, IsField and IsFinite, IsList ],
function( filter, f, l )
Expand Down
2 changes: 1 addition & 1 deletion lib/algfld.gi
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ end);
#############################################################################
##
#F AlgExtElm A `nicer' ObjByExtRep, that shrinks/grows a list to the
## correct length and tries to get to the BaseField
## correct length and tries to get to the base field
## representation
##
BindGlobal("AlgExtElm",function(fam,e)
Expand Down
7 changes: 7 additions & 0 deletions lib/matobj2.gd
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,13 @@ DeclareAttribute( "BaseDomain", IsMatrixObj );
# nor associative. For non-associative base domains, the behavior of
# powering matrices is undefined.

# HACK: BaseField used to be defined in matrix.gd, as a kind of predecessor
# to BaseDomain; we keep it around here for backwards compatibility with
# older versions of the cvec package. It should be removed eventually.
DeclareSynonymAttr( "BaseField", BaseDomain );



DeclareAttribute( "NumberRows", IsMatrixObj );
DeclareAttribute( "NumberColumns", IsMatrixObj );
DeclareSynonymAttr( "NrRows", NumberRows );
Expand Down
18 changes: 0 additions & 18 deletions lib/matrix.gd
Original file line number Diff line number Diff line change
Expand Up @@ -1999,24 +1999,6 @@ DeclareOperation("FieldOfMatrixList",[IsListOrCollection]);
DeclareOperation("DefaultScalarDomainOfMatrixList",[IsListOrCollection]);


#############################################################################
##
#O BaseField( <matrixorvector> )
##
## <ManSection>
## <Oper Name="BaseField" Arg='matrixorvector'/>
##
## <Description>
## returns the base field of a matrix or a vector. This is only defined
## for wrapped matrices and vectors, not for plain lists. That is, for
## a plain list the operation returns fail. It is guaranteed
## that a call to this operation is only a very fast lookup.
## </Description>
## </ManSection>
##
DeclareOperation("BaseField",[IsObject]);


#############################################################################
##
#O ZeroVector( <len>, <vector> )
Expand Down
7 changes: 1 addition & 6 deletions lib/vec8bit.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1127,11 +1127,6 @@ InstallMethod( ConstructingFilter, "for an 8bit vector",
InstallMethod( ConstructingFilter, "for an 8bit matrix",
[ Is8BitMatrixRep ], function(v) return Is8BitMatrixRep; end );

InstallMethod( BaseField, "for a compressed 8bit matrix",
[Is8BitMatrixRep], function(m) return DefaultFieldOfMatrix(m); end );
InstallMethod( BaseField, "for a compressed 8bit vector",
[Is8BitVectorRep], function(v) return GF(Q_VEC8BIT(v)); end );

InstallMethod( NewVector, "for Is8BitVectorRep, GF(q), and a list",
[ Is8BitVectorRep, IsField and IsFinite, IsList ],
function( filter, f, l )
Expand Down Expand Up @@ -1188,7 +1183,7 @@ InstallMethod( IdentityMatrix, "for a compressed 8bit matrix",
[IsInt, Is8BitMatrixRep],
function(rows,m)
local f,n;
f := BaseField(m);
f := BaseDomain(m);
n := IdentityMat(rows,f);
ConvertToMatrixRep(n,Size(f));
return n;
Expand Down
5 changes: 0 additions & 5 deletions lib/vecmat.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2314,11 +2314,6 @@ InstallMethod( ConstructingFilter, "for a gf2 vector",
InstallMethod( ConstructingFilter, "for a gf2 matrix",
[ IsGF2MatrixRep ], function(v) return IsGF2MatrixRep; end );

InstallMethod( BaseField, "for a compressed gf2 matrix",
[IsGF2MatrixRep], function(m) return GF(2); end );
InstallMethod( BaseField, "for a compressed gf2 vector",
[IsGF2VectorRep], function(v) return GF(2); end );

InstallMethod( NewVector, "for IsGF2VectorRep, GF(2), and a list",
[ IsGF2VectorRep, IsField and IsFinite, IsList ],
function( filter, f, l )
Expand Down