The condition required of a final program state when a program finishes under its precondition. The summation loop verification requires returned value to satisfy and preserves the input . Relating the answer to the original input matters: allowing the program to replace by zero would change the intended contract.
A postcondition alone gives no promise of algorithm termination. It also need not specify a unique output: allows many answers, while the exact triangular number equation determines one integer answer for each permitted . Stronger postconditions express more obligations; proving only a weaker consequence cannot justify the stronger requirement.

Articles by others on the same topic (1)

A postcondition is a specific condition or set of conditions that must be true after the execution of a particular operation, function, or block of code. It is part of programming and formal verification practices, particularly within the context of software development and design by contract. In a contract-based programming model, a method or function is described with three main components: 1. **Preconditions**: Conditions that must be true before the function is executed.