-
Notifications
You must be signed in to change notification settings - Fork 163
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
FIX: Add IsBiCoset #2666
FIX: Add IsBiCoset #2666
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -320,6 +320,24 @@ DeclareAttribute( "RepresentativesContainedRightCosets", IsDoubleCoset ); | |
DeclareCategory("IsRightCoset", IsDomain and IsExternalOrbit and | ||
IsMultiplicativeElementWithInverse); | ||
|
||
############################################################################# | ||
## | ||
#P IsBiCoset( <C> ) | ||
## | ||
## <#GAPDoc Label="IsBiCoset"> | ||
## <ManSection> | ||
## <Prop Name="IsBiCoset" Arg='C'/> | ||
## | ||
## <Description> | ||
## A (right) cose is considered a <E>bicoset</E> if its set of elements simultaneously forms a left | ||
## coset for the same subgroup. This is the case, for example, if the coset representative normalizes | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why "for example"? This is an equivalence, isn't it? |
||
## the subgroup. | ||
## </Description> | ||
## </ManSection> | ||
## <#/GAPDoc> | ||
## | ||
DeclareProperty( "IsBiCoset", IsRightCoset ); | ||
|
||
############################################################################# | ||
## | ||
#O RightCoset( <U>, <g> ) | ||
|
@@ -353,6 +371,8 @@ DeclareCategory("IsRightCoset", IsDomain and IsExternalOrbit and | |
## 6 | ||
## gap> AsList(c); | ||
## [ (2,3,4), (1,4,2), (1,3,4,2), (1,3)(2,4), (2,4), (1,4,2,3) ] | ||
## gap> IsBiCoset(c); | ||
## false | ||
## ]]></Example> | ||
## </Description> | ||
## </ManSection> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -629,6 +629,14 @@ function(d) | |
Print(ViewString(d)); | ||
end); | ||
|
||
InstallMethod(IsBiCoset,"test property",true,[IsRightCoset],0, | ||
function(c) | ||
local s,r; | ||
s:=ActingDomain(c); | ||
r:=Representative(c); | ||
return ForAll(GeneratorsOfGroup(s),x->r*x/r in s); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps test for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, if this ever could be time-critical this has the potential to be faster. I decided on the inverse-conjugation as it translated directly to the condition as I had written it doen on paper. |
||
end); | ||
|
||
InstallMethodWithRandomSource(Random, | ||
"for a random source and a RightCoset", | ||
[IsRandomSource, IsRightCoset],0, | ||
|
@@ -656,10 +664,17 @@ end); | |
InstallOtherMethod(\*,"RightCosets",IsIdenticalObj, | ||
[IsRightCoset,IsRightCoset],0, | ||
function(a,b) | ||
if ActingDomain(a)<>ActingDomain(b) then | ||
Error("no multiplication defined for cosets of different subgroups"); | ||
local c; | ||
if ActingDomain(a)<>ActingDomain(b) then TryNextMethod();fi; | ||
if not IsBiCoset(a) then # product does not require b to be bicoset | ||
TryNextMethod(); | ||
fi; | ||
c:=RightCoset(ActingDomain(a), Representative(a) * Representative(b) ); | ||
if IsBiCoset(b) then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps first check HasIsBicoset to avoid a computation? |
||
SetIsBiCoset(c,true); | ||
fi; | ||
return RightCoset(ActingDomain(a), Representative(a) * Representative(b) ); | ||
|
||
return c; | ||
end); | ||
|
||
InstallOtherMethod(InverseOp,"Right cosets",true, | ||
|
@@ -668,10 +683,12 @@ function(a) | |
local s,r; | ||
s:=ActingDomain(a); | ||
r:=Representative(a); | ||
if ForAny(GeneratorsOfGroup(s),x->not x^r in s) then | ||
if not IsBiCoset(a) then | ||
Error("Inversion only works for cosets of normal subgroups"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That error message is wrong (though of course it was before, too) |
||
fi; | ||
return RightCoset(s,Inverse(r)); | ||
r:=RightCoset(s,Inverse(r)); | ||
SetIsBiCoset(r,true); | ||
return r; | ||
end); | ||
|
||
InstallOtherMethod(OneOp,"Right cosets",true, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: coset