Label correcting correctness under nonnegative arc lengths (Bertsekas Prop. 2.3.1)
ProvedBertsekasDP.label_correcting_correctness_of_nonneg_arcsProposition 2.3.1 (correctness of the label correcting method). Consider the shortest path problem of §2.3 on a finite directed graph with origin and destination , under the standing assumption of that section:
Run the label correcting algorithm from its initial state (, all other labels , , ), with the node removed from and the order of child processing chosen arbitrarily at every iteration. Then for every execution that terminates, i.e. every reachable state with ,
In particular is the shortest path length when a path from to exists, and when none does.
The nonnegative arc hypothesis is essential, not a formalization artifact. Step 2 prunes a child whenever , which is sound only if no suffix from to can have negative length. With a negative arc the pruning discards a node that lies on a cheaper route: for arcs , , — a graph with no cycles at all — the run terminates with while . Exercise 2.7 of the source treats the case where only cycle lengths are assumed nonnegative; that case calls for a modified algorithm.
Formalization Note The statement quantifies over every terminal state reachable by the nondeterministic step relation, so it certifies every removal discipline and every child-processing order simultaneously. The conclusion is an equation in EReal, so the no-path case is the genuine empty infimum .
import Mathlib import Definitions.Def_BertsekasSPGraph import Definitions.Def_BertsekasLCState
namespace BertsekasDP
theorem label_correcting_correctness_of_nonneg_arcs {V : Type} [Fintype V] [DecidableEq V]
(G : BertsekasSPGraph V)
(hnn : ∀ i j, (i, j) ∈ G.arcs → 0 ≤ G.length i j)
(σ : BertsekasLCState V)
(hreach : Relation.ReflTransGen (BertsekasLCStep G) (BertsekasLCInit G) σ)
(hterm : σ.openList = ∅) :
σ.upper = BertsekasShortestDistance G G.s G.t := by sorry
end BertsekasDP