From b274c5ffb26cf190e8ade9ef87c8ec48f37ae36d Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 10 Jan 2024 09:48:14 +0100 Subject: [PATCH] InstallValue on types leads to incorrect behavior So don't do it, see https://github.com/gap-system/gap/issues/1637 Also remove some unused families. --- lib/brace.gd | 1 - lib/brace.gi | 2 +- lib/cycleset.gd | 1 - lib/cycleset.gi | 2 -- lib/linear.gd | 1 - lib/linear.gi | 2 +- lib/qlinear.gd | 1 - lib/qlinear.gi | 2 +- lib/rack.gd | 2 -- lib/rack.gi | 2 -- lib/skew.gi | 2 -- lib/tau.gd | 1 - lib/tau.gi | 2 +- lib/ybe.gd | 1 - lib/ybe.gi | 2 +- 15 files changed, 5 insertions(+), 19 deletions(-) diff --git a/lib/brace.gd b/lib/brace.gd index 3e55c5f..b8d530c 100644 --- a/lib/brace.gd +++ b/lib/brace.gd @@ -1,5 +1,4 @@ DeclareCategory("IsBrace", IsAttributeStoringRep); -DeclareGlobalVariable("BraceType"); ### To create/recognize braces DeclareOperation("Brace", [IsList]); diff --git a/lib/brace.gi b/lib/brace.gi index d689cdc..2e54ca1 100644 --- a/lib/brace.gi +++ b/lib/brace.gi @@ -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) diff --git a/lib/cycleset.gd b/lib/cycleset.gd index ee47b75..e9fc4fa 100644 --- a/lib/cycleset.gd +++ b/lib/cycleset.gd @@ -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)); diff --git a/lib/cycleset.gi b/lib/cycleset.gi index 2896087..f4dd46b 100644 --- a/lib/cycleset.gi +++ b/lib/cycleset.gi @@ -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 InstallMethod(CycleSet, "for a matrix", [IsList], diff --git a/lib/linear.gd b/lib/linear.gd index 39efce8..1b871a0 100644 --- a/lib/linear.gd +++ b/lib/linear.gd @@ -1,5 +1,4 @@ DeclareCategory("IsLinearCycleSet", IsAttributeStoringRep); -DeclareGlobalVariable("LinearCycleSetType"); ### To create/recognize braces DeclareOperation("LinearCycleSet", [IsList, IsMatrix]); diff --git a/lib/linear.gi b/lib/linear.gi index f8da8cf..b5fae3f 100644 --- a/lib/linear.gi +++ b/lib/linear.gi @@ -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) diff --git a/lib/qlinear.gd b/lib/qlinear.gd index e5d9e6d..af1eaab 100644 --- a/lib/qlinear.gd +++ b/lib/qlinear.gd @@ -1,5 +1,4 @@ DeclareCategory("IsQLCycleSet", IsAttributeStoringRep); -DeclareGlobalVariable("QLCycleSetType"); DeclareOperation("QLCycleSet", [IsList, IsMatrix]); DeclareOperation("SmallQLCycleSet", [IsInt, IsInt]); diff --git a/lib/qlinear.gi b/lib/qlinear.gi index 7c12768..9d7f3d9 100644 --- a/lib/qlinear.gi +++ b/lib/qlinear.gi @@ -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) diff --git a/lib/rack.gd b/lib/rack.gd index c4963ca..d0c7b11 100644 --- a/lib/rack.gd +++ b/lib/rack.gd @@ -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); diff --git a/lib/rack.gi b/lib/rack.gi index 7146514..a3a7007 100644 --- a/lib/rack.gi +++ b/lib/rack.gi @@ -1,6 +1,4 @@ ### racks -BindGlobal("RackFamily", NewFamily("RackFamily")); -#InstallValue(RackType, NewType(RackFamily, IsRack)); InstallMethod(Rack, "for a matrix", [ IsMatrix ], function(matrix) diff --git a/lib/skew.gi b/lib/skew.gi index 0194695..df45f7c 100644 --- a/lib/skew.gi +++ b/lib/skew.gi @@ -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) diff --git a/lib/tau.gd b/lib/tau.gd index 9a62a15..de81aaa 100644 --- a/lib/tau.gd +++ b/lib/tau.gd @@ -1,5 +1,4 @@ DeclareCategory("IsTauGroup", IsAttributeStoringRep); -DeclareGlobalVariable("TauGroupType"); DeclareOperation("TauGroup", [IsList, IsPerm]); DeclareOperation("SmallTauGroup", [IsInt, IsInt]); diff --git a/lib/tau.gi b/lib/tau.gi index 4d6809a..b916923 100644 --- a/lib/tau.gi +++ b/lib/tau.gi @@ -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) diff --git a/lib/ybe.gd b/lib/ybe.gd index 3837a13..94ac9a8 100644 --- a/lib/ybe.gd +++ b/lib/ybe.gd @@ -2,7 +2,6 @@ #! @Section Braces and Yang-Baxter Equation DeclareCategory("IsYB", IsAttributeStoringRep); -DeclareGlobalVariable("YBType"); DeclareOperation("SmallIYB", [IsInt, IsInt]); DeclareOperation("YB", [IsList, IsList]); diff --git a/lib/ybe.gi b/lib/ybe.gi index 04f4309..836c5a5 100644 --- a/lib/ybe.gi +++ b/lib/ybe.gi @@ -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 and ### and are matrices!