prioritized_borel_state_history_extend
Any legal state history to a node and state extends along a legal outgoing edge to a legal state history at the child and target state, retaining all previously recorded states.
Statement
theorem prioritized_borel_state_history_extend {Q : Type} {k : ℕ} (G : PrioritizedBorelGame Q k) (v : List Bool) (q : Q) (h : Fin (v.length + 1) → Q) (hh : h ∈ op1385StateHistories G v q) (e : TreeGameEdge Q k) (he : e ∈ G.edges) (hv : e.source_node = v) (hq : e.source_state = q) : ∃ h' ∈ op1385StateHistories G (v ++ [e.dir]) e.target_state, ∀ i : Fin (v.length + 1), h' ⟨i.val, by simp⟩ = h i
- Source
- History update in the bounded-state-history reduction for arXiv:2611.10136, Conjecture 19.
- Verified
- 17 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 3
- PrioritizedBorelGameA structure PrioritizedBorelGame (Q : Type*) (k : ℕ) representing a prioritized Borel game with state space Q and k priorities, with…
- TreeGameEdgeA structure TreeGameEdge (Q : Type*) (k : ℕ) representing an edge in a binary tree game arena with state space Q and k priorities, with…
- prioritized_borel_reverse_state_histories_uniqueIf a tree-game edge is reverse-deterministic in the state at each fixed parent node and child direction, then at most one state history…
- Used by 1
- prioritized_borel_bounded_history_trace_trackerIf at most d legal state histories reach each position, an index in Fin d recovers the accumulated encoded branch from the visible…
The proof, explained
We extend the valid state history h to the extended node v ++ [e.dir] by defining h' piecewise: on all indices corresponding to the prefix v, h' preserves the states recorded by h, and at the final new index, h' records the target state of the outgoing edge e. We then verify the four defining conditions of a legal state history. The initial state is preserved because 0 < |v| + 1, the final state is e.target_state by construction, and previous history entries are retained. For transitions along the prefix v, legality is inherited directly from the original history h, while the newly appended transition is witnessed by the edge e.
Define the candidate extended history h', establish its values on indices, and provide it as the witness, reducing the theorem to the four defining properties of a legal state history.
We define the extended state history `h' : Fin ((v ++ [e.dir]).length + 1) → Q` by cases: for any index j whose numerical value is strictly less than `v.length + 1`, `h' j` evaluates to `h ⟨j.val, hj⟩`; otherwise, it evaluates to `e.target_state`. Applying `dif_pos` and `dif_neg` establishes these two rules as local lemmas: `h'_lt` asserts that `h' j = h ⟨j.val, hj⟩` when `j.val < v.length + 1`, and `h'_ge` asserts that `h' j = e.target_state` otherwise. Finally, `refine` instantiates the existential goal with `h'` and decomposes the requirement `h' ∈ op1385StateHistories ...` into four obligations: the initial state condition, the final state condition, the step transition conditions, and the requirement that `h'` extends `h`.
uses
dif_pos,dif_negtheorem prioritized_borel_state_history_extend {Q : Type} {k : ℕ} (G : PrioritizedBorelGame Q k) (v : List Bool) (q : Q) (h : Fin (v.length + 1) → Q) (hh : h ∈ op1385StateHistories G v q) (e : TreeGameEdge Q k) (he : e ∈ G.edges) (hv : e.source_node = v) (hq : e.source_state = q) : ∃ h' ∈ op1385StateHistories G (v ++ [e.dir]) e.target_state, ∀ i : Fin (v.length + 1), h' ⟨i.val, by simp⟩ = h i := by let h' : Fin ((v ++ [e.dir]).length + 1) → Q := fun j => if hj : j.val < v.length + 1 then h ⟨j.val, hj⟩ else e.target_state have h'_lt : ∀ (j : Fin ((v ++ [e.dir]).length + 1)) (hj : j.val < v.length + 1), h' j = h ⟨j.val, hj⟩ := fun j hj => dif_pos hj have h'_ge : ∀ (j : Fin ((v ++ [e.dir]).length + 1)) (hj : ¬ (j.val < v.length + 1)), h' j = e.target_state := fun j hj => dif_neg hj refine ⟨h', ⟨?_h_init, ?_h_last, ?_h_step⟩, ?_h_rest⟩
The extended history h' starts at the game's initial state: h' 0 = G.init_state.
Because `0 < v.length + 1` by `Nat.succ_pos`, rule `h'_lt` rewrites `h' 0` to `h 0`. Since `h` is a valid state history for `v`, its initial state `h 0` is indeed `G.init_state`.
uses
Nat.succ_poscase _h_init => rw [h'_lt 0 (Nat.succ_pos _)] exact hh.1The extended history h' ends at e.target_state.
The final index `Fin.last (v ++ [e.dir]).length` has numerical value `v.length + 1`. Since this value is not strictly less than `v.length + 1`, rule `h'_ge` applies directly to show that `h'` evaluated at this last index equals `e.target_state`.
case _h_last => apply h'_ge simpThe extended history h' agrees with h on all original indices: h' i = h i for each i < v.length + 1.
For an arbitrary index `i : Fin (v.length + 1)`, its numerical value is strictly less than `v.length + 1` by definition (`i.is_lt`). Applying rule `h'_lt` immediately yields `h' ⟨i.val, ...⟩ = h i`.
case _h_rest => intro i apply h'_lt ⟨i.val, by simp⟩ i.is_ltFor every step index i < v.length, the transition under h' is valid and witnessed by the edge from h.
We fix an arbitrary step index `i : Fin (v ++ [e.dir]).length` and assume `i.val < v.length`. This gives an index `i₀ : Fin v.length`. Since `h` is a valid history on `v`, there is an edge `e' ∈ G.edges` with the appropriate endpoints and label. We check that `e'` also validates step `i` for `h'`: its source node matches because `take i (v ++ [e.dir]) = take i v` by `List.take_append_of_le_length`; its source state matches because `h' i.castSucc = h i₀.castSucc` by `h'_lt`; its direction matches because `(v ++ [e.dir]).get i = v.get i₀` by `List.get_eq_getElem` and `List.getElem_append_left`; and its target state matches because `h' i.succ = h i₀.succ` by `h'_lt`.
uses
List.take_append_of_le_length,List.get_eq_getElem,List.getElem_append_leftcase _h_step => intro i by_cases hi : i.val < v.length · let i₀ : Fin v.length := ⟨i.val, hi⟩ obtain ⟨e', he', hnode, hsrc, hdir, htgt⟩ := hh.2.2 i₀ refine ⟨e', he', ?_, ?_, ?_, ?_⟩ · rw [hnode] exact (List.take_append_of_le_length (by omega)).symm · rw [hsrc] have h1 : i.castSucc.val < v.length + 1 := by simp; omega rw [h'_lt i.castSucc h1] congr 1 · rw [hdir] rw [List.get_eq_getElem, List.get_eq_getElem, List.getElem_append_left hi] · rw [htgt] have h2 : i.succ.val < v.length + 1 := by simp; omega rw [h'_lt i.succ h2] congr 1For the final step index i = v.length, the transition under h' is valid and witnessed by the edge e.
In the remaining case where `¬ (i.val < v.length)`, since `i.val < v.length + 1`, linear arithmetic forces `i.val = v.length`, so `i = ⟨v.length, ...⟩` by `Fin.ext`. We witness this step with the incoming edge `e ∈ G.edges`: its source node is `e.source_node = v`, which equals `take (v.length) (v ++ [e.dir])`; its source state is `e.source_state = q`, which equals the final state of `h` and thus `h' i.castSucc` by `h'_lt`; its direction is `e.dir`, which is the element at index `v.length` in `v ++ [e.dir]` by `List.get_eq_getElem`; and its target state is `e.target_state`, which equals `h' i.succ` by `h'_ge` since `i.succ.val = v.length + 1`.
uses
Fin.ext,List.get_eq_getElem· have hi_le : i.val ≤ v.length := by have := i.is_lt simp at this exact this have hi_eq : i.val = v.length := by omega have hi_fin : i = ⟨v.length, by simp⟩ := Fin.ext hi_eq subst hi_fin refine ⟨e, he, ?_, ?_, ?_, ?_⟩ · rw [hv] simp · rw [hq, ← hh.2.1] have h1 : (⟨v.length, by simp⟩ : Fin (v ++ [e.dir]).length).castSucc.val < v.length + 1 := by simp rw [h'_lt _ h1] congr 1 · simp [List.get_eq_getElem] · rw [h'_ge _ (by simp)]
dif_pos- In a dependent conditional expression `if c then t else e`, if the condition `c` holds, the expression reduces to `t`.
dif_neg- In a dependent conditional expression `if c then t else e`, if the condition `c` is false, the expression reduces to `e`.
Nat.succ_pos- For any natural number n, its successor n + 1 is strictly positive.
List.take_append_of_le_length- Taking the prefix of length i of a concatenated list l₁ ++ l₂ is equal to taking the prefix of length i of l₁, provided i ≤ |l₁|.
List.get_eq_getElem- Indexing a list using `get` on a `Fin` index is equal to the element indexing operation `l[i]`.
List.getElem_append_left- The i-th element of a concatenated list as ++ bs is equal to the i-th element of as, provided i < |as|.
Fin.ext- Two elements of `Fin n` are equal if and only if their underlying natural values are equal.
- In Lean, state histories are formalized as dependently-typed functions from `Fin (v.length + 1)`. Extending the domain from `v.length + 1` to `(v ++ [e.dir]).length + 1` requires wrapping indices in `Fin` constructors (`Fin.castSucc`, `Fin.succ`, and explicit bound proofs), bookkeeping that is purely formal and omitted in informal paper proofs.
- Linear arithmetic over indices and list lengths (such as establishing that `i.castSucc.val < v.length + 1` or that `i.val = v.length`) is handled in several places by the automated tactics `omega` and `simp`.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
theorem prioritized_borel_state_history_extend {Q : Type} {k : ℕ} (G : PrioritizedBorelGame Q k) (v : List Bool) (q : Q) (h : Fin (v.length + 1) → Q) (hh : h ∈ op1385StateHistories G v q) (e : TreeGameEdge Q k) (he : e ∈ G.edges) (hv : e.source_node = v) (hq : e.source_state = q) : ∃ h' ∈ op1385StateHistories G (v ++ [e.dir]) e.target_state, ∀ i : Fin (v.length + 1), h' ⟨i.val, by simp⟩ = h i := by let h' : Fin ((v ++ [e.dir]).length + 1) → Q := fun j => if hj : j.val < v.length + 1 then h ⟨j.val, hj⟩ else e.target_state have h'_lt : ∀ (j : Fin ((v ++ [e.dir]).length + 1)) (hj : j.val < v.length + 1), h' j = h ⟨j.val, hj⟩ := fun j hj => dif_pos hj have h'_ge : ∀ (j : Fin ((v ++ [e.dir]).length + 1)) (hj : ¬ (j.val < v.length + 1)), h' j = e.target_state := fun j hj => dif_neg hj refine ⟨h', ⟨?_h_init, ?_h_last, ?_h_step⟩, ?_h_rest⟩ case _h_init => rw [h'_lt 0 (Nat.succ_pos _)] exact hh.1 case _h_last => apply h'_ge simp case _h_rest => intro i apply h'_lt ⟨i.val, by simp⟩ i.is_lt case _h_step => intro i by_cases hi : i.val < v.length · let i₀ : Fin v.length := ⟨i.val, hi⟩ obtain ⟨e', he', hnode, hsrc, hdir, htgt⟩ := hh.2.2 i₀ refine ⟨e', he', ?_, ?_, ?_, ?_⟩ · rw [hnode] exact (List.take_append_of_le_length (by omega)).symm · rw [hsrc] have h1 : i.castSucc.val < v.length + 1 := by simp; omega rw [h'_lt i.castSucc h1] congr 1 · rw [hdir] rw [List.get_eq_getElem, List.get_eq_getElem, List.getElem_append_left hi] · rw [htgt] have h2 : i.succ.val < v.length + 1 := by simp; omega rw [h'_lt i.succ h2] congr 1 · have hi_le : i.val ≤ v.length := by have := i.is_lt simp at this exact this have hi_eq : i.val = v.length := by omega have hi_fin : i = ⟨v.length, by simp⟩ := Fin.ext hi_eq subst hi_fin refine ⟨e, he, ?_, ?_, ?_, ?_⟩ · rw [hv] simp · rw [hq, ← hh.2.1] have h1 : (⟨v.length, by simp⟩ : Fin (v ++ [e.dir]).length).castSucc.val < v.length + 1 := by simp rw [h'_lt _ h1] congr 1 · simp [List.get_eq_getElem] · rw [h'_ge _ (by simp)]