First-order model checking on monadically dependent graph classes

Lax185574.ModelChecking · concepts/Lax185574/ModelChecking.lean · lax-185574

proven

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

    Theorem

    There is an algorithm which solves the model checking problem for first-order logic on graphs, that is, it decides whether a given graph G satisfies a given first-order sentence φ, with the following guarantee. For every monadically dependent graph class 𝒞 and every real ε > 0, the algorithm runs in time O_{𝒞,φ,ε}(n^(3+ε)) on the n-vertex graphs G ∈ 𝒞.

    Concept map
    9 concepts
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A
    Evidence

    Each proof establishes this claim relative to its assumptions.

    In the paper

    • page 4 of this submission's paper

    Lean source view on GitHub

    1import Lax185574.Algorithms
    2import Lax185574.MonadicDependence
    3import Mathlib.Analysis.SpecialFunctions.Pow.Real
    4
    5/-!
    6---
    7title: First-order model checking on monadically dependent graph classes
    8type: theorem
    9---
    10There is an algorithm which solves the model checking problem for
    11first-order logic on graphs, that is, it decides whether a given graph
    12*G* satisfies a given first-order sentence φ, with the following
    13guarantee. For every monadically dependent graph class 𝒞 and every real
    14ε > 0, the algorithm runs in time O_{𝒞,φ,ε}(n^(3+ε)) on the n-vertex
    15graphs G ∈ 𝒞.
    16
    17# Formalization notes
    18
    19The algorithm is an algorithm in the sense of `Lax185574.Algorithms`, a
    20word RAM program together with the exponent of the word length it needs.
    21It comes first, before the class, the sentence and ε, and it knows none
    22of them. Only the constant `c` of the O-notation depends on them.
    23
    24`A.Decides c (G, φ) (G ⊨ φ) T` is a statement about the encoding of the
    25pair `(G, φ)` of `Lax185574.Encodings`, which is the encoding of the
    26graph followed by the encoding of the sentence. At every word length
    27that is admissible for `c`, every halting run of `A` on this input
    28writes `1` if `G ⊨ φ` and `0` otherwise, and `A` halts within
    29`c · T + c` steps once this number fits into a word. Here
    30`T = n^(3+ε)` is the real power. The additive `c` is part of the
    31O-notation, and it covers small graphs, such as the graph without
    32vertices, where `T` vanishes. An n-vertex graph with m edges is encoded
    33by a word of length n + 4m + 1 ≤ 2n² + 1, so reading the input fits into
    34the time bound.
    35
    36Every graph lies in a monadically dependent class, for instance the
    37class consisting of it alone. So the algorithm decides every instance
    38correctly at every word length that is admissible for some such class.
    39The time bound is claimed for members of a monadically dependent class
    40only.
    41
    42Monadic dependence is the transduction-based definition of
    43`Lax185574.MonadicDependence`: the class does not transduce the class of
    44all graphs. It agrees with the archive's definition
    45`Lax710763.MonadicDependence` and with the definition of the paper, see
    46`Lax185574.MonadicDependence`.
    47-/
    48
    49namespace Lax185574.ModelChecking
    50
    51open Lax185574.Graphs Lax185574.FirstOrderLogic Lax185574.MonadicDependence
    52open Lax185574.Algorithms
    53
    54/-- **First-order model checking on monadically dependent graph
    55classes.** There is an algorithm `A` such that for every monadically
    56dependent class `C`, every sentence `φ` and every `ε > 0` there is a
    57constant `c` such that `A` decides `G ⊨ φ` from `(G, φ)` in time
    58`O(n ^ (3 + ε))` with the constant `c`, for every graph `G ∈ C` on `n`
    59vertices. -/
    60axiom exists_program_modelChecking :
    61 ∃ A : Algorithm, ∀ C : GraphClass, MonadicallyDependent C →
    62 ∀ (φ : Sentence) (ε : ℝ), 0 < ε → ∃ c : ℕ,
    63 ∀ G ∈ C, A.Decides c (G, φ) (G ⊨ φ) ((G.n : ℝ) ^ (3 + ε))
    64
    65end Lax185574.ModelChecking
    66
    Show Proof
    Formalization notes

    The algorithm is an algorithm in the sense of Lax185574.AlgorithmsLax185574.Algorithms, a word RAM program together with the exponent of the word length it needs. It comes first, before the class, the sentence and ε, and it knows none of them. Only the constant cc of the O-notation depends on them.

    A.Decidesc(G,φ)(G⊨φ)TA.Decides c (G, φ) (G ⊨ φ) T is a statement about the encoding of the pair (G,φ)(G, φ) of Lax185574.EncodingsLax185574.Encodings, which is the encoding of the graph followed by the encoding of the sentence. At every word length that is admissible for cc, every halting run of AA on this input writes 11 if G⊨φG ⊨ φ and 00 otherwise, and AA halts within c⋅T+cc · T + c steps once this number fits into a word. Here T=n(3+ε)T = n^(3+ε) is the real power. The additive cc is part of the O-notation, and it covers small graphs, such as the graph without vertices, where TT vanishes. An n-vertex graph with m edges is encoded by a word of length n + 4m + 1 ≤ 2n² + 1, so reading the input fits into the time bound.

    Every graph lies in a monadically dependent class, for instance the class consisting of it alone. So the algorithm decides every instance correctly at every word length that is admissible for some such class. The time bound is claimed for members of a monadically dependent class only.

    Monadic dependence is the transduction-based definition of Lax185574.MonadicDependenceLax185574.MonadicDependence: the class does not transduce the class of all graphs. It agrees with the archive's definition Lax710763.MonadicDependenceLax710763.MonadicDependence and with the definition of the paper, see Lax185574.MonadicDependenceLax185574.MonadicDependence.

    Discussion

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

    Loading discussion…