Proof of `Lifting type trees through a merge`

groundedproofs/Lax185574Proofs/MergeLift.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 48 of this submission's paper

Description

The program is one pass over the tree followed by restoring canonical form, as in the proof of the merge lift lemma. The pass reads the tree and the colors PP and QQ, lists the nodes of the tree in breadth-first order, and writes for every node, from the last to the first, its transformed atoms and its extensions. An atom is transformed by replacing the color QQ by PP in every atom Y(x)Y(x) and dist(x,Y)<rdist(x, Y) < r. The guards are kept, and the child of an extension is referred to by the indices of the jobs of the child. Nothing is sorted in the pass. The canonical form is then restored from the leaves up by the program of the canonical form observation, called once for every set of the result (TreeCanon.treeCanonTreeCanon.treeCanon), which merges atoms that become equal. This is the semantic core mergeNodemergeNode, whose correctness is mergeNodenodemergeNode_node. No tree grows, so the time is polynomial in the length of the input.

The proof is carried out for the notion Lax185574.Computing.ComputesLax185574.Computing.Computes, and transferred to Lax185574.Algorithms.Algorithm.ComputesLax185574.Algorithms.Algorithm.Computes through Lax185574Proofs.InterfaceLax185574Proofs.Interface.