Translating a quantifier-free matrix #
DescriptiveComplexity.Exponential.PointAtoms writes each atom of a sentence
over an expansion as a sentence of the quantifier prefix. This file closes the
Boolean connectives over them: a quantifier-free formula whose free variables
range over the points of the expanded universe becomes a sentence of the prefix,
variable i read at round i.
Two points of technique.
The recursion is total, the correctness is not. IsQF is a Prop, so a
definition cannot recurse on it. DescriptiveComplexity.ExpExpansion.translQF
is therefore defined on every bounded formula, sending a quantifier node – and
an atom mentioning a bound variable – to ⊥; correctness is then proved by
induction on FirstOrder.Language.BoundedFormula.IsQF at n = 0, where no such
node is reachable. This is the shape the abandoned quantifier-free-reduction
track would have used too, and it is the standard way to recurse on a syntactic
class carved out by a Prop.
Function symbols are impossible, not junk. The expanded vocabulary and the
order vocabulary are both relational, so FirstOrder.Language.Term.func is
eliminated by isEmptyElim rather than mapped to a default: a term is a
variable (DescriptiveComplexity.ExpExpansion.termVar). Only the distinction
between a free and a bound variable needs an Option.
Terms are variables #
The variable a term is. Over a relational vocabulary there is nothing else
a term can be, so the function case is isEmptyElim.
Equations
Instances For
Dependency graph
Dependency graph
The atoms, selected by the relation symbol #
The prefix-level sentence of an atom, given the round each argument names: a relation of the expanded vocabulary, or the order.
Equations
Instances For
Dependency graph
The translation #
The recursion carries a map bv sending each bound variable to a round. A
quantifier node is sent to ⊥, so bv is never extended and never consulted at
the depth the correctness proof works at – where it is finZeroElim, the empty
map. Carrying it is what keeps the definition total without an Option in every
atom.
The translation of a quantifier-free matrix. Total, so that it is a
definition; correct on quantifier-free formulas, which is
DescriptiveComplexity.ExpExpansion.realize_translQF.
Equations
- One or more equations did not get rendered due to their size.
- X.translQF m x✝ FirstOrder.Language.BoundedFormula.falsum = ⊥
- X.translQF m x✝ (FirstOrder.Language.BoundedFormula.rel r ts) = X.atomOf m r fun (j : Fin l) => Sum.elim id x✝ (DescriptiveComplexity.ExpExpansion.termVar (ts j))
- X.translQF m x✝ (φ.imp ψ) = FirstOrder.Language.BoundedFormula.imp (X.translQF m x✝ φ) (X.translQF m x✝ ψ)
- X.translQF m x✝ f.all = ⊥
Instances For
Dependency graph
Correctness #
At no bound variables, a valuation of the free variables reads a variable through its round.
Dependency graph
The matrix says what it should: on a quantifier-free formula, the translated sentence holds of the prefix exactly when the formula holds of the points the rounds carry.