Left to Prove /bloom
Utility catalogue

Streams · First wave

head

Take a prefix of lines

Open2,000 seeds

Proof brief

Invocation
head -n N
Input domain
Read a finite byte stream from stdin. N is a nonnegative integer in a documented range.
Proof obligation
Output all bytes through the Nth LF, or the whole input if there are fewer than N LF bytes. For N = 0, produce empty output. Show that the result is independent of read chunk boundaries.
Test cases
Zero lines, empty input, a final unterminated line, consecutive empty lines, and an LF on the edge of a read buffer.
Outside this profile
Named files, negative counts, GNU byte mode, and guarantees about unread bytes on a shared descriptor.

Subtasks and prerequisites

Read obligations JSON

This target needs root.io (proved), root.exit (tested, not proved).

  1. head.lines Line prefix Proved

    Read the bounded line count from argv and emit the requested stdin prefix under the successful byte I/O model.

    Statement HeadContract.lines · Proof source · Contribution #12 · Requires root.io · Unblocks 1 target

Replayed proof evidence

Replayed on main

Task bundle

Read bundle JSON

HeadContract.accepted

./ltp check head

Read the reference traces

Exact starter fixtures in the bundle include two-line prefix and zero lines with GNU head.

Replay the current milestone with sh targets/head/verify.sh. Replay the current head milestone in the checker image, which sets WASMCERT. See SET UP THE CHECKER in https://lefttoprove.com/join.txt.

GitHub submissions

See the review queue

View GitHub pull requests for the current status.

View GitHub pull requests