prioritized_borel_expanded_play_legal
The encoded sequence of any legal original play is a legal play of the phase-state arena, with the correct initial position and consecutive edge endpoints.
Statement
theorem prioritized_borel_expanded_play_legal {Q : Type} [Fintype Q] (G : PrioritizedBorelGame Q 3) (π : ℕ → TreeGameEdge Q 3) (hlegal : ∀ n, π n ∈ G.edges) (hinit : (π 0).source_node = [] ∧ (π 0).source_state = G.init_state) (hnext : ∀ n, (π (n+1)).source_node = (π n).source_node ++ [(π n).dir] ∧ (π (n+1)).source_state = (π n).target_state) : (∀ n, enc1385ExpandedPlay G π n ∈ (enc1385Game G).edges) ∧ ((enc1385ExpandedPlay G π 0).source_node = [] ∧ (enc1385ExpandedPlay G π 0).source_state = (enc1385Game G).init_state) ∧ ∀ n, (enc1385ExpandedPlay G π (n+1)).source_node = (enc1385ExpandedPlay G π n).source_node ++ [(enc1385ExpandedPlay G π n).dir] ∧ (enc1385ExpandedPlay G π (n+1)).source_state = (enc1385ExpandedPlay G π n).target_state
- Source
- Infinite-play encoding for arXiv:2611.10136, Conjecture 19.
- Verified
- 18 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 6
- enc1385GameGiven a finite-state three-priority tree game, construct a phase-state game that encodes each original direction followed by a one-hot…
- enc1385ExpandedPlayExpand an arbitrary sequence of original edges into phase-game edges by indexing its fixed-length direction-and-state blocks. This…
- prioritized_borel_encoding_state_code_lengthThe one-hot code of a state has length equal to the number of states.
- prioritized_borel_encoding_decode_stateDecoding a valid one-hot state code recovers the original state.
- TreeGameEdgeA structure TreeGameEdge (Q : Type*) (k : ℕ) representing an edge in a binary tree game arena with state space Q and k priorities, with…
- PrioritizedBorelGameA structure PrioritizedBorelGame (Q : Type*) (k : ℕ) representing a prioritized Borel game with state space Q and k priorities, with…
- Used by 2
- prioritized_borel_phase_strategy_transferGiven an index that decodes and updates the phase branch at every reached original position, a winning phase strategy with memory M…
- prioritized_borel_expanded_block_strategy_simulationFor an expanded sequence with matching consecutive positions and the phase strategy memory updates, full-block replay gives its memory and…
The proof, explained
The theorem proves that expanding an infinite play of a prioritized Borel game—by replacing each original edge transition with a block of |Q| + 1 binary steps—yields a valid play in the encoded phase-state arena. Each block outputs the chosen direction bit followed by the |Q|-bit binary representation of the target state, assigning priority 0 until the final bit of the block reveals the original edge's priority. By analyzing whether step n + 1 continues within the current block or crosses into the next, the proof verifies that consecutive source and target phase states match, tree nodes accumulate correctly, and every edge is an allowed transition.
The encoded block for any tree game edge e has length |Q| + 1.
By definition, an edge block consists of one bit indicating the edge direction followed by the binary code of the target state. Since the state code has length |Q| by prioritized_borel_encoding_state_code_length, the total block length is 1 + |Q| = |Q| + 1.
uses
prioritized_borel_encoding_state_code_lengthlemma prioritized_borel_expanded_play_legal_block_length {Q : Type} [Fintype Q] (e : TreeGameEdge Q 3) : (enc1385Block e).length = Fintype.card Q + 1 := by simp [enc1385Block, prioritized_borel_encoding_state_code_length]
For an in-bounds index i < l.length, l.take i ++ [l.getD i d] = l.take (i + 1).
When i is strictly smaller than the list length, the default lookup `getD` coincides with list indexing l[i]. Appending this element to the prefix of length i gives the prefix of length i + 1.
uses
List.getD_eq_getElem,List.take_succ_eq_append_getElemlemma prioritized_borel_expanded_play_legal_take_succ_getD {α : Type*} (l : List α) (i : ℕ) (hi : i < l.length) (d : α) : l.take i ++ [l.getD i d] = l.take (i + 1) := by rw [List.getD_eq_getElem l d hi, ← List.take_succ_eq_append_getElem hi]
When n % L + 1 < L, the quotient (n + 1) / L equals n / L and the remainder (n + 1) % L equals n % L + 1.
Express n as k * L + r where k = n / L and r = n % L < L. Adding 1 gives n + 1 = k * L + (r + 1). Since r + 1 < L, dividing by L yields quotient k and remainder r + 1.
uses
Nat.mod_lt,Nat.div_add_mod',Nat.add_comm,Nat.add_mul_div_right,Nat.div_eq_of_lt,Nat.zero_add,Nat.add_mul_mod_self_right,Nat.mod_eq_of_ltlemma prioritized_borel_expanded_play_legal_div_mod_cases (n L : ℕ) (hL : 0 < L) : (n % L + 1 < L ∧ (n + 1) / L = n / L ∧ (n + 1) % L = n % L + 1) ∨ (n % L + 1 = L ∧ (n + 1) / L = n / L + 1 ∧ (n + 1) % L = 0) := by set k := n / L set r := n % L have hr : r < L := Nat.mod_lt n hL have hn : n = k * L + r := (Nat.div_add_mod' n L).symm by_cases h : r + 1 < L · left have hn1 : n + 1 = k * L + (r + 1) := by omega refine ⟨h, ?_, ?_⟩ · rw [hn1] have : (k * L + (r + 1)) / L = k := by rw [Nat.add_comm (k * L), Nat.add_mul_div_right (r + 1) k hL] rw [Nat.div_eq_of_lt h, Nat.zero_add] exact this · rw [hn1] rw [Nat.add_comm (k * L), Nat.add_mul_mod_self_right] exact Nat.mod_eq_of_lt h
When n % L + 1 = L, the quotient (n + 1) / L equals n / L + 1 and the remainder (n + 1) % L equals 0.
If r + 1 = L, then n + 1 = k * L + L = (k + 1) * L. Dividing by L yields quotient k + 1, and the remainder modulo L is 0.
uses
Nat.mul_div_left,Nat.mul_mod_left· right have hr1 : r + 1 = L := by omega have hn1 : n + 1 = (k + 1) * L := by calc n + 1 = k * L + (r + 1) := by omega _ = k * L + L := by rw [hr1] _ = (k + 1) * L := by ring refine ⟨hr1, ?_, ?_⟩ · rw [hn1, Nat.mul_div_left (k + 1) hL] · rw [hn1, Nat.mul_mod_left (k + 1) L]
Every step n of the expanded play is a valid real edge transition (enc1385Real) of the encoded game arena.
For step n, the active original edge is e = π (n / L) and the position within the block is i = n % L. The bit played is the i-th bit of e's block, so the accumulated pending bits form a prefix of length i + 1 of the block. The full block length |Q| + 1 is reached exactly when i = |Q|, which matches when the original edge priority is assigned (otherwise priority 0 is used), fulfilling the definition of enc1385Real.
uses
Nat.succ_pos,Nat.mod_lt,prioritized_borel_expanded_play_legal_block_length,prioritized_borel_expanded_play_legal_take_succ_getD,List.take_prefix,List.length_take,min_eq_left,Nat.succ_le_of_lt,if_pos,if_neg,mtlemma prioritized_borel_expanded_play_legal_is_real {Q : Type} [Fintype Q] (G : PrioritizedBorelGame Q 3) (π : ℕ → TreeGameEdge Q 3) (hlegal : ∀ n, π n ∈ G.edges) (n : ℕ) : enc1385Real G (enc1385ExpandedPlay G π n).source_state (enc1385ExpandedPlay G π n).dir (enc1385ExpandedPlay G π n).prio := by dsimp [enc1385ExpandedPlay] set L := Fintype.card Q + 1 set e := π (n / L) set i := n % L have hLpos : 0 < L := Nat.succ_pos _ have hi : i < L := Nat.mod_lt n hLpos have hlen : (enc1385Block e).length = L := prioritized_borel_expanded_play_legal_block_length e have hi_len : i < (enc1385Block e).length := by rw [hlen]; exact hi have htake : (enc1385Block e).take i ++ [(enc1385Block e).getD i false] = (enc1385Block e).take (i + 1) := prioritized_borel_expanded_play_legal_take_succ_getD (enc1385Block e) i hi_len false refine ⟨e, hlegal (n / L), rfl, rfl, ?_, ?_⟩ · rw [htake] exact List.take_prefix (i + 1) (enc1385Block e) · rw [htake] rw [List.length_take] rw [hlen] have hmin : min (i + 1) L = i + 1 := min_eq_left (Nat.succ_le_of_lt hi) rw [hmin] have heq : (i + 1 = L) ↔ (i = Fintype.card Q) := by dsimp [L] omega by_cases h : i = Fintype.card Q · rw [if_pos (heq.mpr h), if_pos h] · rw [if_neg (mt heq.mp h), if_neg h]
Within an edge block (i + 1 < L), the source phase state at step n + 1 equals the target phase state at step n.
When advancing inside the block for edge e = π (n / L), the length of the pending bit sequence is i + 1 < |Q| + 1. The step transition function enc1385Step keeps the same original node and state and appends the new bit to the pending buffer, which exactly matches the state of the expanded play at step n + 1.
uses
Nat.succ_pos,Nat.mod_lt,prioritized_borel_expanded_play_legal_block_length,prioritized_borel_expanded_play_legal_take_succ_getD,prioritized_borel_expanded_play_legal_div_mod_cases,List.length_take,min_eq_left,Nat.succ_le_of_lt,if_neglemma prioritized_borel_expanded_play_legal_source_state_next {Q : Type} [Fintype Q] (G : PrioritizedBorelGame Q 3) (π : ℕ → TreeGameEdge Q 3) (hnext : ∀ n, (π (n+1)).source_node = (π n).source_node ++ [(π n).dir] ∧ (π (n+1)).source_state = (π n).target_state) (n : ℕ) : (enc1385ExpandedPlay G π (n + 1)).source_state = (enc1385ExpandedPlay G π n).target_state := by dsimp [enc1385ExpandedPlay] set L := Fintype.card Q + 1 set e := π (n / L) set i := n % L have hLpos : 0 < L := Nat.succ_pos _ have hi : i < L := Nat.mod_lt n hLpos have hlen : (enc1385Block e).length = L := prioritized_borel_expanded_play_legal_block_length e have hi_len : i < (enc1385Block e).length := by rw [hlen]; exact hi have htake : (enc1385Block e).take i ++ [(enc1385Block e).getD i false] = (enc1385Block e).take (i + 1) := prioritized_borel_expanded_play_legal_take_succ_getD (enc1385Block e) i hi_len false dsimp [enc1385Step] rw [htake] rcases prioritized_borel_expanded_play_legal_div_mod_cases n L hLpos with (⟨h1, hdiv, hmod⟩ | ⟨h2, hdiv, hmod⟩) · rw [hdiv, hmod] have hlen_take : ((enc1385Block e).take (i + 1)).length = i + 1 := by rw [List.length_take, hlen, min_eq_left (Nat.succ_le_of_lt hi)] have hcond : ¬((enc1385Block e).take (i + 1)).length = Fintype.card Q + 1 := by rw [hlen_take] intro h have : i + 1 = L := h omega rw [if_neg hcond]
At a block boundary (i + 1 = L), the target phase state at step n correctly transitions to the source phase state of the next edge at step n + 1.
When the block for edge e = π (n / L) is completed (length |Q| + 1), enc1385Step appends the initial bit (the direction of e) to the tree node, decodes the remaining |Q| bits back into e's target state using prioritized_borel_encoding_decode_state, and empties the pending buffer. By the play continuity assumption hnext, this matches the source node and state of π (n / L + 1).
uses
min_self,if_pos,List.take_length,prioritized_borel_encoding_decode_state,List.take_zero· rw [hdiv, hmod] have hlen_take : ((enc1385Block e).take (i + 1)).length = L := by rw [List.length_take, hlen, h2, min_self] have hcond : ((enc1385Block e).take (i + 1)).length = Fintype.card Q + 1 := hlen_take rw [if_pos hcond] have htake_all : (enc1385Block e).take (i + 1) = enc1385Block e := by rw [h2, ← hlen, List.take_length] rw [htake_all] have hhead : (enc1385Block e).headD false = e.dir := rfl have htail : (enc1385Block e).tail = enc1385StateCode e.target_state := rfl rw [hhead, htail] rw [prioritized_borel_encoding_decode_state] have hnxt := hnext (n / L) have htake0 : List.take 0 (enc1385Block (π (n / L + 1))) = [] := List.take_zero rw [htake0] rw [hnxt.1, hnxt.2]
The expanded play enc1385ExpandedPlay G π is a legal play in enc1385Game G: each edge is allowed, the initial position is correct, and consecutive edges connect properly.
Every step edge belongs to the arena edges because it is real (shown by prioritized_borel_expanded_play_legal_is_real). The initial step has an empty node and the initial game state by hinit, and consecutive steps match in phase state by prioritized_borel_expanded_play_legal_source_state_next and grow the tree node by appending the step's direction bit using List.ofFn_succ'.
uses
Or.inl,prioritized_borel_expanded_play_legal_is_real,prioritized_borel_expanded_play_legal_source_state_next,List.ofFn_succ',List.concat_eq_appendtheorem prioritized_borel_expanded_play_legal {Q : Type} [Fintype Q] (G : PrioritizedBorelGame Q 3) (π : ℕ → TreeGameEdge Q 3) (hlegal : ∀ n, π n ∈ G.edges) (hinit : (π 0).source_node = [] ∧ (π 0).source_state = G.init_state) (hnext : ∀ n, (π (n+1)).source_node = (π n).source_node ++ [(π n).dir] ∧ (π (n+1)).source_state = (π n).target_state) : (∀ n, enc1385ExpandedPlay G π n ∈ (enc1385Game G).edges) ∧ ((enc1385ExpandedPlay G π 0).source_node = [] ∧ (enc1385ExpandedPlay G π 0).source_state = (enc1385Game G).init_state) ∧ ∀ n, (enc1385ExpandedPlay G π (n+1)).source_node = (enc1385ExpandedPlay G π n).source_node ++ [(enc1385ExpandedPlay G π n).dir] ∧ (enc1385ExpandedPlay G π (n+1)).source_state = (enc1385ExpandedPlay G π n).target_state := by refine ⟨fun n => ⟨rfl, Or.inl (prioritized_borel_expanded_play_legal_is_real G π hlegal n)⟩, ?_, fun n => ?_⟩ · dsimp [enc1385ExpandedPlay, enc1385Game] refine ⟨rfl, ?_⟩ simp [hinit.1, hinit.2] · refine ⟨?_, prioritized_borel_expanded_play_legal_source_state_next G π hnext n⟩ dsimp [enc1385ExpandedPlay] rw [List.ofFn_succ', List.concat_eq_append] rfl
prioritized_borel_encoding_state_code_length- The length of the binary state code for any state in Q is equal to the number of states |Q|.
List.getD_eq_getElem- If an index i is within bounds for a list l, the default lookup l.getD i d equals the element l[i].
List.take_succ_eq_append_getElem- For an in-bounds index i, taking i + 1 elements from a list equals taking i elements and appending the i-th element.
Nat.mod_lt- For any positive integer y, x % y < y.
Nat.div_add_mod'- For any natural numbers a and b, (a / b) * b + a % b = a.
Nat.add_comm- Addition of natural numbers is commutative: n + m = m + n.
Nat.add_mul_div_right- For z > 0, (x + y * z) / z = x / z + y.
Nat.div_eq_of_lt- If a < b, then a / b = 0.
Nat.zero_add- Zero is an additive identity on the left: 0 + n = n.
Nat.add_mul_mod_self_right- For natural numbers x, y, z, (x + y * z) % z = x % z.
Nat.mod_eq_of_lt- If a < b, then a % b = a.
Nat.mul_div_left- For n > 0, (m * n) / n = m.
Nat.mul_mod_left- For natural numbers m and n, (m * n) % n = 0.
Nat.succ_pos- The successor of any natural number is strictly positive: 0 < n + 1.
prioritized_borel_expanded_play_legal_block_length- The length of the encoded block for any tree game edge is |Q| + 1.
prioritized_borel_expanded_play_legal_take_succ_getD- Appending the i-th element of a list to its prefix of length i yields the prefix of length i + 1.
List.take_prefix- Taking the first i elements of a list produces a prefix of that list.
List.length_take- The length of the prefix of length i of a list is min(i, length).
min_eq_left- If a ≤ b, then min a b = a.
Nat.succ_le_of_lt- If n < m, then n + 1 ≤ m.
if_pos- If proposition c is true, then (if c then t else e) = t.
if_neg- If proposition c is false, then (if c then t else e) = e.
mt- Modus tollens: if a → b and ¬b, then ¬a.
prioritized_borel_expanded_play_legal_div_mod_cases- When incrementing n modulo L > 0, either the remainder increases by 1 within the same block, or it wraps to 0 while the quotient increases by 1.
min_self- The minimum of an element with itself is that element: min a a = a.
List.take_length- Taking all elements up to the length of a list returns the entire list.
prioritized_borel_encoding_decode_state- Decoding the binary code of a state q recovers the original state q.
List.take_zero- Taking 0 elements from any list yields the empty list [].
Or.inl- From a, one can deduce the disjunction a ∨ b.
prioritized_borel_expanded_play_legal_is_real- Every step of the expanded play is a valid real edge transition in the encoded arena.
prioritized_borel_expanded_play_legal_source_state_next- The source state of the expanded play at step n + 1 matches the target state at step n.
List.ofFn_succ'- A list constructed from a function on Fin (n + 1) equals the list for the first n values concatenated with the final value.
List.concat_eq_append- Concatenating a single element to a list via `concat` equals list append `as ++ [a]`.
- Several integer arithmetic steps (e.g. establishing division and modulo updates) are closed by the automated tactic `omega`.
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.
lemma prioritized_borel_expanded_play_legal_block_length {Q : Type} [Fintype Q] (e : TreeGameEdge Q 3) : (enc1385Block e).length = Fintype.card Q + 1 := by simp [enc1385Block, prioritized_borel_encoding_state_code_length]lemma prioritized_borel_expanded_play_legal_take_succ_getD {α : Type*} (l : List α) (i : ℕ) (hi : i < l.length) (d : α) : l.take i ++ [l.getD i d] = l.take (i + 1) := by rw [List.getD_eq_getElem l d hi, ← List.take_succ_eq_append_getElem hi]lemma prioritized_borel_expanded_play_legal_div_mod_cases (n L : ℕ) (hL : 0 < L) : (n % L + 1 < L ∧ (n + 1) / L = n / L ∧ (n + 1) % L = n % L + 1) ∨ (n % L + 1 = L ∧ (n + 1) / L = n / L + 1 ∧ (n + 1) % L = 0) := by set k := n / L set r := n % L have hr : r < L := Nat.mod_lt n hL have hn : n = k * L + r := (Nat.div_add_mod' n L).symm by_cases h : r + 1 < L · left have hn1 : n + 1 = k * L + (r + 1) := by omega refine ⟨h, ?_, ?_⟩ · rw [hn1] have : (k * L + (r + 1)) / L = k := by rw [Nat.add_comm (k * L), Nat.add_mul_div_right (r + 1) k hL] rw [Nat.div_eq_of_lt h, Nat.zero_add] exact this · rw [hn1] rw [Nat.add_comm (k * L), Nat.add_mul_mod_self_right] exact Nat.mod_eq_of_lt h · right have hr1 : r + 1 = L := by omega have hn1 : n + 1 = (k + 1) * L := by calc n + 1 = k * L + (r + 1) := by omega _ = k * L + L := by rw [hr1] _ = (k + 1) * L := by ring refine ⟨hr1, ?_, ?_⟩ · rw [hn1, Nat.mul_div_left (k + 1) hL] · rw [hn1, Nat.mul_mod_left (k + 1) L]lemma prioritized_borel_expanded_play_legal_is_real {Q : Type} [Fintype Q] (G : PrioritizedBorelGame Q 3) (π : ℕ → TreeGameEdge Q 3) (hlegal : ∀ n, π n ∈ G.edges) (n : ℕ) : enc1385Real G (enc1385ExpandedPlay G π n).source_state (enc1385ExpandedPlay G π n).dir (enc1385ExpandedPlay G π n).prio := by dsimp [enc1385ExpandedPlay] set L := Fintype.card Q + 1 set e := π (n / L) set i := n % L have hLpos : 0 < L := Nat.succ_pos _ have hi : i < L := Nat.mod_lt n hLpos have hlen : (enc1385Block e).length = L := prioritized_borel_expanded_play_legal_block_length e have hi_len : i < (enc1385Block e).length := by rw [hlen]; exact hi have htake : (enc1385Block e).take i ++ [(enc1385Block e).getD i false] = (enc1385Block e).take (i + 1) := prioritized_borel_expanded_play_legal_take_succ_getD (enc1385Block e) i hi_len false refine ⟨e, hlegal (n / L), rfl, rfl, ?_, ?_⟩ · rw [htake] exact List.take_prefix (i + 1) (enc1385Block e) · rw [htake] rw [List.length_take] rw [hlen] have hmin : min (i + 1) L = i + 1 := min_eq_left (Nat.succ_le_of_lt hi) rw [hmin] have heq : (i + 1 = L) ↔ (i = Fintype.card Q) := by dsimp [L] omega by_cases h : i = Fintype.card Q · rw [if_pos (heq.mpr h), if_pos h] · rw [if_neg (mt heq.mp h), if_neg h]lemma prioritized_borel_expanded_play_legal_source_state_next {Q : Type} [Fintype Q] (G : PrioritizedBorelGame Q 3) (π : ℕ → TreeGameEdge Q 3) (hnext : ∀ n, (π (n+1)).source_node = (π n).source_node ++ [(π n).dir] ∧ (π (n+1)).source_state = (π n).target_state) (n : ℕ) : (enc1385ExpandedPlay G π (n + 1)).source_state = (enc1385ExpandedPlay G π n).target_state := by dsimp [enc1385ExpandedPlay] set L := Fintype.card Q + 1 set e := π (n / L) set i := n % L have hLpos : 0 < L := Nat.succ_pos _ have hi : i < L := Nat.mod_lt n hLpos have hlen : (enc1385Block e).length = L := prioritized_borel_expanded_play_legal_block_length e have hi_len : i < (enc1385Block e).length := by rw [hlen]; exact hi have htake : (enc1385Block e).take i ++ [(enc1385Block e).getD i false] = (enc1385Block e).take (i + 1) := prioritized_borel_expanded_play_legal_take_succ_getD (enc1385Block e) i hi_len false dsimp [enc1385Step] rw [htake] rcases prioritized_borel_expanded_play_legal_div_mod_cases n L hLpos with (⟨h1, hdiv, hmod⟩ | ⟨h2, hdiv, hmod⟩) · rw [hdiv, hmod] have hlen_take : ((enc1385Block e).take (i + 1)).length = i + 1 := by rw [List.length_take, hlen, min_eq_left (Nat.succ_le_of_lt hi)] have hcond : ¬((enc1385Block e).take (i + 1)).length = Fintype.card Q + 1 := by rw [hlen_take] intro h have : i + 1 = L := h omega rw [if_neg hcond] · rw [hdiv, hmod] have hlen_take : ((enc1385Block e).take (i + 1)).length = L := by rw [List.length_take, hlen, h2, min_self] have hcond : ((enc1385Block e).take (i + 1)).length = Fintype.card Q + 1 := hlen_take rw [if_pos hcond] have htake_all : (enc1385Block e).take (i + 1) = enc1385Block e := by rw [h2, ← hlen, List.take_length] rw [htake_all] have hhead : (enc1385Block e).headD false = e.dir := rfl have htail : (enc1385Block e).tail = enc1385StateCode e.target_state := rfl rw [hhead, htail] rw [prioritized_borel_encoding_decode_state] have hnxt := hnext (n / L) have htake0 : List.take 0 (enc1385Block (π (n / L + 1))) = [] := List.take_zero rw [htake0] rw [hnxt.1, hnxt.2]theorem prioritized_borel_expanded_play_legal {Q : Type} [Fintype Q] (G : PrioritizedBorelGame Q 3) (π : ℕ → TreeGameEdge Q 3) (hlegal : ∀ n, π n ∈ G.edges) (hinit : (π 0).source_node = [] ∧ (π 0).source_state = G.init_state) (hnext : ∀ n, (π (n+1)).source_node = (π n).source_node ++ [(π n).dir] ∧ (π (n+1)).source_state = (π n).target_state) : (∀ n, enc1385ExpandedPlay G π n ∈ (enc1385Game G).edges) ∧ ((enc1385ExpandedPlay G π 0).source_node = [] ∧ (enc1385ExpandedPlay G π 0).source_state = (enc1385Game G).init_state) ∧ ∀ n, (enc1385ExpandedPlay G π (n+1)).source_node = (enc1385ExpandedPlay G π n).source_node ++ [(enc1385ExpandedPlay G π n).dir] ∧ (enc1385ExpandedPlay G π (n+1)).source_state = (enc1385ExpandedPlay G π n).target_state := by refine ⟨fun n => ⟨rfl, Or.inl (prioritized_borel_expanded_play_legal_is_real G π hlegal n)⟩, ?_, fun n => ?_⟩ · dsimp [enc1385ExpandedPlay, enc1385Game] refine ⟨rfl, ?_⟩ simp [hinit.1, hinit.2] · refine ⟨?_, prioritized_borel_expanded_play_legal_source_state_next G π hnext n⟩ dsimp [enc1385ExpandedPlay] rw [List.ofFn_succ', List.concat_eq_append] rfl