Reference · The Applied Higher-Order Functions catalogue
rainbow.algorithms.proofs.ahof.bfs-reachability
AHoF V48 BFS/DFS Graph Reachability: explore the state graph to decide whether a target is reachable; a state is within the explored frontier when its distance to the frontier representative is within the radius: reachable? distance frontier-radius = decide (distance <= frontier-radius). Proved native and axiom-free (decision, two positive instances, at-most certificate, negative instance). Requires audit/decide-nnrat-at-most, nnrat/at-most, nnrat/decide-at-most-true-sound (all in the D63 checkpoint). Scope (measured by the kernel): this module has 4 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.bfs-reachability` prints this classification.
bfs-reach/reachable?
bfs-reach/reachable? : (x₁ x₂ : ℚ≥0) → data/Bool
ℚ≥0 = nnrat/NonnegativeRational
bfs-reach/within-frontier-reachable
bfs-reach/within-frontier-reachable : → search/poll-improves 1/2 3/4 = data/true
= = equality/Eq
bfs-reach/boundary-reachable
bfs-reach/boundary-reachable : → search/poll-improves 1/2 1/2 = data/true
= = equality/Eq
bfs-reach/reach-certificate
bfs-reach/reach-certificate : → 1/2 ≤ 3/4
≤ = nnrat/at-most
bfs-reach/beyond-frontier-unreached
bfs-reach/beyond-frontier-unreached : → search/poll-improves 3/4 1/2 = data/false
= = equality/Eq