Documentation

CslibFrontier.Logics.RealArithmetic.FormulaTokenDecoding

Strict decoding of real-arithmetic formula tokens #

The dimension-independent decoder reads the constructor stream of encFormula and keeps each comparison's term word as its payload. The strict framed-list decoder supplies polynomial time and rejects malformed tags and frames. The shape of the formula and the syntax of its term words can be checked separately.

Decode framed formula tags with their comparison words, independently of dimension.

A canonical formula word decodes to its prefix tokens with encoded comparison terms.

theorem Cslib.Logic.RealArithmetic.formulaTermWord_length_lt_of_decode {word term : List Bool} {tokens : List FormulaToken} (h : formulaTokensDecoder.decode word = some tokens) (hterm : Sum.inr (Sum.inl term) ∈ tokens ∨ Sum.inr (Sum.inr (Sum.inl term)) ∈ tokens) :
term.length < word.length

The bits of an equality or inequality term payload fit strictly inside the formula word.