Hi,
I'm implementing a Metamath verifier, and I am at the point of actually
verifying the proofs. I would like to support compressed proofs so that
I can directly verify
set.mm instead of first converting to normal
proof format.
I've been reading the section in the book about how the proof
compression format works. I'm confused by the explanation of the Z
character. Here is a quote from the book:
The letter Z indentifies (tags) a proof step that is identical to one
that occurs later on in the proof; it helps shorten the proof by not
requiring identical proof steps to be proved over and over again
(which happens often when building wff's).
And also:
When the compressed proof is converted to a normal proof, the entire
subproof of a step tagged with Z replaces the reference to that step.
I have two questions:
1. What is a subproof? I thought that uncompressed proofs are just
sequences of labels, so there doesn't seem to be enough structure for
steps to refer to a "subproof".
2. Should the compressed proof verifier skip running steps of a saved
subproof the second time it sees it? Given my first question, I don't
really understand what steps a subproof will contain, so I can't even
tel if skipping the duplicate steps would end up being sound. I would
have expected a verifier to operate on a stream of labels, and then the
uncompressed or compressed verifiers would merely be a fold over those
labels. However, if we skip sub-proofs, that means the compressed
verifier is not just a different representation, but also a different
algorithm.
I would greatly any explanation you can give.
Thanks,
Philip