Canonically padded tuples #
Shared machinery for interpretations whose tags need tuples of different
lengths. The universe of a DescriptiveComplexity.FOInterpretation is Tag × A^dim
for a single dimension dim, so an element meant to carry an m-tuple with
m < dim must fix its remaining coordinates; otherwise the same intended
element would have several representatives, which for the SAT-family
reductions would mean several distinct propositional variables standing for
the same atom.
The convention here is to pad with a minimum of the input order: a tuple is
DescriptiveComplexity.Canon m when every coordinate from m on is a minimum. This is
the one place where the reductions of the library need their input structure
to be ordered. The file provides
- the semantic side:
DescriptiveComplexity.Canon,DescriptiveComplexity.Agree, the paddingDescriptiveComplexity.padand prefixDescriptiveComplexity.prefoperations, and the fact that a canonical tuple is the padding of its prefix (DescriptiveComplexity.pad_pref_of_canon,DescriptiveComplexity.eq_pad_of_canon_agree); - the first-order side: formulas
DescriptiveComplexity.canonF,DescriptiveComplexity.eqTupF,DescriptiveComplexity.agreeFover the ordered expansionL.sum Language.orderexpressing these conditions of the coordinates held by selected free variables, with their realization lemmas; - the special case of a tuple read from a context through an index map
(
DescriptiveComplexity.PadTup,DescriptiveComplexity.padTupF), which is how an element encoding a second-order atomR (x_{f 0}, …)is pinned down.
Formula builders are parameterized by maps Fin D → γ selecting the free
variables holding each tuple, so that they can be instantiated at the variable
types of the defining formulas of an interpretation (Fin 1 × Fin D,
Fin 2 × Fin D).
Clients: the Tseitin encoding of DescriptiveComplexity.Problems.Sat.Tseitin and the
Horn discharge of DescriptiveComplexity.Problems.HornSat.Hardness.
Finite conjunctions and disjunctions of formulas #
Finite conjunction of a list of formulas.
Equations
Instances For
Dependency graph
Finite disjunction of a list of formulas.
Equations
Instances For
Dependency graph
Dependency graph
Dependency graph
Padded tuples #
A D-tuple is canonical at context length m: every coordinate from m
on is a minimum of the order.
Equations
- DescriptiveComplexity.Canon m u = ∀ (j : Fin D), m ≤ ↑j → IsBot (u j)
Instances For
Dependency graph
Two D-tuples agree below m.
Equations
- DescriptiveComplexity.Agree m u x = ∀ (j : Fin D), ↑j < m → x j = u j
Instances For
Dependency graph
Pad a context tuple to a D-tuple with a (minimal) element.
Equations
- DescriptiveComplexity.pad a₀ w j = if hj : ↑j < m then w ⟨↑j, hj⟩ else a₀
Instances For
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
A canonical tuple is the padding of its prefix.
Dependency graph
A tuple canonical at m agreeing with u below m is the padding of
u's prefix.
Dependency graph
Dependency graph
Dependency graph
Tuples read through an index map #
An interpretation encoding second-order atoms as elements needs one element per
atom R (x_{f 0}, …, x_{f (m-1)}), whose coordinates are read from a context
tuple u through an index map f. Canonical padding makes that element
unique.
x is the canonically padded, length-m tuple read from u through the
index map f.
Equations
- DescriptiveComplexity.PadTup f u x = (DescriptiveComplexity.Canon m x ∧ ∀ (j : Fin D) (hj : ↑j < m), x j = u (f ⟨↑j, hj⟩))
Instances For
Dependency graph
The canonical padding of the tuple read through f does satisfy
DescriptiveComplexity.PadTup.
Dependency graph
Conversely, a tuple satisfying DescriptiveComplexity.PadTup is that canonical
padding: the element encoding an atom is unique.
Dependency graph
A tuple canonical at m + 1 agreeing below m with u is the padding
of the prefix of u extended by its own coordinate m.
Dependency graph
x is a minimum of the order, as a formula.
Equations
Instances For
Dependency graph
The coordinates of c from m on are minima, as a formula: c holds a
canonically padded context tuple of length m.
Equations
- DescriptiveComplexity.canonF m c = DescriptiveComplexity.listInf (List.map (fun (j : Fin D) => if m ≤ ↑j then DescriptiveComplexity.botF (c j) else ⊤) (List.finRange D))
Instances For
Dependency graph
The tuples held by u and x are equal, as a formula.
Equations
- DescriptiveComplexity.eqTupF u x = DescriptiveComplexity.listInf (List.map (fun (j : Fin D) => (FirstOrder.Language.var (x j)).equal (FirstOrder.Language.var (u j))) (List.finRange D))
Instances For
Dependency graph
The tuples held by u and x agree below m, as a formula.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The tuple held by x is the canonically padded, length-m tuple read
from u through the index map f, as a formula.
Equations
- One or more equations did not get rendered due to their size.