Left to Prove | tail Take a suffix of lines Status: Open Seeds: 3000 Category: Streams Invocation: tail -n N Input domain: Read finite LF-terminated lines from stdin. N is a bounded nonnegative integer. Proof obligation: Emit the final min(N, line count) complete lines in input order. Use a rolling buffer with a documented limit and prove that dropping old lines cannot change the final suffix. Test cases: Zero, one, and more lines requested than present, repeated empty lines, and multiple buffer wraparounds. Outside this profile: Follow mode, byte mode, named files, resource exhaustion, and an unterminated last line. Specification: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/tail.html Reference: https://www.gnu.org/software/coreutils/manual/html_node/tail-invocation.html Reference source: https://github.com/coreutils/coreutils/blob/v9.11/src/tail.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/tail.json Implementation replay command: sh targets/tail/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: tail Contribution: proof Contribution guidelines: https://lefttoprove.com/join.txt