Guessing a point of an expanded universe #
The translation lemma (DescriptiveComplexity.ExpExpansion.exists_translate) –
an FO sentence over an expansion is a second-order sentence over the base –
peels one quantifier at a time into one
second-order block. What that block has to hold is a point of the expanded
universe: a tag together with an assignment of the expansion's block.
The assignment half is what a block quantifier already ranges over. The tag half
is the problem: everywhere else in this development a tag is static, chosen at
formula-construction time (relSentence is indexed by a tuple of tags,
ordSentence compares two of them by trichotomy). A quantified point chooses its
tag at evaluation time, so the tag has to become part of the guessed object.
The encoding: extend the block by one arity-0 relation variable per tag
(DescriptiveComplexity.SOBlock.withTag). An arity-0 variable is a bit – the
same observation DescriptiveComplexity.PSpace's docstring makes about finite
control in an SO(TC) walk – so a tag is a bit vector, and
DescriptiveComplexity.SOBlock.tagGuardF is the sentence saying exactly one bit
is set. Its correctness
(DescriptiveComplexity.SOBlock.realize_tagGuardF) says the guard holds of an
assignment exactly when that assignment is a tagged assignment, which is the
form the peeling step consumes.
Nothing here depends on the expansion, only on a block and a finite tag type.
An enumeration of a finite type, as a list. (SOBlock.ivars is this list at
a block's index type; fold the two together when the translation lands.)
Equations
Instances For
Dependency graph
Dependency graph
The block extended by tag bits #
A block extended with one arity-0 relation variable per tag. An arity-0
variable is a bit, so an assignment of this block is an assignment of B
together with a bit vector naming a tag.
An abbrev deliberately: with a semireducible def in between, instance
search cannot see that the arity of a tag variable is 0, and Fin 0 → A
stops being recognized as a subsingleton.
Instances For
Dependency graph
The assignment of the extended block carrying a given tag and a given
assignment: the bit of t' says t' = t.
Equations
Instances For
Dependency graph
A tag variable has arity 0, so its argument tuple is the empty one. Stated
as an instance because Fin ((B.withTag T).arity (Sum.inl t)) is not
syntactically Fin 0, and the Subsingleton/Inhabited facts the correctness
proof needs are found through it.
Dependency graph
The assignment an extended assignment carries, forgetting the tag bits.
Equations
- DescriptiveComplexity.SOBlock.dropTag σ j = σ (Sum.inr j)
Instances For
Dependency graph
Dependency graph
The exactly-one guard #
The atom “the bit of the tag t is set”.
Instances For
Dependency graph
Exactly one tag bit is set: the sentence saying that an assignment of the extended block names a tag.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Dependency graph
The guard says the assignment is a tagged one.