prioritized_borel_encoding_state_code_length
The one-hot code of a state has length equal to the number of states.
Statement
theorem prioritized_borel_encoding_state_code_length {Q : Type} [Fintype Q] (q : Q) : (enc1385StateCode q).length = Fintype.card 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 6
- prioritized_borel_encoding_actions_eq_blockA sequence of zero-priority actions followed by a final action with the original priority equals the encoded edge-action block when its…
- 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.
- 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_block_legalThe complete encoded block of any legal original edge consists of legal phase-game edges when replayed from the matching block boundary.
- 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…
- prioritized_borel_encoding_trace_lengthAn encoded state history has one fixed-length block per original edge.
The proof, explained
The theorem states that the one-hot encoding of any state q in a finite type Q has length equal to the number of states |Q|. The encoding `enc1385StateCode` is defined by tabulating an indicator function over `Fin (Fintype.card Q)` using `List.ofFn`. Unfolding this definition allows the simplifier to reduce the length of the list directly to `Fintype.card Q`.
The length of the state code of q equals the cardinality of Q. automation
Unfolding the definition of `enc1385StateCode` reveals that it constructs a list of length `Fintype.card Q` by applying `List.ofFn` to an indicator function on `Fin (Fintype.card Q)`. The simplifier evaluates the length of this tabulated list to `Fintype.card Q`, directly completing the proof.
uses
enc1385StateCodesimp [enc1385StateCode]
enc1385StateCode- the one-hot encoding of a state q in a finite type Q as a list of booleans, constructed by tabulating over Fin (Fintype.card Q)
- The simplifier automatically applies the lemma that the length of a list constructed with `List.ofFn` on `Fin n` is `n`.
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_length {Q : Type} [Fintype Q] (q : Q) : (enc1385StateCode q).length = Fintype.card Q := by simp [enc1385StateCode]