prioritized_borel_encoding_state_code_injective
Distinct states have distinct one-hot bit codes.
Statement
theorem prioritized_borel_encoding_state_code_injective {Q : Type} [Fintype Q] : Function.Injective (@enc1385StateCode Q _)
- Source
- Phase-state encoding for arXiv:2611.10136, Conjecture 19.
- Verified
- 17 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- enc1385GameGiven a finite-state three-priority tree game, construct a phase-state game that encodes each original direction followed by a one-hot…
- Used by 1
- prioritized_borel_encoding_decode_stateDecoding a valid one-hot state code recovers the original state.
The proof, explained
To prove that the one-hot state encoding is injective, we reduce the equality of two states to the equality of their indices in Fin (|Q|) using the injectivity of the finite-type equivalence. The injectivity of List.ofFn implies that if two states have identical state codes, their indicator functions across all indices are equal. Evaluating this function equality at the index of the first state forces the second state to have the exact same index, showing the two states are identical.
To show that two states with equal bit codes are identical, it suffices to show that their indices under Fintype.equivFin are equal.
We introduce states q and r and the hypothesis h that enc1385StateCode q = enc1385StateCode r. Since Fintype.equivFin Q is an equivalence between Q and Fin (Fintype.card Q), its underlying function is injective, so proving q = r reduces to proving that their indices (Fintype.equivFin Q) q and (Fintype.equivFin Q) r are equal.
uses
Fintype.equivFinclassical intro q r h apply (Fintype.equivFin Q).injective
The indicator functions mapping each index to whether it equals the index of q and r, respectively, are identical.
The state code enc1385StateCode is defined by applying List.ofFn to the indicator function of the state's index. Because List.ofFn is injective (List.ofFn_injective), the equality of the two state code lists implies that the indicator functions fun i => decide (i = equivFin q) and fun i => decide (i = equivFin r) must be equal.
uses
List.ofFn_injective,enc1385StateCodehave hf : (fun i : Fin (Fintype.card Q) => decide (i = Fintype.equivFin Q q)) = (fun i : Fin (Fintype.card Q) => decide (i = Fintype.equivFin Q r)) := by apply List.ofFn_injective simpa [enc1385StateCode] using h
The indices of q and r are equal, which completes the proof.
Specializing the equality of indicator functions hf to the index of q using congrFun yields decide (equivFin q = equivFin q) = decide (equivFin q = equivFin r). Since equivFin q = equivFin q is true, the left side simplifies to true, which forces the equality equivFin q = equivFin r.
uses
congrFunhave he := congrFun hf (Fintype.equivFin Q q) simpa using he
Fintype.equivFin- the canonical bijection between a finite type α and the index type Fin (|α|)
enc1385StateCode- the function mapping each state in a finite type to its one-hot bit code, represented as a list of booleans indicating equality with each index
List.ofFn_injective- the mapping List.ofFn from a function on Fin n to a list of length n is injective
congrFun- if two functions f and g are equal, their values f a and g a at any point a are equal
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_state_code_injective {Q : Type} [Fintype Q] : Function.Injective (@enc1385StateCode Q _) := by classical intro q r h apply (Fintype.equivFin Q).injective have hf : (fun i : Fin (Fintype.card Q) => decide (i = Fintype.equivFin Q q)) = (fun i : Fin (Fintype.card Q) => decide (i = Fintype.equivFin Q r)) := by apply List.ofFn_injective simpa [enc1385StateCode] using h have he := congrFun hf (Fintype.equivFin Q q) simpa using he