Tagged interpretations #
Reductions between problems often build structures whose elements are of several kinds: the
literal vertices and the clause gadgets of a graph built from a formula, the variables and the
clauses of a formula built from a structure. A tagged interpretation I of L' in L
(Cslib.Logic.FO.TaggedInterpretation) has a finite type T of tags and, for each tag t, a
type ι t of coordinates and a domain formula; the interpreted structure I.Model M is the
disjoint union over the tags t of the tuples ι t → M satisfying the domain formula of t,
and a relation symbol is defined, for each choice of tags of its arguments, by a formula in the
coordinates of the arguments. Senellart and Gnatenko's interpretations are tagged in this way, with
the same coordinates Fin dim for every tag Senellart and Gnatenko.
The first-order interpretations of this library (Cslib.Logic.FO.Interpretation) are untagged,
and the structures are unordered and have no constants, so a tag cannot be named by a fixed
element. It is named by an equality pattern instead: the coordinates of the compiled
interpretation I.toInterpretation S are two coordinates p ≠ q, a coordinate per tag, equal to
q at the tag of the element and to p at the others, and the coordinates of every tag, those of
the other tags equal to p. Every ordered pair p ≠ q thus carries a copy of I.Model M, and
the compiled structure is isomorphic to Copies J (I.Model M), the disjoint union of copies
indexed by the pairs J (Cslib.Logic.FO.TaggedInterpretation.copiesEquiv). A structure with at
most one element has no such pair; on it, the compiled interpretation is a given interpretation
S of dimension one (Cslib.Logic.FO.TaggedInterpretation.subsingletonEquiv).
So a tagged interpretation gives an order-free reduction to every class that is closed under
isomorphism and invariant under copies (Cslib.Logic.FO.CopyInvariant): a finite structure
belongs to the class exactly when the disjoint union of a positive finite number of copies of it
does. Examples are satisfiability of formulas in conjunctive normal form and colorability of
graphs (Cslib.Logic.FO.Reduces.of_tagged).
Binary relations of tagged interpretations are conveniently defined by templates
(Cslib.Logic.FO.TaggedInterpretation.Template): a template from tag t relates an element of tag
t whose coordinates satisfy a guard to the elements of a target tag whose coordinates are copied
from it, or are arbitrary.
Main definitions #
Cslib.Logic.FO.TaggedInterpretation,Cslib.Logic.FO.TaggedInterpretation.Model,Cslib.Logic.FO.TaggedInterpretation.Model.toSigma,Cslib.Logic.FO.subsingletonFormula: tagged interpretations, the structures they interpret, and the subsingleton guard formula.Cslib.Logic.FO.TaggedInterpretation.reindex,Cslib.Logic.FO.TaggedInterpretation.reindexEquiv: renaming the tags and the induced isomorphism.Cslib.Logic.FO.Copies,Cslib.Logic.FO.Copies.equivProd,Cslib.Logic.FO.CopyInvariant: disjoint copies of a structure, their product equivalence, and the classes invariant under them.Cslib.Logic.FO.TaggedInterpretation.Coord,Cslib.Logic.FO.TaggedInterpretation.Coord.tag,Cslib.Logic.FO.TaggedInterpretation.Coord.data,Cslib.Logic.FO.TaggedInterpretation.domainAt,Cslib.Logic.FO.TaggedInterpretation.relAt,Cslib.Logic.FO.TaggedInterpretation.toInterpretation: coordinates, component formulas, and the compiled first-order interpretation.Cslib.Logic.FO.TaggedInterpretation.Pairs,Cslib.Logic.FO.TaggedInterpretation.coords,Cslib.Logic.FO.TaggedInterpretation.ofCopies: distinct-element pairs, coordinate encoding, and the map from copies into the compiled model.Cslib.Logic.FO.TaggedInterpretation.Template,Cslib.Logic.FO.TaggedInterpretation.Template.Compat,Cslib.Logic.FO.TaggedInterpretation.Template.Holds,Cslib.Logic.FO.TaggedInterpretation.Template.formula,Cslib.Logic.FO.TaggedInterpretation.Template.listFormula,Cslib.Logic.FO.TaggedInterpretation.binaryRel: templates and formulas for binary relations.
Main results #
Cslib.Logic.FO.TaggedInterpretation.copiesEquiv: on a structure with two distinct elements, the compiled interpretation is a disjoint union of copies of the tagged one.Cslib.Logic.FO.TaggedInterpretation.subsingletonEquiv: on a structure with at most one element, it is the given interpretation of dimension one.Cslib.Logic.FO.Reduces.of_tagged: tagged interpretations give order-free reductions to classes closed under isomorphism and invariant under copies.Cslib.Logic.FO.TaggedInterpretation.Template.realize_formula: the semantics of templates.
References #
A tagged interpretation of L' in L: for each tag t a domain formula in the
coordinates ι t, and for each relation symbol of arity n and each choice of tags of its n
arguments a formula in their coordinates.
- domain (t : T) : L.Formula (ι t)
The domain formula of each tag.
The formula defining a relation symbol among arguments of the given tags.
In a structure with at most one element: the formula ∀ x y, x = y.
subsingletonFormula L α holds in M if and only if M is a Subsingleton.
The universe of the structure interpreted by I in M: for each tag, the tuples satisfying
its domain formula.
Instances For
When T, each ι t, and M are finite, the tagged model I.Model M is finite.
Coordinate tuple e.2.1 of an element e of the tagged model I.Model M.
The tag and coordinates of an element of the interpreted structure.
Two elements of I.Model M with equal toSigma projections are equal.
The structure interpreted by I: a relation holds of some elements when its defining formula
for their tags holds of their coordinates.
A relation R holds on xs in I.Model M iff I.rel R for their tags holds of their
coordinates.
Renaming tags #
The tagged interpretation with tags renamed along e.
Renaming the tags of a tagged interpretation does not change the interpreted structure, up to isomorphism.
Disjoint copies #
The disjoint union of copies of N indexed by J: a relation holds of some elements of one
copy when it holds of them in N.
- idx : J
The copy containing the element.
- val : N
The element of
Nit is a copy of.
Instances For
Relational structure on Copies J N: a relation holds on a tuple iff all arguments lie in the
same copy and the relation holds on their underlying values in N.
A relation R holds on xs in Copies J N iff all xs i share the same copy index and R
holds on i ↦ (xs i).val in N.
A binary relation holds of two elements of the copies when they are in the same copy and
related in N.
A unary relation in a copy holds exactly when it holds of the underlying element.
A class of structures is invariant under copies when a finite structure belongs to it exactly when the disjoint union of a finite positive number of copies of it does.
The compiled interpretation #
The first coordinate of a copy.
The second coordinate of a copy, distinct from the first.
The domain formula of the compiled interpretation on elements of tag t: the coordinates
p and q are distinct, the coordinate of each tag is q at t and p elsewhere, the
coordinates of the other tags are p, and the coordinates of t satisfy its domain formula.
The formula defining a relation symbol in the compiled interpretation: all arguments belong to
the same copy, and the formula of I for their tags holds of their coordinates.
The compiled interpretation of a tagged interpretation I, using the interpretation S
of dimension one on structures with at most one element.
I.domainAt t holds of c iff c p ≠ c q, c (tag t') is c q at t and c p elsewhere,
all data coordinates for tags t' ≠ t equal c p, and the t-coordinates satisfy I.domain t.
I.relAt R holds of c iff all arguments share the same copy pair (p, q) and there is a tag
assignment ts selected by the tag coordinates whose data coordinates satisfy I.rel R ts.
On a subsingleton structure M, the domain formula of I.toInterpretation S reduces to
S.domain at coordinate p.
On a nontrivial structure M, the domain formula of I.toInterpretation S holds iff
I.domainAt t holds for some tag t.
On a subsingleton structure M, the relation formula of I.toInterpretation S for R reduces
to S.rel R at coordinate p.
On a nontrivial structure M, the relation formula of I.toInterpretation S for R reduces
to I.relAt R.
Structures with at most one element #
On a structure with at most one element, the compiled interpretation is the interpretation
S.
Structures with two distinct elements #
The ordered pairs of distinct elements, each indexing a copy of the tagged structure.
Instances For
When M is nontrivial, Pairs M is nonempty.
The coordinates of an element e of the tagged structure in the copy of the pair (a, b):
the coordinates p and q are a and b.
At the tag e.1 of e, coords a b e evaluates data ⟨e.1, i⟩ to e.coords i.
For distinct elements a ≠ b and e : I.Model M, coords a b e satisfies
I.domainAt e.1.
The map from the copies of the tagged structure to the compiled structure.
On a nontrivial structure M, ofCopies S is a bijection from Copies (Pairs M) (I.Model M)
to (I.toInterpretation S).Model M.
On a structure with two distinct elements, the compiled interpretation is a disjoint union of copies of the tagged one, a copy for each ordered pair of distinct elements.
On a structure with two distinct elements, the compiled interpretation of a tagged interpretation whose structures are nonempty is nontrivial: there are at least two copies.
Reductions by tagged interpretations #
Tagged interpretations give order-free reductions to classes closed under isomorphism and
invariant under copies: if the structure interpreted by I decides membership on the finite
structures with two distinct elements, and the interpretation S of dimension one decides it on
those with at most one element, then the compiled interpretation is an order-free reduction.
Templates for binary relations #
A template for a binary relation from elements of tag t: it relates an element of tag
t whose coordinates x satisfy the guard to the elements of tag target whose coordinate j
is x i whenever map j = some i, the coordinates j with map j = none being arbitrary.
- target : T
The tag of the related elements.
- guard : L.Formula (ι t)
The condition on the coordinates of the element of tag
t. The coordinates of the related elements copied from the element of tag
t.
The tuples of tag τ.target related to the coordinates x of an element of tag t.
The template relates the coordinates x of an element of tag t to an element of tag w
with coordinates y.
The formula of a template, relating an element of tag t to an element of tag w.
The formula of a template holds of the coordinates of two elements exactly when the template relates them.
The disjunction of the formulas of a list of templates.
The formula of a list of templates holds exactly when one of them relates the elements.
The formula of a binary relation among arguments of tags ts 0 and ts 1, from a formula in
the coordinates of the two arguments.
When I.rel R is defined by binaryRel F, RelMap R ![a, b] holds in I.Model M iff
F a.1 b.1 holds of Sum.elim a.coords b.coords.