Documentation

MIPRE.Foundations.Introspection.FieldAnswerParserProg

Exact, bounded parsing of field-valued answer tables #

The number of field elements is supplied in binary and the field width in unary. Before allocating any list of blocks, the count is capped by the actual answer length. The parser checks every width and exact re-encoding, including the absence of trailing bits. Its polynomial bound therefore holds even when a malformed short answer claims an exponentially large number of elements.

This supplies the payload parser for point, polynomial and full Pauli answers. Question-type dispatch and the interpretation of field rows are separate.

Candidate rows, with the binary count capped before the unary scan.

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    Validate the count, every block width, and the exact original bit string.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      theorem MIPRE.Introspection.FieldAnswerParser.parserProg_flatten (rows : List Cost.BitStr) (k : ℕ) (hk : 0 < k) (hw : ∀ row ∈ rows, List.length row = k) :

      Canonically encoded field vectors are returned exactly, without padding or loss.

      Binary shifting computes an exponentially large count without unary allocation.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        Full Pauli payloads: dimension, field width, and raw answer bits.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For