  
  [1X4 [33X[0;0YOperators[133X[101X
  
  
  [1X4.1 [33X[0;0YOperators for digraphs[133X[101X
  
  [8X[10X[3Xdigraph1[103X[8X[10X = [3Xdigraph2[103X[8X[10X[110X[8X[108X
        [33X[0;6Yreturns  [9Xtrue[109X  if  [3Xdigraph1[103X  and  [3Xdigraph2[103X have the same vertices, and
        [10XDigraphEdges([3Xdigraph1[103X[10X)    =   DigraphEdges([3Xdigraph2[103X[10X)[110X,   up   to   some
        re-ordering of the edge lists.[133X
  
        [33X[0;6YNote that this operator does not compare the vertex labels of [3Xdigraph1[103X
        and [3Xdigraph2[103X.[133X
  
  [8X[10X[3Xdigraph1[103X[8X[10X < [3Xdigraph2[103X[8X[10X[110X[8X[108X
        [33X[0;6YThis operator returns [9Xtrue[109X if one of the following holds:[133X
  
        [30X    [33X[0;12YThe  number  [22Xn_1[122X of vertices in [3Xdigraph1[103X is less than the number
              [22Xn_2[122X of vertices in [3Xdigraph2[103X;[133X
  
        [30X    [33X[0;12Y[22Xn_1  = n_2[122X, and the number [22Xm_1[122X of edges in [3Xdigraph1[103X is less than
              the number [22Xm_2[122X of edges in [3Xdigraph2[103X;[133X
  
        [30X    [33X[0;12Y[22Xn_1  =  n_2[122X,  [22Xm_1 = m_2[122X, and [10XDigraphEdges([3Xdigraph1[103X[10X)[110X is less than
              [10XDigraphEdges([3Xdigraph2[103X[10X)[110X after having both of these sets have been
              sorted with respect to the lexicographical order.[133X
  
  [1X4.1-1 IsSubdigraph[101X
  
  [33X[1;0Y[29X[2XIsSubdigraph[102X( [3Xsuper[103X, [3Xsub[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0YIf  [3Xsuper[103X and [3Xsub[103X are digraphs, then this operation returns [9Xtrue[109X if [3Xsub[103X is a
  subdigraph of [3Xsuper[103X, and [9Xfalse[109X if it is not.[133X
  
  [33X[0;0YA  digraph [3Xsub[103X is a [13Xsubdigraph[113X of a digraph [3Xsuper[103X if [3Xsub[103X and [3Xsuper[103X share the
  same  number  of  vertices,  and the collection of edges of [3Xsuper[103X (including
  repeats) contains the collection of edges of [3Xsub[103X (including repeats).[133X
  
  [33X[0;0YIn   other   words,   [3Xsub[103X   is   a  subdigraph  of  [3Xsuper[103X  if  and  only  if
  [10XDigraphNrVertices([3Xsub[103X[10X)  =  DigraphNrVertices([3Xsuper[103X[10X)[110X,  and  for  each pair of
  vertices  [10Xi[110X  and  [10Xj[110X,  there are at least as many edges of the form [10X[i, j][110X in
  [3Xsuper[103X as there are in [3Xsub[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xg := Digraph([[2, 3], [1], [2, 3]]);[127X[104X
    [4X[28X<immutable digraph with 3 vertices, 5 edges>[128X[104X
    [4X[25Xgap>[125X [27Xh := Digraph([[2, 3], [], [2]]);[127X[104X
    [4X[28X<immutable digraph with 3 vertices, 3 edges>[128X[104X
    [4X[25Xgap>[125X [27XIsSubdigraph(g, h);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsSubdigraph(h, g);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsSubdigraph(CompleteDigraph(4), CycleDigraph(4));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsSubdigraph(CycleDigraph(4), ChainDigraph(4));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xg := Digraph([[2, 2], [1]]);[127X[104X
    [4X[28X<immutable multidigraph with 2 vertices, 3 edges>[128X[104X
    [4X[25Xgap>[125X [27Xh := Digraph([[2], [1]]);[127X[104X
    [4X[28X<immutable digraph with 2 vertices, 2 edges>[128X[104X
    [4X[25Xgap>[125X [27XIsSubdigraph(g, h);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsSubdigraph(h, g);[127X[104X
    [4X[28Xfalse[128X[104X
  [4X[32X[104X
  
  [1X4.1-2 IsUndirectedSpanningTree[101X
  
  [33X[1;0Y[29X[2XIsUndirectedSpanningTree[102X( [3Xsuper[103X, [3Xsub[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XIsUndirectedSpanningForest[102X( [3Xsuper[103X, [3Xsub[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0YThe operation [10XIsUndirectedSpanningTree[110X returns [9Xtrue[109X if the digraph [3Xsub[103X is an
  undirected   spanning   tree   of  the  digraph  [3Xsuper[103X,  and  the  operation
  [10XIsUndirectedSpanningForest[110X  returns [9Xtrue[109X if the digraph [3Xsub[103X is an undirected
  spanning forest of the digraph [3Xsuper[103X.[133X
  
  [33X[0;0YAn [13Xundirected spanning tree[113X of a digraph [3Xsuper[103X is a subdigraph of [3Xsuper[103X that
  is  an  undirected  tree  (see  [2XIsSubdigraph[102X  ([14X4.1-1[114X)  and  [2XIsUndirectedTree[102X
  ([14X6.5-9[114X)).  Note  that  a digraph whose [2XMaximalSymmetricSubdigraph[102X ([14X3.3-5[114X) is
  not  connected  has  no  undirected  spanning  trees (see [2XIsConnectedDigraph[102X
  ([14X6.5-3[114X)).[133X
  
  [33X[0;0YAn  [13Xundirected  spanning  forest[113X of a digraph [3Xsuper[103X is a subdigraph of [3Xsuper[103X
  that    is    an   undirected   forest   (see   [2XIsSubdigraph[102X   ([14X4.1-1[114X)   and
  [2XIsUndirectedForest[102X  ([14X6.5-9[114X)),  and  is  not  contained  in  any  larger such
  subdigraph  of  [3Xsuper[103X.  Equivalently,  an  undirected  spanning  forest is a
  subdigraph  of  [3Xsuper[103X  whose connected components coincide with those of the
  [2XMaximalSymmetricSubdigraph[102X  ([14X3.3-5[114X) of [3Xsuper[103X (see [2XDigraphConnectedComponents[102X
  ([14X5.4-9[114X)).[133X
  
  [33X[0;0YNote  that an undirected spanning tree is an undirected spanning forest that
  is connected.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XD := CompleteDigraph(4);[127X[104X
    [4X[28X<immutable complete digraph with 4 vertices>[128X[104X
    [4X[25Xgap>[125X [27Xtree := Digraph([[3], [4], [1, 4], [2, 3]]);[127X[104X
    [4X[28X<immutable digraph with 4 vertices, 6 edges>[128X[104X
    [4X[25Xgap>[125X [27XIsSubdigraph(D, tree) and IsUndirectedTree(tree);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsUndirectedSpanningTree(D, tree);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xforest := EmptyDigraph(4);[127X[104X
    [4X[28X<immutable empty digraph with 4 vertices>[128X[104X
    [4X[25Xgap>[125X [27XIsSubdigraph(D, forest) and IsUndirectedForest(forest);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsUndirectedSpanningForest(D, forest);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsSubdigraph(tree, forest);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XD := DigraphDisjointUnion(CycleDigraph(2), CycleDigraph(2));[127X[104X
    [4X[28X<immutable digraph with 4 vertices, 4 edges>[128X[104X
    [4X[25Xgap>[125X [27XIsUndirectedTree(D);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsUndirectedForest(D) and IsUndirectedSpanningForest(D, D);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
