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