prioritized_borel_encoding_decode_state
Decoding a valid one-hot state code recovers the original state.
Statement
theorem prioritized_borel_encoding_decode_state {Q : Type} [Fintype Q] (G : PrioritizedBorelGame Q 3) (q : Q) : enc1385Decode G (enc1385StateCode q) = q
- Source
- Phase-state encoding for arXiv:2611.10136, Conjecture 19.
- Verified
- 17 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 3
- enc1385GameGiven a finite-state three-priority tree game, construct a phase-state game that encodes each original direction followed by a one-hot…
- prioritized_borel_encoding_state_code_injectiveDistinct states have distinct one-hot bit codes.
- PrioritizedBorelGameA structure PrioritizedBorelGame (Q : Type*) (k : ℕ) representing a prioritized Borel game with state space Q and k priorities, with…
- Used by 2
- prioritized_borel_expanded_play_legalThe encoded sequence of any legal original play is a legal play of the phase-state arena, with the correct initial position and…
- prioritized_borel_encoding_replay_boundaryReplaying an edge block from a block boundary appends its encoded bits to the phase-game node and ends at the original child node and…
The proof, explained
The decoding function enc1385Decode inspects whether the input bitstring encodes some state; if so, it selects a witness via Classical.choose, and otherwise falls back to the initial state. The state q itself witnesses that its code is valid, so the decoder reduces to the chosen witness. Because state encoding is injective, this chosen witness must be q.
There exists a state whose code is enc1385StateCode q.
Working under classical logic, q itself trivially witnesses that enc1385StateCode q is the encoding of some state r, since enc1385StateCode q = enc1385StateCode q by reflexivity.
classical have h : ∃ r : Q, enc1385StateCode r = enc1385StateCode q := ⟨q,rfl⟩
The expression enc1385Decode G (enc1385StateCode q) evaluates to Classical.choose h.
Unfolding the definition of enc1385Decode reveals a dependent conditional that checks whether a valid state code exists. Because hypothesis h provides this existential witness, dif_pos reduces the conditional to the positive branch, which extracts the witness via Classical.choose.
uses
dif_posunfold enc1385Decode rw [dif_pos h]
Classical.choose h = q, completing the proof.
By Classical.choose_spec, the chosen state satisfies enc1385StateCode (Classical.choose h) = enc1385StateCode q. Because enc1385StateCode is injective (prioritized_borel_encoding_state_code_injective), the decoded state must equal q.
uses
prioritized_borel_encoding_state_code_injective,Classical.choose_specexact prioritized_borel_encoding_state_code_injective (Classical.choose_spec h)
dif_pos- If a condition c holds, a dependent conditional `if hc : c then t else e` reduces to the 'then' branch t hc.
Classical.choose_spec- Given an existential statement ∃ x, p x, the witness Classical.choose h satisfies the predicate p.
prioritized_borel_encoding_state_code_injective- The state encoding function enc1385StateCode is injective: distinct states have distinct bitstring codes.
- The decoding function `enc1385Decode` is defined non-constructively using `Classical.choose` over a dependent `if-then-else`: it searches for a matching state and defaults to `G.init_state` if no match exists.
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_encoding_decode_state {Q : Type} [Fintype Q] (G : PrioritizedBorelGame Q 3) (q : Q) : enc1385Decode G (enc1385StateCode q) = q := by classical have h : ∃ r : Q, enc1385StateCode r = enc1385StateCode q := ⟨q,rfl⟩ unfold enc1385Decode rw [dif_pos h] exact prioritized_borel_encoding_state_code_injective (Classical.choose_spec h)