Normalizing the total binary natural-number decoder

TheoremPayload normalization agrees with decode-then-encode#✓fully proved

Normalization agrees with the existing total decoder on every payload, not just canonical encodings.

theorem normalizeNat_eq_encode_decode (bits : List Bool) :
    normalizeNat bits = encodeNat (decodeNat bits)
Uses 1 · Used by 4

TheoremPayload normalization adds at most one bit#✓fully proved

Normalization adds at most one bit.

theorem length_normalizeNat_le (bits : List Bool) :
    (normalizeNat bits).length ≤ bits.length + 1
Uses 1 · Used by 5

TheoremPayload normalization fixes canonical encodings#✓fully proved

Canonical encodings are unchanged.

@[simp] theorem normalizeNat_encodeNat (n : ℕ) :
    normalizeNat (encodeNat n) = encodeNat n
Uses 2
4 fully proved

The dependency explorer needs JavaScript and its graph data.

Download the complete graph data.