diff --git a/gap/oper.gd b/gap/oper.gd index cbdf26ed4..28968e1fb 100644 --- a/gap/oper.gd +++ b/gap/oper.gd @@ -139,6 +139,7 @@ DeclareOperation("DigraphShortestPathSpanningTree", [IsDigraph, IsPosInt]); DeclareOperation("VerticesReachableFrom", [IsDigraph, IsPosInt]); DeclareOperation("VerticesReachableFrom", [IsDigraph, IsList]); DeclareOperation("IsOrderIdeal", [IsDigraph, IsList]); +DeclareOperation("IsOrderFilter", [IsDigraph, IsList]); DeclareOperation("Dominators", [IsDigraph, IsPosInt]); DeclareOperation("DominatorTree", [IsDigraph, IsPosInt]); DeclareOperation("DigraphCycleBasis", [IsDigraph]); diff --git a/gap/oper.gi b/gap/oper.gi index 6ee58b39d..4c0f9a9ed 100644 --- a/gap/oper.gi +++ b/gap/oper.gi @@ -2076,6 +2076,11 @@ function(D, roots) end); +InstallMethod(IsOrderFilter, "for a digraph and a list of vertices", [IsDigraph, IsList], +function(D, roots) + return IsOrderIdeal(DigraphReverse(D), roots); +end); + InstallMethod(DominatorTree, "for a digraph and a vertex", [IsDigraph, IsPosInt], function(D, root)