Proof of `Canonical form`
groundedproofs/Lax185574Proofs/CanonicalForm.lean · lax-185574
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 list of words into arrays, the entries one after the other with the start and the length of every word. It then selects the distinct words in increasing order: in round it scans all words and keeps the smallest one above the word selected in round , comparing words lexicographically entry by entry. The indices of the selected words are recorded, and finally their number and their frames are written. With words of total length , this takes steps, so cubic time in the length of the input. Every value the program produces is at most the length of the input plus its largest entry, so word-length exponent suffices.
The proof is carried out for the notion , and transferred to through .