/// - reverse: If true, the topological ordering is reversed, i.e. successors before the incoming state.
pub fn sort_topological<F, L>(lts: &L, filter: F, reverse: bool) -> Result<Vec<StateIndex>, MercError>
"The permutation {reorder:?} is not a valid topological ordering for the states of the given LTS"
/// Returns true if the given permutation is a topological ordering of the states of the given LTS.
fn is_topologically_sorted<F, P>(lts: &impl LTS, filter: F, permutation: P, reverse: bool) -> bool