Issue #2552: Decision: does the prover derive what a function hands back as a fact for its callers (call results, ~60 sites of claim (b))

Open and answer this issue on GitHub.

decision · opened 2026-11-21 · updated 2026-11-21 · 0 comments

Part of #1053

What it is

About 60 unproved sites in the compiler’s Nikaia code stand under the reason a call’s result (figure of 2026-10-31 in #1053: 60 under prove-through-loops:on); an example is a function that returns an index or -1 (the_boundary, named in “Bounds reasons: split the catch-all by the form that blocks a site” #1105). The prover needs a fact about what the callee hands back. #1053 step 6 marked this “postconditions on a program’s own function: needs a decision paper when reached”. What is decided: a written assert before return is a postcondition, published as ensures (ADR-269 D17, D18); a private function takes as facts what all its callers prove about its arguments (ADR-391 D1, derived preconditions). No decision yet derives a postcondition from a body without a written assert, and #1053’s rule (owner, 2026-11-08) forbids writing an assert into the compiler’s code only to raise the figure.

The question: where a function no other package can call hands back a value its body bounds (every exit returns -1 or an index below a list’s length), does the prover derive that as a fact for its callers?

Options the text gives:

To build

  1. A decision paper: the two options with a probe of one real call-result site each, a recommendation, and, once decided, the ADR text and the build issue it files.

Done when

The question is decided (the ADR decision named) and its build is filed as its own issue, or this issue is closed naming why no build is needed.

Split from #1053 by Claude Code

Back to Open Issues