Correctness of arithmetic encoding addresses #
Index a flattened list by the total length of preceding blocks plus an offset within the selected block. Applied first to tuples and then to relation tables, this identifies arithmetic addresses with the encoder's existing site positions.
theorem
Complexity.DescriptiveComplexity.tupleDigits_eq_div_pow_internal
(card k index : ℕ)
(i : Fin k)
:
theorem
Complexity.DescriptiveComplexity.tupleIndex_lt_internal
{card k : ℕ}
(args : Fin k → Fin card)
:
theorem
Complexity.DescriptiveComplexity.tupleDigits_lt_internal
{card : ℕ}
(hcard : 0 < card)
(k index : ℕ)
(i : Fin k)
:
theorem
Complexity.DescriptiveComplexity.encodingPosition_relation_internal
(V : Vocabulary)
(card : ℕ)
(r : Fin V.numRels)
(args : Fin (V.relArity r) → Fin card)
:
encodingPosition V card (Sum.inl ⟨r, args⟩) = relationAddress V card r fun (i : Fin (V.relArity r)) => ↑(args i)
theorem
Complexity.DescriptiveComplexity.encodingPosition_constant_internal
(V : Vocabulary)
(card : ℕ)
(c : Fin V.numConsts)
(a : Fin card)
: