Left to Prove | uniq Collapse adjacent equal lines Status: Open Seeds: 2000 Category: Text processing (first wave) Invocation: uniq Input domain: Use no options. Read byte lines from stdin under LC_ALL=C, each shorter than 2^20 bytes excluding LF. Treat a final line without LF as a line. Proof obligation: Emit exactly the first line of each maximal run of byte-identical lines, in input order, followed by LF. Repeated lines that occur in separate runs stay separate. Test cases: Empty input, blank lines, long runs, the sequence A, B, A, and a final line without LF. Outside this profile: Counting, skip flags, named files, locale-sensitive comparison, and I/O failures. Specification: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/uniq.html Reference: https://www.gnu.org/software/coreutils/manual/html_node/uniq-invocation.html Reference source: https://github.com/coreutils/coreutils/blob/v9.11/src/uniq.c Reference release: GNU Coreutils 9.11 (https://github.com/coreutils/coreutils/releases/tag/v9.11) Prerequisites: root.io: Byte I/O and argument forwarding (Proved) root.exit: Exit status (Tested, not proved) Subtasks: uniq.adjacent: Collapse adjacent runs (Proved; requires root.io; unblocks 1 target) Obligation graph: https://lefttoprove.com/obligations.json Task bundle: https://lefttoprove.com/bundles/uniq.json Proof replay: Specs.UniqContract.accepted (replayed) Rocq contract: https://github.com/bloom-directory/lefttoprove/blob/3440f400d235544fe816475adde8e55009e057c0/targets/uniq/Contract.v Rocq assumptions policy: https://github.com/bloom-directory/lefttoprove/blob/3440f400d235544fe816475adde8e55009e057c0/.github/assumptions-allowlist.txt Replay bundle and recorded assumptions: https://github.com/bloom-directory/lefttoprove/actions/runs/46701031785#artifacts Rocq statement: UniqContract.accepted (https://github.com/bloom-directory/lefttoprove/blob/main/targets/uniq/Contract.v) Specification replay from the contribution checkout: ./ltp check uniq Reference fixtures: https://github.com/bloom-directory/lefttoprove/blob/main/targets/uniq/fixtures.json Implementation replay command: sh targets/uniq/verify.sh Replay the current uniq milestone in the checker image, which sets WASMCERT. See SET UP THE CHECKER in https://lefttoprove.com/join.txt. Submission: https://github.com/bloom-directory/lefttoprove/compare Pull request metadata: Target: uniq Contribution: proof Contribution guidelines: https://lefttoprove.com/join.txt