Reference · The Applied Higher-Order Functions catalogue
rainbow.algorithms.proofs.ahof.articulation-points
AHoF Articulation Points (Tarjan's DFS low-link algorithm): find the cut vertices of an undirected graph -- those whose removal disconnects it -- in O(V + E), the basis of network-reliability and bridge analysis. During DFS, disc[u] is u's discovery time and low[v] is the earliest discovery time reachable from v's subtree (via tree or one back edge). A non-root vertex u is an articulation point when some CHILD v cannot reach any ancestor of u -- i.e. low[v] is no earlier than disc[u], so the subtree has no escape route above u: is-articulation? disc-u child-low = decide (disc-u <= child-low) over exact-rational (integer) DFS timestamps. Proved native and axiom-free: the cut-vertex test; that a child whose low-link is at least u's discovery time makes u an articulation point; the certificate that in that case u's discovery time is at most the child's low-link (native nnrat/at-most) -- the subtree is trapped below u; and that a child reaching above u (smaller low-link) does NOT make u a cut vertex. The DFS with discovery/low bookkeeping is executable; what is proved is the articulation-point decision. Requires nnrat/at-most, audit/decide-nnrat-at-most, nnrat/decide-at-most-true-sound (all in the D63 checkpoint). Scope (measured by the kernel): this module has 3 worked instances (statements about specific values). None of its theorems is a guarantee about the algorithm for all inputs; `lein verify rainbow.algorithms.proofs.ahof.articulation-points` prints this classification.
articulation-points/is-articulation?
articulation-points/is-articulation? : (x₁ x₂ : ℚ≥0) → data/Bool
ℚ≥0 = nnrat/NonnegativeRational
articulation-points/trapped-child-articulation
articulation-points/trapped-child-articulation : → search/poll-improves 3 5 = data/true
= = equality/Eq
articulation-points/subtree-trapped-below
articulation-points/subtree-trapped-below : → 3 ≤ 5
≤ = nnrat/at-most
articulation-points/escaping-child-not-articulation
articulation-points/escaping-child-not-articulation : → search/poll-improves 3 1 = data/false
= = equality/Eq