The areas / V21. Dynamics, ergodic theory and information theory
Mathlib.InformationTheory.Coding.UniquelyDecodable
3 declarations and 4 deprecated aliases. Mathlib docs · Source
Uniquely Decodable Codes
This file defines uniquely decodable codes and proves basic properties.
Main definitions
IsUniquelyDecodable: A set of codewords is uniquely decodable if distinct concatenations of codewords yield distinct strings.
Main results
IsUniquelyDecodable.epsilon_notMem: Uniquely decodable codes cannot contain the empty string.IsUniquelyDecodable.flatten_injective: The flatten function is injective on lists of codewords from a uniquely decodable code.
def InformationTheory.IsUniquelyDecodable E3 #
{α : Type u_1} → Set (List α) → Prop
A set of lists is uniquely decodable if distinct concatenations yield distinct strings.
theorem InformationTheory.IsUniquelyDecodable.epsilon_notMem E3 #
∀ {α : Type u_1} {S : Set (List α)}, InformationTheory.IsUniquelyDecodable S → [] ∉ S
If a code is uniquely decodable, it does not contain the empty string.
The empty string can be "decoded" as either zero or two copies of itself, violating unique decodability.
theorem InformationTheory.IsUniquelyDecodable.flatten_injective E3 #
∀ {α : Type u_1} {S : Set (List α)}, InformationTheory.IsUniquelyDecodable S → Function.Injective fun L ↦ (↑L).flatten
Deprecated aliases
| Name | New name | Since |
|---|---|---|
InformationTheory.IsUniquelyDecodable.epsilon_not_mem | InformationTheory.IsUniquelyDecodable.epsilon_notMem | 2026-09-28 |
InformationTheory.UniquelyDecodable | InformationTheory.IsUniquelyDecodable | 2026-08-16 |
InformationTheory.UniquelyDecodable.epsilon_not_mem | InformationTheory.IsUniquelyDecodable.epsilon_notMem | 2026-08-16 |
InformationTheory.UniquelyDecodable.flatten_injective | InformationTheory.IsUniquelyDecodable.flatten_injective | 2026-08-16 |