>
in the long term we might want [...] proof verification
>
we should have verification that the proofs in the file are actually
correct, and while we're at it we may as well also ensure they have the
claimed length
The initial purpose of pmGenerator (before it even had that name) was to convert all proofs in pmproofs.txt into formula-based proofs,
and validate
them
along the way.
So, whenever a proof database is parsed, this comes with automated validation, and when reassembled, its proof steps are counted automatically and printed into the output file.
Thus an easy way to verify both correctness and lengths is to reassemble pmproofs.txt via '-a' without applying any replacements (i.e. referring to an empty replacements file), like
$ ./pmGenerator -a XY empty.txt pmproofs.txt pmproofs-reassembled.txt -l -d -w
and then comparing 'pmproofs.txt'
with 'pmproofs-reassembled.txt' to compare specified proof lengths.
The program should throw an error when any proofs are incorrect (if not, that'd be
an issue), and otherwise the user can subsequently check whether the result is the same as in the original file, excluding the header.
All file versions provided by me are verified by the tool, due to how they were processed and generated.
Exemplary output:
$ ./pmGenerator -a XY data/empty.txt data/pmproofs.txt data/pmproofs-reassembled.txt -l -d -w
Sun Jun 16 22:00:03 2024: Process started. [pid: 48532, tid:1]
Tasks:
1. applyReplacements("XY", "data/empty.txt", "data/pmproofs.txt", "data/pmproofs-reassembled.txt", false, true, true, true)
[Main]
Calling applyReplacements("XY", "data/empty.txt", "data/pmproofs.txt",
"data/pmproofs-reassembled.txt", false, true, true, true).
0.27 ms taken to read 0 shortening replacements and 0 styling replacements.
1.14 ms taken to read 196 condensed detachment proofs from file "data/pmproofs.txt".
0.00 ms taken to store 196 lengths.
0.03 ms taken to apply replacements.
202.27
ms taken to check, generate and save 54594 bytes of MM-styled condensed
detachment proofs (0 shortened, 0 styled, 196 unmodified) to
data/pmproofs-reassembled.txt.
Sun Jun 16 22:00:03 2024: Process terminated. [pid: 48532, tid:1]
Note: Omitting the '-w' will remove all line wrappings, which can make the individual D-proofs easier to use.
PS: Isn't drule.c (mentioned in the file's header) also able to validate all proofs in the file at once? I mean, it should, but maybe it just ignores some issues that can be ignored, like
incorrectly lining up multiple correct D-proofs..