A quantifier prefix of k copies of one block #
The shape every Σₖ definition in this library has: k alternating blocks
that are all the same block, one per round of whatever the definition
describes — one truth assignment per quantifier block for
DescriptiveComplexity.QBF, one run per round of the game for the machine
bridge of the polynomial hierarchy.
DescriptiveComplexity.SecondOrderMerge collapses a prefix into a single
block, at the cost of turning the alternation into
DescriptiveComplexity.altAssign, an alternating quantification over the
pieces of one merged assignment. That is awkward to use: the pieces are
indexed by the shape of the merge rather than by the round. This file removes
the awkwardness when all the blocks are equal:
DescriptiveComplexity.repBlockAssignassembles a merged assignment out of a familyFin k → B.Assignment A, one per round (DescriptiveComplexity.QBF's ownrepAssignis its monadic special case, and should be folded into it);DescriptiveComplexity.repSymnames the relation variable of thei-th round, andDescriptiveComplexity.relMap_repSymreads it back;DescriptiveComplexity.altBlockQuantis the alternating quantification over such a family, andDescriptiveComplexity.altAssign_repBlocksidentifies it withaltAssign.
Nothing here is specific to a block: the symbol and the assignment are built by
the same recursion on k, so the reading lemma is Iff.rfl at the head and the
induction hypothesis at the tail.
The prefix and its merge #
A quantifier prefix of k copies of the block B.
Equations
Instances For
Dependency graph
Dependency graph
The single block merging a prefix of k copies of B.
Equations
Instances For
Dependency graph
The relation variable of B used by the i-th round, as a symbol of the
merged block's vocabulary. The arity proof is carried along the recursion, so
that reading the symbol back needs no cast.
Equations
Instances For
Dependency graph
The merged assignment determined by one assignment of B per round.
Equations
- DescriptiveComplexity.repBlockAssign B A 0 x_2 = DescriptiveComplexity.nilAssign A
- DescriptiveComplexity.repBlockAssign B A k.succ ρs = DescriptiveComplexity.consAssign (ρs 0) (DescriptiveComplexity.repBlockAssign B A k fun (i : Fin k) => ρs i.succ)
Instances For
Dependency graph
Reading back the relation variable of a round.
Dependency graph
Alternating over the rounds #
Alternating quantification over one assignment of B per round: the round
of index 0 is quantified outermost, existentially if pol is true, and the
polarities alternate inwards.
Equations
- DescriptiveComplexity.altBlockQuant A B 0 P x✝ = P Fin.elim0
- DescriptiveComplexity.altBlockQuant A B k.succ P true = ∃ (ρ : B.Assignment A), DescriptiveComplexity.altBlockQuant A B k (fun (ρs : Fin k → B.Assignment A) => P (Fin.cons ρ ρs)) false
- DescriptiveComplexity.altBlockQuant A B k.succ P false = ∀ (ρ : B.Assignment A), DescriptiveComplexity.altBlockQuant A B k (fun (ρs : Fin k → B.Assignment A) => P (Fin.cons ρ ρs)) true
Instances For
Dependency graph
Alternating quantification over the rounds only depends on the quantified predicate up to pointwise equivalence.
Dependency graph
The prefix quantifies one assignment per round: alternating over the
pieces of the merged assignment of k copies of B is alternating over k
assignments of B.
Dependency graph
The definability statement #
Put together: a sentence over the single merged block, transported into the
iterated expansion by DescriptiveComplexity.unmergeHom, is satisfied
alternately exactly when the k round assignments are quantified alternately.
This is the form a Σₖ-definability proof consumes.