Positions and tags of the FINSAT reduction #
The combinatorial skeleton of the RE-hardness reduction: what the elements
of the encoded sentence are, and in what order they come. The reduction itself
(the defining formulas) and its correctness live in the sibling files; nothing
here mentions DescriptiveComplexity.FINSAT.
Positions #
The kernel φ of an ∃SO[new] definition is traversed by the subformula
positions of DescriptiveComplexity.Tseitin.NodeAt, reused verbatim from the
Cook–Levin reduction – as is the whole semantic layer of
DescriptiveComplexity.Problems.Sat.Tseitin, whose
DescriptiveComplexity.Tseitin.Gates is exactly the recursion the encoded
sentence has to compute. What that layer does not carry, and this file adds, is
a size: DescriptiveComplexity.FinSat.nodeSize, the size of the subformula at
a position, which is what makes the parse DAG of
the image descend along the order of the syntax
(DescriptiveComplexity.FinSat.IsWF.child_lt).
Tags #
DescriptiveComplexity.FinSat.Tag is the tag type of the interpretation. Its
elements are of three kinds:
- the syntax the kernel does not see: the existential prefix
prebinding one variablepvarper element of the instance, the distinctness literalsneqof the diagram, and the top conjunctionbody; - the translation of the kernel: one node
nd p πper subformula positionpand polarityπ– negation normal form is a polarity flag, nothing more – together with, for an atom of the instance's vocabulary (or the markerold), the tuple nodesatup p πand their equality literalsalit p π j, which are what replaces an atom the encoded sentence is not allowed to mention; - the vocabulary of the encoded sentence: one symbol
sym iper relation variable of the second-order block, its argument positionsapos j, and one variabledbvar lper de Bruijn level of the kernel. There is no need for a variable per position: a level is bound by at most one quantifier on any branch, so the levels can be named once and for all.
The order. Well-formedness of the image demands a linear order in which
every child comes strictly earlier, so the tags are ranked
(DescriptiveComplexity.FinSat.tagRank) by the layer they sit in – leaves
lowest, the prefix highest, the translated kernel ordered by the size of its
subformula – and ties are broken by an arbitrary enumeration of the (finite)
tag type. The resulting key DescriptiveComplexity.FinSat.tagKey is injective,
so the reduction may compare two tags by trichotomy and emit ⊤, ⊥ or a
comparison of the tuples. That last comparison,
DescriptiveComplexity.FinSat.lexLtF / DescriptiveComplexity.FinSat.lexLeF, is
the one order guard DescriptiveComplexity.OrderWalk does not carry: it walks
the lexicographic order (succTupF) where a reduction defining the order of its
image has to decide it. It is written here rather than there only so that this
work in progress adds files instead of changing one the whole library depends
on; it belongs next to succTupF.
The size of a subformula #
The size of a formula: one for each of its nodes.
Equations
- DescriptiveComplexity.FinSat.fmlSize FirstOrder.Language.BoundedFormula.falsum = 1
- DescriptiveComplexity.FinSat.fmlSize (FirstOrder.Language.BoundedFormula.equal t₁ t₂) = 1
- DescriptiveComplexity.FinSat.fmlSize (FirstOrder.Language.BoundedFormula.rel R ts) = 1
- DescriptiveComplexity.FinSat.fmlSize (f₁.imp f₂) = DescriptiveComplexity.FinSat.fmlSize f₁ + DescriptiveComplexity.FinSat.fmlSize f₂ + 1
- DescriptiveComplexity.FinSat.fmlSize f.all = DescriptiveComplexity.FinSat.fmlSize f + 1
Instances For
Dependency graph
Dependency graph
The size of the subformula at a position. It is what the order of the syntax of the image is built from: a child position carries a strictly smaller subformula.
Equations
- DescriptiveComplexity.FinSat.nodeSize FirstOrder.Language.BoundedFormula.falsum x✝ = 1
- DescriptiveComplexity.FinSat.nodeSize (FirstOrder.Language.BoundedFormula.equal t₁ t₂) x✝ = 1
- DescriptiveComplexity.FinSat.nodeSize (FirstOrder.Language.BoundedFormula.rel R ts) x✝ = 1
- DescriptiveComplexity.FinSat.nodeSize (f₁.imp f₂) (Sum.inl val) = DescriptiveComplexity.FinSat.fmlSize f₁ + DescriptiveComplexity.FinSat.fmlSize f₂ + 1
- DescriptiveComplexity.FinSat.nodeSize (f₁.imp f₂) (Sum.inr (Sum.inl q)) = DescriptiveComplexity.FinSat.nodeSize f₁ q
- DescriptiveComplexity.FinSat.nodeSize (f₁.imp f₂) (Sum.inr (Sum.inr q)) = DescriptiveComplexity.FinSat.nodeSize f₂ q
- DescriptiveComplexity.FinSat.nodeSize f.all (Sum.inl val) = DescriptiveComplexity.FinSat.fmlSize f + 1
- DescriptiveComplexity.FinSat.nodeSize f.all (Sum.inr q) = DescriptiveComplexity.FinSat.nodeSize f q
Instances For
Dependency graph
Dependency graph
Every position of a formula carries a subformula no larger than it.
Dependency graph
The three descent facts the image needs: at an implication every position of either side is smaller than the implication itself, and at a quantifier so is every position of the body.
Dependency graph
Dependency graph
Dependency graph
The arity of the atoms #
A bound on the arities of the relation symbols occurring in a formula: the dimension of the reduction must be large enough to hold one element per argument of an atom of the instance's vocabulary.
Equations
- DescriptiveComplexity.FinSat.maxArity FirstOrder.Language.BoundedFormula.falsum = 0
- DescriptiveComplexity.FinSat.maxArity (FirstOrder.Language.BoundedFormula.equal t₁ t₂) = 0
- DescriptiveComplexity.FinSat.maxArity (FirstOrder.Language.BoundedFormula.rel R ts) = l
- DescriptiveComplexity.FinSat.maxArity (f₁.imp f₂) = max (DescriptiveComplexity.FinSat.maxArity f₁) (DescriptiveComplexity.FinSat.maxArity f₂)
- DescriptiveComplexity.FinSat.maxArity f.all = DescriptiveComplexity.FinSat.maxArity f
Instances For
Dependency graph
Comparing two tuples lexicographically #
The tuple held by sel is lexicographically strictly below the one held by
sel': the two agree before some coordinate, at which the first is strictly
smaller.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The tuple held by sel is lexicographically below or equal to the one held
by sel'.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Dependency graph
Dependency graph
The comparison is total, so a reduction may define the order of its image
by emitting DescriptiveComplexity.FinSat.lexLeF at equal tags.
Dependency graph
The tags #
The tags of the FINSAT reduction. See the module docstring for what
each of them stands for; P is the type of subformula positions of the kernel,
ι the index type of the second-order block, c the number of de Bruijn levels
and d the dimension.
- body
{P ι : Type}
{c d : ℕ}
: Tag P ι c d
The top conjunction: the diagram of the instance and the translated kernel.
- pre
{P ι : Type}
{c d : ℕ}
: Tag P ι c d
An existential of the prefix, one per element of the instance; the tuple holds that element.
- pvar
{P ι : Type}
{c d : ℕ}
: Tag P ι c d
The variable that existential binds, one per element of the instance.
- neq
{P ι : Type}
{c d : ℕ}
: Tag P ι c d
A distinctness literal
x_a ≠ x_bof the diagram; the tuple holds the pair. - dbvar
{P ι : Type}
{c d : ℕ}
(l : Fin c)
: Tag P ι c d
The variable naming one de Bruijn level of the kernel.
- sym
{P ι : Type}
{c d : ℕ}
(i : ι)
: Tag P ι c d
A relation symbol of the encoded sentence: one per relation variable of the block.
- apos
{P ι : Type}
{c d : ℕ}
(j : Fin d)
: Tag P ι c d
An argument position of the relation symbols.
- nd
{P ι : Type}
{c d : ℕ}
(p : P)
(pol : Bool)
: Tag P ι c d
The translation of the subformula at a position, at a polarity.
- atup
{P ι : Type}
{c d : ℕ}
(p : P)
(pol : Bool)
: Tag P ι c d
One tuple of the translation of an atom of the instance's vocabulary (or of the marker
old); the tuple holds the arguments. - alit
{P ι : Type}
{c d : ℕ}
(p : P)
(pol : Bool)
(j : Fin d)
: Tag P ι c d
One equality literal inside such a tuple; the tuple holds the argument.
Instances For
Dependency graph
Dependency graph
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The tags, mapped injectively into a sum of finite types: how they are seen to be finitely many.
Equations
- DescriptiveComplexity.FinSat.Tag.body.toSum = Sum.inl ()
- DescriptiveComplexity.FinSat.Tag.pre.toSum = Sum.inr (Sum.inl ())
- DescriptiveComplexity.FinSat.Tag.pvar.toSum = Sum.inr (Sum.inr (Sum.inl ()))
- DescriptiveComplexity.FinSat.Tag.neq.toSum = Sum.inr (Sum.inr (Sum.inr (Sum.inl ())))
- (DescriptiveComplexity.FinSat.Tag.dbvar l).toSum = Sum.inr (Sum.inr (Sum.inr (Sum.inr (Sum.inl l))))
- (DescriptiveComplexity.FinSat.Tag.sym i).toSum = Sum.inr (Sum.inr (Sum.inr (Sum.inr (Sum.inr (Sum.inl i)))))
- (DescriptiveComplexity.FinSat.Tag.apos j).toSum = Sum.inr (Sum.inr (Sum.inr (Sum.inr (Sum.inr (Sum.inr (Sum.inl j))))))
- (DescriptiveComplexity.FinSat.Tag.nd p pol).toSum = Sum.inr (Sum.inr (Sum.inr (Sum.inr (Sum.inr (Sum.inr (Sum.inr (Sum.inl (p, pol))))))))
- (DescriptiveComplexity.FinSat.Tag.atup p pol).toSum = Sum.inr (Sum.inr (Sum.inr (Sum.inr (Sum.inr (Sum.inr (Sum.inr (Sum.inr (Sum.inl (p, pol)))))))))
- (DescriptiveComplexity.FinSat.Tag.alit p pol j).toSum = Sum.inr (Sum.inr (Sum.inr (Sum.inr (Sum.inr (Sum.inr (Sum.inr (Sum.inr (Sum.inr (p, pol, j)))))))))
Instances For
Dependency graph
Dependency graph
Dependency graph
Dependency graph
The order of the syntax #
The parse DAG of the image has to descend along the order, so the tags are
ranked by the layer they sit in. Children of a node always sit in a strictly
lower layer, except among the translated kernel, where the layer is the size of
the subformula – strictly decreasing from a position to its children by
DescriptiveComplexity.FinSat.nodeSize_imp_left and its two companions.
The layer of a tag, given the size sz of the subformula at a position and
a bound S on it: the variables and symbols lowest, then the literals of an
atom, the distinctness literals, the tuple nodes, the translated kernel by
increasing subformula size, the top conjunction, and the prefix.
Equations
- DescriptiveComplexity.FinSat.Tag.tagRank sz S DescriptiveComplexity.FinSat.Tag.pvar = 0
- DescriptiveComplexity.FinSat.Tag.tagRank sz S (DescriptiveComplexity.FinSat.Tag.dbvar l) = 0
- DescriptiveComplexity.FinSat.Tag.tagRank sz S (DescriptiveComplexity.FinSat.Tag.sym i) = 0
- DescriptiveComplexity.FinSat.Tag.tagRank sz S (DescriptiveComplexity.FinSat.Tag.apos j) = 0
- DescriptiveComplexity.FinSat.Tag.tagRank sz S (DescriptiveComplexity.FinSat.Tag.alit p pol j) = 1
- DescriptiveComplexity.FinSat.Tag.tagRank sz S DescriptiveComplexity.FinSat.Tag.neq = 2
- DescriptiveComplexity.FinSat.Tag.tagRank sz S (DescriptiveComplexity.FinSat.Tag.atup p pol) = 3
- DescriptiveComplexity.FinSat.Tag.tagRank sz S (DescriptiveComplexity.FinSat.Tag.nd p pol) = 4 + sz p
- DescriptiveComplexity.FinSat.Tag.tagRank sz S DescriptiveComplexity.FinSat.Tag.body = 5 + S
- DescriptiveComplexity.FinSat.Tag.tagRank sz S DescriptiveComplexity.FinSat.Tag.pre = 6 + S
Instances For
Dependency graph
An enumeration of the tags, used only to break ties between tags of the same layer: which of two such tags comes first is immaterial, since no two of them are ever parent and child.
Instances For
Dependency graph
The sorting key of a tag: its layer, then its place in the enumeration.
Equations
Instances For
Dependency graph
Dependency graph
A tag of a lower layer comes strictly earlier: this is what makes the parse DAG of the image descend along the order.