The certificate: a finite model, invented #
The mathematical content of FINSAT ∈ RE, ahead of any second-order syntax:
an encoded sentence has a finite model exactly when a finite set of invented
values carries one (DescriptiveComplexity.FinSat.finSatOn_iff_cert). The
∃SO[new] sentence of DescriptiveComplexity.Problems.FinSat.Membership is then this
statement written out, the invented values being the extension A ⊕ Fin m of
the universe and the five relations below the guessed relation variables.
What has to be invented, and why #
- the elements of the model (
Elt) – unbounded in the instance, which is exactly what∃SO[new]adds toΣ₁and what takes the problem out of NP; - the environments (
Env, withVal e x dreading the value of the variablexin the environmente). An environment is a function from the variables of the sentence to the model, so it cannot be a tuple: its arity would be the number of variables of the input. Reifying it as an invented value, with its graph as a guessed ternary relation, is the only way a first-order kernel can quantify over environments.val_update– every environment can be updated at one variable to any value – is what makes the reified environments cover all assignments, and it is used exactly where the truth definition updates the environment, at a quantifier node; - the truth values of the nodes (
G g e), constrained by the truth definition read as an equivalence (step). Well-formedness makes that fixed point unique (DescriptiveComplexity.FinSat.IsEval.iff_Gval), so the guess is forced to be satisfaction – this is where the acyclicity of the parse DAG is spent; - the truth values of the atoms (
H g e), not the interpretation of the relation symbols. An atom's arguments form a tuple of unbounded arity too, so the interpretation cannot be guessed directly; it is instead recovered fromHby the coherence conditionatom_coh– two atoms of the same symbol whose arguments have the same values get the same truth value – which is first-order and needs no tuples at all. The atom shape conditions ofDescriptiveComplexity.FinSat.IsWFare what make that recovery sound.
Note that G must be given separately from H: a node that is a negated
atom has the negation of the atom's truth value, so the two cannot be the same
relation – the equation G g e ↔ ¬G g e has no solutions.
The certificate #
e' is the environment e with the variable x set to the value d.
Equations
- DescriptiveComplexity.FinSat.UpdAt Val e e' x d = (Val e' x d ∧ ∀ (y : A), y ≠ x → ∀ (c : D), Val e' y c ↔ Val e y c)
Instances For
Dependency graph
The truth definition of DescriptiveComplexity.FinSat.gstep, read on a
certificate: environments are invented values, an updated environment is any
invented value that updates the given one, and the two atom clauses read the
guessed truth value of the atom rather than an interpretation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
A certificate of finite satisfiability, over a set D of invented
values: a nonempty model Elt, environments Env with their graph Val,
truth values G of the nodes and H of the atoms, subject to the conditions
of the module docstring. Every condition is first-order in the vocabulary of
the instance together with the five relations, which is what makes the
∃SO[new] sentence of DescriptiveComplexity.Problems.FinSat.Membership possible.
- elt_nonempty : ∃ (d : D), Elt d
The model is nonempty.
- env_nonempty : ∃ (e : D), Env e
There is at least one environment.
- val_total (e : D) : Env e → ∀ (x : A), ∃ (d : D), Elt d ∧ Val e x d
An environment gives every variable a value in the model.
- val_fun (e : D) : Env e → ∀ (x : A) (d d' : D), Val e x d → Val e x d' → d = d'
An environment gives every variable at most one value.
Environments are closed under updating one variable: this is what makes the invented environments cover every assignment.
- g_ext (g : A) (e e' : D) : Env e → Env e' → (∀ (x : A) (d : D), Val e x d ↔ Val e' x d) → (G g e ↔ G g e')
The truth value of a node depends on the environment only through the values it gives: two environments with the same graph agree.
The truth values obey the truth definition.
- atom_coh (g g' s : A) (e e' : D) : Env e → Env e' → PosG g s ∨ NegG g s → PosG g' s ∨ NegG g' s → (∀ (p x x' : A), ArgG g p x → ArgG g' p x' → ∀ (d : D), Val e x d ↔ Val e' x' d) → (H g e ↔ H g' e')
Atoms cohere: two atoms of the same relation symbol whose arguments have the same values have the same truth value. This is what an interpretation of the symbol is, written without tuples.
- root_holds (g : A) : RootG g → ∀ (e : D), Env e → G g e
The root holds under every environment.
Instances For
Dependency graph
Matching the arguments of an atom #
An assignment of the argument positions matches an atom under an environment
when it gives each argument position the value of the variable the atom has
there. The shape conditions of DescriptiveComplexity.FinSat.IsWF make such an
assignment exist, and make any two of them agree wherever the symbol's
signature can see – so “some matching assignment satisfies the symbol” and
“every matching assignment does” coincide, which is what the negated atom
clause of the truth definition needs.
From a certificate to a model #
The environment object e represents the assignment v.
Equations
- DescriptiveComplexity.FinSat.Represents Val e v = ∀ (x : A), Val e x ↑(v x)
Instances For
Dependency graph
Dependency graph
From a model to a certificate #
The invented values are the assignments themselves: an environment is an assignment, and an element of the model is the constant assignment at it.
The graph of an environment, when environments are assignments.
Equations
- DescriptiveComplexity.FinSat.EnvVal e x d = (d = fun (x_1 : A) => e x)
Instances For
Dependency graph
The truth values of the atoms read off the interpretation.
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
Relabeling the invented values #
The ∃SO[new] sentence of DescriptiveComplexity.Problems.FinSat.Membership guesses its
relations over A ⊕ Fin m, so it needs the invented values indexed. Nothing
in DescriptiveComplexity.FinSat.CertOK looks at the set of invented values
beyond its elements, so a bijection carries a certificate over one such set to a
certificate over another, one field at a time.
Dependency graph
Dependency graph
The graph of an environment, relabeled along a bijection of the invented values.
Equations
- DescriptiveComplexity.FinSat.mapVal σ Val e x d = Val (σ.symm e) x (σ.symm d)
Instances For
Dependency graph
Dependency graph
A certificate can be carried to any equinumerous set of invented
values, which is what lets the ∃SO[new] sentence guess its relations over
the extension A ⊕ Fin m of the universe.
Dependency graph
The characterization #
An encoded sentence has a finite model exactly when a finite set of
invented values carries one. The right-hand side is first-order in the
instance together with five guessed relations, which is what
DescriptiveComplexity.Problems.FinSat.Membership turns into an ∃SO[new]
sentence.