AFTD Auto-Formalizing Theoretical Domains

prioritized_borel_encoding_follow_proper_prefix

theoremverified

At an original position controlled by the given player, after any number of phase-game strategy steps up to the number of states, the original node and state are unchanged; the phase holds the selected bit prefix, the encoded node has that prefix appended, and the prefix extends to the code of a legal original edge.

Statement

theorem prioritized_borel_encoding_follow_proper_prefix {Q M : Type} [Fintype Q] (G : PrioritizedBorelGame Q 3)
    (pl : BorelGamePlayer) (σ : FiniteMemoryStrategy (enc1385Game G) pl M)
    (m : M) (node v : List Bool) (q : Q) (hown : G.owner (v,q) = pl) :
    ∀ n, n ≤ Fintype.card Q →
      ∃ bits : List Bool, bits.length = n ∧
        (enc1385Follow G pl σ m node ⟨v,q,[]⟩ n).2.1 = node ++ bits ∧
        (enc1385Follow G pl σ m node ⟨v,q,[]⟩ n).2.2 = ⟨v,q,bits⟩ ∧
        ∃ e ∈ G.edges, e.source_node = v ∧ e.source_state = q ∧ bits <+: enc1385Block e
Source
Controlled block simulation for arXiv:2611.10136, Conjecture 19.
Verified
17 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 7
  • enc1385GameGiven a finite-state three-priority tree game, construct a phase-state game that encodes each original direction followed by a one-hot…
  • enc1385FollowStarting with a phase-game memory and position, follow a fixed strategy for a specified number of phase steps, returning the resulting…
  • FiniteMemoryStrategyA structure FiniteMemoryStrategy {Q : Type*} {k : ℕ} (G : PrioritizedBorelGame Q k) (pl : BorelGamePlayer) (M : Type*) representing a…
  • prioritized_borel_encoding_real_prefix_has_nextA proper prefix of the code of a legal edge always admits a real next encoding move at the matching source position.
  • 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…
  • BorelGamePlayerThe two players in a prioritized Borel game, Eve and Adam.
Used by 3

The proof, explained

