@@ -25,7 +25,7 @@ No hypothesis on the structure
2525
2626What we mean by "no hypothesis" is that the set is not known
2727to be a forest, symmetric, or graded. However, it may have other
28- structures , such as not containing an oriented cycle, that do not
28+ structure , such as not containing an oriented cycle, that does not
2929help with the enumeration.
3030
3131In this example, the seed is 0 and the successor function is either ``+ 2``
@@ -171,8 +171,25 @@ Only two things are necessary to define a set using a
171171:class:`RecursivelyEnumeratedSet` object ( the other
172172classes being very similar) :
173173
174- .. figure:: .. /.. /media/recursively-enumerated-set. png
175- :scale: 67 %
174+ .. MATH::
175+
176+ \b egin{array}{rcl}
177+ & ^ {``}\h space{0. 5em}^ {"} \\
178+ \s warrow & \d ownarrow & \s earrow \\ [5pt ]
179+ ^ {``}a^ {"} \h space{3. 125em} & ^ {``}b^ {"} & \h space{3. 125em}^ {``}c^ {"} \\
180+ \b egin{array}{rcl}
181+ \s warrow & \d ownarrow & \s earrow \\ [5pt ]
182+ ^ {``}aa^ {"}\: & ^ {``}ab^ {"} & \: ^ {``}ac^ {"} \\
183+ \e nd{array} &
184+ \b egin{array}{rcl}
185+ \s warrow & \d ownarrow & \s earrow \\ [5pt ]
186+ ^ {``}ba^ {"}\: & ^ {``}bb^ {"} & \: ^ {``}bc^ {"} \\
187+ \e nd{array} &
188+ \b egin{array}{rcl}
189+ \s warrow & \d ownarrow & \s earrow \\ [5pt ]
190+ ^ {``}ca^ {"}\: & ^ {``}cb^ {"} & \: ^ {``}cc^ {"} \\
191+ \e nd{array}
192+ \e nd{array}
176193
177194For the previous example, the two necessary pieces of information are:
178195
@@ -369,7 +386,7 @@ def RecursivelyEnumeratedSet(seeds, successors, structure=None,
369386
370387 .. WARNING::
371388
372- If you do not set a good structure, you might obtain bad results,
389+ If you do not set a valid structure, you might obtain bad results,
373390 like elements generated twice::
374391
375392 sage: f = lambda a: [a-1,a+1 ]
@@ -1537,9 +1554,9 @@ def search_forest_iterator(roots, children, algorithm='depth'):
15371554 [0, 1, 2 ], [0, 2, 1 ], [1, 0, 2 ], [1, 2, 0 ], [2, 0, 1 ], [2, 1, 0 ]]
15381555 """
15391556 # Little trick: the same implementation handles both depth and
1540- # breadth first search. Setting the position to -1 makes a depth search
1557+ # breadth first search. Setting position to -1 initiates a depth search
15411558 # (you ask the children for the last node you met). Setting
1542- # position on 0 makes a breadth search (enumerate all the
1559+ # position on 0 initiates a breadth search (enumerate all the
15431560 # descendants of a node before going on to the next father)
15441561 if algorithm == ' depth' :
15451562 position = - 1
@@ -1884,7 +1901,7 @@ class RecursivelyEnumeratedSet_forest(Parent):
18841901 r """
18851902 Return an iterator over the elements of ``self`` of given depth.
18861903 An element of depth `n` can be obtained by applying the
1887- children function `n` times from the root. This function is not affected
1904+ children function `n` times from a root. This function is not affected
18881905 by post processing.
18891906
18901907 EXAMPLES::
@@ -1915,7 +1932,7 @@ class RecursivelyEnumeratedSet_forest(Parent):
19151932 r """
19161933 Return an iterator over the elements of ``self`` of given depth.
19171934 An element of depth `n` can be obtained by applying the
1918- children function `n` times from the root.
1935+ children function `n` times from a root.
19191936
19201937 EXAMPLES::
19211938
0 commit comments