Documentation

Mathlib.InformationTheory.Coding.PrefixFree

Prefix-Free Codes #

This file defines prefix-free codes and proves that every prefix-free code not containing the empty word is uniquely decodable.

Main definitions #

Main results #

def InformationTheory.IsPrefixFree {α : Type u_1} (S : Set (List α)) :

A set of words is prefix-free if two words in the set cannot be distinct when one is a prefix of the other.

Equations
Instances For

    A prefix-free set containing the empty word is the singleton containing the empty word.

    theorem InformationTheory.IsPrefixFree.anti {α : Type u_1} {S T : Set (List α)} (hS : IsPrefixFree S) (hTS : TS) :

    Any subset of a prefix-free set is prefix-free.

    A prefix-free code not containing the empty word is uniquely decodable.

    A nontrivial prefix-free code is uniquely decodable.