Tools, x)

Given an initial value x and a successor function f, return a list containing x and all of its successors. The successor function should return a list of all the successors of f.

Note that if x has an infinite number of successors, transitive_ideal won’t return.


sage: f = lambda x: [x-1] if x > 0 else []
sage:, 10)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

Previous topic

Low-level multichoose

Next topic


This Page