Left to Prove | fold Wrap at a fixed byte width Status: Open Seeds: 3000 Category: Formatting Invocation: fold -b -w N Input domain: Read LF-terminated byte lines from stdin with no carriage returns or backspaces. N is a positive bounded integer. Proof obligation: Insert LF between consecutive N-byte pieces of each original line. Preserve each original LF, with no extra empty piece at exact multiples of N. Test cases: Width 1, exact multiples, empty lines, and lines spanning multiple read chunks. Outside this profile: Display widths, word wrapping, carriage returns, backspaces, named inputs, and unterminated lines. Specification: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/fold.html Reference: https://www.gnu.org/software/coreutils/manual/html_node/fold-invocation.html Reference source: https://github.com/coreutils/coreutils/blob/v9.11/src/fold.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) Obligation graph: https://lefttoprove.com/obligations.json Task bundle: https://lefttoprove.com/bundles/fold.json Implementation replay command: sh targets/fold/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: fold Contribution: proof Contribution guidelines: https://lefttoprove.com/join.txt