Skip to content

Commit

Permalink
Better Nambooripad (#1026)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianrun-Y authored Nov 15, 2024
1 parent 4f732b7 commit 810d0b4
Show file tree
Hide file tree
Showing 2 changed files with 218 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gap/attributes/attr.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1098,10 +1098,10 @@ function(S)

return
function(x, y)
local R;
R := RClass(S, x);
return IsGreensLessThanOrEqual(R, RClass(S, y))
and ForAny(Idempotents(R), e -> e * y = x);
local E;
E := Idempotents(S);
return ForAny(E, e -> e * y = x)
and ForAny(E, f -> y * f = x);
end;
end);

Expand Down
214 changes: 214 additions & 0 deletions tst/standard/attributes/attr.tst
Original file line number Diff line number Diff line change
Expand Up @@ -2008,6 +2008,220 @@ gap> GR := Digraph(s);
<immutable digraph with 78 vertices, 316 edges>
gap> IsPartialOrderDigraph(DigraphReflexiveTransitiveClosure(GR));
true
gap> S := FullTransformationMonoid(4);;
gap> s := NambooripadPartialOrder(S);
[ [ ], [ 1, 86 ], [ 1, 171 ], [ 1, 256 ], [ 1, 86 ], [ 1, 86 ],
[ 1, 3, 5, 6, 11, 86, 87, 167, 171 ], [ 1, 4, 5, 6, 16, 86, 88, 248, 256 ],
[ 1, 171 ], [ 1, 2, 6, 9, 11, 86, 90, 170, 171 ], [ 1, 171 ],
[ 1, 4, 9, 11, 16, 171, 172, 252, 256 ], [ 1, 256 ],
[ 1, 2, 6, 13, 16, 86, 94, 254, 256 ],
[ 1, 3, 11, 13, 16, 171, 175, 255, 256 ], [ 1, 256 ], [ 1, 86 ], [ 1, 86 ],
[ 1, 3, 17, 18, 35, 86, 87, 155, 171 ],
[ 1, 4, 17, 18, 52, 86, 88, 224, 256 ], [ 1, 86 ], [ 1, 86 ],
[ 1, 3, 21, 22, 43, 86, 87, 151, 171 ],
[ 1, 4, 21, 22, 64, 86, 88, 216, 256 ],
[ 1, 9, 17, 21, 41, 86, 90, 155, 171 ],
[ 1, 9, 18, 22, 43, 86, 90, 154, 171 ],
[ 1, 11, 17, 22, 43, 86, 91, 155, 171 ],
[ 1, 4, 9, 11, 12, 16, 17, 18, 20, 21, 22, 24, 25, 26, 27, 32, 41, 43, 44,
52, 60, 64, 86, 88, 90, 91, 92, 96, 154, 155, 156, 171, 172, 188, 216,
220, 224, 236, 252, 256 ], [ 1, 13, 17, 21, 61, 86, 94, 224, 256 ],
[ 1, 13, 18, 22, 64, 86, 94, 222, 256 ],
[ 1, 3, 11, 13, 15, 16, 17, 18, 19, 21, 22, 23, 27, 29, 30, 32, 35, 43, 47,
61, 63, 64, 86, 87, 91, 94, 95, 96, 151, 155, 159, 171, 175, 191, 222,
223, 224, 239, 255, 256 ], [ 1, 16, 17, 22, 64, 86, 96, 224, 256 ],
[ 1, 171 ], [ 1, 2, 18, 33, 35, 86, 102, 170, 171 ], [ 1, 171 ],
[ 1, 4, 33, 35, 52, 171, 172, 240, 256 ],
[ 1, 5, 21, 33, 41, 86, 102, 167, 171 ],
[ 1, 6, 22, 33, 43, 86, 102, 166, 171 ],
[ 1, 5, 22, 35, 43, 86, 103, 167, 171 ],
[ 1, 4, 5, 6, 8, 16, 21, 22, 24, 33, 35, 36, 37, 38, 39, 41, 43, 44, 48,
52, 56, 64, 86, 88, 102, 103, 104, 120, 166, 167, 168, 171, 172, 176,
216, 232, 236, 240, 248, 256 ], [ 1, 171 ],
[ 1, 2, 22, 41, 43, 86, 106, 170, 171 ], [ 1, 171 ],
[ 1, 4, 41, 43, 64, 171, 172, 236, 256 ],
[ 1, 13, 33, 41, 61, 171, 175, 240, 256 ],
[ 1, 2, 6, 13, 14, 16, 18, 22, 30, 33, 34, 35, 38, 41, 42, 43, 45, 47, 48,
61, 62, 64, 86, 94, 102, 106, 110, 126, 166, 170, 171, 174, 175, 176,
222, 238, 239, 240, 254, 256 ],
[ 1, 13, 35, 43, 64, 171, 175, 239, 256 ],
[ 1, 16, 33, 43, 64, 171, 176, 240, 256 ], [ 1, 256 ],
[ 1, 2, 18, 49, 52, 86, 118, 254, 256 ],
[ 1, 3, 35, 49, 52, 171, 187, 255, 256 ], [ 1, 256 ],
[ 1, 5, 21, 49, 61, 86, 118, 248, 256 ],
[ 1, 6, 22, 49, 64, 86, 118, 246, 256 ],
[ 1, 3, 5, 6, 7, 11, 21, 22, 23, 35, 39, 43, 49, 51, 52, 53, 54, 56, 59,
61, 63, 64, 86, 87, 103, 118, 119, 120, 151, 167, 171, 183, 187, 191,
246, 247, 248, 251, 255, 256 ], [ 1, 5, 22, 52, 64, 86, 120, 248, 256 ],
[ 1, 9, 41, 49, 61, 171, 187, 252, 256 ],
[ 1, 2, 6, 9, 10, 11, 18, 22, 26, 41, 42, 43, 49, 50, 52, 54, 57, 59, 60,
61, 62, 64, 86, 90, 106, 118, 122, 126, 154, 170, 171, 186, 187, 188,
246, 250, 251, 252, 254, 256 ],
[ 1, 11, 43, 49, 64, 171, 187, 251, 256 ],
[ 1, 9, 43, 52, 64, 171, 188, 252, 256 ], [ 1, 256 ],
[ 1, 2, 22, 61, 64, 86, 126, 254, 256 ],
[ 1, 3, 43, 61, 64, 171, 191, 255, 256 ], [ 1, 256 ], [ 1, 86 ], [ 1, 86 ],
[ 1, 3, 65, 66, 86, 87, 107, 131, 171 ],
[ 1, 4, 65, 66, 86, 88, 128, 196, 256 ], [ 1, 86 ], [ 1, 86 ],
[ 1, 3, 69, 70, 86, 87, 103, 139, 171 ],
[ 1, 4, 69, 70, 86, 88, 120, 208, 256 ],
[ 1, 9, 65, 69, 86, 90, 107, 137, 171 ],
[ 1, 9, 66, 70, 86, 90, 106, 139, 171 ],
[ 1, 11, 65, 70, 86, 91, 107, 139, 171 ],
[ 1, 4, 9, 11, 12, 16, 65, 66, 68, 69, 70, 72, 73, 74, 75, 80, 86, 88, 90,
91, 92, 96, 106, 107, 108, 120, 124, 128, 137, 139, 140, 171, 172, 188,
196, 204, 208, 236, 252, 256 ], [ 1, 13, 65, 69, 86, 94, 128, 205, 256 ]
, [ 1, 13, 66, 70, 86, 94, 126, 208, 256 ],
[ 1, 3, 11, 13, 15, 16, 65, 66, 67, 69, 70, 71, 75, 77, 78, 80, 86, 87, 91,
94, 95, 96, 103, 107, 111, 126, 127, 128, 131, 139, 143, 171, 175, 191,
205, 207, 208, 239, 255, 256 ], [ 1, 16, 65, 70, 86, 96, 128, 208, 256 ]
, [ 1, 86 ], [ 1, 86 ], [ 1, 3, 81, 82, 86, 87, 91, 163, 171 ],
[ 1, 4, 81, 82, 86, 88, 96, 244, 256 ], [ 1, 86 ], [ ], [ 86, 171 ],
[ 86, 256 ], [ 1, 9, 81, 85, 86, 90, 91, 169, 171 ], [ 86, 171 ],
[ 86, 171 ], [ 86, 88, 90, 91, 96, 171, 172, 252, 256 ],
[ 1, 13, 81, 85, 86, 94, 96, 253, 256 ], [ 86, 256 ],
[ 86, 87, 91, 94, 96, 171, 175, 255, 256 ], [ 86, 256 ],
[ 1, 33, 65, 81, 86, 102, 107, 161, 171 ],
[ 1, 33, 66, 82, 86, 102, 106, 163, 171 ],
[ 1, 35, 65, 82, 86, 103, 107, 163, 171 ],
[ 1, 4, 33, 35, 36, 52, 65, 66, 68, 81, 82, 84, 86, 88, 96, 97, 98, 99,
102, 103, 104, 106, 107, 108, 112, 116, 120, 128, 161, 163, 164, 171,
172, 176, 196, 228, 236, 240, 244, 256 ],
[ 1, 33, 69, 85, 86, 102, 103, 169, 171 ], [ 86, 171 ], [ 86, 171 ],
[ 86, 88, 102, 103, 120, 171, 172, 240, 256 ],
[ 1, 41, 65, 85, 86, 106, 107, 169, 171 ], [ 86, 171 ], [ 86, 171 ],
[ 86, 88, 106, 107, 128, 171, 172, 236, 256 ],
[ 1, 13, 33, 41, 45, 61, 65, 69, 77, 81, 85, 86, 93, 94, 96, 97, 101, 102,
103, 105, 106, 107, 110, 111, 112, 125, 126, 128, 161, 169, 171, 173,
175, 176, 205, 237, 239, 240, 253, 256 ],
[ 86, 94, 102, 106, 126, 171, 175, 240, 256 ],
[ 86, 94, 103, 107, 128, 171, 175, 239, 256 ],
[ 86, 96, 102, 107, 128, 171, 176, 240, 256 ],
[ 1, 49, 65, 81, 86, 118, 128, 241, 256 ],
[ 1, 49, 66, 82, 86, 118, 126, 244, 256 ],
[ 1, 3, 35, 49, 51, 52, 65, 66, 67, 81, 82, 83, 86, 87, 91, 99, 103, 107,
113, 114, 116, 118, 119, 120, 123, 126, 127, 128, 131, 163, 171, 179,
187, 191, 241, 243, 244, 251, 255, 256 ],
[ 1, 52, 65, 82, 86, 120, 128, 244, 256 ],
[ 1, 49, 69, 85, 86, 118, 120, 253, 256 ], [ 86, 256 ],
[ 86, 87, 103, 118, 120, 171, 187, 255, 256 ], [ 86, 256 ],
[ 1, 9, 41, 49, 57, 61, 65, 69, 73, 81, 85, 86, 89, 90, 91, 105, 106, 107,
113, 117, 118, 120, 122, 123, 124, 125, 126, 128, 137, 169, 171, 185,
187, 188, 241, 249, 251, 252, 253, 256 ],
[ 86, 90, 106, 118, 126, 171, 187, 252, 256 ],
[ 86, 91, 107, 118, 128, 171, 187, 251, 256 ],
[ 86, 90, 107, 120, 128, 171, 188, 252, 256 ],
[ 1, 61, 65, 85, 86, 126, 128, 253, 256 ], [ 86, 256 ],
[ 86, 87, 107, 126, 128, 171, 191, 255, 256 ], [ 86, 256 ], [ 1, 171 ],
[ 1, 2, 66, 86, 129, 131, 150, 170, 171 ], [ 1, 171 ],
[ 1, 4, 129, 131, 171, 172, 192, 196, 256 ],
[ 1, 5, 69, 86, 129, 137, 150, 167, 171 ],
[ 1, 6, 70, 86, 129, 139, 150, 166, 171 ],
[ 1, 5, 70, 86, 131, 139, 151, 167, 171 ],
[ 1, 4, 5, 6, 8, 16, 69, 70, 72, 86, 88, 120, 129, 131, 132, 133, 134, 135,
137, 139, 140, 144, 150, 151, 152, 166, 167, 168, 171, 172, 176, 184,
188, 192, 196, 200, 208, 216, 248, 256 ], [ 1, 171 ],
[ 1, 2, 70, 86, 137, 139, 154, 170, 171 ], [ 1, 171 ],
[ 1, 4, 137, 139, 171, 172, 188, 208, 256 ],
[ 1, 13, 129, 137, 171, 175, 192, 205, 256 ],
[ 1, 2, 6, 13, 14, 16, 66, 70, 78, 86, 94, 126, 129, 130, 131, 134, 137,
138, 139, 141, 143, 144, 150, 154, 158, 166, 170, 171, 174, 175, 176,
190, 191, 192, 205, 206, 208, 222, 254, 256 ],
[ 1, 13, 131, 139, 171, 175, 191, 208, 256 ],
[ 1, 16, 129, 139, 171, 176, 192, 208, 256 ],
[ 1, 17, 81, 86, 129, 150, 155, 161, 171 ],
[ 1, 18, 82, 86, 129, 150, 154, 163, 171 ],
[ 1, 17, 82, 86, 131, 151, 155, 163, 171 ],
[ 1, 4, 17, 18, 20, 52, 81, 82, 84, 86, 88, 96, 129, 131, 132, 145, 146,
147, 150, 151, 152, 154, 155, 156, 160, 161, 163, 164, 171, 172, 176,
180, 188, 192, 196, 212, 216, 224, 244, 256 ],
[ 1, 21, 85, 86, 129, 150, 151, 169, 171 ], [ 86, 171 ], [ 86, 171 ],
[ 86, 88, 150, 151, 171, 172, 192, 216, 256 ],
[ 1, 17, 85, 86, 137, 154, 155, 169, 171 ], [ 86, 171 ], [ 86, 171 ],
[ 86, 88, 154, 155, 171, 172, 188, 224, 256 ],
[ 1, 13, 17, 21, 29, 61, 81, 85, 86, 93, 94, 96, 129, 137, 141, 145, 149,
150, 151, 153, 154, 155, 158, 159, 160, 161, 169, 171, 173, 175, 176,
189, 191, 192, 205, 221, 222, 224, 253, 256 ],
[ 86, 94, 150, 154, 171, 175, 192, 222, 256 ],
[ 86, 94, 151, 155, 171, 175, 191, 224, 256 ],
[ 86, 96, 150, 155, 171, 176, 192, 224, 256 ], [ 1, 171 ],
[ 1, 2, 82, 86, 161, 163, 166, 170, 171 ], [ 1, 171 ],
[ 1, 4, 161, 163, 171, 172, 176, 244, 256 ],
[ 1, 5, 85, 86, 161, 166, 167, 169, 171 ], [ 86, 171 ], [ 86, 171 ],
[ 86, 88, 166, 167, 171, 172, 176, 248, 256 ], [ 1, 171 ], [ 86, 171 ],
[ ], [ 171, 256 ], [ 1, 13, 161, 169, 171, 175, 176, 253, 256 ],
[ 86, 94, 166, 170, 171, 175, 176, 254, 256 ], [ 171, 256 ], [ 171, 256 ],
[ 1, 49, 129, 161, 171, 187, 192, 241, 256 ],
[ 1, 2, 18, 49, 50, 52, 66, 82, 86, 114, 118, 126, 129, 130, 131, 146, 150,
154, 161, 162, 163, 166, 170, 171, 177, 179, 180, 182, 186, 187, 188,
190, 191, 192, 241, 242, 244, 246, 254, 256 ],
[ 1, 49, 131, 163, 171, 187, 191, 244, 256 ],
[ 1, 52, 129, 163, 171, 188, 192, 244, 256 ],
[ 1, 5, 21, 49, 53, 61, 69, 85, 86, 117, 118, 120, 129, 133, 137, 149, 150,
151, 161, 165, 166, 167, 169, 171, 177, 182, 183, 184, 185, 187, 188,
189, 191, 192, 241, 245, 246, 248, 253, 256 ],
[ 86, 118, 150, 166, 171, 187, 192, 246, 256 ],
[ 86, 118, 151, 167, 171, 187, 191, 248, 256 ],
[ 86, 120, 150, 167, 171, 188, 192, 248, 256 ],
[ 1, 49, 137, 169, 171, 187, 188, 253, 256 ],
[ 86, 118, 154, 170, 171, 187, 188, 254, 256 ], [ 171, 256 ], [ 171, 256 ],
[ 1, 61, 129, 169, 171, 191, 192, 253, 256 ],
[ 86, 126, 150, 170, 171, 191, 192, 254, 256 ], [ 171, 256 ], [ 171, 256 ],
[ 1, 256 ], [ 1, 2, 66, 86, 193, 196, 214, 254, 256 ],
[ 1, 3, 131, 171, 193, 196, 235, 255, 256 ], [ 1, 256 ],
[ 1, 5, 69, 86, 193, 205, 214, 248, 256 ],
[ 1, 6, 70, 86, 193, 208, 214, 246, 256 ],
[ 1, 3, 5, 6, 7, 11, 69, 70, 71, 86, 87, 103, 131, 135, 139, 151, 167, 171,
193, 195, 196, 197, 198, 200, 203, 205, 207, 208, 214, 215, 216, 231,
235, 239, 246, 247, 248, 251, 255, 256 ],
[ 1, 5, 70, 86, 196, 208, 216, 248, 256 ],
[ 1, 9, 137, 171, 193, 205, 235, 252, 256 ],
[ 1, 2, 6, 9, 10, 11, 66, 70, 74, 86, 90, 106, 137, 138, 139, 154, 170,
171, 193, 194, 196, 198, 201, 203, 204, 205, 206, 208, 214, 218, 222,
234, 235, 236, 246, 250, 251, 252, 254, 256 ],
[ 1, 11, 139, 171, 193, 208, 235, 251, 256 ],
[ 1, 9, 139, 171, 196, 208, 236, 252, 256 ], [ 1, 256 ],
[ 1, 2, 70, 86, 205, 208, 222, 254, 256 ],
[ 1, 3, 139, 171, 205, 208, 239, 255, 256 ], [ 1, 256 ],
[ 1, 17, 81, 86, 193, 214, 224, 241, 256 ],
[ 1, 18, 82, 86, 193, 214, 222, 244, 256 ],
[ 1, 3, 17, 18, 19, 35, 81, 82, 83, 86, 87, 91, 131, 147, 151, 155, 163,
171, 193, 195, 196, 209, 210, 212, 214, 215, 216, 219, 222, 223, 224,
227, 235, 239, 241, 243, 244, 251, 255, 256 ],
[ 1, 17, 82, 86, 196, 216, 224, 244, 256 ],
[ 1, 21, 85, 86, 193, 214, 216, 253, 256 ], [ 86, 256 ],
[ 86, 87, 151, 171, 214, 216, 235, 255, 256 ], [ 86, 256 ],
[ 1, 9, 17, 21, 25, 41, 81, 85, 86, 89, 90, 91, 137, 153, 154, 155, 169,
171, 193, 201, 205, 209, 213, 214, 216, 218, 219, 220, 221, 222, 224,
233, 235, 236, 241, 249, 251, 252, 253, 256 ],
[ 86, 90, 154, 171, 214, 222, 235, 252, 256 ],
[ 86, 91, 155, 171, 214, 224, 235, 251, 256 ],
[ 86, 90, 155, 171, 216, 224, 236, 252, 256 ],
[ 1, 17, 85, 86, 205, 222, 224, 253, 256 ], [ 86, 256 ],
[ 86, 87, 155, 171, 222, 224, 239, 255, 256 ], [ 86, 256 ],
[ 1, 33, 161, 171, 193, 235, 240, 241, 256 ],
[ 1, 2, 18, 33, 34, 35, 66, 82, 86, 98, 102, 106, 161, 162, 163, 166, 170,
171, 193, 194, 196, 210, 214, 222, 225, 227, 228, 230, 234, 235, 236,
238, 239, 240, 241, 242, 244, 246, 254, 256 ],
[ 1, 35, 163, 171, 193, 235, 239, 244, 256 ],
[ 1, 33, 163, 171, 196, 236, 240, 244, 256 ],
[ 1, 5, 21, 33, 37, 41, 69, 85, 86, 101, 102, 103, 161, 165, 166, 167, 169,
171, 193, 197, 205, 213, 214, 216, 225, 230, 231, 232, 233, 235, 236,
237, 239, 240, 241, 245, 246, 248, 253, 256 ],
[ 86, 102, 166, 171, 214, 235, 240, 246, 256 ],
[ 86, 103, 167, 171, 214, 235, 239, 248, 256 ],
[ 86, 102, 167, 171, 216, 236, 240, 248, 256 ],
[ 1, 41, 169, 171, 193, 235, 236, 253, 256 ],
[ 86, 106, 170, 171, 214, 235, 236, 254, 256 ], [ 171, 256 ], [ 171, 256 ],
[ 1, 33, 169, 171, 205, 239, 240, 253, 256 ],
[ 86, 102, 170, 171, 222, 239, 240, 254, 256 ], [ 171, 256 ], [ 171, 256 ],
[ 1, 256 ], [ 1, 2, 82, 86, 241, 244, 246, 254, 256 ],
[ 1, 3, 163, 171, 241, 244, 251, 255, 256 ], [ 1, 256 ],
[ 1, 5, 85, 86, 241, 246, 248, 253, 256 ], [ 86, 256 ],
[ 86, 87, 167, 171, 246, 248, 251, 255, 256 ], [ 86, 256 ],
[ 1, 9, 169, 171, 241, 251, 252, 253, 256 ],
[ 86, 90, 170, 171, 246, 251, 252, 254, 256 ], [ 171, 256 ], [ 171, 256 ],
[ 1, 256 ], [ 86, 256 ], [ 171, 256 ], [ ] ]
gap> S := InverseSemigroup([Bipartition([[1, -3], [2, -1], [3, 4, -2, -4]]),
> Bipartition([[1, -1], [2, -3], [3, -2], [4, -4]])]);
<inverse block bijection semigroup of degree 4 with 2 generators>
Expand Down

0 comments on commit 810d0b4

Please sign in to comment.