Lemma A.3 — the three-level edge check from {−3 + a, b} is feasible iff (a, b) ≠ (1, 1) (explicit construction of the proof)
ProvedUnequalHuffman.NPC.lemma_A_3combinatoricsp2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1trees
For and the three-level construction of the proof (checkData: all coefficients ; sorted leaf intervals level 1: ; level 2: ; level 3: ): a sequence from with the prescribed leaf counts and intervals exists if and only if ; and for each permitted input it is unique, ends with no internal vertices and has score zero.
Source (p. 41): "Lemma A.3. For , there is a three-level construction starting from and ending with no internal vertices that has a feasible sequence if and only if . For each permitted input, the sequence of coordinate multisets is unique and has score zero."
Differences from the source:
- generalization: there is a three-level construction → the explicit construction of the proof (p. 41), checkData; reason: the explicit data implies the existential and is what Lemma 3.2's proof uses
- encoding: ending with no internal vertices → conclusion X_3 = ∅ for the feasible sequence; reason: forced by the leaf counts (2, 2, 4) from two starting vertices
- encoding: feasible sequence of coordinate multisets → X : Fin 4 → Multiset ℤ with the prescribed counts and intervals (IsFeasibleSeq); reason: coordinates are integers
Preamble
import Mathlib import Definitions.Def_UnequalHuffman_NPC_Gadgets
Formal statement
namespace UnequalHuffman.NPC
open LeafData
/-- Lemma A.3 (p. 41), for the three-level edge-check construction of its proof (`checkData`):
for `a, b ∈ {0, 1}`, a sequence from `{-3 + a, b}` with the prescribed leaf counts and intervals
exists iff `(a, b) ≠ (1, 1)`; for each permitted input it is unique, ends with no internal
vertices, and has score zero. -/
theorem lemma_A_3 (a b : ℤ) (ha : a = 0 ∨ a = 1) (hb : b = 0 ∨ b = 1) :
((∃ X : Fin (checkData.length + 1) → Multiset ℤ, checkData.IsFeasibleSeq {-3 + a, b} X) ↔
¬ (a = 1 ∧ b = 1)) ∧
(¬ (a = 1 ∧ b = 1) →
∃ X : Fin (checkData.length + 1) → Multiset ℤ,
checkData.IsFeasibleSeq {-3 + a, b} X ∧ X (Fin.last _) = 0 ∧ checkData.score X = 0 ∧
∀ Y : Fin (checkData.length + 1) → Multiset ℤ,
checkData.IsFeasibleSeq {-3 + a, b} Y → Y = X) := by sorry
end UnequalHuffman.NPC
Source
Chandran and Gajjala, Binary Huffman Coding with Unequal Letter Costs Is NP-Complete, arXiv:2611.04444v1, p. 41, Lemma A.3 (construction from its proof)
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.