Evaluation of distance formulas on type trees
Lax185574.Evaluation · concepts/Lax185574/Evaluation.lean · lax-185574
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Lemma
Let φ(x̄) be a distFO formula of distance rank (k, q), G a partial graph and ā ∈ V(G)^ℓ with ℓ = |x̄| ≤ k. Then whether G ⊨ φ(ā) holds is decidable in polynomial time, given tree^G_{k,q}(ā) and φ.
For a type tree τ = tree^G_{k,q}(ā) one writes τ ⊨ φ if G ⊨ φ(ā). The lemma shows that this depends on τ only.
Concept map
In the paper
- page 42 of this submission's paper
Lean source view on GitHub
| 1 | import Lax185574.TypeTrees |
| 2 | import Lax185574.Algorithms |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Evaluation of distance formulas on type trees |
| 7 | type: lemma |
| 8 | --- |
| 9 | Let φ(x̄) be a distFO formula of distance rank (k, q), G a partial graph |
| 10 | and ā ∈ V(G)^ℓ with ℓ = |x̄| ≤ k. Then whether G ⊨ φ(ā) holds is |
| 11 | decidable in polynomial time, given tree^G_{k,q}(ā) and φ. |
| 12 | |
| 13 | For a type tree τ = tree^G_{k,q}(ā) one writes τ ⊨ φ if G ⊨ φ(ā). The |
| 14 | lemma shows that this depends on τ only. |
| 15 | |
| 16 | # Formalization notes |
| 17 | |
| 18 | The algorithm is an algorithm in the sense of `Lax185574.Algorithms`, |
| 19 | one for all k and q. Its input is the pair of the type tree and the |
| 20 | formula. It decides whether `u` satisfies `φ` in time polynomial in the |
| 21 | size of the input, `O((N + 1)^a)` for an input of length `N`. The |
| 22 | degree `a` and the constant `c` may depend on k and q. The paper says |
| 23 | polynomial time, with no subscript, so this is weaker than a degree |
| 24 | independent of k and q. It suffices, since k and q are fixed in every |
| 25 | use. Running times of the paper of the form poly_{k,q} are formalized |
| 26 | in the same way. That the answer depends on τ alone is part of the |
| 27 | statement, because the output of the algorithm depends on its input |
| 28 | only. |
| 29 | -/ |
| 30 | |
| 31 | namespace Lax185574.Evaluation |
| 32 | |
| 33 | open Lax185574.Encoding Lax185574.Algorithms |
| 34 | open Lax185574.PartialGraphs Lax185574.DistanceLogic Lax185574.DistanceLogic.DistFO |
| 35 | open Lax185574.TypeTrees |
| 36 | |
| 37 | /-- **Evaluation.** One algorithm decides, given `tree_{k,q}(u)` and a |
| 38 | formula `φ` of distance rank `(k, q)`, whether `u` satisfies `φ`, in |
| 39 | time polynomial in the size of the input. -/ |
| 40 | axiom exists_program_eval : |
| 41 | ∃ A : Algorithm, ∀ k q : ℕ, ∃ c a : ℕ, |
| 42 | ∀ (n : ℕ) (G : PartialGraph (Fin n)) (ℓ : ℕ) (u : Fin ℓ → Fin n) (φ : DistFO ℓ), |
| 43 | ℓ ≤ k → DRank k q φ → |
| 44 | A.Decides c (tree G k q u, φ) (Sat G u φ) |
| 45 | (((encode (tree G k q u)).length + (encode φ).length + 1) ^ a) |
| 46 | |
| 47 | end Lax185574.Evaluation |
| 48 |
Formalization notes
The algorithm is an algorithm in the sense of , one for all k and q. Its input is the pair of the type tree and the formula. It decides whether satisfies in time polynomial in the size of the input, for an input of length . The degree and the constant may depend on k and q. The paper says polynomial time, with no subscript, so this is weaker than a degree independent of k and q. It suffices, since k and q are fixed in every use. Running times of the paper of the form poly_{k,q} are formalized in the same way. That the answer depends on τ alone is part of the statement, because the output of the algorithm depends on its input only.
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments