Arithmetically definable relations: AC⁰ definability with free variables #
DescriptiveComplexity.AC0Definable is a statement about sentences, and a
sentence is an awkward thing to build by hand: every construction carries its
own variable bookkeeping through FirstOrder.Language.Formula.iExs and
Sum.elim. This file does that bookkeeping once, and then never again:
DescriptiveComplexity.ArithDef says that a family of relations on
valuations – one relation for every nonempty finite ordered structure – is
realized by a single formula of the arithmetic expansion, and the lemmas below
close the notion under the Boolean connectives and under quantification.
Everything downstream is then semantic. A construction states what its relation
means on ranks, chains the closure lemmas, and reads the sentence off at the
end with DescriptiveComplexity.ArithDef.ac0Definable; no formula is ever
inspected again.
Conventions #
Variables are indexed by an arbitrary type α, as Formula α is, and a
quantifier binds the variables of Fin 1 in α ⊕ Fin 1
(DescriptiveComplexity.ArithDef.ex, DescriptiveComplexity.ArithDef.all) –
the layout of FirstOrder.Language.Formula.iExs, so that no relabeling is
needed at the quantifier step. Moving between variable layouts is
DescriptiveComplexity.ArithDef.relabel, and a relation with no free
variables (α = Empty) is literally a sentence, which is what
DescriptiveComplexity.ArithDef.ac0Definable reads.
The three groups of lemmas #
- Atoms – the order, the two numeric predicates, equality, and an input
relation read at a tuple of variables
(
DescriptiveComplexity.arithDef_le,_plus,_times,_eq,_rel). - Connectives – negation, conjunction, disjunction, implication, and the two constants.
- Quantifiers –
DescriptiveComplexity.ArithDef.exandDescriptiveComplexity.ArithDef.all, together with the vector formsDescriptiveComplexity.ArithDef.exsandDescriptiveComplexity.ArithDef.allsbinding a wholeFin kof variables at once.
A DescriptiveComplexity.ArithDef.congr lemma lets a relation be replaced by a
pointwise-equivalent one, which is how a semantic reformulation – the shape most
proofs actually want – is fed to the closure lemmas.
Relations on valuations of a finite ordered structure #
A family of relations on α-indexed valuations: one relation for every
nonempty finite ordered L-structure. The instance arguments are those of
DescriptiveComplexity.AC0Definable, since that is what the family is
eventually read as.
Equations
- DescriptiveComplexity.ArithRel L α = ((A : Type) → [L.Structure A] → [LinearOrder A] → [Finite A] → [Nonempty A] → (α → A) → Prop)
Instances For
Dependency graph
A family of relations is arithmetically definable when one formula of
the arithmetic expansion realizes it in every nonempty finite ordered
structure – first-order logic with ≤, + and × on the ranks, with free
variables indexed by α.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Definability transfers along a pointwise equivalence of relations: the formula is unchanged, only the semantic reading of it is.
Dependency graph
Renaming the free variables: a definable relation read through a substitution of variables is definable.
Dependency graph
Connectives #
The negation of a definable relation is definable.
Dependency graph
The conjunction of two definable relations is definable.
Dependency graph
The disjunction of two definable relations is definable.
Dependency graph
An implication between definable relations is definable.
Dependency graph
An equivalence between definable relations is definable.
Dependency graph
The always-true relation is definable.
Dependency graph
The always-false relation is definable.
Dependency graph
A case distinction made outside the structure – a condition on the machine, not on the instance – is definable when both branches are.
Dependency graph
A finite conjunction of definable relations is definable: the index
ranges over a Fin k of the machine, not of the instance, so the conjunction
is unfolded rather than quantified.
Dependency graph
A conjunction over a finite index of the machine, not of the instance: the index type is any finite type, and the conjunction is unfolded rather than quantified.
Dependency graph
A disjunction over a finite index of the machine, by De Morgan.
Dependency graph
A truth value fixed outside the structure is definable.
Dependency graph
Atoms #
The order between two variables is definable.
Dependency graph
Equality between two variables is definable.
Dependency graph
Addition of the ranks of three variables is definable.
Dependency graph
Multiplication of the ranks of three variables is definable.
Dependency graph
An input relation symbol, in the arithmetic expansion of its vocabulary.
Named, as every symbol of a sum vocabulary in this library is, so that rw
matches it.
Equations
Instances For
Dependency graph
Reading the input: an atom of the input vocabulary, at a tuple of variables, is definable. This is the only place the instance is looked at – in the machine reading of this logic it is the query instruction.
Dependency graph
Quantifiers #
Existential quantification of one variable: the variable of Fin 1 in
α ⊕ Fin 1, which is the layout FirstOrder.Language.Formula.iExs binds.
Dependency graph
Universal quantification of one variable, in the same layout.
Dependency graph
Existential quantification of a block of k variables at once.
Dependency graph
Universal quantification of a block of k variables at once.
Dependency graph
From a closed relation to a sentence #
The bridge to DescriptiveComplexity.AC0Definable: a definable relation
with no free variables is an AC⁰ definition of the problem it states – a
formula over Empty is a sentence.