Acyclic relations: simple cycles and topological numberings #
A relation r is acyclic (cslib's Relation.Acyclic r) when its transitive closure is
irreflexive, that is, when r has no closed walk. This file gives two equivalent forms of
acyclicity:
- Simple cycles. A closed walk is a nonempty list whose consecutive elements, read cyclically
(
Cycle.Chain), are related. Every closed walk contains a simple one, without repeated elements: cut the walk at a repeated element and keep the closed walk between its two occurrences. Soris acyclic exactly when it has no simple cycle (Relation.acyclic_iff_forall_nodup_not_cycle_chain), the form in which feedback vertex and arc sets are stated. - Topological numberings. When the related elements lie in a finite set
V,ris acyclic exactly when some numberingf : α → ℕstrictly increases along every step ofr(Relation.acyclic_iff_exists_rank). The numbering may be taken below the number of elements ofV, which makes it a certificate of polynomial size: number each element by how many elements ofVreach it.
Main results #
Relation.exists_nodup_of_cycle_chain: a closed walk contains a simple cycle.Relation.exists_cycle_chain_of_transGen,Relation.transGen_of_cycle_chain: closed walks are the transitive closure relating an element to itself.Relation.acyclic_iff_forall_nodup_not_cycle_chain: acyclicity as the absence of simple cycles.Relation.Acyclic.exists_rank,Relation.acyclic_of_rank,Relation.acyclic_iff_exists_rank: acyclicity on a finite set as a topological numbering bounded by the number of elements.Relation.not_transGen_of_rank: a strictly increasing numbering excludes closed walks.
Closed walks and simple cycles #
A closed walk contains a simple cycle: a nonempty closed chain contains a nonempty closed chain without repetitions, all of whose elements are elements of the walk.
A closed walk through a gives a closed chain containing a.
Every element of a closed chain lies on a closed walk.
Acyclicity as the absence of simple cycles: no element lies on a closed walk exactly when there is no nonempty closed chain without repetitions.
Topological numberings #
Topological numbering. If every step of r is between elements of a finite set V and
r is acyclic, then numbering each element by the number of elements of V that reach it gives
numbers below the number of elements of V that strictly increase along every step.
The hypothesis hV says that V contains the support of r: both ends of every step. Elements
outside V are related to nothing, so their numbers are unconstrained.
Acyclicity on a finite set as a topological numbering: when every step of r is between
elements of a finite set V (the hypothesis hV), r is acyclic exactly when some numbering
below the number of elements of V strictly increases along every step.