Skip to content

Commit

Permalink
matrix: replace IsMatrixOverFiniteField -> MatrixObj x 10
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed Jun 24, 2022
1 parent bc2f7b2 commit 2f1f179
Show file tree
Hide file tree
Showing 17 changed files with 64 additions and 745 deletions.
191 changes: 15 additions & 176 deletions doc/ffmat.xml
Original file line number Diff line number Diff line change
@@ -1,115 +1,13 @@
#############################################################################
##
#W matrix.xml
#Y Copyright (C) 2014-2015
#W ffmat.xml
#Y Copyright (C) 2014-2022
##
## Licensing information can be found in the README file of this package.
##
#############################################################################

<#GAPDoc Label="IsMatrixOverFiniteFieldCollection">
<ManSection>
<Filt Name="IsMatrixOverFiniteFieldCollection" Arg="obj" Type="Category"/>
<Returns><K>true</K> or <K>false</K>.</Returns>
<Description>
Every collection of matrices in the category
<Ref Filt="IsMatrixOverFiniteField"/> belongs to the category
<C>IsMatrixOverFiniteFieldCollection</C>. For example, matrix semigroup
belong to <C>IsMatrixOverFiniteFieldCollection</C>.
</Description>
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="IsMatrixOverFiniteField">
<ManSection>
<Filt Name="IsMatrixOverFiniteField" Arg="obj" Type="Category"/>
<Returns><K>true</K> or <K>false</K>.</Returns>
<Description>
This category contains &SEMIGROUPS; matrix object wrapper. The
introduction of this filter was necessary to get around &GAP;
limitations with regards to matrices and associative objects.<P/>

The behaviour of this object type might be changed or removed
completely from the package in the future.

<Example><![CDATA[
gap> x := Z(4) * [[1, 0], [0, 2]];
[ [ Z(2^2), 0*Z(2) ], [ 0*Z(2), 0*Z(2) ] ]
gap> IsMatrixOverFiniteField(x);
false
gap> y := Matrix(GF(4), x);
Matrix(GF(2^2), [[Z(2^2), 0*Z(2)], [0*Z(2), 0*Z(2)]])
gap> IsMatrixOverFiniteField(y);
true]]></Example>
</Description>
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="NewMatrixOverFiniteField">
<ManSection>
<Oper Name="NewMatrixOverFiniteField" Arg="filt, F, rows"
Label="for a filter, a field, an integer, and a list"/>
<Returns>a new matrix object.</Returns>
<Description>
Creates a new <A>n</A>-by-<A>n</A> matrix over the finite field <A>F</A>
with constructing filter <A>filt</A>. The matrix itself is given by a list
<A>rows</A> of rows. Currently the only possible value for <A>filt</A> is
<C>IsPlistMatrixOverFiniteFieldRep</C>.
<Example><![CDATA[
gap> x := NewMatrixOverFiniteField(IsPlistMatrixOverFiniteFieldRep,
> GF(4),
> Z(4) * [[1, 0], [0, 1]]);
Matrix(GF(2^2), [[Z(2^2), 0*Z(2)], [0*Z(2), Z(2^2)]])
gap> y := NewMatrixOverFiniteField(IsPlistMatrixOverFiniteFieldRep,
> GF(4),
> []);
Matrix(GF(2^2), [])]]></Example>
</Description>
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="IdentityMatrixOverFiniteField">
<ManSection>
<Oper Name="IdentityMatrixOverFiniteField" Arg="F, n"
Label = "for a finite field and a pos int" />
<Oper Name="IdentityMatrixOverFiniteField" Arg="mat, n"
Label = "for a matrix over finite field and pos int" />
<Description>
Given a finite field <A>F</A> and a positive integer <A>n</A>, this
operation returns an <A>n</A>-by-<A>n</A> identity matrix with entries in
the finite field <A>F</A>. If instead the first argument is an
<A>n</A>-by-<A>n</A> matrix <A>mat</A> whose <Ref Oper = "BaseDomain" Label
= "for a matrix over finite field" /> is a finite field <A>F</A>, then
<C>IdentityMatrixOverFiniteField(<A>mat</A>, <A>n</A>)</C> returns the same
as <C>IdentityMatrixOverFiniteField(<A>F</A>, <A>n</A>)</C>.
<Example><![CDATA[
gap> x := NewIdentityMatrixOverFiniteField(
> IsPlistMatrixOverFiniteFieldRep, GF(4), 2);
Matrix(GF(2^2), [[Z(2)^0, 0*Z(2)], [0*Z(2), Z(2)^0]])
gap> y := NewZeroMatrixOverFiniteField(IsPlistMatrixOverFiniteFieldRep,
> GF(4), 2);
Matrix(GF(2^2), [[0*Z(2), 0*Z(2)], [0*Z(2), 0*Z(2)]])]]></Example>
</Description>
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="NewIdentityMatrixOverFiniteField">
<ManSection>
<Oper Name="NewIdentityMatrixOverFiniteField" Arg="filt, F, n"/>
<Oper Name="NewZeroMatrixOverFiniteField" Arg="filt, F, n"/>
<Description>
Creates a new <A>n</A>-by-<A>n</A> zero or identity matrix with entries
in the finite field <A>F</A>.
<Example><![CDATA[
gap> x := NewIdentityMatrixOverFiniteField(
> IsPlistMatrixOverFiniteFieldRep, GF(4), 2);
Matrix(GF(2^2), [[Z(2)^0, 0*Z(2)], [0*Z(2), Z(2)^0]])
gap> y := NewZeroMatrixOverFiniteField(IsPlistMatrixOverFiniteFieldRep,
> GF(4), 2);
Matrix(GF(2^2), [[0*Z(2), 0*Z(2)], [0*Z(2), 0*Z(2)]])]]></Example>
</Description>
</ManSection>
<#/GAPDoc>
<!-- TODO(MatrixObj) update this section -->

