Documentation

MIPRE.Foundations.Introspection.AuxiliaryAnswerCoding

Canonical auxiliary answer coding #

Pauli payloads are left as bytes for the separate field-aware parser. The other three answer shapes use full-register binary vectors and the existing canonical tuple syntax. Valid raw tuples re-encode exactly, so same-type byte consistency is exactly consistency of parsed answers.

Total type-directed decoding; the caller checks canonical format first.

Equations
Instances For

    Decoding chooses exactly the constructor required by the question.

    Every correctly tagged parsed answer survives the byte round trip.

    theorem MIPRE.Introspection.AuxiliaryAnswer.bits_decode {P : Type u_1} {Q ℓ : ℕ} (R : ℕ) (t : QuestionType P ℓ) (bs : Cost.BitStr) (h : Valid Q R t bs) :
    bits (decode Q t bs) = bs

    A parser-accepted auxiliary payload is the exact canonical encoding of its decoded answer, including the full third register of a Hide answer.

    For a fixed type, byte equality and parsed equality coincide.