cable_instance_code_nil
The empty instance is encoded by the single bit false.
Statement
theorem cable_instance_code_nil : cable_instance_code [] = [false]- Source
- Sanity check of cable_instance_code.
- Verified
- 23 Nov 2026
- Axioms
Quot.soundpropext- Built on 1
- cable_instance_codeThe 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…
The proof, explained
The encoding of the empty instance `[]` reduces by definition to the self-delimiting code of its length ($0$) concatenated with the concatenation of the encodings of its elements (which is empty). Since the binary representation of $0$ is empty, its self-delimiting code is simply `[false]`. Because all definitions are computable and applied to concrete values, the claim is verified directly by computation using the `decide` tactic.
cable_instance_code [] = [false] automation
Evaluating `cable_instance_code []` unfolds to `nat_self_delimiting_code 0 ++ [].flatMap rat_segment_list_code`. The encoding of 0 is `(Nat.bits 0).flatMap (...) ++ [false]`, which simplifies to `[] ++ [false] = [false]`, while mapping over the empty list gives `[]`. Concatenating these yields `[false]`. Because both sides are concrete finite objects and all involved operations are computable, the `decide` tactic verifies the equality by direct computation.
theorem cable_instance_code_nil : cable_instance_code [] = [false] := by decide
- The `decide` tactic evaluates computable terms via kernel reduction or the bytecode evaluator, closing the goal purely through computation without producing fine-grained proof steps.
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 cable_instance_code_nil : cable_instance_code [] = [false] := by decide