Skip to content

Commit

Permalink
next iteration
Browse files Browse the repository at this point in the history
- name changes as suggested in the comments
- use `GAPWrap` where possible
- change the `show` method (no newline in the end, fewer linebreaks)
- do not call `_oscar_group`
- add `Base.in` method
- add `straight_line_program` for recognition trees (and for GAP slps)
- add a few tests
- add initial documentation of group recognition
  • Loading branch information
ThomasBreuer committed Jun 13, 2024
1 parent a27b075 commit d4200b0
Show file tree
Hide file tree
Showing 8 changed files with 262 additions and 61 deletions.
1 change: 1 addition & 0 deletions docs/doc.main
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"Groups/grouplib.md",
"Hecke/abelian/introduction.md",
"Groups/group_characters.md",
"Groups/recog.md",
],

"Rings" => [
Expand Down
27 changes: 27 additions & 0 deletions docs/src/Groups/recog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
```@meta
CurrentModule = Oscar
DocTestSetup = Oscar.doctestsetup()
```

# Group recognition

The idea of constructive group recognition is to compute a *recognition tree*
for a given (permutation or matrix) group, which describes the structure
of this group in a recursive way:
Each non-leaf node of the tree describes an epimorphism such that
the kernel and the image belong to the two subtrees of the node.
Each leaf node describes a group for which efficient methods are available
that allow one to decide whether a group element is an element of this group,
and if yes to write the element as a word in terms of suitable generators.

The recognition tree has enough information to decide whether a group element
is an element of the given group,
and if yes to write the element as a word in terms of suitable generators
of the given group.

```@docs
recognize
is_ready
nice_gens
straight_line_program(tree::GroupRecognitionTree, g::GAPGroupElem)
```
8 changes: 8 additions & 0 deletions src/GAP/gap_to_oscar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,11 @@ function matrices_over_field(gapmats::GapObj)
z = gen(F)
return result, F, z
end

## GAP straight line program
function straight_line_program(slp::GapObj)
@req GAP.Globals.IsStraightLineProgram(slp) "slp must be a straight line program in GAP"
lines = GAP.gap_to_julia(GAP.Globals.LinesOfStraightLineProgram(slp); recursive = true)
n = GAP.Globals.NrInputsOfStraightLineProgram(slp)
return SLP.GAPSLProgram(lines, n)
end
19 changes: 19 additions & 0 deletions src/GAP/wrappers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,22 @@ GAP.@wrap GroupHomomorphismByFunction(x1, x2, x3)::GapObj
GAP.@wrap GroupHomomorphismByFunction(x1, x2, x3, x4)::GapObj
GAP.@wrap GroupHomomorphismByFunction(x1, x2, x3, x4, x5)::GapObj
GAP.@wrap GroupOfPcgs(x::GapObj)::GapObj
GAP.@wrap Grp(x::GapObj)::GapObj
GAP.@wrap HasCharacterParameters(x::GapObj)::Bool
GAP.@wrap HasClassParameters(x::GapObj)::Bool
GAP.@wrap HasGrp(x::GapObj)::Bool
GAP.@wrap HasImageRecogNode(x::GapObj)::Bool
GAP.@wrap HasIsRecogInfoForAlmostSimpleGroup(x::GapObj)::Bool
GAP.@wrap HasIsRecogInfoForSimpleGroup(x::GapObj)::Bool
GAP.@wrap HasKernelRecogNode(x::GapObj)::Bool
GAP.@wrap HasMaxes(x::GapObj)::Bool
GAP.@wrap HasMaximalAbelianQuotient(x::Any)::Bool
GAP.@wrap HasSize(x::Any)::Bool
GAP.@wrap Hasfhmethsel(x::GapObj)::Bool
GAP.@wrap Identity(x::GapObj)::GapObj
GAP.@wrap Image(x::Any)::GapObj
GAP.@wrap Image(x::Any, y::Any)::GapObj
GAP.@wrap ImageRecogNode(x::GapObj)::GapObj
GAP.@wrap ImagesRepresentative(x::GapObj, y::Any)::GAP.Obj
GAP.@wrap ImagesSource(x::GapObj)::GapObj
GAP.@wrap ImmutableMatrix(x::GapObj, y::GapObj, z::Bool)::GapObj
Expand Down Expand Up @@ -179,6 +187,7 @@ GAP.@wrap IsInnerAutomorphism(x::Any)::Bool
GAP.@wrap IsInt(x::Any)::Bool
GAP.@wrap IsIntegers(x::Any)::Bool
GAP.@wrap IsIrreducibleCharacter(x::Any)::Bool
GAP.@wrap IsLeaf(x::GapObj)::Bool
GAP.@wrap IsLetterAssocWordRep(x::Any)::Bool
GAP.@wrap IsLetterWordsFamily(x::Any)::Bool
GAP.@wrap IsLieAlgebra(x::Any)::Bool
Expand Down Expand Up @@ -211,6 +220,10 @@ GAP.@wrap IsPrimitive(x::Any, y::Any)::Bool
GAP.@wrap IsQuasisimpleGroup(x::Any)::Bool
GAP.@wrap IsQuaternionGroup(x::Any)::Bool
GAP.@wrap IsRationals(x::Any)::Bool
GAP.@wrap IsReady(x::GapObj)::Bool
GAP.@wrap IsRecogInfoForSimpleGroup(x::GapObj)::Bool
GAP.@wrap IsRecogInfoForAlmostSimpleGroup(x::GapObj)::Bool
GAP.@wrap IsRecord(x::Any)::Bool
GAP.@wrap IsRegular(x::Any)::Bool
GAP.@wrap IsRegular(x::Any, y::Any)::Bool
GAP.@wrap IsSemiRegular(x::Any)::Bool
Expand All @@ -220,6 +233,7 @@ GAP.@wrap IsSimpleGroup(x::Any)::Bool
GAP.@wrap IsSingularForm(x::Any)::Bool
GAP.@wrap IsSolvableGroup(x::Any)::Bool
GAP.@wrap IsSporadicSimpleGroup(x::Any)::Bool
GAP.@wrap IsString(x::Any)::Bool
GAP.@wrap IsSubgroupFpGroup(x::Any)::Bool
GAP.@wrap IsSubset(x::Any, y::Any)::Bool
GAP.@wrap IsSupersolvableGroup(x::Any)::Bool
Expand All @@ -238,6 +252,7 @@ GAP.@wrap IsZmodnZObj(x::Any)::Bool
GAP.@wrap IsZmodnZObjNonprimeCollection(x::Any)::Bool
GAP.@wrap Iterator(x::Any)::GapObj
GAP.@wrap KernelOfCharacter(x::GapObj, y::GapObj)::GapObj
GAP.@wrap KernelRecogNode(x::GapObj)::GapObj
GAP.@wrap LargestMovedPoint(x::Any)::Int
GAP.@wrap LeftActingDomain(x::GapObj)::GapObj
GAP.@wrap LetterRepAssocWord(x::GapObj)::GapObj
Expand All @@ -252,6 +267,7 @@ GAP.@wrap mod(x::Any, y::Any)::GAP.Obj
GAP.@wrap NameFunction(x::GapObj)::GapObj
GAP.@wrap NamesOfFusionSources(x::GapObj)::GapObj
GAP.@wrap NextIterator(x::GapObj)::Any
GAP.@wrap NiceGens(x::GapObj)::GapObj
GAP.@wrap NormalClosure(x::GapObj, y::GapObj)::GapObj
GAP.@wrap Normalizer(x::GapObj, y::GapObj)::GapObj
GAP.@wrap NormalSubgroupClasses(x::GapObj, y::GAP.Obj)::GapObj
Expand Down Expand Up @@ -286,12 +302,14 @@ GAP.@wrap PrimitiveElement(x::GapObj)::GapObj
GAP.@wrap Projection(x::GapObj)::GapObj
GAP.@wrap Projection(x::GapObj, i::Int)::GapObj
GAP.@wrap Range(x::GapObj)::GapObj
GAP.@wrap RecognizeGroup(x::GapObj)::GapObj
GAP.@wrap ReduceCoeffs(x::GapObj, y::GapObj)
GAP.@wrap RelatorsOfFpGroup(x::GapObj)::GapObj
GAP.@wrap Representative(x::GapObj)::GAP.Obj
GAP.@wrap RepresentativeAction(x::GapObj, y::GapObj, z::GapObj)::GapObj
GAP.@wrap RestrictedMapping(x::GapObj, y::GapObj)::GapObj
GAP.@wrap RootSystem(x::GapObj)::GapObj
GAP.@wrap SLPforElement(x::GapObj, y::GapObj)::GAP.Obj
GAP.@wrap ScalarProduct(x::GapObj, y::GapObj, z::GapObj)::GAP.Obj
GAP.@wrap SchurIndexByCharacter(x::GapObj, y::GapObj, z::GapObj)::GAP.Obj
GAP.@wrap SetMaximalAbelianQuotient(x::Any, y::Any)::Nothing
Expand Down Expand Up @@ -324,6 +342,7 @@ GAP.@wrap WeylGroup(x::GapObj)::GapObj
GAP.@wrap WeylOrbitIterator(x::GapObj, y::GapObj)::GapObj
GAP.@wrap Z(x::Any)::GAP.Obj
GAP.@wrap Zero(x::Any)::GAP.Obj
GAP.@wrap fhmethsel(x::GapObj)::GAP.Obj

# for Int arguments we can sometimes provide better alternatives
Conductor(x::Int) = 1
Expand Down
Loading

0 comments on commit d4200b0

Please sign in to comment.