<#GAPDoc Label="RowSpaceBasis">
<ManSection>
Expand All @@ -127,8 +25,8 @@ Matrix(GF(2^2), [[0*Z(2), 0*Z(2)], [0*Z(2), 0*Z(2)]])]]></Example>
of <C>RowSpaceTransformation(m)</C>.
<Example><![CDATA[
gap> x := Matrix(GF(4), Z(4) ^ 0 * [[1, 1, 0], [0, 1, 1], [1, 1, 1]]);
Matrix(GF(2^2), [[Z(2)^0, Z(2)^0, 0*Z(2)], [0*Z(2), Z(2)^0, Z(2)^0],
[Z(2)^0, Z(2)^0, Z(2)^0]])
[ [ Z(2)^0, Z(2)^0, 0*Z(2) ], [ 0*Z(2), Z(2)^0, Z(2)^0 ],
[ Z(2)^0, Z(2)^0, Z(2)^0 ] ]
gap> RowSpaceBasis(x);
<rowbasis of rank 3 over GF(2^2)>
gap> RowSpaceTransformation(x);
Expand All @@ -148,15 +46,16 @@ gap> RowSpaceTransformation(x);
right-inverse of the matrix <A>m</A> respectively.
<Example><![CDATA[
gap> x := Matrix(GF(4), Z(4) ^ 0 * [[1, 1, 0], [0, 0, 0], [1, 1, 1]]);
Matrix(GF(2^2), [[Z(2)^0, Z(2)^0, 0*Z(2)], [0*Z(2), 0*Z(2), 0*Z(2)],
[Z(2)^0, Z(2)^0, Z(2)^0]])
[ [ Z(2)^0, Z(2)^0, 0*Z(2) ], [ 0*Z(2), 0*Z(2), 0*Z(2) ],
[ Z(2)^0, Z(2)^0, Z(2)^0 ] ]
gap> LeftInverse(x);
Matrix(GF(2^2), [[Z(2)^0, Z(2)^0, 0*Z(2)], [0*Z(2), 0*Z(2), 0*Z(2)],
[Z(2)^0, 0*Z(2), Z(2)^0]])
[ [ Z(2)^0, Z(2)^0, 0*Z(2) ], [ 0*Z(2), 0*Z(2), 0*Z(2) ],
[ Z(2)^0, 0*Z(2), Z(2)^0 ] ]
gap> Display(LeftInverse(x) * x);
Z(2)^0 Z(2)^0 0*Z(2)
0*Z(2) 0*Z(2) 0*Z(2)
0*Z(2) 0*Z(2) Z(2)^0]]></Example>
1 1 .
. . .
. . 1
]]></Example>
</Description>
</ManSection>
<#/GAPDoc>
Expand All @@ -168,70 +67,10 @@ Z(2)^0 Z(2)^0 0*Z(2)
<Description>
<Example><![CDATA[
gap> x := Matrix(GF(5), Z(5) ^ 0 * [[1, 1, 0], [0, 0, 0], [1, 1, 1]]);
Matrix(GF(5), [[Z(5)^0, Z(5)^0, 0*Z(5)], [0*Z(5), 0*Z(5), 0*Z(5)],
[Z(5)^0, Z(5)^0, Z(5)^0]])
[ [ Z(5)^0, Z(5)^0, 0*Z(5) ], [ 0*Z(5), 0*Z(5), 0*Z(5) ],
[ Z(5)^0, Z(5)^0, Z(5)^0 ] ]
gap> RowRank(x);
2]]></Example>
</Description>
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="BaseDomain">
<ManSection>
<Attr Name="BaseDomain" Arg="mat" Label="for a matrix over finite field"/>
<Returns>
If <A>mat</A> is a matrix over a finite field (in the category <Ref Filt
= "IsMatrixOverSemiring"/>), then <C>BaseDomain</C> returns the finite
field specified at the point that <A>mat</A> was created. Every entry in
the matrix <A>mat</A> belongs to <C>BaseDomain(<A>mat</A>)</C>.
</Returns>
<Description>
<Example><![CDATA[
gap> x := Matrix(GF(5), Z(5) ^ 0 * [[1, 1, 0], [0, 0, 0], [1, 1, 1]]);
Matrix(GF(5), [[Z(5)^0, Z(5)^0, 0*Z(5)], [0*Z(5), 0*Z(5), 0*Z(5)],
[Z(5)^0, Z(5)^0, Z(5)^0]])
gap> BaseDomain(x);
GF(5)]]></Example>
</Description>
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="TransposedMatImmutable">
<ManSection>
<Attr Name="TransposedMatImmutable" Arg="m"
Label="for a matrix over finite field"/>
<Returns>
An immutable matrix.
</Returns>
<Description>
This attribute contains an immutable copy of <A>m</A>. Note that matrices
are immutable by default.
<Example><![CDATA[
gap> x := Matrix(GF(5), Z(5) ^ 0 * [[1, 1, 0], [0, 0, 0], [1, 1, 1]]);
Matrix(GF(5), [[Z(5)^0, Z(5)^0, 0*Z(5)], [0*Z(5), 0*Z(5), 0*Z(5)],
[Z(5)^0, Z(5)^0, Z(5)^0]])
gap> TransposedMatImmutable(x);
Matrix(GF(5), [[Z(5)^0, 0*Z(5), Z(5)^0], [Z(5)^0, 0*Z(5), Z(5)^0],
[0*Z(5), 0*Z(5), Z(5)^0]])]]></Example>
</Description>
</ManSection>
<#/GAPDoc>

