Skip to content
Rainbow docs menu

Reference · The Applied Higher-Order Functions catalogue

rainbow.algorithms.proofs.ahof.bfs-reachability

The Applied Higher-Order Functions cataloguesrc/rainbow/algorithms/proofs/ahof/bfs_reachability.clj1 definitions, 4 theorems

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?

DefinitionSource, line 44

bfs-reach/reachable? :
  (x₁ x₂ : ℚ≥0)
  → data/Bool

ℚ≥0 = nnrat/NonnegativeRational

bfs-reach/within-frontier-reachable

TheoremWorked exampleNo axiomsSource, line 51

bfs-reach/within-frontier-reachable :
  → search/poll-improves 1/2 3/4 = data/true

= = equality/Eq

bfs-reach/boundary-reachable

TheoremWorked exampleNo axiomsSource, line 57

bfs-reach/boundary-reachable :
  → search/poll-improves 1/2 1/2 = data/true

= = equality/Eq

bfs-reach/reach-certificate

TheoremWorked exampleNo axiomsSource, line 63

bfs-reach/reach-certificate :
  → 1/2 ≤ 3/4

≤ = nnrat/at-most

bfs-reach/beyond-frontier-unreached

TheoremWorked exampleNo axiomsSource, line 68

bfs-reach/beyond-frontier-unreached :
  → search/poll-improves 3/4 1/2 = data/false

= = equality/Eq