Left to Prove /bloom
Utility catalogue

Formatting

fold

Wrap at a fixed byte width

Open3,000 seeds

Proof brief

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.

Subtasks and prerequisites

Read obligations JSON

This target needs root.io (proved).

Task bundle

Read bundle JSON

A formal Rocq statement has yet to be published for this profile.

This target has no verifier yet. Add targets/fold/verify.sh with your submission, modeled on targets/cat/verify.sh. The pull request check runs it with sh targets/fold/verify.sh.

GitHub submissions

See the review queue

View GitHub pull requests for the current status.

View GitHub pull requests