The theorem is proved by induction on the number of steps n ≤ |Q|. In the base case n = 0, following zero steps leaves the original node and state unchanged, and the empty bit string trivially prefixes an outgoing edge. For the inductive step from n to n + 1, the prefix is strictly shorter than a full edge block of length |Q| + 1, so the original node and state remain unchanged and the position is still owned by the given player. Consequently, the player's strategy choice is a legal move; because valid encoding transitions exist, the strategy cannot take a default dummy move and must pick a real encoding transition, which appends the chosen bit to the prefix along a legal original edge without resetting the phase.

  1. For n = 0, the theorem holds with the empty bit sequence.

    We proceed by induction on n. In the base case n = 0, we choose the empty bit sequence `[]`, which has length 0. Following the strategy for 0 steps leaves the node and the encoded state ⟨v, q, []⟩ unchanged. Since the original game has at least one outgoing edge e from (v, q), and the empty list is a prefix of any list by `List.nil_prefix`, all required conditions hold.

    lines 9–17

    uses List.nil_prefix

      classical
      intro n
      induction n with
      | zero =>
        intro _
        obtain ⟨e, he, hv, hq⟩ := G.edges_outgoing v q
        refine ⟨[], rfl, ?_, rfl, e, he, hv, hq, ?_⟩
        · simp [enc1385Follow]
        · exact List.nil_prefix
  2. In the induction step, the state after n steps is still owned by the given player, and the strategy selects a valid edge in the encoded game.

    Assuming n + 1 ≤ |Q|, we have n ≤ |Q| by linear arithmetic. The induction hypothesis provides a prefix `bits` of length n such that the state `st` after n steps has original node v, original state q, and pending prefix `bits`. Because the original node and state are unchanged, ownership of `st` coincides with that of (v, q), which is player `pl`. Thus, the strategy's choice `a` is a valid outgoing edge from `st` in the encoded game.

    lines 18–27

      | succ n ih =>
        intro hn
        have hn' : n ≤ Fintype.card Q := by omega
        obtain ⟨bits, hlen, hnode, hstate, e, he, hv, hq, hp⟩ := ih hn'
        let st := enc1385Follow G pl σ m node ⟨v,q,[]⟩ n
        let a := σ.choice st.1 st.2.1 st.2.2
        have ho : (enc1385Game G).owner (st.2.1, st.2.2) = pl := by
          change G.owner (st.2.2.origNode, st.2.2.origState) = pl
          simpa [st, hstate] using hown
        have ha := σ.choice_edge st.1 st.2.1 st.2.2 ho
  3. There exists at least one real encoding transition extending the current pending prefix.

    By the induction hypothesis, `bits` is a prefix of the block encoding an outgoing edge e from (v, q). Since n + 1 ≤ |Q|, the length n of `bits` is strictly less than |Q| + 1. Lemma `prioritized_borel_encoding_real_prefix_has_next` ensures that any prefix of an edge block shorter than |Q| + 1 can be extended by a valid encoding transition (`enc1385Real`).

    lines 28–33

    uses prioritized_borel_encoding_real_prefix_has_next

        have hreal_exists : ∃ bit prio, enc1385Real G st.2.2 bit prio := by
          apply prioritized_borel_encoding_real_prefix_has_next G st.2.2 e he
          · simpa [st, hstate] using hv
          · simpa [st, hstate] using hq
          · simpa [st, hstate] using hp
          · simpa [st, hstate, hlen] using (show n < Fintype.card Q + 1 by omega)
  4. The transition chosen by the strategy is a real encoding transition extending to an original edge e'.

    Because the strategy's choice `a` is a valid game edge, it must be an allowed transition (`enc1385Allowed`). An allowed transition is either a real encoding transition or a default dummy transition taken only when no real transition exists. Since we proved that a real transition exists, the dummy case is contradictory (ruled out by `False.elim`). Hence `a` is a real encoding step, meaning its direction bit extends `bits` along the encoding block of some legal edge e' from (v, q).

    lines 34–42

    uses False.elim

        have hsrc : a.source_state = st.2.2 := ha.2.2
        have ha_allowed : enc1385Allowed G st.2.2 a.dir a.prio := by
          have h : enc1385Allowed G a.source_state a.dir a.prio := ha.1.2
          simpa only [hsrc] using h
        have ha_real : enc1385Real G st.2.2 a.dir a.prio := by
          rcases ha_allowed with hr | ⟨hnone, _, _⟩
          · exact hr
          · exact False.elim (hnone hreal_exists)
        obtain ⟨e', he', hv', hq', hp', _⟩ := ha_real
  5. The target state appends the chosen direction bit to the pending bits, leaving the original node and state unchanged.

    The target state is determined by `enc1385Step`. Since n + 1 ≤ |Q|, the extended list of bits `bits ++ [a.dir]` has length n + 1 < |Q| + 1, so the block is still incomplete. Thus, the transition step does not trigger a block decode or state change, but simply appends `a.dir` to the pending bits while preserving the original node v and state q.

    lines 43–50

        have hne : (bits ++ [a.dir]).length ≠ Fintype.card Q + 1 := by
          simp [hlen]
          omega
        have htarget : a.target_state = ⟨v,q,bits ++ [a.dir]⟩ := by
          have h : a.target_state = enc1385Step G a.source_state a.dir := ha.1.1
          rw [hsrc, show st.2.2 = ⟨v,q,bits⟩ from hstate] at h
          have hlenne : bits.length ≠ Fintype.card Q := by omega
          simpa [enc1385Step, hlenne] using h
  6. The extended sequence `bits ++ [a.dir]` satisfies all conditions of the theorem for n + 1.

    The extended sequence `bits ++ [a.dir]` has length n + 1. By the definition of `enc1385Follow`, the node string after n + 1 steps appends `a.dir` to the node string after n steps; rewriting using the inductive hypothesis and associativity of list concatenation (`List.append_assoc`) shows it equals `node ++ (bits ++ [a.dir])`. The target state is ⟨v, q, bits ++ [a.dir]⟩ as established in the previous step, and the prefix extends the encoding block of the valid original edge e'.

    lines 51–58

    uses List.append_assoc

        refine ⟨bits ++ [a.dir], by simp [hlen], ?_, ?_, e', he', ?_, ?_, ?_⟩
        · change st.2.1 ++ [a.dir] = node ++ (bits ++ [a.dir])
          rw [hnode, List.append_assoc]
        · change a.target_state = ⟨v,q,bits ++ [a.dir]⟩
          exact htarget
        · simpa [st, hstate] using hv'
        · simpa [st, hstate] using hq'
        · simpa [st, hstate] using hp'
