Skip to content

Commit

Permalink
Merge pull request #47 from kalmarek/enh/kbmag_parsing
Browse files Browse the repository at this point in the history
Enh/kbmag parsing
  • Loading branch information
kalmarek authored Apr 27, 2021
2 parents 15544b3 + abcd1da commit 3b2b58b
Show file tree
Hide file tree
Showing 48 changed files with 927 additions and 227 deletions.
6 changes: 5 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
name = "KnuthBendix"
uuid = "c2604015-7b3d-4a30-8a26-9074551ec60a"
authors = ["Marek Kaluba <[email protected]>", "Mikołaj Pabiszczak <[email protected]>"]
version = "0.1.0"
version = "0.1.1"

[deps]
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"

[compat]
julia = "1"
MacroTools = "0.5"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
11 changes: 11 additions & 0 deletions kb_data/237
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#Von Dyck (2,3,7) group - infinite hyperbolic - small tidyint works better
_RWS := rec(
isRWS := true,
ordering := "shortlex",
tidyint := 20,
generatorOrder := [a,A,b,B,c],
inverses := [A,a,B,b,c],
equations := [
[a*a*a*a,A*A*A], [b*b,B], [B*A,c]
]
);
12 changes: 12 additions & 0 deletions kb_data/3a6
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#3-fold cover of A_6
_RWS := rec(
isRWS := true,
ordering := "shortlex",
generatorOrder := [a,b,A,B],
inverses := [A,B,a,b],
equations := [[a^3,IdWord],
[b^3,IdWord],
[(a*b)^4,IdWord],
[(a*B)^5,IdWord]
]
);
8 changes: 8 additions & 0 deletions kb_data/a4
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#Group is A_4. Generators named by the enumerated prefix method.
_RWS := rec(
isRWS := true,
ordering := "shortlex",
generatorOrder := [g.10,g.20,g.30],
inverses := [g.10,g.30,g.20],
equations := [ [g.20*g.20,g.30], [g.30*g.10*g.30,g.10*g.20*g.10] ]
);
11 changes: 11 additions & 0 deletions kb_data/a4monoid
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#Presentation of group A_4 regarded as monoid presentation
# - gives infinite monoid.
_RWS := rec(
isRWS := true,
ordering := "shortlex",
generatorOrder := [a,b,B],
inverses := [],
equations := [
[b*b,B], [B*a*B,a*b*a]
]
);
8 changes: 8 additions & 0 deletions kb_data/ab1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#infinite cyclic group
_RWS := rec(
isRWS := true,
ordering := "shortlex",
generatorOrder := [a,A],
inverses := [A,a],
equations := []
);
8 changes: 8 additions & 0 deletions kb_data/ab2
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#2-generator free abelian group (with this ordering KB terminates - but no all)
_RWS := rec(
isRWS := true,
ordering := "shortlex",
generatorOrder := [a,A,b,B],
inverses := [A,a,B,b],
equations := [[B*a*b,a]]
);
8 changes: 8 additions & 0 deletions kb_data/c2
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#Cyclic group of order 2.
_RWS := rec(
isRWS := true,
ordering := "shortlex",
generatorOrder := [a],
inverses := [a],
equations := [[a^2,IdWord]]
);
13 changes: 13 additions & 0 deletions kb_data/cosets
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#The group is S_4, and the subgroup H of order 4.
#There are 30 reduced words - 24 for the group elements, and 6 for the
#6 cosets Hg.
_RWS := rec(
isRWS := true,
ordering := "shortlex",
generatorOrder := [H,a,A,b,B],
inverses := [,A,a,B,b],
equations := [
[a^3,IdWord], [b^4,IdWord], [a*b*a*b,IdWord], [H*b,H],
[H*H,H], [a*H,H], [b*H,H]
]
);
16 changes: 16 additions & 0 deletions kb_data/d22
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#This group is actually D_22 (although it wasn't meant to be).
#All generators are unexpectedly involutory.
_RWS := rec(
isRWS := true,
ordering := "shortlex",
generatorOrder := [a,A,b,B,c,C,d,D,e,E,f,F],
inverses := [A,a,B,b,C,c,D,d,E,e,F,f],
equations := [
[a*C*A*d,IdWord],
[b*f*B*E,IdWord],
[c*e*C*D,IdWord],
[d*F*D*a,IdWord],
[e*b*E*A,IdWord],
[f*C*F*B,IdWord]
]
);
8 changes: 8 additions & 0 deletions kb_data/degen1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#No generators - no anything!
_RWS := rec(
isRWS := true,
ordering := "shortlex",
generatorOrder := [],
inverses := [],
equations := []
);
8 changes: 8 additions & 0 deletions kb_data/degen2
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#A generator, but trivial.
_RWS := rec(
isRWS := true,
ordering := "shortlex",
generatorOrder := [a,A],
inverses := [A,a],
equations := [[a,IdWord]]
);
8 changes: 8 additions & 0 deletions kb_data/degen3
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#fairly clearly the trivial group
_RWS := rec(
isRWS := true,
ordering := "shortlex",
generatorOrder := [a,A,b,B],
inverses := [A,a,B,b],
equations := [[a*b,IdWord],[a*b*b,IdWord]]
);
8 changes: 8 additions & 0 deletions kb_data/degen4a
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#trivial group - BHN presentation
_RWS := rec(
isRWS := true,
ordering := "shortlex",
generatorOrder := [a,A,b,B,c,C],
inverses := [A,a,B,b,C,c],
equations := [[A*b*a,b^2], [B*c*b,c^2], [C*a*c,a^2] ]
);
14 changes: 14 additions & 0 deletions kb_data/degen4b
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#Second of BHN's series of increasingly complicated presentations of 1.
#Works quickest with large value of tidyint
_RWS := rec(
isRWS := true,
ordering := "shortlex",
tidyint := 3000,
generatorOrder := [x,X,y,Y,z,Z],
inverses := [X,x,Y,y,Z,z],
equations := [
[y*y*X*Y*x*Y*z*y*Z*Z*X*y*x*Y*Y*z*z*Y*Z*y*z*z*Y*Z*y,IdWord],
[z*z*Y*Z*y*Z*x*z*X*X*Y*z*y*Z*Z*x*x*Z*X*z*x*x*Z*X*z,IdWord],
[x*x*Z*X*z*X*y*x*Y*Y*Z*x*z*X*X*y*y*X*Y*x*y*y*X*Y*x,IdWord]
]
);
23 changes: 23 additions & 0 deletions kb_data/degen4c
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#Third of BHN's series of increasingly complicated presentations of 1.
#This is too difficult for KB!!
_RWS := rec(
isRWS := true,
ordering := "shortlex",
tidyint := 3000,
generatorOrder := [r,R,s,S,t,T],
inverses := [R,r,S,s,T,t],
equations := [
[S*t*s*T*T*S*t*s*T*T*s*s*R*S*r*t*t*S*T*s*R*s*r*S*S*t*t*S*T*s*T*r*t*R*R*S*t*s*
T*T*r*r*T*R*t*r*r*T*R*t*s*s*R*S*r*S*t*s*T*T*R*s*r*S*S*t*t*S*T*s*t*t*S*T*s*T*
r*t*R*R*T*r*t*R*R*t*t*S*T*s*r*r*T*R*t*S*t*s*T*T*T*r*t*R*R*T*r*t*R*R*t*t*S*T*
s*r*r*T*R*t*S*t*s*T*T, IdWord],
[T*r*t*R*R*T*r*t*R*R*t*t*S*T*s*r*r*T*R*t*S*t*s*T*T*r*r*T*R*t*R*s*r*S*S*T*r*t*
R*R*s*s*R*S*r*s*s*R*S*r*t*t*S*T*s*T*r*t*R*R*S*t*s*T*T*r*r*T*R*t*r*r*T*R*t*R*
s*r*S*S*R*s*r*S*S*r*r*T*R*t*s*s*R*S*r*T*r*t*R*R*R*s*r*S*S*R*s*r*S*S*r*r*T*R*
t*s*s*R*S*r*T*r*t*R*R, IdWord],
[R*s*r*S*S*R*s*r*S*S*r*r*T*R*t*s*s*R*S*r*T*r*t*R*R*s*s*R*S*r*S*t*s*T*T*R*s*r*
S*S*t*t*S*T*s*t*t*S*T*s*r*r*T*R*t*R*s*r*S*S*T*r*t*R*R*s*s*R*S*r*s*s*R*S*r*S*
t*s*T*T*S*t*s*T*T*s*s*R*S*r*t*t*S*T*s*R*s*r*S*S*S*t*s*T*T*S*t*s*T*T*s*s*R*S*
r*t*t*S*T*s*R*s*r*S*S, IdWord]
]
);
16 changes: 16 additions & 0 deletions kb_data/e8
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#Weyl group E8 (all gens involutory).
_RWS := rec(
isRWS := true,
ordering := "shortlex",
generatorOrder := [a,b,c,d,e,f,g,h],
inverses := [a,b,c,d,e,f,g,h],
equations := [
[b*a*b,a*b*a],[c*a,a*c],[d*a,a*d],[e*a,a*e],[f*a,a*f],[g*a,a*g],[h*a,a*h],
[c*b*c,b*c*b],[d*b,b*d],[e*b,b*e],[f*b,b*f],[g*b,b*g],[h*b,b*h],
[d*c*d,c*d*c],[e*c*e,c*e*c],[f*c,c*f],[g*c,c*g],[h*c,c*h],
[e*d,d*e],[f*d,d*f],[g*d,d*g],[h*d,d*h],
[f*e*f,e*f*e],[g*e,e*g],[h*e,e*h],
[g*f*g,f*g*f],[h*f,f*h],
[h*g*h,g*h*g]
]
);
8 changes: 8 additions & 0 deletions kb_data/f2
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#Free group on 2 generators
_RWS := rec(
isRWS := true,
ordering := "shortlex",
generatorOrder := [a,A,b,B],
inverses := [A,a,B,b],
equations := []
);
9 changes: 9 additions & 0 deletions kb_data/f25
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#Fibonacci group F(2,5)
_RWS := rec(
isRWS := true,
ordering := "shortlex",
generatorOrder := [a,A,b,B,c,C,d,D,e,E],
inverses := [A,a,B,b,C,c,D,d,E,e],
equations := [[a*b,c], [b*c,d], [c*d,e], [d*e,a], [e*a,b]
]
);
10 changes: 10 additions & 0 deletions kb_data/f25monoid
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#Fibonacci group F(2,5) - monoid presentation - has order 12
# (group elements + empty word)
_RWS := rec(
isRWS := true,
ordering := "shortlex",
generatorOrder := [a,b,c,d,e],
inverses := [],
equations := [[a*b,c], [b*c,d], [c*d,e], [d*e,a], [e*a,b]
]
);
10 changes: 10 additions & 0 deletions kb_data/f27
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#Fibonacci group F(2,7) - order 29 - works better with largish tidyint
_RWS := rec(
isRWS := true,
ordering := "shortlex",
tidyint := 1000,
generatorOrder := [a,A,b,B,c,C,d,D,e,E,f,F,g,G],
inverses := [A,a,B,b,C,c,D,d,E,e,F,f,G,g],
equations := [[a*b,c], [b*c,d], [c*d,e], [d*e,f], [e*f,g], [f*g,a], [g*a,b]
]
);
13 changes: 13 additions & 0 deletions kb_data/f27_2gen
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#Two generator presentation of Fibonacci group F(2,7) - order 29
#Large value of tidyint works better.
_RWS := rec(
isRWS := true,
ordering := "shortlex",
tidyint := 3000,
generatorOrder := [a,A,b,B],
inverses := [A,a,B,b],
equations := [
[b*a*b*a*b^2*a*b*a*b^2*a*b^2*a*b*a*b^2*a*b,a],
[a*b^2*a*b^2*a*b*a*b^2*a*b*a,b]
]
);
12 changes: 12 additions & 0 deletions kb_data/f27monoid
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#monoid presentation of F(2,7) - should produce a monoid of length 30
#which is the same as the group, together with the empty word.
#This is a very difficult calculation indeed, however.
_RWS := rec(
isRWS := true,
ordering := "recursive",
maxstoredlen := [15,15],
generatorOrder := [a,b,c,d,e,f,g],
inverses := [],
equations := [[a*b,c], [b*c,d], [c*d,e], [d*e,f], [e*f,g], [f*g,a], [g*a,b]
]
);
15 changes: 15 additions & 0 deletions kb_data/freenilpc3
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
_RWS := rec(
isRWS := true,
ordering := "recursive",
generatorOrder := [e,E,d,D,c,C,b,B,a,A],
inverses := [E,e,D,d,C,c,B,b,A,a],
equations := [
[B*A*b*a,c],
[C*A*c*a,d],
[C*B*c*b,e],
[d*a,a*d],
[e*a,a*e],
[d*b,b*d],
[e*b,b*e]
]
);
18 changes: 18 additions & 0 deletions kb_data/funny3
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
_RWS:= rec(
isRWS:=true,
generatorOrder:=[x,X,y,Y,z,Z],
inverses:=[X,x,Y,y,Z,z],
ordering:="shortlex",
equations:=[
[x*x*x,IdWord],
[y*y*y,IdWord],
[z*z*z,IdWord],
[X*Y*x,Y*x*Y],
[y*z*Y,z*Y*z],
[z*x*Z,x*Z*x],
[(x*y*z*X*Y*Z)^3,IdWord],
[(Y*z*x*y*Z*X)^3,IdWord],
[(z*y*X*Z*Y*x)^3,IdWord]
]
);