<!--<#GAPDoc Label="ConstructingFilter">
<ManSection>
<Oper Name="ConstructingFilter" Arg="m" Label="for a matrix over finite field"/>
<Returns>A filter</Returns>
<Description>
Return the filter that was passed to
<Ref Oper="NewMatrixOverFiniteField" Label="for a filter, a field, an
integer, and a list"/>
when creating the matrix <A>m</A>. This is used to create new objects that
lie in the same filter.
<Example><![CDATA[
gap> x := Matrix(GF(4), Z(4) ^ 0 * [[1, 1, 0], [0, 0, 0], [1, 1, 1]]);
gap> ConstructingFilter(x);
<Representation "IsPlistMatrixOverFiniteFieldRep">
]]></Example>
</Description>
</ManSection>
<#/GAPDoc>-->
10 changes: 5 additions & 5 deletions doc/greens-generic.xml
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ gap> Size(L);
1
gap> x := PartialPerm([2, 3, 4, 5, 0, 0, 6, 8, 10, 11]);;
gap> L := LClass(POI(11), x);
<Green's L-class: [1,2,3,4,5,6,8,11][7,10]>
<Green's L-class: [1,2,3,4,5][7,6][9,10,11](8)>
gap> Size(L);
165]]></Example>
</Description>
Expand Down Expand Up @@ -547,9 +547,9 @@ gap> L := GreensLClassOfElement(S, Transformation([3, 1, 1, 3]));;
gap> AsSet(Idempotents(L));
[ Transformation( [ 1, 1, 3, 3 ] ), Transformation( [ 1, 3, 3, 1 ] ) ]
gap> H := GroupHClass(D);
<Green's H-class: Transformation( [ 1, 1, 3, 3 ] )>
<Green's H-class: Transformation( [ 1, 3, 3, 1 ] )>
gap> Idempotents(H);
[ Transformation( [ 1, 1, 3, 3 ] ) ]
[ Transformation( [ 1, 3, 3, 1 ] ) ]
gap> S := InverseSemigroup(
> PartialPerm([10, 6, 3, 4, 9, 0, 1]),
> PartialPerm([6, 10, 7, 4, 8, 2, 9, 1]));;
Expand Down Expand Up @@ -783,7 +783,7 @@ gap> Size(S);
6342
gap> x := Transformation([1, 3, 3, 1, 3, 5]);;
gap> D := DClass(S, x);
<Green's D-class: Transformation( [ 2, 4, 2, 2, 2, 1 ] )>
<Green's D-class: Transformation( [ 1, 3, 3, 1, 3, 5 ] )>
gap> NrRClasses(D);
87
gap> S := SymmetricInverseSemigroup(10);;
Expand Down Expand Up @@ -885,7 +885,7 @@ gap> NrRegularDClasses(S);
gap> NrDClasses(S);
7
gap> AsSet(RegularDClasses(S));
[ <Green's D-class: Transformation( [ 1, 3, 4, 1, 3, 3 ] )>,
[ <Green's D-class: Transformation( [ 1, 4, 1, 1, 4, 3 ] )>,
<Green's D-class: Transformation( [ 1, 1, 1, 1, 1 ] )>,
<Green's D-class: Transformation( [ 1, 1, 1, 1, 1, 1 ] )> ]]]></Example>
</Description>
Expand Down
101 changes: 0 additions & 101 deletions doc/grpffmat.xml

This file was deleted.

2 changes: 1 addition & 1 deletion doc/ideals.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ gap> S := FullTransformationSemigroup(8);
<full transformation monoid of degree 8>
gap> x := Transformation([2, 6, 7, 2, 6, 1, 1, 5]);;
gap> D := DClass(S, x);
<Green's D-class: Transformation( [ 6, 3, 4, 6, 3, 5, 5, 1 ] )>
<Green's D-class: Transformation( [ 2, 6, 7, 2, 6, 1, 1, 5 ] )>
gap> R := PrincipalFactor(D);
<Rees 0-matrix semigroup 1050x56 over Group([ (2,8,7,4,3), (3,4) ])>
gap> S := Semigroup(List([1 .. 10], x -> Random(R)));
Expand Down
Loading

0 comments on commit 2f1f179

Please sign in to comment.