List.nil_prefix
The empty list is a prefix of any list.
prioritized_borel_encoding_real_prefix_has_next
If an encoded state's pending bits form a prefix of length strictly less than |Q| + 1 of the block encoding an original edge, then there exists a valid next bit and priority extending that prefix in the encoding game.
False.elim
From a contradiction (False), any proposition follows (principle of explosion).
List.append_assoc
Concatenation of lists is associative: (as ++ bs) ++ cs = as ++ (bs ++ cs).

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

theorem prioritized_borel_encoding_follow_proper_prefix {Q M : Type} [Fintype Q] (G : PrioritizedBorelGame Q 3)    (pl : BorelGamePlayer) (σ : FiniteMemoryStrategy (enc1385Game G) pl M)    (m : M) (node v : List Bool) (q : Q) (hown : G.owner (v,q) = pl) :    ∀ n, n ≤ Fintype.card Q →      ∃ bits : List Bool, bits.length = n ∧        (enc1385Follow G pl σ m node ⟨v,q,[]⟩ n).2.1 = node ++ bits ∧        (enc1385Follow G pl σ m node ⟨v,q,[]⟩ n).2.2 = ⟨v,q,bits⟩ ∧        ∃ e ∈ G.edges, e.source_node = v ∧ e.source_state = q ∧ bits <+: enc1385Block e := by  classical  intro n  induction n with  | zero =>    intro _    obtain ⟨e, he, hv, hq⟩ := G.edges_outgoing v q    refine ⟨[], rfl, ?_, rfl, e, he, hv, hq, ?_⟩    · simp [enc1385Follow]    · exact List.nil_prefix  | succ n ih =>    intro hn    have hn' : n ≤ Fintype.card Q := by omega    obtain ⟨bits, hlen, hnode, hstate, e, he, hv, hq, hp⟩ := ih hn'    let st := enc1385Follow G pl σ m node ⟨v,q,[]⟩ n    let a := σ.choice st.1 st.2.1 st.2.2    have ho : (enc1385Game G).owner (st.2.1, st.2.2) = pl := by      change G.owner (st.2.2.origNode, st.2.2.origState) = pl      simpa [st, hstate] using hown    have ha := σ.choice_edge st.1 st.2.1 st.2.2 ho    have hreal_exists : ∃ bit prio, enc1385Real G st.2.2 bit prio := by      apply prioritized_borel_encoding_real_prefix_has_next G st.2.2 e he      · simpa [st, hstate] using hv      · simpa [st, hstate] using hq      · simpa [st, hstate] using hp      · simpa [st, hstate, hlen] using (show n < Fintype.card Q + 1 by omega)    have hsrc : a.source_state = st.2.2 := ha.2.2    have ha_allowed : enc1385Allowed G st.2.2 a.dir a.prio := by      have h : enc1385Allowed G a.source_state a.dir a.prio := ha.1.2      simpa only [hsrc] using h    have ha_real : enc1385Real G st.2.2 a.dir a.prio := by      rcases ha_allowed with hr | ⟨hnone, _, _⟩      · exact hr      · exact False.elim (hnone hreal_exists)    obtain ⟨e', he', hv', hq', hp', _⟩ := ha_real    have hne : (bits ++ [a.dir]).length ≠ Fintype.card Q + 1 := by      simp [hlen]      omega    have htarget : a.target_state = ⟨v,q,bits ++ [a.dir]⟩ := by      have h : a.target_state = enc1385Step G a.source_state a.dir := ha.1.1      rw [hsrc, show st.2.2 = ⟨v,q,bits⟩ from hstate] at h      have hlenne : bits.length ≠ Fintype.card Q := by omega      simpa [enc1385Step, hlenne] using h    refine ⟨bits ++ [a.dir], by simp [hlen], ?_, ?_, e', he', ?_, ?_, ?_⟩    · change st.2.1 ++ [a.dir] = node ++ (bits ++ [a.dir])      rw [hnode, List.append_assoc]    · change a.target_state = ⟨v,q,bits ++ [a.dir]⟩      exact htarget    · simpa [st, hstate] using hv'    · simpa [st, hstate] using hq'    · simpa [st, hstate] using hp'
See it in the graphDiscuss this resultChallenge it