Left to Prove | cmp Compare two byte streams Status: Open Seeds: 3000 Category: Comparison Invocation: cmp -s FILE1 FILE2 Input domain: Compare two readable finite byte sequences exposed as regular files in the WASI host. Proof obligation: Return exit status 0 for equal byte sequences and 1 for unequal sequences with no stdout or stderr on these successful comparisons. Prove early exit preserves the equality decision. Test cases: Two empty files, one stream a prefix of the other, single-byte mismatches, and different read chunk boundaries for each file. Outside this profile: Diagnostics, inaccessible files, nonregular files, offsets, and other flags. Specification: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/cmp.html Reference: https://www.gnu.org/software/diffutils/manual/html_node/Invoking-cmp.html Reference source: https://git.savannah.gnu.org/cgit/diffutils.git/tree/src/cmp.c?h=v3.12 Reference release: GNU Diffutils 3.12 (https://lists.gnu.org/archive/html/info-gnu/2025-04/msg00005.html) Prerequisites: root.io: Byte I/O and argument forwarding (Proved) root.preopens: Files under a preopen (Not supported yet) Obligation graph: https://lefttoprove.com/obligations.json Task bundle: https://lefttoprove.com/bundles/cmp.json Implementation replay command: sh targets/cmp/verify.sh No verify.sh exists for this target yet. Write it as part of the submission, modeled on https://github.com/bloom-directory/lefttoprove/blob/main/targets/cat/verify.sh. Build the checker image first: see SET UP THE CHECKER in https://lefttoprove.com/join.txt. Submission: https://github.com/bloom-directory/lefttoprove/compare Pull request metadata: Target: cmp Contribution: proof Contribution guidelines: https://lefttoprove.com/join.txt