AC⁰ as first-order logic with arithmetic

Lax895169.ArithmeticLogic · concepts/Lax895169/ArithmeticLogic.lean · lax-895169

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

    The arithmetic vocabulary has a binary symbol ≤\le and two ternary symbols for addition and multiplication. Every finite linear order interprets it canonically through the ranks of its elements: ≤\le is the order, plus(x,y,z)\mathrm{plus}(x, y, z) holds when the ranks satisfy r(x)+r(y)=r(z)r(x) + r(y) = r(z) and times(x,y,z)\mathrm{times}(x, y, z) when r(x)⋅r(y)=r(z)r(x) \cdot r(y) = r(z). The two are graphs, hence truncated: a sum or a product that is not the rank of an element is related to nothing.

    A decision problem PP over a relational vocabulary LL is AC⁰ definable when there is a first-order sentence φ\varphi over LL and the arithmetic vocabulary such that, for every nonempty finite LL-structure AA and every linear order on AA, AA is a yes-instance of PP if and only if φ\varphi holds in AA with the canonical arithmetic of that order. This is the logic FO(≤,+,×\le, +, \times), which defines the problems of uniform AC⁰ by theorems of Barrington, Immerman and Straubing; no circuit model is introduced here.

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

    Lean source view on GitHub

    1import Mathlib.ModelTheory.Order
    2import Mathlib.ModelTheory.Semantics
    3import Lax904597.Problems
    4import Lax895169.BitPredicate
    5
    6/-!
    7---
    8title: AC⁰ as first-order logic with arithmetic
    9type: definition
    10---
    11The arithmetic vocabulary has a binary symbol ≤\le and two ternary symbols
    12for addition and multiplication. Every finite linear order interprets it
    13canonically through the ranks of its elements: ≤\le is the order,
    14plus(x,y,z)\mathrm{plus}(x, y, z) holds when the ranks satisfy
    15r(x)+r(y)=r(z)r(x) + r(y) = r(z) and times(x,y,z)\mathrm{times}(x, y, z) when
    16r(x)⋅r(y)=r(z)r(x) \cdot r(y) = r(z). The two are graphs, hence truncated: a sum or a
    17product that is not the rank of an element is related to nothing.
    18
    19A decision problem PP over a relational vocabulary LL is AC⁰ definable
    20when there is a first-order sentence φ\varphi over LL and the arithmetic
    21vocabulary such that, for every nonempty finite LL-structure AA and every
    22linear order on AA, AA is a yes-instance of PP if and only if
    23φ\varphi holds in AA with the canonical arithmetic of that order. This is
    24the logic FO(≤,+,×\le, +, \times), which defines the problems of uniform AC⁰
    25by theorems of Barrington, Immerman and Straubing; no circuit model is
    26introduced here.
    27-/
    28
    29namespace Lax895169.ArithmeticLogic
    30
    31open Lax895169.BitPredicate Lax904597.Problems
    32
    33open FirstOrder
    34
    35open FirstOrder.Language
    36
    37/-- Relation symbols of the arithmetic vocabulary. -/
    38inductive arithRel : ℕ → Type
    39 /-- `le x y`: the rank of `x` is at most the rank of `y`, i.e., `x ≤ y`. -/
    40 | le : arithRel 2
    41 /-- `plus x y z`: the ranks satisfy `orank x + orank y = orank z`. -/
    42 | plus : arithRel 3
    43 /-- `times x y z`: the ranks satisfy `orank x * orank y = orank z`. -/
    44 | times : arithRel 3
    45 deriving DecidableEq
    46
    47/-- The relational vocabulary of the numeric predicates: a linear order and the
    48graphs of addition and multiplication of ranks. Interpreted canonically on every
    49finite linear order by `arithStructure`. -/
    50def arith : Language :=
    51 ⟨fun _ => Empty, arithRel⟩
    52
    53instance instIsRelationalArith : IsRelational arith := fun _ =>
    54 (inferInstance : IsEmpty Empty)
    55
    56open FirstOrder
    57
    58open Language Structure
    59
    60section Structures
    61
    62variable (A : Type) [LinearOrder A] [Finite A]
    63
    64/-- **The numeric predicates of a finite linear order**: `≤` is the order, and
    65`plus`/`times` are the graphs of addition and multiplication of ranks. Both are
    66truncated: a value that is not the rank of an element of `A` is not related to
    67anything. -/
    68instance arithStructure : arith.Structure A where
    69 funMap f := isEmptyElim f
    70 RelMap {n} R :=
    71 match n, R with
    72 | _, .le => fun x => x 0 ≤ x 1
    73 | _, .plus => fun x => orank (x 0) + orank (x 1) = orank (x 2)
    74 | _, .times => fun x => orank (x 0) * orank (x 1) = orank (x 2)
    75
    76end Structures
    77
    78open FirstOrder
    79
    80open Language
    81
    82/-- A decision problem is **AC⁰ definable** if a single sentence over the
    83arithmetic expansion of its vocabulary decides it on nonempty finite ordered
    84structures. The equivalence is required for *every* linear order, so the notion
    85is order-invariant: the sentence sees `≤`, `+` and `×`, the problem does not.
    86There is no order-free variant: the numeric predicates are computed from the
    87order, so without one there is nothing for them to mean. -/
    88def AC0Definable {L : Language.{0, 0}} [L.IsRelational] (P : DecisionProblem L) : Prop :=
    89 ∃ φ : (L.sum arith).Sentence,
    90 ∀ (A : Type) [L.Structure A] [LinearOrder A] [Finite A] [Nonempty A], P A ↔ A ⊨ φ
    91
    92end Lax895169.ArithmeticLogic
    93

    Discussion

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

    Loading discussion…