Proof of `Model checking along a construction sequence`

groundedproofs/Lax185574Proofs/ConstructionModelChecking.lean · lax-185574

What this proof establishes

Assuming the claims on the left, the claim on the right holds — checked by the archive's pipeline. Proof code is not displayed here.

Read the Lean proof on GitHub

In the paper

  • page 52 of this submission's paper

Description

Two threads run in parallel at a word length a constant below the given one. The first thread removes the graph from the input and runs a loop that alternates a glue program with a callee. The glue program follows the construction sequence step by step. It keeps the current partial graph with its matrix of distances and the type trees of all vertices, and issues one call per step and finally one call of the evaluation on the tree of a vertex and the localized sentence. For a merge step the callee maps the merge lift over the trees of all vertices, for a resolve step it runs the resolve lift, which also returns the new matrix of distances. Each query is guarded for the word length of its callee, so every halting run of the pipeline is right, and the pipeline halts within c⋅m⋅(n+1)2⋅(K+1)bc · m · (n + 1)² · (K + 1) ^ b steps when the input is long enough. The second thread evaluates the sentence by brute force, which is fast for short inputs and for graphs without vertices. The combinator outputs the answer of a thread that halts.

The proof is carried out for the input format with the graph in compressed sparse row form and the notion Lax185574.Computing.ComputesLax185574.Computing.Computes, with a time bound that holds for every bound on the width. The algorithm converts the word of the graph into compressed sparse rows (Interface.nbrbridgeInterface.nbr_bridge) and runs the program for that format with the width itself as the bound. The conversion takes time linear in the length of the input, which is O(λ⋅(n+1)2)O(λ · (n+1)²) for a fixed sentence.