Simulating a k-variable induction on the invariant structure #
The forward simulation of the Abiteboul–Vianu argument
(DescriptiveComplexity.AbiteboulVianu): a simultaneous induction within the k-variable
budget runs, step for step, on the invariant structure Iᵏ A
(DescriptiveComplexity.InvMap). Its stage relations are ≡ᵏ-invariant
(DescriptiveComplexity.Invariant.Stages), so they are unary relations on
the classes; one application of a step formula is evaluated on the classes by
the pebble compiler (DescriptiveComplexity.pebbleCompile), which
translates a formula over the base vocabulary expanded by the block into a
formula over the invariant vocabulary expanded by the unary copy of the block
(DescriptiveComplexity.classBlock), one free class variable standing for
the current pebble assignment:
- atomic formulas become atomic-type bits of the class;
- block atoms follow a rearrangement relation to the class of the reordered argument tuple, and read the unary relation variable there;
- a quantifier spends a fresh pebble: it becomes a quantifier over the classes reachable along that pebble's substitution relation.
The compiler is exact (DescriptiveComplexity.realize_pebbleCompile, the
same pebble induction as the k-variable invariance lemma
DescriptiveComplexity.realize_equivK, which also absorbs each re-choice of
a representative); the induced induction on the invariant structure and the
stage-by-stage tracking are DescriptiveComplexity.StepDef.invStepDef and
its lemmas, further down.
The unary copy of a block #
The unary copy of a block: the same relation variables, all unary – on the invariant structure, an invariant relation is a set of classes. (Reducible so that numerals elaborate at the block's arities.)
Equations
Instances For
Dependency graph
The relation symbol of an invariant-vocabulary relation, in the expansion by the unary block.
Equations
- DescriptiveComplexity.invRelSym L k B r = Sum.inl r
Instances For
Dependency graph
The pebble compiler #
The coordinate selection of a block atom, extended to a rearrangement of
all k pebbles (fixing the pebbles beyond the atom's arity).
Equations
- DescriptiveComplexity.blockSel sel q = if hq : ↑q < l then sel ⟨↑q, hq⟩ else q
Instances For
Dependency graph
Dependency graph
The pebble compiler: a formula over the base vocabulary expanded by
the block, its free variables read through the selection g and its bound
variables through h, becomes a formula over the invariant vocabulary
expanded by the unary block, with one free class variable. Atomic formulas
read the atomic-type bits of the class; block atoms follow a rearrangement to
the class of their argument tuple; each quantifier spends a fresh pebble,
quantifying over the classes along its substitution relation. (When no fresh
pebble is left the compiled formula is ⊥; the budget hypothesis of
DescriptiveComplexity.realize_pebbleCompile rules the case out.)
Equations
- One or more equations did not get rendered due to their size.
- DescriptiveComplexity.pebbleCompile g FirstOrder.Language.BoundedFormula.falsum x✝ = ⊥
- DescriptiveComplexity.pebbleCompile g (f₁.imp f₂) x✝ = FirstOrder.Language.BoundedFormula.imp (DescriptiveComplexity.pebbleCompile g f₁ x✝) (DescriptiveComplexity.pebbleCompile g f₂ x✝)
Instances For
Dependency graph
Exactness of the compiler #
Exactness of the pebble compiler: over an invariant block assignment
ρ on A and its unary image X on the classes, the compiled formula holds
at the class of v exactly when the original formula holds at the pebble
assignment v. The induction is the one of the k-variable invariance
lemma: each quantifier spends a fresh pebble, and re-choosing a
representative is absorbed by the invariance lemma itself
(DescriptiveComplexity.realize_equivK).
Dependency graph
Sentences over an empty variable supply #
A sentence, re-typed over an empty supply of Fin-indexed variables, so
that the pebble compiler applies to it.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Dependency graph
Dependency graph
Dependency graph
The induced induction on the invariant structure #
The unary image on the classes of a block assignment: the class of w
is in the image of variable i when ρ holds at the initial coordinates of
w.
Equations
- DescriptiveComplexity.invAssign S harity ρ i x = ∃ (w : Fin k → A), x 0 = DescriptiveComplexity.InvMap.mk S w ∧ ρ i fun (p : Fin (B.arity i)) => w (Fin.castLE ⋯ p)
Instances For
Dependency graph
Dependency graph
The unary image determines an invariant assignment: read any tuple at an extension of its arguments.
Dependency graph
The arity part of the variable budget.
Dependency graph
The induced induction on the invariant structure: the same relation variables, unary; the step formulas and the output, compiled by the pebble compiler.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The partial stages of the induced induction are the images of the original ones: the pebble compiler tracks the iteration stage by stage.
Dependency graph
Convergence transfers between the induction and its image on the invariant structure.
Dependency graph
The forward simulation: the partial value of the induced induction on the invariant structure is the partial value of the original induction.