Documentation

Mathlib.InformationTheory.Coding.UniquelyDecodable

Uniquely Decodable Codes #

This file defines uniquely decodable codes and proves basic properties.

Main definitions #

Main results #

A set of lists is uniquely decodable if distinct concatenations yield distinct strings.

Equations
Instances For

    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.UniquelyDecodable.flatten_injective {α : Type u_1} {S : Set (List α)} (h : UniquelyDecodable S) :
    Function.Injective fun (L : { L : List (List α) // ∀ (x : List α), x Lx S }) => (↑L).flatten