24 changes: 24 additions & 0 deletions kb_data/heinnilp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#This example verifies the nilpotence of the group using the Sims algorithm.
#The original presentation was <a,b| [b,a,a,a], [b^-1,a,a,a], [a,b,b,b],
# [a^-1,b,b,b], [a,a*b,a*b,a*b], [a^-1,a*b,a*b,a*b] >.
# (where [] mean left-normed commutators. The presentation here was derived by
#first applying the NQA to find the maximal nilpotent quotient, and then
#introducing new generators for the PCP generators.
_RWS := rec(
isRWS := true,
ordering := "recursive",
generatorOrder := [f,F,e,E,d,D,c,C,b,B,a,A],
inverses := [F,f,E,e,D,d,C,c,B,b,A,a],
equations := [
[B*A*b*a,c],
[C*A*c*a,d],
[C*B*c*b,e],
[D*B*d*b,f],
#[d*a,a*d],
#[b*a*B*A*b*A*B*a,a*b*a*B*A*b*A*B],
[c*B*C*b,b*c*B*C],
[b*a*b*A*B*a*B*A,a*b*A*B*a*B*A*b],
[c*B*A*C*a*b,a*b*c*B*A*C],
[B*a*b*A*B*B*A*b*a*b,a*a*b*A*B*B*A*b]
]
);
13 changes: 13 additions & 0 deletions kb_data/l32ext
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#An extension of 2^6 be L32
_RWS := rec(
isRWS := true,
ordering := "shortlex",
generatorOrder := [a,b,B],
inverses := [a,B,b],
equations := [
[a^2,IdWord],
[B^2,b],
[B*a*B*a*B*a*B,a*b*a*b*a*b*a],
[a*B*a*b*a*B*a*b*a*B*a*b*a*B*a*b,B*a*b*a*B*a*b*a*B*a*b*a*B*a*b*a ]
]
);
13 changes: 13 additions & 0 deletions kb_data/m11
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#Mathieu group M_11
_RWS := rec(
isRWS := true,
ordering := "shortlex",
generatorOrder := [a,b,B],
inverses := [a,B,b],
equations := [
[B^2,b^2],
[B*a*B*a*B*a*B*a*B*a*B,a*b*a*b*a*b*a*b*a*b*a],
[b^2*a*b^2*a*b^2*a,a*b^2*a*b^2*a*b^2],
[a*B*a*B*a*b*a*b*a*B*a*b*a*B^2*a*B*a*b,IdWord]
]
);
10 changes: 10 additions & 0 deletions kb_data/nilp2
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#Free nilpotent group of rank 2 and class 2
_RWS := rec(
isRWS := true,
ordering := "recursive",
generatorOrder := [c,C,b,B,a,A],
inverses := [C,c,B,b,A,a],
equations := [
[b*a,a*b*c], [c*a,a*c], [c*b,b*c]
]
);
10 changes: 10 additions & 0 deletions kb_data/nonhopf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#A nonhopfian group
_RWS := rec(
isRWS := true,
maxeqns := 100,
maxstates := 200,
ordering := "recursive",
generatorOrder := [a,A,b,B],
inverses := [A,a,B,b],
equations := [[B*a^2*b,a^3]]
);
Loading

2 comments on commit 3b2b58b

@kalmarek
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/35433

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.1 -m "<description of version>" 3b2b58bddc1d382a74ba29072928afe49f57e0bf
git push origin v0.1.1

Please sign in to comment.