Relationalizing an ∃SO[new] definition #
Hardness proofs whose target reads the source structure through the defining
formulas of an interpretation cope with function symbols for free; one whose
target has to name what a function does – as the encoded sentence of
DescriptiveComplexity.FINSAT must, since it carries its own quantifiers – does
not. This file removes function symbols from the source once and for all:
every
∃SO[new]-definable problem admits a first-order reduction to an∃SO[new]-definable problem over a relational vocabulary (DescriptiveComplexity.exists_relational_of_sigmaSONewDefinable).
Composed with a hardness result proved for relational sources, it gives the
hardness result for all of them, which is what
DescriptiveComplexity.CofinalHard asks for.
The two obstacles, and how they are removed #
The junk value. An extended universe A ⊕ Fin m interprets a function
symbol on a tuple with an invented argument by applying f^A to
DescriptiveComplexity.oldPart, which sends every invented value to
Classical.arbitrary A. That element depends on the carrier type only, so no
formula can name it, and a translation that has to mention it is stuck. The way
out is that the definability equivalence quantifies over every L-structure
instance on the carrier: transporting the structure along a transposition
gives a second instance, isomorphic to the first, whose junk element is whatever
we like. Hence DescriptiveComplexity.sigmaSONewDefinable_junk: an ∃SO[new]
definition may be read with any junk element.
The terms. The relational vocabulary is the atomic diagram language
DescriptiveComplexity.atomLang: one relation symbol of arity n per atomic
formula of L in n variables. An L-structure carries one canonically, and
the map is a one-dimensional first-order interpretation, since “this atomic
formula holds of this tuple” is a first-order property of the tuple. The kernel
is then translated atom by atom, in place: an atom at context length n
becomes an existential block of n + 1 variables – the coerced arguments, and
the junk element the block guesses – followed by the corresponding symbol of the
atomic diagram language. Nothing else in the kernel changes, so no de Bruijn
index is ever shifted.
An extended universe with a chosen junk value #
The original-element part of an extended universe, reading an invented value
as a given element rather than Classical.arbitrary.
Equations
- DescriptiveComplexity.oldPartAt A m z = Sum.elim id fun (x : Fin m) => z
Instances For
Dependency graph
The base structure carried by an extended universe with a chosen junk value.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The extended structure with a chosen junk value.
Equations
- DescriptiveComplexity.extStructureAt L A m z = L.sumStructure FirstOrder.Language.oldMark (A ⊕ Fin m)
Instances For
Dependency graph
At the arbitrary element it is the extended structure of
DescriptiveComplexity.extStructure.
Dependency graph
The three defining equations of the extended structure, stated with the
instance explicit: two structures on one carrier are in play below, so no
occurrence of funMap or RelMap may be left to instance synthesis.
Dependency graph
Dependency graph
Dependency graph
Transporting a structure along a permutation of its carrier: a second structure on the same type, isomorphic to the first.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Dependency graph
Dependency graph
The permutation is that isomorphism.
Equations
- DescriptiveComplexity.transportEquiv π inst = { toEquiv := π, map_fun' := ⋯, map_rel' := ⋯ }
Instances For
Dependency graph
The junk value moves with the permutation: the extended structure of the
transported instance, with junk z, is the extended structure of the original
instance with junk π z. This is what lets a definition be read at any junk
value at all.
Equations
- DescriptiveComplexity.extIsoTransport π inst m z = { toEquiv := π.sumCongr (Equiv.refl (Fin m)), map_fun' := ⋯, map_rel' := ⋯ }
Instances For
Dependency graph
An ∃SO[new] definition may be read with any junk value: the extended
universe interpreting a function symbol on an invented argument through the
given element z rather than through Classical.arbitrary.
This is what makes the undefinability of Classical.arbitrary A harmless: the
junk element is not a feature of the problem, only of one presentation of the
extended universe.
Dependency graph
The atomic diagram language #
The relational vocabulary the source is moved to: one relation symbol of arity
n per atomic formula of L in n variables. Every structure carries one
canonically, and “this atomic formula holds of this tuple” is a first-order
property of the tuple, so the map is a one-dimensional interpretation.
The atomic diagram language: a relation symbol of arity n for each
atom r(t₁, …, t_l) and each equality t₁ = t₂ of L in n variables.
Equations
Instances For
Dependency graph
Dependency graph
The atomic diagram of a structure: each symbol holds of the tuples satisfying the atomic formula it names.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Dependency graph
Dependency graph
The defining formula of a symbol of the atomic diagram language: the atomic formula it names, read at the one-dimensional tuple.
Equations
- DescriptiveComplexity.atomFml (Sum.inl ⟨fst, (r, ts)⟩) = r.formula fun (j : Fin fst) => FirstOrder.Language.Term.relabel (fun (i : Fin n) => (i, 0)) (ts j)
- DescriptiveComplexity.atomFml (Sum.inr (t₁, t₂)) = (FirstOrder.Language.Term.relabel (fun (i : Fin n) => (i, 0)) t₁).equal (FirstOrder.Language.Term.relabel (fun (i : Fin n) => (i, 0)) t₂)
Instances For
Dependency graph
The atomic diagram, as a one-dimensional first-order interpretation.
Equations
- DescriptiveComplexity.atomInterp L = { relFormula := fun {n : ℕ} (R : (DescriptiveComplexity.atomLang L).Relations n) (x : Fin n → Unit) => DescriptiveComplexity.atomFml R }
Instances For
Dependency graph
What the defining formula of an atomic-diagram symbol says: the symbol holds of the tuple.
Dependency graph
The interpreted structure is the atomic diagram, through the equivalence of a one-dimensional single-tag universe with its own carrier.
Equations
- DescriptiveComplexity.atomMapEquiv A = { toEquiv := (DescriptiveComplexity.atomInterp L).mapEquivSelf A, map_fun' := ⋯, map_rel' := ⋯ }
Instances For
Dependency graph
The relationalizing reduction: any problem reduces, first-order, to a problem over the atomic diagram language that agrees with it on the atomic diagrams of finite structures.
Equations
- DescriptiveComplexity.atomReduction P Q h = { Tag := Unit, tagFinite := ⋯, tagNonempty := ⋯, dim := 1, toInterpretation := DescriptiveComplexity.atomInterp L, correct := ⋯ }
Instances For
Dependency graph
Blocks of existential quantifiers #
The translation of an atom introduces a fixed number of fresh variables at the end of the context, which is what makes it a purely local rewriting: nothing already in the kernel is shifted.
A block of k existential quantifiers.
Equations
Instances For
Dependency graph
What a block of existential quantifiers says: the context is extended by
k values, the ones already there being kept.
Dependency graph
The shadow of a term #
The translation replaces a term by the value it takes; the point of the construction is that this value is computed in the instance, on the tuple the junk convention leaves behind.
The kernel language of an ∃SO[new] definition.
Equations
Instances For
Dependency graph
The block, extended by the unary relation variable naming the junk element.
Equations
Instances For
Dependency graph
The kernel language the translation lands in: the atomic diagram language, extended and expanded by the enlarged block.
Equations
Instances For
Dependency graph
The L-term a term of the kernel language shadows: neither the marker
nor the vocabulary of a block has function symbols, so every function
application is one of L.
Equations
- DescriptiveComplexity.termDown (FirstOrder.Language.var x_1) = FirstOrder.Language.var x_1
- DescriptiveComplexity.termDown (FirstOrder.Language.func (Sum.inl (Sum.inl g)) ts) = FirstOrder.Language.func g fun (j : Fin l) => DescriptiveComplexity.termDown (ts j)
- DescriptiveComplexity.termDown (FirstOrder.Language.func (Sum.inl (Sum.inr e)) _ts) = Empty.elim e
- DescriptiveComplexity.termDown (FirstOrder.Language.func (Sum.inr e) _ts) = Empty.elim e
Instances For
Dependency graph
The shadow of a term of the kernel, as an L-term in the context
variables: the index of a symbol of the atomic diagram language.
Equations
Instances For
Dependency graph
Dependency graph
The structure a certificate puts on an extended universe: the instance with its junk convention, expanded by the assignment of the block.
Equations
- DescriptiveComplexity.srcStruct z μ = (DescriptiveComplexity.newLang L).sumStructure B.lang (A ⊕ Fin m)
Instances For
Dependency graph
The value of a term, up to the junk convention: forgetting which invented values a term's value came from is computing its shadow in the instance, on the context with the same forgetting applied.
Dependency graph
The value of a term that is a function application is an original element: only a variable can take an invented value.
Dependency graph
Finite conjunctions #
The conjunction of finitely many bounded formulas.
Equations
- DescriptiveComplexity.finConj x_2 = ⊤
- DescriptiveComplexity.finConj f = f 0 ⊓ DescriptiveComplexity.finConj fun (j : Fin n) => f j.succ
Instances For
Dependency graph
Dependency graph
The translation #
Each atom is rewritten in place: a block of n + 1 + l existentials at the
end of the context holds the coerced context, the guessed junk element and the
values of the l arguments, and the atom itself is then a symbol of the atomic
diagram language – or of the marker, or of the block – applied to those values.
⊥, → and ∀ are structural, so no de Bruijn index of the kernel moves.
A variable of the body of a translated atom.
Equations
Instances For
Dependency graph
The i-th variable of the original context.
Equations
- DescriptiveComplexity.xIdx n l i = Fin.castAdd (n + 1 + l) i
Instances For
Dependency graph
The i-th variable of the context, coerced to an original element.
Equations
- DescriptiveComplexity.uIdx n l i = ⟨n + ↑i, ⋯⟩
Instances For
Dependency graph
Dependency graph
The value of the j-th argument of the atom.
Instances For
Dependency graph
old x, in the target kernel language.
Equations
Instances For
Dependency graph
The relation variable naming the junk element, applied to one variable.
Equations
- DescriptiveComplexity.zOf i = FirstOrder.Language.BoundedFormula.rel (Sum.inr ⟨Sum.inr (), ⋯⟩) fun (x : Fin ((DescriptiveComplexity.jBlock B).arity (Sum.inr ()))) => DescriptiveComplexity.vr i
Instances For
Dependency graph
An equality of two variables.
Equations
Instances For
Dependency graph
The graph of a term, as a symbol of the atomic diagram language: the
equality t(x̄) = xₙ in n + 1 variables.
Equations
Instances For
Dependency graph
What pins the value of one argument: a variable takes the value the context gives it – which may be an invented one – and a function application the value its graph gives on the coerced context.
Equations
- One or more equations did not get rendered due to their size.
- DescriptiveComplexity.argCl n l (FirstOrder.Language.var (Sum.inl e)) x✝ = e.elim
- DescriptiveComplexity.argCl n l (FirstOrder.Language.var (Sum.inr i)) x✝ = DescriptiveComplexity.eqOf (DescriptiveComplexity.yIdx n l x✝) (DescriptiveComplexity.xIdx n l i)
Instances For
Dependency graph
The body of a translated atom.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
A translated atom.
Equations
- DescriptiveComplexity.flatAtom n l ts core = DescriptiveComplexity.exs (n + 1 + l) (DescriptiveComplexity.atomBody n l ts core)
Instances For
Dependency graph
The translation of the kernel: atom by atom, in place.
Equations
- One or more equations did not get rendered due to their size.
- DescriptiveComplexity.flat FirstOrder.Language.BoundedFormula.falsum = FirstOrder.Language.BoundedFormula.falsum
- DescriptiveComplexity.flat (f₁.imp f₂) = (DescriptiveComplexity.flat f₁).imp (DescriptiveComplexity.flat f₂)
- DescriptiveComplexity.flat f.all = (DescriptiveComplexity.flat f).all
Instances For
Dependency graph
The intended values of the fresh variables #
The structure the translated kernel is read in: the atomic diagram, extended, and expanded by the enlarged block.
Equations
Instances For
Dependency graph
The enlarged assignment: the given one, plus the singleton naming the junk element.
Equations
- DescriptiveComplexity.jAssign z μ (Sum.inl b) = μ b
- DescriptiveComplexity.jAssign z μ (Sum.inr val) = fun (u : Fin ((DescriptiveComplexity.jBlock B).arity (Sum.inr val)) → A ⊕ Fin m) => u ⟨0, Nat.zero_lt_one⟩ = Sum.inl z
Instances For
Dependency graph
The values the body of a translated atom forces on its fresh variables: the context is kept, the coerced context is the context with the invented values replaced by the junk, and each argument variable holds the value of its term.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
The four families of indices exhaust the body's context.
Dependency graph
What the body of a translated atom says #
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
The coerced context, as a tuple of the instance.
Equations
- DescriptiveComplexity.ubar z w i = DescriptiveComplexity.oldPartAt A m z (w i)
Instances For
Dependency graph
Dependency graph
The value of a term is its shadow's, on the coerced context.
Dependency graph
A term that is a function application takes the value its shadow names.
Dependency graph
What an argument clause says, once the coerced context is known: the argument variable holds the value of its term.
Dependency graph
Dependency graph
Dependency graph
What the body of a translated atom says, conjunct by conjunct.
Dependency graph
A translated atom is its core, read at the values the body forces: the existential block is determined, so nothing is really guessed.
Dependency graph
The translation is correct #
The core of a translated atom of the instance's vocabulary: the symbol of the atomic diagram language naming that atom, at the values of the arguments.
Dependency graph
The core of a translated atom of a relation variable: the same variable of the enlarged block, at the values of the arguments.
Dependency graph
The translated kernel says of the atomic diagram what the kernel says of the instance: the two structures share a carrier, and the translation only replaces each atom by the symbol of the atomic diagram language that names it.
Dependency graph
The relational problem, and the reduction to it #
The junk element is a single original element: what makes the guesses of the individual atoms agree.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The translated kernel: the junk element, and the translation of the original kernel.
Equations
Instances For
Dependency graph
Dependency graph
The relational problem, and the reduction to it #
Dependency graph
Dependency graph
Dependency graph
The relational reading of an ∃SO[new] definition: the same definition
over the atomic diagram language, with the junk element guessed by one more
relation variable.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
It is a decision problem: ∃SO[new] sentences are isomorphism-invariant.
Equations
- DescriptiveComplexity.relProblem B φ = { Holds := fun (A' : Type) (x : (DescriptiveComplexity.atomLang L).Structure A') => DescriptiveComplexity.relHolds B φ A', iso_invariant := ⋯ }
Instances For
Dependency graph
Dependency graph
The relational reading agrees with the original on atomic diagrams.
Dependency graph
The theorem #
Every ∃SO[new]-definable problem admits a first-order reduction to an
∃SO[new]-definable problem over a relational vocabulary.
The relational vocabulary is the atomic diagram language
DescriptiveComplexity.atomLang, and the reduction is the identity on the
carrier: only the vocabulary changes, an atomic formula of the source becoming a
relation symbol of the target. The kernel of the definition is carried across by
DescriptiveComplexity.flat, and what makes that possible is that the junk
element of the extended universe may be guessed
(DescriptiveComplexity.sigmaSONewDefinable_junk).
Composed with a hardness result proved for relational sources, this gives the
hardness result for all of them, which is what
DescriptiveComplexity.CofinalHard asks for.