Documentation

Complexitylib.DescriptiveComplexity.Encoding.Positions

Reading the structure encoding by table site #

The computable positions recover every relation and constant-table bit. The full encoded length is strictly increasing with universe size, so at a fixed input length there can be at most one structure size.

Every relation and constant-table site occurs in the encoder's ordering.

Every table position lies within the full encoded input.

The existing structure encoder has the named encoded length.

Reading a table site's computed position recovers exactly its stored value.

The unary prefix alone is longer than the represented universe size.

Encoded lengths are positive even when all relation and constant tables are empty.

The unary prefix makes encoded length strictly increasing in universe size.

Every table site occurs exactly once in the encoder's ordering.

The header contains card true bits followed by the false terminator.

theorem Complexity.DescriptiveComplexity.encodeStruct_eq_of_values {V : Vocabulary} (A : DecFinStruct V) (bits : List Bool) (hlen : bits.length = encodingLength V A.card) (hheader : ∀ (i : Fin (A.card + 1)), bits[↑i]? = some (decide (↑i < A.card))) (hsites : ∀ (site : InputSite V A.card), bits[encodingPosition V A.card site]? = some (inputSiteValue A site)) :

Correct length, header, and table bits characterize the full encoding.