First-order interpretations and first-order reductions

Lax904597.Interpretations · concepts/Lax904597/Interpretations.lean · lax-904597

definition

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Definition

    A tagged dd-dimensional first-order interpretation of a relational vocabulary L′L' in a vocabulary LL maps an LL-structure with universe AA to the L′L'-structure with universe Tag×Ad\mathrm{Tag} \times A^d, in which an nn-ary symbol RR holds of the tagged tuples (t1,aˉ1),…,(tn,aˉn)(t_1, \bar a_1), \dots, (t_n, \bar a_n) exactly when the first-order LL-formula chosen for RR and the tags t1,…,tnt_1, \dots, t_n holds in AA of the coordinates aˉ1,…,aˉn\bar a_1, \dots, \bar a_n. The tags play the role of the constantly many sorts that textbook reductions carve out of an ordered universe.

    A first-order reduction from a problem PP to a problem QQ is such an interpretation mapping yes-instances of PP exactly to yes-instances of QQ, on every finite nonempty structure. An ordered first-order reduction is one over the expansion of LL by a linear order, correct for every linear order put on the input; since PP does not depend on the order, neither does whether the image is a yes-instance of QQ, so the reduction is order-invariant. Both kinds are computable in AC0\mathrm{AC}^0 on encodings of finite structures, hence in particular polynomial-time many-one reductions; this standard fact is not part of the formalization.

    Concept map
    2 concepts; 5 descendants hidden
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A

    Lean source view on GitHub

    1import Mathlib.ModelTheory.Semantics
    2import Mathlib.ModelTheory.Order
    3import Lax904597.Problems
    4
    5/-!
    6---
    7title: First-order interpretations and first-order reductions
    8type: definition
    9---
    10A *tagged dd-dimensional first-order interpretation* of a relational
    11vocabulary L′L' in a vocabulary LL maps an LL-structure with universe AA
    12to the L′L'-structure with universe Tag×Ad\mathrm{Tag} \times A^d, in which an
    13nn-ary symbol RR holds of the tagged tuples (t1,aˉ1),…,(tn,aˉn)(t_1, \bar a_1), \dots, (t_n, \bar a_n)
    14 exactly when the first-order LL-formula chosen for RR and
    15the tags t1,…,tnt_1, \dots, t_n holds in AA of the coordinates aˉ1,…,aˉn\bar a_1, \dots, \bar a_n
    16. The tags play the role of the constantly many sorts that textbook
    17reductions carve out of an ordered universe.
    18
    19A *first-order reduction* from a problem PP to a problem QQ is such an
    20interpretation mapping yes-instances of PP exactly to yes-instances of QQ,
    21on every finite nonempty structure. An *ordered* first-order reduction is
    22one over the expansion of LL by a linear order, correct for every linear
    23order put on the input; since PP does not depend on the order, neither
    24does whether the image is a yes-instance of QQ, so the reduction is
    25order-invariant. Both kinds are computable in AC0\mathrm{AC}^0 on encodings
    26of finite structures, hence in particular polynomial-time many-one
    27reductions; this standard fact is not part of the formalization.
    28-/
    29
    30namespace Lax904597.Interpretations
    31
    32open FirstOrder FirstOrder.Language Lax904597.Problems
    33
    34/-- A tagged `dim`-dimensional first-order interpretation of `L'` in `L`:
    35the defining `L`-formula of each relation symbol of `L'`, for each tuple of
    36tags; the free variable `(i, j)` is the `j`-th coordinate of the `i`-th
    37argument tuple. -/
    38structure FOInterpretation (L L' : Language.{0, 0}) (Tag : Type) (dim : ℕ) where
    39 /-- The defining `L`-formula of each relation symbol of `L'`, for each tuple
    40 of tags; the free variable `(i, j)` is the `j`-th coordinate of the `i`-th
    41 argument tuple. -/
    42 relFormula : ∀ {n : ℕ}, L'.Relations n → (Fin n → Tag) → L.Formula (Fin n × Fin dim)
    43
    44namespace FOInterpretation
    45
    46variable {L L' : Language.{0, 0}} {Tag : Type} {dim : ℕ}
    47
    48/-- The universe of the structure interpreted in `A`: tagged `dim`-tuples. -/
    49protected def Map (_I : FOInterpretation L L' Tag dim) (A : Type) : Type :=
    50 Tag × (Fin dim → A)
    51
    52variable (I : FOInterpretation L L' Tag dim) (A : Type) [L.Structure A]
    53
    54/-- The `L'`-structure interpreted in the `L`-structure `A`. -/
    55instance mapStructure [L'.IsRelational] : L'.Structure (I.Map A) where
    56 funMap f := isEmptyElim f
    57 RelMap R xs := (I.relFormula R fun i => (xs i).1).Realize fun p => (xs p.1).2 p.2
    58
    59end FOInterpretation
    60
    61/-- A first-order reduction from the problem `P` on `L`-structures to the
    62problem `Q` on `L'`-structures: an interpretation mapping yes-instances of
    63`P` exactly to yes-instances of `Q`, on the finite nonempty structures. -/
    64structure FOReduction {L L' : Language.{0, 0}} [L.IsRelational] [L'.IsRelational]
    65 (P : DecisionProblem L) (Q : DecisionProblem L') where
    66 /-- The tags: the copies of `A^dim` the interpretation uses. -/
    67 Tag : Type
    68 /-- Finitely many tags, so that finite structures map to finite ones. -/
    69 [tagFinite : Finite Tag]
    70 /-- At least one tag, so that nonempty structures map to nonempty ones. -/
    71 [tagNonempty : Nonempty Tag]
    72 /-- The dimension of the interpretation. -/
    73 dim : ℕ
    74 /-- The interpretation. -/
    75 toInterpretation : FOInterpretation L L' Tag dim
    76 /-- Yes-instances map exactly to yes-instances. -/
    77 correct : ∀ (A : Type) [L.Structure A] [Finite A] [Nonempty A],
    78 P A ↔ Q (toInterpretation.Map A)
    79
    80section Ordered
    81
    82variable (L : Language.{0, 0}) (A : Type) [L.Structure A] [LE A]
    83
    84/-- A linearly ordered `L`-structure is a structure over the ordered expansion
    85`L.sum Language.order`, interpreting the order symbol as `≤`. -/
    86instance sumOrderStructure : (L.sum Language.order).Structure A :=
    87 letI := orderStructure (M := A)
    88 inferInstance
    89
    90instance sumOrderOrderedStructure : (L.sum Language.order).OrderedStructure A :=
    91 ⟨fun _ => Iff.rfl⟩
    92
    93end Ordered
    94
    95/-- An ordered first-order reduction from `P` to `Q`: an interpretation over
    96the ordered expansion of `L` that maps yes-instances of `P` exactly to
    97yes-instances of `Q`, on every finite nonempty structure and for every linear
    98order on it. -/
    99structure OrderedFOReduction {L L' : Language.{0, 0}} [L.IsRelational] [L'.IsRelational]
    100 (P : DecisionProblem L) (Q : DecisionProblem L') where
    101 /-- The tags: the copies of `A^dim` the interpretation uses. -/
    102 Tag : Type
    103 /-- Finitely many tags, so that finite structures map to finite ones. -/
    104 [tagFinite : Finite Tag]
    105 /-- At least one tag, so that nonempty structures map to nonempty ones. -/
    106 [tagNonempty : Nonempty Tag]
    107 /-- The dimension of the interpretation. -/
    108 dim : ℕ
    109 /-- The interpretation, over the ordered expansion of `L`. -/
    110 toInterpretation : FOInterpretation (L.sum Language.order) L' Tag dim
    111 /-- Yes-instances map exactly to yes-instances, whatever the linear order. -/
    112 correct : ∀ (A : Type) [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A],
    113 P A ↔ Q (toInterpretation.Map A)
    114
    115end Lax904597.Interpretations
    116

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…