Rollout under sequential consistency (Prop. 6.4.1)
ProvedBertsekasDP.rollout_sequential_consistencyProposition 6.4.1 (termination and improvement under sequential consistency). Let the base heuristic be sequentially consistent, and run the rollout algorithm with the source's tie-breaking convention: when several neighbors attain and one of them is the successor that itself would take from , that one is chosen. Then:
- The rollout terminates: the run reaches a destination node after finitely many steps.
- It improves on the base heuristic: at any time at which a destination is reached,
The tie-breaking convention is not a technicality: the source exhibits a graph in which, with ties broken the other way, the rollout cycles forever without reaching a destination. Sequential consistency makes the -values along the run non-increasing, and each plateau shortens the base heuristic's remaining path by one arc, which is what forces termination.
Formalization Note The run is modeled as an infinite sequence that obeys the selection rule while at a non-destination node and stays put once at a destination, so "terminates" is the genuine claim that some index lands in the destination set, rather than an assumption built into the shape of the object. The cost claim is stated for every such index. As in Prop. 6.4.2, the minimum is phrased as a least element, asserting attainment as well as the bound.
import Mathlib import Definitions.Def_BertsekasGraphSearch
namespace BertsekasDP
theorem rollout_sequential_consistency {V : Type} [Fintype V] [DecidableEq V]
(G : BertsekasGraphSearch V) (H : BertsekasBaseHeuristic G)
(hcons : BertsekasSeqConsistent G H)
(r : ℕ → V) (hstart : r 0 ∉ G.dest)
(hstep : ∀ k, r k ∉ G.dest →
r (k + 1) ∈ BertsekasNbrs G (r k) ∧
(∀ j ∈ BertsekasNbrs G (r k),
BertsekasHeurCost G H (r (k + 1)) ≤ BertsekasHeurCost G H j))
(htie : ∀ k, r k ∉ G.dest → ∀ (jH : V) (l : List V),
H.path (r k) = r k :: jH :: l →
(∀ j ∈ BertsekasNbrs G (r k),
BertsekasHeurCost G H jH ≤ BertsekasHeurCost G H j) →
r (k + 1) = jH)
(habsorb : ∀ k, r k ∈ G.dest → r (k + 1) = r k) :
(∃ K, r K ∈ G.dest) ∧
(∀ K, r K ∈ G.dest →
BertsekasHeurCost G H (r K) ≤ BertsekasHeurCost G H (r 0) ∧
IsLeast {c : ℝ | c = BertsekasHeurCost G H (r 0) ∨
∃ k < K, r k ∉ G.dest ∧
∃ j ∈ BertsekasNbrs G (r k), c = BertsekasHeurCost G H j}
(BertsekasHeurCost G H (r K))) := by sorry
end BertsekasDPRead-back
What the Lean code literally says, in plain math · claude-fable-5
Let be a finite type with decidable equality, a graph structure, a base heuristic, and assume BertsekasSeqConsistent holds for (tails of heuristic paths from non-destination vertices are again heuristic paths). Let be an infinite sequence of vertices such that:
- (hstart) ;
- (hstep) for every with : and for every — the sequence always steps to a heuristic-cost-minimizing out-neighbour;
- (htie) a tie-breaking rule: for every with , for every vertex and list , if the heuristic path from has the literal form and itself minimizes over (i.e. for all ), then — i.e. whenever the base heuristic's own next vertex is among the minimizers, the sequence must follow it;
- (habsorb) for every with : (once at a destination the sequence is constant).
The conclusion is a conjunction:
- There exists some index with (termination: the sequence reaches the destination set at some finite time).
- For every index with : , and the number is the least element (in the
IsLeastsense: it both belongs to the set and is every element of the set) of the set of real numbers
i.e. the set consisting of together with the heuristic costs of all out-neighbours of all non-destination vertices visited strictly before time . Note is here , since heuristic paths from destination vertices are singletons. The IsLeast claim includes membership: must literally equal one of the listed values, not merely bound them below. The proof is left as sorry.
Confirmed by the mission captain (proposal self-audit).