Proof of Corollary 8, p. 8 — composing with a finite maximal prefix code multiplies the shortest synchronizing length by a factor between m and M, plus an additive term
ProvedSyncPrefix.Huffman.composition_boundsLet be a synchronizing complete automaton over whose shortest synchronizing word has length . Let be a finite maximal prefix code over with shortest and longest codeword lengths and , let be a bijection, and let be a word over with (a synchronizing word of ). Let be the composition decoder (the tree of substituted for the transitions of ). Then is synchronizing, and the length of its shortest synchronizing word satisfies
For the Wielandt code (, , ) this gives , which contains the bracket printed in the proof of Corollary 8 with . The proof cites Theorem 7, which is about absorbing pairs of codes rather than synchronizing words of decoders; the statement here is the decoder version the argument needs.
Differences from the source:
- generalization: the bracket ℓ log k ≤ ℓ_X ≤ 2(log k + 1)ℓ + Θ((log k)²) for the code Z of the proof → m ℓ ≤ ℓ_X ≤ M ℓ + |w_Z| for every finite maximal prefix code Z and every w_Z with Σw_Z ⊆ Z; reason: with Z = Z_L (m = L, M = L + 1, |w_Z| ≤ L²) it implies the printed bracket.
- generalization: the original automaton, a synchronizing Huffman decoder obtained from Corollary 6 (iii) → any synchronizing complete automaton δY on any state type; reason: the Huffman property is not used by the bracket, and the source's decoder is an instance.
- encoding: "the result of the composition" → the decoder
composeDecoderof the composition (pp. 7–8); reason: the object the proof composes.
import Mathlib import Definitions.Def_SyncPrefix_Huffman_Constructions
namespace SyncPrefix.Huffman
open Computability
/-- The composition bounds of the proof of Corollary 8 (p. 8), in decoder form. Let `δY` be a
synchronizing complete automaton over `β`, `Z` a finite maximal prefix code over `α` with
shortest and longest codeword lengths `m` and `M`, `e : β → Z` a bijection, and `w_Z` a word
with `u w_Z ∈ Z∗` for every word `u`. Then the composition decoder is synchronizing and
`m ℓ ≤ ℓ_X ≤ M ℓ + |w_Z|`, where `ℓ` and `ℓ_X` are the lengths of shortest synchronizing words of
`δY` and of the decoder. -/
theorem composition_bounds {σ α β : Type} [DecidableEq α] (δY : σ → β → σ)
(Z : Finset (List α)) (hZ : IsMaximalPrefixCode (lang Z)) (e : β ≃ {z // z ∈ Z})
(m M : ℕ) (hm : IsLeast ((fun z : List α => z.length) '' (Z : Set (List α))) m)
(hM : IsGreatest ((fun z : List α => z.length) '' (Z : Set (List α))) M)
(wZ : List α) (hwZ : ∀ u : List α, u ++ wZ ∈ (lang Z)∗) (hY : IsSynchronizing δY) :
IsSynchronizing (composeDecoder δY Z e) ∧
m * syncLength δY ≤ syncLength (composeDecoder δY Z e) ∧
syncLength (composeDecoder δY Z e) ≤ M * syncLength δY + wZ.length := by sorry
end SyncPrefix.Huffman
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.