Documentation

Complexitylib.DescriptiveComplexity.Circuit.Validity.Internal

Proofs for encoding validation #

Literal tests characterize the header and one-hot blocks. Encoding reconstruction proves completeness of these tests; finite connective laws account for size and depth.

theorem Complexity.DescriptiveComplexity.encodingHeaderFormula_eval_internal (V : Vocabulary) (card : ℕ) (input : BitString (encodingLength V card)) :
AC0Formula.eval input (encodingHeaderFormula V card) = true ↔ ∀ (i : Fin (card + 1)), input ⟨↑i, ⋯⟩ = decide (↑i < card)
theorem Complexity.DescriptiveComplexity.constantValueFormula_eval_internal (V : Vocabulary) (card : ℕ) (c : Fin V.numConsts) (a : Fin card) (input : BitString (encodingLength V card)) :
AC0Formula.eval input (constantValueFormula V card c a) = true ↔ ∀ (b : Fin card), input ((encodingLayout V card).const c b) = decide (a = b)
theorem Complexity.DescriptiveComplexity.encodingValidityFormula_eval_internal (V : Vocabulary) (card : ℕ) (input : BitString (encodingLength V card)) :
AC0Formula.eval input (encodingValidityFormula V card) = true ↔ 2 ≤ card ∧ (∀ (i : Fin (card + 1)), input ⟨↑i, ⋯⟩ = decide (↑i < card)) ∧ ∀ (c : Fin V.numConsts), ∃ (a : Fin card), ∀ (b : Fin card), input ((encodingLayout V card).const c b) = decide (a = b)