Existential and existential–universal real truth problems #
These are the binary languages in edemaine/lean-canny's formal abstract at
970f28a5ecefc1327402ade16c068aa4b1b2c183. The input is an integer-polynomial Boolean
formula encoded by a flat constructor stream, with binary integer magnitudes and unary
variable indices. The two-block language prefixes the formula word with a framed unary
existential-block length. Neither problem promises well-formedness: only words in the image
of a true sentence are accepted. The encoding-membership criteria below show that these words
have their intended semantics
even when the same word represents a formula in several dimensions. No complexity bound is
claimed in this module.
Main definitions #
Cslib.Complexity.ETR: satisfiable existential real formulas.Cslib.Complexity.ExistsForallTheory: true existential–universal real sentences.
Main results #
Cslib.Complexity.encFormula_mem_ETR: encoding preserves existential truth.Cslib.Complexity.encFormula_mem_ExistsForallTheory: encoding preserves two-block truth.Cslib.Complexity.mem_ExistsForallTheory_iff_decode: two-block truth on every bit word.
The total input view adapts ExistsForall.language_iff_normalized from lean-canny's
CountingHierarchy/ExistsForallLanguage at 970f28a5ecefc1327402ade16c068aa4b1b2c183.
It uses Frontier's strict pair decoder and finite formula view.
Encodings of satisfiable integer-polynomial formulas, in any finite dimension.
True existential–universal real sentences. The unary existential-block length is framed before the formula word. Existential variables precede universal variables; either block may be empty. Noncanonical and malformed words are rejected.
An encoded formula belongs to ETR exactly when its real solution set is nonempty. Omitting the ambient dimension from the word does not change satisfiability.
ETR membership agrees with satisfiability of the total formula view, on every bit word. In particular the view rejects malformed inputs by assigning them an empty solution set.
The two-block encoding has exactly the advertised truth condition, including when a representing formula has extra unused universal coordinates.
Decode the framed unary existential-block length and the raw matrix word in polynomial
time. Reencoding checks the frame. Matrix syntax is handled by existsForallWordMatrix.
View the raw matrix with r existential coordinates followed by word.length
universal coordinates. The extension preserves all original variable indices and allows
even a short matrix to have a larger, partly unused existential block. Malformed matrices
become false.
A malformed matrix becomes false in any existential block size.
On every bit word, two-block truth is false when the frame fails to decode and otherwise is the two-block truth of the total matrix view. In particular either a malformed frame or a malformed matrix is rejected.