Proof of `Evaluation of distance formulas on type trees`
What this proof establishes
no assumptions
Assuming the claims on the left, the claim on the right holds — checked by the archive's pipeline. Proof code is not displayed here.
In the paper
- page 42 of this submission's paper
Description
The program reads the tree, copies the word of its root into an array, reads the code of the formula into a second array, and lists the nodes of the tree in breadth-first order. It fills a table with a row for every position of the code and a column for every node, from the last position to the first. At a position where a subformula starts, the entry of a node is the value of the subformula at the node: an atom is looked up among the atom codes of the node, a negation or a conjunction is read off the rows of its subformulas, and holds if some extension of the node with guard has a child where holds, read off the row of . A second table records where every subformula ends, which locates the second conjunct of a conjunction. This is the recursion of the proof of the evaluation lemma over pairs of a subformula and a node. The answer is the entry of the first position at the root, which is the semantic core , whose correctness is . A cell takes time linear in the length of the input, so the time is a polynomial of degree three. Every value is at most a constant times the square of the input length, so word-length exponent suffices.
The proof is carried out for the notion , and transferred to through .