From 0c5ba32c8c25d40975a98ef4ec19896af02c20ab Mon Sep 17 00:00:00 2001
From: William-Kenyon <115789274+William-Kenyon@users.noreply.github.com>
Date: Sun, 25 Oct 2026 08:05:59 +0000
Subject: [PATCH 01/10] 2edgetrans synonym
---
doc/prop.xml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/doc/prop.xml b/doc/prop.xml
index 5c293f4a3..0eea03180 100644
--- a/doc/prop.xml
+++ b/doc/prop.xml
@@ -1665,11 +1665,14 @@ false]]>
<#GAPDoc Label="Is2EdgeTransitive">
+
true or false.
If digraph is a digraph without multiple edges, then Is2EdgeTransitive
returns true if digraph is 2-edge transitive, and false
- otherwise. If digraph has multiple edges, then Is2EdgeTransitive returns an error.
+ otherwise. If digraph has multiple edges, then Is2EdgeTransitive returns an error.
+
+ is a synonym for .
A digraph is 2-edge transitive if its automorphism group
acts transitively on 2-edges via the action
From cde46783fffd30d2f0952e8c634ae12f73c982c0 Mon Sep 17 00:00:00 2001
From: William-Kenyon <115789274+William-Kenyon@users.noreply.github.com>
Date: Sun, 25 Oct 2026 08:45:27 +0000
Subject: [PATCH 02/10] cutverts synonym
---
doc/attr.xml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/doc/attr.xml b/doc/attr.xml
index 1dd3bb640..23f846615 100644
--- a/doc/attr.xml
+++ b/doc/attr.xml
@@ -1117,6 +1117,7 @@ gap> DigraphUndirectedGirth(D);
<#GAPDoc Label="ArticulationPoints">
+
A list of vertices.
A connected digraph is biconnected if it is still connected (in the
@@ -1143,6 +1144,9 @@ gap> DigraphUndirectedGirth(D);
with articulation points, but no bridges.
+ is a synonym for .
+
+
See also and
.
Date: Sun, 25 Oct 2026 09:11:10 +0000
Subject: [PATCH 03/10] smallestlastorder docs
---
doc/grahom.xml | 30 ++++++++++++++++++++++++++++++
doc/z-chap6.xml | 1 +
2 files changed, 31 insertions(+)
diff --git a/doc/grahom.xml b/doc/grahom.xml
index 2e3d1b213..dadcc01b9 100644
--- a/doc/grahom.xml
+++ b/doc/grahom.xml
@@ -563,6 +563,36 @@ gap> DigraphWelshPowellOrder(Digraph([[4], [9], [9], [],
<#/GAPDoc>
+<#GAPDoc Label="DigraphSmallestLastOrder">
+
+
+ A list of vertices.
+
+ DigraphSmallestLastOrder returns a list order containing each
+ of the vertices of digraph in smallest-last order, defined as
+ follows:
+
+ Let D_n be digraph. For i = n, n-1, \ldots, 1, the
+ vertex order[i] is a vertex of minimum degree in D_i, and
+ D_{i-1} is the subdigraph of D_i induced by removing
+ order[i]. The degree of a vertex here is the sum of the number of
+ out- and in-neighbours.
+
+ The result is not unique in general, since there may be several vertices
+ of minimum degree at any step; DigraphSmallestLastOrder tiebreaks
+ by taking the smallest such vertex.
+ D1 := Digraph([[2], [1, 3], [2]]);;
+gap> DigraphSmallestLastOrder(D1);
+[ 3, 2, 1 ]
+gap> D2 := CompleteDigraph(3);;
+gap> DigraphSmallestLastOrder(D2);
+[ 3, 2, 1 ]
+]]>
+
+
+<#/GAPDoc>
+
<#GAPDoc Label="DigraphEmbedding">
diff --git a/doc/z-chap6.xml b/doc/z-chap6.xml
index f9798b51c..26f5e23bc 100644
--- a/doc/z-chap6.xml
+++ b/doc/z-chap6.xml
@@ -73,6 +73,7 @@ from} $E_a$ \emph{to} $E_b$. In this case we say that $E_a$ and $E_b$ are
<#Include Label="DigraphColouring">
<#Include Label="DigraphGreedyColouring">
<#Include Label="DigraphWelshPowellOrder">
+ <#Include Label="DigraphSmallestLastOrder">
<#Include Label="ChromaticNumber">
<#Include Label="DigraphCore">
<#Include Label="LatticeDigraphEmbedding">
From 148eb658a38e7383a7fef1b83e4418d8e3ae685b Mon Sep 17 00:00:00 2001
From: William-Kenyon <115789274+William-Kenyon@users.noreply.github.com>
Date: Sun, 25 Oct 2026 09:21:51 +0000
Subject: [PATCH 04/10] unitedgeweighted docs
---
doc/weights.xml | 21 +++++++++++++++++++++
doc/z-chap5.xml | 1 +
2 files changed, 22 insertions(+)
diff --git a/doc/weights.xml b/doc/weights.xml
index cc569a088..cf25d2612 100644
--- a/doc/weights.xml
+++ b/doc/weights.xml
@@ -70,6 +70,27 @@ gap> EdgeWeights(g);
<#/GAPDoc>
+<#GAPDoc Label="UnitEdgeWeightedDigraph">
+
+
+ A digraph
+
+ UnitEdgeWeightedDigraph returns an edge-weighted copy of
+ digraph, with all edge weights set to 1.
+
+ See .
+ D := Digraph([[2], [1, 3], [1]]);
+
+gap> D1 := UnitEdgeWeightedDigraph(D);
+
+gap> EdgeWeights(D1);
+[ [ 1 ], [ 1, 1 ], [ 1 ] ]
+]]>
+
+
+<#/GAPDoc>
+
<#GAPDoc Label="EdgeWeightedDigraphTotalWeight">
diff --git a/doc/z-chap5.xml b/doc/z-chap5.xml
index f1da97657..361324fc9 100644
--- a/doc/z-chap5.xml
+++ b/doc/z-chap5.xml
@@ -28,6 +28,7 @@
Edge Weights
<#Include Label="EdgeWeights">
<#Include Label="EdgeWeightedDigraph">
+ <#Include Label="UnitEdgeWeightedDigraph">
<#Include Label="EdgeWeightedDigraphTotalWeight">
<#Include Label="EdgeWeightedDigraphMinimumSpanningTree">
<#Include Label="EdgeWeightedDigraphShortestPaths">
From 6712150db57a984293b63234173c84c6471edcef Mon Sep 17 00:00:00 2001
From: William-Kenyon <115789274+William-Kenyon@users.noreply.github.com>
Date: Sun, 25 Oct 2026 09:35:42 +0000
Subject: [PATCH 05/10] product synonyms
---
doc/oper.xml | 30 +++++++++++++++++++++++++-----
1 file changed, 25 insertions(+), 5 deletions(-)
diff --git a/doc/oper.xml b/doc/oper.xml
index 9213ec1b4..758489b05 100644
--- a/doc/oper.xml
+++ b/doc/oper.xml
@@ -2290,6 +2290,7 @@ gap> DigraphDijkstra(D, 1, 2);
<#GAPDoc Label="ModularProduct">
+
A digraph.
If D1 and D2 are digraphs without multiple edges, then
@@ -2313,7 +2314,10 @@ gap> DigraphDijkstra(D, 1, 2);
Notably, the complete (with loops) subdigraphs of MPD are
- precisely the partial isomorphisms from D1 to D2.
+ precisely the partial isomorphisms from D1 to D2.
+
+ is a synonym for
+ .
ModularProduct(Digraph([[1], [1, 2]]), Digraph([[], [2]]));
@@ -2333,6 +2337,7 @@ gap> ModularProduct(NullDigraph(0), CompleteDigraph(10));
<#GAPDoc Label="StrongProduct">
+
A digraph.
If D1 and D2 are digraphs without multiple edges,
@@ -2360,7 +2365,10 @@ gap> ModularProduct(NullDigraph(0), CompleteDigraph(10));
The SPD of two paths of lengths m and n is also the king's graph
- for an m by n board.
+ for an m by n board.
+
+ is a synonym for
+ .
D1 := Digraph([[2], [1, 3, 4], [2, 5], [2, 5], [3, 4]]);
@@ -2380,6 +2388,7 @@ gap> StrongProduct(DigraphSymmetricClosure(ChainDigraph(3)),
<#GAPDoc Label="ConormalProduct">
+
A digraph.
If D1 and D2 are digraphs without multiple edges,
@@ -2398,7 +2407,10 @@ gap> StrongProduct(DigraphSymmetricClosure(ChainDigraph(3)),
-
There is an edge from b to d in D2.
-
+
+
+ is a synonym for
+ .
ConormalProduct(DigraphSymmetricClosure(CycleDigraph(7)),
@@ -2414,6 +2426,7 @@ gap> ConormalProduct(NullDigraph(0), CompleteDigraph(10));
<#GAPDoc Label="HomomorphicProduct">
+
A digraph.
If D1 and D2 are digraphs without multiple edges,
@@ -2433,7 +2446,10 @@ gap> ConormalProduct(NullDigraph(0), CompleteDigraph(10));
There is an edge from a to c in D1 and no edge from
b to d in D2.
-
+
+
+ is a synonym for
+ .
HomomorphicProduct(PetersenGraph(),
@@ -2476,6 +2492,7 @@ gap> OutNeighbours(D1);
<#GAPDoc Label="LexicographicProduct">
+
A digraph.
If D1 and D2 are digraphs without multiple edges,
@@ -2495,7 +2512,10 @@ gap> OutNeighbours(D1);
The vertices a and c of D1 are equal and there is
an edge from b to d in D2.
-
+
+
+ is a synonym for
+ .
LexicographicProduct(DigraphSymmetricClosure(CycleDigraph(3)),
From 958501fb057e1686d32320f5ac31b8c60f960bae Mon Sep 17 00:00:00 2001
From: William-Kenyon <115789274+William-Kenyon@users.noreply.github.com>
Date: Sun, 25 Oct 2026 09:36:07 +0000
Subject: [PATCH 06/10] dominatingset synonym
---
doc/oper.xml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/doc/oper.xml b/doc/oper.xml
index 758489b05..4231b0614 100644
--- a/doc/oper.xml
+++ b/doc/oper.xml
@@ -1957,6 +1957,7 @@ rec( idom := [ 2, fail, 2, 2, 2 ], preorder := [ 2, 1, 3, 4, 5 ] )
<#GAPDoc Label="IsDigraphOutDominatingSet">
+
true or false.
@@ -1973,7 +1974,10 @@ rec( idom := [ 2, fail, 2, 2, 2 ], preorder := [ 2, 1, 3, 4, 5 ] )
either in S or an out-neighbour of a vertex in S.
An in-dominating set of digraph is a subset S of
vertices of digraph such that every vertex of digraph is
- either in S or an in-neighbour of a vertex in S.
+ either in S or an in-neighbour of a vertex in S.
+
+ is a synonym for
+ .
D := Digraph([[2, 4], [3], [1, 5], [3], [4]]);;
From 225463dfd58a9cfdfc4f4de4544f69946794da21 Mon Sep 17 00:00:00 2001
From: William-Kenyon <115789274+William-Kenyon@users.noreply.github.com>
Date: Sun, 25 Oct 2026 09:43:54 +0000
Subject: [PATCH 07/10] isnegativeedgeweight docs
---
doc/weights.xml | 18 ++++++++++++++++++
doc/z-chap5.xml | 1 +
2 files changed, 19 insertions(+)
diff --git a/doc/weights.xml b/doc/weights.xml
index cf25d2612..502d8ff9f 100644
--- a/doc/weights.xml
+++ b/doc/weights.xml
@@ -112,6 +112,24 @@ gap> EdgeWeightedDigraphTotalWeight(D);
<#/GAPDoc>
+<#GAPDoc Label="IsNegativeEdgeWeightedDigraph">
+
+
+ A boolean.
+
+ This returns true if digraph contains at least one edge
+ with negative weight, and false otherwise.
+ D := EdgeWeightedDigraph([[2], [1]], [[5], [10]]);;
+gap> IsNegativeEdgeWeightedDigraph(D);
+false
+gap> D := EdgeWeightedDigraph([[2], [1]], [[-5], [10]]);;
+gap> IsNegativeEdgeWeightedDigraph(D);
+true]]>
+
+
+<#/GAPDoc>
+
<#GAPDoc Label="EdgeWeightedDigraphMinimumSpanningTree">
diff --git a/doc/z-chap5.xml b/doc/z-chap5.xml
index 361324fc9..bf322b769 100644
--- a/doc/z-chap5.xml
+++ b/doc/z-chap5.xml
@@ -30,6 +30,7 @@
<#Include Label="EdgeWeightedDigraph">
<#Include Label="UnitEdgeWeightedDigraph">
<#Include Label="EdgeWeightedDigraphTotalWeight">
+ <#Include Label="IsNegativeEdgeWeightedDigraph">
<#Include Label="EdgeWeightedDigraphMinimumSpanningTree">
<#Include Label="EdgeWeightedDigraphShortestPaths">
<#Include Label="EdgeWeightedDigraphShortestPath">
From dd7f7101251498b65ff1794c72fc5c43726de354 Mon Sep 17 00:00:00 2001
From: William-Kenyon <115789274+William-Kenyon@users.noreply.github.com>
Date: Sun, 25 Oct 2026 10:33:16 +0000
Subject: [PATCH 08/10] doc syntax
---
doc/oper.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/oper.xml b/doc/oper.xml
index 4231b0614..c7cf5d218 100644
--- a/doc/oper.xml
+++ b/doc/oper.xml
@@ -2411,7 +2411,7 @@ gap> StrongProduct(DigraphSymmetricClosure(ChainDigraph(3)),
-
There is an edge from b to d in D2.
-
+
is a synonym for
.
From 8b8e02117baaf08f16c9107032056532a041de07 Mon Sep 17 00:00:00 2001
From: William-Kenyon <115789274+William-Kenyon@users.noreply.github.com>
Date: Mon, 26 Oct 2026 14:50:49 +0000
Subject: [PATCH 09/10] wrong declaration
---
gap/weights.gd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gap/weights.gd b/gap/weights.gd
index 423950b61..77d8823a4 100644
--- a/gap/weights.gd
+++ b/gap/weights.gd
@@ -14,7 +14,7 @@ DeclareGlobalFunction("EdgeWeightedDigraph");
DeclareProperty("IsNegativeEdgeWeightedDigraph", IsDigraph and HasEdgeWeights);
DeclareAttribute("EdgeWeightedDigraphTotalWeight",
IsDigraph and HasEdgeWeights);
-DeclareAttribute("UnitEdgeWeightedDigraph", IsDigraph);
+DeclareOperation("UnitEdgeWeightedDigraph", [IsDigraph]);
# 2. Edge Weight Copies
DeclareOperation("EdgeWeightsMutableCopy", [IsDigraph and HasEdgeWeights]);
From b2592a18ee3a9e3ee8c3633b3fd16d2fe48a2eb5 Mon Sep 17 00:00:00 2001
From: William-Kenyon <115789274+William-Kenyon@users.noreply.github.com>
Date: Mon, 26 Oct 2026 14:50:59 +0000
Subject: [PATCH 10/10] fixes
---
doc/weights.xml | 18 ++++++++++++++----
gap/grahom.gd | 2 +-
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/doc/weights.xml b/doc/weights.xml
index 502d8ff9f..be0fda438 100644
--- a/doc/weights.xml
+++ b/doc/weights.xml
@@ -75,10 +75,14 @@ gap> EdgeWeights(g);
A digraph
- UnitEdgeWeightedDigraph returns an edge-weighted copy of
- digraph, with all edge weights set to 1.
+
+ If digraph is immutable, UnitEdgeWeightedDigraph returns
+ an immutable edge-weighted copy of digraph, with all edge weights
+ set to 1. If digraph is mutable, the returned digraph will be
+ mutable, but will not have edge weights.
See .
+
D := Digraph([[2], [1, 3], [1]]);
@@ -86,6 +90,11 @@ gap> D1 := UnitEdgeWeightedDigraph(D);
gap> EdgeWeights(D1);
[ [ 1 ], [ 1, 1 ], [ 1 ] ]
+gap> D2 := Digraph(IsMutableDigraph, [[2], [1, 3], [1]]);;
+gap> UnitEdgeWeightedDigraph(D2);
+
+gap> HasEdgeWeights(D2);
+false
]]>
@@ -117,8 +126,9 @@ gap> EdgeWeightedDigraphTotalWeight(D);
A boolean.
- This returns true if digraph contains at least one edge
- with negative weight, and false otherwise.
+ If digraph has edge weights, then this returns true if
+ at least one edge has negative weight, and false otherwise. If
+ digraph has no edge weights, then an error is raised.
D := EdgeWeightedDigraph([[2], [1]], [[5], [10]]);;
gap> IsNegativeEdgeWeightedDigraph(D);
diff --git a/gap/grahom.gd b/gap/grahom.gd
index b18ecce70..8e970feb7 100644
--- a/gap/grahom.gd
+++ b/gap/grahom.gd
@@ -42,7 +42,7 @@ DeclareOperation("DigraphGreedyColouring", [IsDigraph, IsHomogeneousList]);
DeclareOperation("DigraphGreedyColouringNC", [IsDigraph, IsHomogeneousList]);
DeclareAttribute("DigraphWelshPowellOrder", IsDigraph);
-DeclareAttribute("DigraphSmallestLastOrder", IsDigraph); # TODO: document
+DeclareAttribute("DigraphSmallestLastOrder", IsDigraph);
DeclareOperation("IsDigraphEndomorphism", [IsDigraph, IsTransformation]);
DeclareOperation("IsDigraphHomomorphism",