cable_instance_code
def
The binary word encoding an instance of planar cable Steiner tree given as a list I of cables, each cable a list of segments with rational endpoints: the number of cables in nat_self_delimiting_code, followed by rat_segment_list_code of each cable in order.
Statement
def cable_instance_code (I : List (List ((ℚ × ℚ) × (ℚ × ℚ)))) : List Bool- Source
- Input encoding, helper for the polynomial-time statement of OP-2019 (arXiv:2611.24611 (Inapproximability of Euclidean Steiner Tree), Section 6.1, after Corollary 20 (open question: is planar Euclidean Cable Steiner Tree APX-hard or does it admit a PTAS?)).
- Verified
- 23 Nov 2026
- Axioms
- none listed
- Built on 2
- nat_self_delimiting_codeThe self-delimiting binary code of a natural number m: each bit b of the binary expansion of m (least significant bit first, as in…
- rat_segment_list_codeThe binary word encoding a list S of plane segments, each given by two endpoints ((x1, y1), (x2, y2)) with rational coordinates: the…
- Used by 1
- cable_instance_code_nilThe empty instance is encoded by the single bit false.
Lean source view module on GitHub
/-- The binary code of a cable instance (a list of cables, each a list of rational segments): the number of cables, then each cable's `rat_segment_list_code`. -/ def cable_instance_code (I : List (List ((ℚ × ℚ) × (ℚ × ℚ)))) : List Bool := nat_self_delimiting_code I.length ++ I.flatMap rat_segment_list_code