Shared scaffolding of the clausal discharges #
The clausal fragments of existential second-order logic – SO-Horn
(DescriptiveComplexity.SecondOrderHorn) and SO-Krom
(DescriptiveComplexity.SecondOrderKrom) – have discharges of the same shape: a
program is translated, inside an ordered input structure, into a CNF instance
whose propositional variables are the second-order atoms and whose clauses are
the instances of the program's clauses whose guard holds
(DescriptiveComplexity.Problems.HornSat.Hardness,
DescriptiveComplexity.Problems.TwoSat.Hardness). Only the literals differ: a head
and a body list on the Horn side, two signed slots on the Krom side.
Everything that does not depend on that difference is here:
DescriptiveComplexity.clauseDim: the dimension of the interpretation, wide enough for thekuniversally quantified variables of the program and for every argument tuple of a relation variable of the block;DescriptiveComplexity.ClauseTag: the tags – one per clause of the program, one per relation variable of the block, plus a junk tag keeping the tag type nonempty;DescriptiveComplexity.guardF,DescriptiveComplexity.atomOccF: the defining formula of a clause's guard, and the formula saying that a coordinate tuple holds the canonically padded (DescriptiveComplexity.Padding) argument tuple of a second-order atom – the two building blocks of every defining formula of such a discharge, with their realization lemmas.
Dimension and tags #
The dimension of a clausal discharge: large enough for the k universally
quantified first-order variables of the program and for every argument tuple of
a relation variable of the block.
Equations
Instances For
Dependency graph
Dependency graph
Dependency graph
The tags of a clausal discharge of a program with m clauses: one per
clause, one per relation variable of the block, plus a junk tag keeping the tag
type nonempty when the program has no clause and the block no variable (its
elements are neither clauses nor literals).
Instances For
Dependency graph
The tag of the clauses coming from the c-th clause of the program.
Equations
Instances For
Dependency graph
The tag of the propositional variables standing for the atoms of the
relation variable i.
Equations
Instances For
Dependency graph
The arguments of a second-order atom, as coordinates of the clause tuple.
Equations
- DescriptiveComplexity.atomIdx a j = Fin.castLE ⋯ (a.args j)
Instances For
Dependency graph
The two defining formulas #
The guard of a clause, reading its variables off the coordinates selected
by u.
Equations
- DescriptiveComplexity.guardF φ u = FirstOrder.Language.Formula.relabel (fun (j : Fin k) => u (Fin.castLE ⋯ j)) φ
Instances For
Dependency graph
The occurrence formula of a second-order atom: the coordinates selected by
x hold the canonically padded tuple of the atom's arguments, read off the
coordinates selected by u.