Skip to content

Commit

Permalink
InstallValue on types leads to incorrect behavior
Browse files Browse the repository at this point in the history
So don't do it, see gap-system/gap#1637

Also remove some unused families.
  • Loading branch information
fingolfin authored and vendramin committed Mar 8, 2024
1 parent f8604b8 commit 55f7cb9
Show file tree
Hide file tree
Showing 15 changed files with 5 additions and 19 deletions.
1 change: 0 additions & 1 deletion lib/brace.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
DeclareCategory("IsBrace", IsAttributeStoringRep);
DeclareGlobalVariable("BraceType");

### To create/recognize braces
DeclareOperation("Brace", [IsList]);
Expand Down
2 changes: 1 addition & 1 deletion lib/brace.gi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### braces
BindGlobal("BraceFamily", NewFamily("BraceFamily"));
InstallValue(BraceType, NewType(BraceFamily, IsBrace));
BindGlobal("BraceType", NewType(BraceFamily, IsBrace));

InstallMethod(Brace, "for a list of pairs of elements in a group", [IsList],
function(p)
Expand Down
1 change: 0 additions & 1 deletion lib/cycleset.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ DeclareCategory("IsCycleSetElm", IsMultiplicativeElement);
DeclareRepresentation( "IsCycleSetElmRep", IsPositionalObjectRep, [ 1 ]);
DeclareOperation("CycleSetElmConstructor", [IsCycleSet, IsInt]);

#DeclareGlobalVariable("CycleSetType");
BindGlobal("CycleSetElmFamily", NewFamily("CycleSetElmFamily", IsCycleSetElm));
BindGlobal("CycleSetElmType", NewType(CycleSetElmFamily, IsCycleSetElm));
BindGlobal("CycleSetType", NewType(CollectionsFamily( CycleSetElmFamily ), IsCycleSet and IsAttributeStoringRep));
Expand Down
2 changes: 0 additions & 2 deletions lib/cycleset.gi
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
### cycle sets
BindGlobal("CycleSetFamily", NewFamily("CycleSetFamily"));
#InstallValue(CycleSetType, NewType(CycleSetFamily, IsCycleSet));

### This function returns the cycle set associated with the action given <matrix>
InstallMethod(CycleSet, "for a matrix", [IsList],
Expand Down
1 change: 0 additions & 1 deletion lib/linear.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
DeclareCategory("IsLinearCycleSet", IsAttributeStoringRep);
DeclareGlobalVariable("LinearCycleSetType");

### To create/recognize braces
DeclareOperation("LinearCycleSet", [IsList, IsMatrix]);
Expand Down
2 changes: 1 addition & 1 deletion lib/linear.gi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### linear cycle sets
BindGlobal("LinearCycleSetFamily", NewFamily("LinearCycleSetFamily"));
InstallValue(LinearCycleSetType, NewType(LinearCycleSetFamily, IsLinearCycleSet));
BindGlobal("LinearCycleSetType", NewType(LinearCycleSetFamily, IsLinearCycleSet));

InstallMethod(LinearCycleSet, "for the list of elements of a group and a matrix", [IsList, IsMatrix],
function(l, m)
Expand Down
1 change: 0 additions & 1 deletion lib/qlinear.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
DeclareCategory("IsQLCycleSet", IsAttributeStoringRep);
DeclareGlobalVariable("QLCycleSetType");

DeclareOperation("QLCycleSet", [IsList, IsMatrix]);
DeclareOperation("SmallQLCycleSet", [IsInt, IsInt]);
Expand Down
2 changes: 1 addition & 1 deletion lib/qlinear.gi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### quasilinear cycle sets
BindGlobal("QLCycleSetFamily", NewFamily("QLCycleSetFamily"));
InstallValue(QLCycleSetType, NewType(QLCycleSetFamily, IsQLCycleSet));
BindGlobal("QLCycleSetType", NewType(QLCycleSetFamily, IsQLCycleSet));

InstallMethod(QLCycleSet, "for the list of elements of a group and a matrix", [IsList, IsMatrix],
function(l, m)
Expand Down
2 changes: 0 additions & 2 deletions lib/rack.gd
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ BindGlobal("RackElmFamily", NewFamily("RackElmFamily", IsRackElm));
BindGlobal("RackElmType", NewType(RackElmFamily, IsRackElm));
BindGlobal("RackType", NewType(CollectionsFamily( RackElmFamily ), IsRack and IsAttributeStoringRep));

#DeclareGlobalVariable("RackType");

### To create/recognize racks
DeclareOperation("Rack", [IsList]);
DeclareAttribute("Rack2YB", IsRack);
Expand Down
2 changes: 0 additions & 2 deletions lib/rack.gi
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
### racks
BindGlobal("RackFamily", NewFamily("RackFamily"));
#InstallValue(RackType, NewType(RackFamily, IsRack));

InstallMethod(Rack, "for a matrix", [ IsMatrix ],
function(matrix)
Expand Down
2 changes: 0 additions & 2 deletions lib/skew.gi
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
### skew braces
BindGlobal("SkewbraceFamily", NewFamily("SkewbraceFamily"));
#InstallValue(SkewbraceType, NewType(SkewbraceFamily, IsSkewbrace));

InstallMethod(Skewbrace, "for a list of pairs of elements in a group", [IsList],
function(p)
Expand Down
1 change: 0 additions & 1 deletion lib/tau.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
DeclareCategory("IsTauGroup", IsAttributeStoringRep);
DeclareGlobalVariable("TauGroupType");

DeclareOperation("TauGroup", [IsList, IsPerm]);
DeclareOperation("SmallTauGroup", [IsInt, IsInt]);
Expand Down
2 changes: 1 addition & 1 deletion lib/tau.gi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### quasilinear cycle sets
BindGlobal("TauGroupFamily", NewFamily("TauGroupFamily"));
InstallValue(TauGroupType, NewType(TauGroupFamily, IsTauGroup));
BindGlobal("TauGroupType", NewType(TauGroupFamily, IsTauGroup));

InstallMethod(TauGroup, "for the list of elements of a group and a permutation", [IsList, IsPerm],
function(l, p)
Expand Down
1 change: 0 additions & 1 deletion lib/ybe.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#! @Section Braces and Yang-Baxter Equation

DeclareCategory("IsYB", IsAttributeStoringRep);
DeclareGlobalVariable("YBType");

DeclareOperation("SmallIYB", [IsInt, IsInt]);
DeclareOperation("YB", [IsList, IsList]);
Expand Down
2 changes: 1 addition & 1 deletion lib/ybe.gi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BindGlobal("YBFamily", NewFamily("YBFamily"));
InstallValue(YBType, NewType(YBFamily, IsYB));
BindGlobal("YBType", NewType(YBFamily, IsYB));

### This function returns the set-theoretic solution given by the permutations <l_actions> and <r_actions>
### <l_action> and <r_action> are matrices!
Expand Down

0 comments on commit 55f7cb9

Please sign in to comment.