Documentation

DescriptiveComplexity.Exponential.Translate

The translation lemma #

A first-order sentence over an exponential expansion is a second-order sentence over the base. This is the type-lowering reading of Henkin 1950 made into a theorem, and the honest statement of the obstruction that keeps an interpretation from being composed after an expansion: a quantifier ranging over the points of X.Map A ranges over block assignments, so it is a second-order quantifier over A. The translation writes that down rather than avoiding it.

The construction is the standard one, with everything it needs already built.

The sentence is produced existentially, not by a total recursive definition. That is what keeps the round arithmetic honest: the inequalities saying that the rounds a subformula needs exist are in scope exactly where the Fin-indices are built, so no fallback round and no cast is needed anywhere. The number of rounds is likewise produced by the induction (the d of DescriptiveComplexity.ExpExpansion.exists_transl) instead of by a second recursion counting quantifiers.

The kernel, read at an arbitrary family of rounds #

@[instance_reducible]

The structure the kernel of the translation is realized against: the base, expanded by one copy of the point block per round. It is DescriptiveComplexity.ExpExpansion.prefixStructure with the rounds allowed to hold assignments not (yet) known to be points.

Equations
Instances For
    Dependency graph

    Freeing the bound variables of the matrix #

    Turning the bound variables of a quantifier-free formula into free ones keeps it quantifier-free.

    Dependency graph

    The matrix of the prefix: the quantifier-free matrix of a prenex sentence, its bound variables freed and each sent to the round holding its point.

    Equations
    Instances For
      Dependency graph
      theorem DescriptiveComplexity.ExpExpansion.realize_matrixF {L : FirstOrder.Language} {X : ExpExpansion L} {A : Type} [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {n j : } (pts : Fin nX.Map A) (hv : Fin jFin n) {ψ : (X.E.sum FirstOrder.Language.order).BoundedFormula Empty j} (hqf : ψ.IsQF) :
      A X.matrixF hv ψ ψ.Realize default fun (i : Fin j) => pts (hv i)

      The matrix says what it should: read against the rounds, it holds exactly when the formula holds of the points they carry.

      Dependency graph

      One quantifier, two rounds #

      The kernel contributed by one quantifier: its two rounds, each guarded to hold a point – the first existentially, as a conjunct, the second universally, as a hypothesis.

      Equations
      Instances For
        Dependency graph
        theorem DescriptiveComplexity.ExpExpansion.altBlockQuant_peel_step {L : FirstOrder.Language} {X : ExpExpansion L} {A : Type} [L.Structure A] [LinearOrder A] {n r : } (i₀ i₁ : Fin n) (K : ((L.sum FirstOrder.Language.order).sum (repMerged X.pointBlock n).lang).Sentence) (ext : (Fin (r + 2)X.pointBlock.Assignment A)Fin nX.pointBlock.Assignment A) (h₀ : ∀ (τs : Fin (r + 2)X.pointBlock.Assignment A), ext τs i₀ = τs 0) (h₁ : ∀ (τs : Fin (r + 2)X.pointBlock.Assignment A), ext τs i₁ = τs (Fin.succ 0)) :
        altBlockQuant A X.pointBlock (r + 2) (fun (τs : Fin (r + 2)X.pointBlock.Assignment A) => A X.stepF i₀ i₁ K) true ∃ (p : X.Map A), ∀ (q : X.Map A), altBlockQuant A X.pointBlock r (fun (τs : Fin rX.pointBlock.Assignment A) => A K) true

        Peeling a quantifier: its two rounds become a point chosen existentially and a point chosen universally, of which the kernel that remains uses one.

        Dependency graph
        theorem DescriptiveComplexity.ExpExpansion.transl_step {L : FirstOrder.Language} {X : ExpExpansion L} {A : Type} [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {n j c d : } (hc0 : c < n) (hc1 : c + 1 < n) {hv : Fin jFin n} (hlt : ∀ (i : Fin j), (hv i) < c) (iv : Fin n) {K : ((L.sum FirstOrder.Language.order).sum (repMerged X.pointBlock n).lang).Sentence} {ψ : (X.E.sum FirstOrder.Language.order).BoundedFormula Empty (j + 1)} (hK : ∀ (pts : Fin nX.Map A) (ext : (Fin dX.pointBlock.Assignment A)Fin nX.pointBlock.Assignment A), (∀ (τs : Fin dX.pointBlock.Assignment A) (k : Fin n), k < c + 2ext τs k = pointAssign (pts k))(∀ (τs : Fin dX.pointBlock.Assignment A) (i : Fin d) (k : Fin n), k = c + 2 + iext τs k = τs i) → (altBlockQuant A X.pointBlock d (fun (τs : Fin dX.pointBlock.Assignment A) => A K) true ψ.Realize default fun (i : Fin (j + 1)) => pts (Fin.snoc hv iv i))) (pts : Fin nX.Map A) (ext : (Fin (d + 2)X.pointBlock.Assignment A)Fin nX.pointBlock.Assignment A) (hfix : ∀ (τs : Fin (d + 2)X.pointBlock.Assignment A) (k : Fin n), k < cext τs k = pointAssign (pts k)) (hemb : ∀ (τs : Fin (d + 2)X.pointBlock.Assignment A) (i : Fin (d + 2)) (k : Fin n), k = c + iext τs k = τs i) (p q : X.Map A) :
        altBlockQuant A X.pointBlock d (fun (τs : Fin dX.pointBlock.Assignment A) => A K) true ψ.Realize default (Fin.snoc (fun (i : Fin j) => pts (hv i)) (Function.update (Function.update pts c, hc0 p) c + 1, hc1 q iv))

        The bookkeeping shared by the two quantifier cases: once the two rounds of a quantifier have been peeled into the points p and q, the induction hypothesis applies at the round c + 2, its variables read at the family of points updated at those two rounds.

        Dependency graph

        The translation #

        theorem DescriptiveComplexity.ExpExpansion.exists_transl {L : FirstOrder.Language} {X : ExpExpansion L} {j : } {ψ : (X.E.sum FirstOrder.Language.order).BoundedFormula Empty j} ( : ψ.IsPrenex) :
        ∃ (d : ), ∀ (n c r : ), c + r = nr = d∀ (hv : Fin jFin n), (∀ (i : Fin j), (hv i) < c)∃ (K : ((L.sum FirstOrder.Language.order).sum (repMerged X.pointBlock n).lang).Sentence), ∀ (A : Type) [inst : L.Structure A] [inst_1 : LinearOrder A] [inst_2 : Finite A] [inst_3 : Nonempty A] (pts : Fin nX.Map A) (ext : (Fin rX.pointBlock.Assignment A)Fin nX.pointBlock.Assignment A), (∀ (τs : Fin rX.pointBlock.Assignment A) (k : Fin n), k < cext τs k = pointAssign (pts k))(∀ (τs : Fin rX.pointBlock.Assignment A) (i : Fin r) (k : Fin n), k = c + iext τs k = τs i) → (altBlockQuant A X.pointBlock r (fun (τs : Fin rX.pointBlock.Assignment A) => A K) true ψ.Realize default fun (i : Fin j) => pts (hv i))

        The translation lemma, by induction on the prenex proof. A prenex formula with j bound variables, each already held by a round below c, is translated into a sentence of the prefix quantified by the r rounds that remain: d rounds are needed, two per quantifier.

        Dependency graph
        theorem DescriptiveComplexity.ExpExpansion.exists_translate {L : FirstOrder.Language} (X : ExpExpansion L) (φ : (X.E.sum FirstOrder.Language.order).Sentence) :
        ∃ (Bs : List SOBlock) (ψ : (soLang (L.sum FirstOrder.Language.order) Bs).Sentence) (pol : Bool), ∀ (A : Type) [inst : L.Structure A] [inst_1 : LinearOrder A] [inst_2 : Finite A] [inst_3 : Nonempty A], X.Map A φ SORealize (L.sum FirstOrder.Language.order) A Bs ψ pol

        An FO sentence over an expansion is a second-order sentence over the base. The obstruction the exponential classes are built around, stated rather than avoided: the quantifiers of a sentence read on the expanded universe become second-order quantifier blocks over the base, two blocks per quantifier.

        Dependency graph